SmallBASIC
Current version: 0.8.1

Platform:	PalmOS 3.1+
			Unix (console, framebuffer, svgalib, sdl, X)
			Win32 (GUI, console)
			DOS (djgpp)

http://smallbasic.sourceforge.net

Developers
----------
Nicholas Christopoulos		wired_gr@yahoo.com			ndc
Gary A. Clark				clarkg@fireserve.net		gac
Bob Riess					riessb@usa.net				bob

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.8.1
--------------------------------------------------------------------------------------------------------------------------------
2002-03-31: ndc
	finish: OPTION-styles, new PREDEF QUITE,COMMAND
	modify: system string-variables are now accepted with both names
            (with or without $ suffix)
	new option: -h[page][-command]

2002-03-25: ndc
	new operator: LIKE
	new proc: DIRWALK
	new func: CHOP()

2002-02-27: ndc
	bug fix: memo (palmos) open/write 

2002-02-22: ndc
	bug fix: pdoc's garbages are now dead (for desktop)
	update: setting backup-bit in user files and pdocs
	update: IN operator priority changed to 'compare'
	new: MDL operator (a%b+b*(sgn(a)<>sgn(b)))

2002-02-??: Earle's port

2002-02-??: Chris's port

2002-01-28: ndc

2002-01-28: ndc
	bug fix: cat() on 16bit, thanks to Frantesik
	very fast and small memory handles emulation (for 'limited' systems)

2002-01-13: ndc
	changes for porting: dev_getenv()/dev_putenv() at device.c
	bug fix: env() function fixed, env command also fixed

2002-01-04: ndc
	bug fix: operators && and || was on different op-category...
	bug fix: small memory leak on string->number convertion inside
	--eval.c module. That causes PalmOS fatal error!!!

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.8.0
--------------------------------------------------------------------------------------------------------------------------------
2001-12-27: ndc 
	bug fix: memo vfs driver: deleted files, no null-char on read

2001-12-??: ndc 
	new: split with pairs

2001-12-11: ndc 
	new: IN operator (not the FOR-IN)
	new: ISNUMER(), ISSTRING()
	new: ENCLOSE(), DISCLOSE() (also, its part of SPLIT)
	bug fix: memory leak (GOTO)
	new: terminal driver (old code for command-line is removed)

2001-12-10: ndc 
	new: DEF FN compatible command (single-line functions)
	-- to support this, I made the DEF; an alias of FUNC 
	-- so, FUNC f(x) = sin(x)
	-- and DEF  f(x) = sin(x)
	-- is now acceptable
	new: bitwise operators NAND,NOR,XNOR,EQV,IMP
	-- it needs checks
	new: parameter parser (RT)
	update: FORMAT, console-codes (\e[nG)
	new: RINSTR, SPRINT

2001-12-08: ndc 
	linux: modules support (external C/C++ libraries)
	new: true color is supported for modes >8bit
	new: RGB() RGBF()
	change: KILL does not create RTE if there is no file
	-- It is very annoying on Linux
	update: svga & sdl (colors, some minor bugs)
	change: LOADLN/SAVELN changed to TLOAD,TSAVE
	-- I don't want to use LOAD/SAVE, also,
	-- I want common names, like BLOAD/BSAVE
	change: &&, || = logical ops (like C)
	new:    &, |, ~ = binary ops (like C)
	new:	& = join code lines (like the \ on C)
	change:	SB limits are changed

2001-12-07: ndc 
	default name on Unices changed to sbasic instead of sbrun
	update: everything is working on 32bits now
	-- 16b version can be produced by using OS_ADDR16
	-- For PalmOS users the 32b means less memory...
	change: xmax, ymax returns now the width-1,height-1
	-- its more logical

2001-12-05: ndc 
	update: +/-INF and +/-0 for real-to-string (PRINT included)

2001-12-03: ndc 
	update: PalmOS IDE: several changes, include auto-goto error-line
	new: APPEND, DELETE, INSERT
	new: PalmOS scripts (thanks to Frantisek Dufka)
	change: ANSI console code for 'reset' does not 
	-- changes the font.

2001-12-02: ndc 
	new: dev_gets() (INPUT)
	-- On Palms: schedule=delete, phone=left, todo=right
	-- possible problems with multibyte charsets, 
	-- var-font: minor problems with multiple lines
	update: PSET,LINE,RECT,VIEW,WINDOW... graphics commands
	changed: LOCATE coordinates starting from 1

2001-12-01: ndc 
	new: SEARCH
	new: CHMOD
	update: compiler: PASS2 errors, more info

2001-11-30: ndc 
	new: SQUEEZE()
	some more compiler/RTL checks
	new: ISARRAY()
	new: ++ and -- pseudo-operators
	bug fix: file size on Unix
	new: COMMAND$ system variable
	update: STOP/END parameter added

2001-11-29: ndc 
	new: FORMAT, PRINT USING and new FTA function (print numbers)
	alias: LINE INPUT (with space) is now acceptable
	INTEGRAL keyword removed

2001-11-28: ndc & bob
	bug fix: EXIT inside function
	new: ISDIR, ISFILE, ISLINK, ACCESS
	new: IF function: IF(condition,true-value,false-value)
	new: operator << (append to array)
	new: REDIM (resizes an existing array. its works only for 1-dim arrays)

2001-11-27: ndc & bob
	changes: ROUND(-1.5) returns -2
	changes: MOD (changed to fmod())
	bug fix: INT, FIX - negative values
	new: FRAC, CEIL, FLOOR
	changes: scientific notation E supports xE{+|-}{praxis=+-*/\^}{y}
	---valid: 1E1 (1*10^1), 1E-1 (1*10^-1), 1E--1 (1-1), 1E-/2 (1/2)
	---invalid (nested E, complex expressions, variables): 1E-+2E--4, 1E-+int(2.2)
	---if I write an eval() then it will do more things :)
	new: LINEINPUT (new alias: LINP) works on console, too
	bug fix: PAUSE n (after an key-interrupt; now clears keyboad-buffer)
	bug fix: WEEKDAY
	bug fix: STATs I was made some stupids things here, now it is working again
	---(QB: DEF FNxxx - END, later will be added the inline DEF FN)

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.7.1
--------------------------------------------------------------------------------------------------------------------------------

2001-11-24: ndc
	changes: LINEQGJ (Gauss-Jordan) renamed to LINEQN
	new: DIFFEQN

2001-11-23: ndc
	new: JULIAN(dmy_string | d, m, y)
	new: DATEFMT(format, dmy_str | d, m, y | julian)
	new: WEEKDAY(dmy_str | d, m, y | julian)
	new: DATEMDY dmy_str | julian, byref d, byref m, byref y
	new: ROOT
	new: SORT (quick sort)

2001-11-22: ndc
	bug fix: Palm's ftostr(), round bug (59.9999999/60 was 0.1 instead of 1) (Thanks Bob :)
	bug fix: Palm IDE: Goto line 1
	bug fix: spaces on parameters (i.e. BYREF bug)
	changes on SPLIT (spaces now counts as delimiters)
	SPLIT supports the USE keyword
	new: TRIM()
	new: INTEGRAL

2001-11-19: ndc
	changes: COM ports 0-9 (COM1:,COM5:,etc)
	PalmOS IDE: categories (edit, delete, rename)
	PalmOS IDE: it does not delete the bytecode (Menu->Pref->Options)
	PalmOS IDE: line numbers on editor
	bug fix: VM (CALL_UDF) (4 bytes instead of 2)
	new: DERIV

2001-11-18: ndc
	changes: DIM A(10):A=1 is valid now... (convertion from array to integer)
	changes on LEN(), INPUT
	bug fix: EMPTY()
	bug fix: '_' its works again in the sub-routines names
	new: DETERM(A[,tol])
	new: LOADLN file, array
	new: SAVELN file, array
	bug fix: binary READ/WRITE commands
	new: FOR var IN array - NEXT
	command-line: quite flag (-q); No "* DONE *", no compiler messages
	bug fix: Unix OS Name

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.7.0a
--------------------------------------------------------------------------------------------------------------------------------
2001-11-07: ndc
	PalmOS: crash with MemoDB deleted/locked records

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.6.1-0.7.0
--------------------------------------------------------------------------------------------------------------------------------
2001-11-06: ndc
	SB web-site: recovery...

2001-11-05: ndc
2001-11-04:
	after hard-disk failure... recover and check
	bug fix: WinXP: sound driver, SBPad forms background color

2001-??-??: ndc
	bug fix: there was a bug on compiler (strchr("1233567890"...))
			 so '4' was not a number in that case! Thanks Bob.

2001-08-31: ndc
	Win32 version (SBPad): sound & serial drivers
	bug fix: REPEAT/UNTIL/EXIT: next/exit IP was wrong
	
2001-08-30: ndc
	Win32 version (SBPad) 
2001-08-29: ndc
	Win32 version (console/GUI/SBPad) 
2001-08-28: ndc
	INVERSE(MATRIX) added

2001-08-14: ndc
    dev_xf.c driver for X (based on generic framebuffer) added (only for 16bit color modes)

    Generic framebuffer driver (actually its provides osd routines for memory; any 'parent'
    --driver can (osd_refresh()) dump this memory to video ram)
    --In most cases this is faster than direct access (especially for scrolling)
    --refresh rate is specified by events check (every ~50ms; that means ~20 fps)

2001-08-11: ndc
    DOS support added (two drivers: direct video-ram (faster but buggy, no mouse) & GRX20):
    --This is for 32bit DOS (DJGPP)
    --That means there needed one DPMI driver (under windows DPMI is supported). 
    --For clean DOS you can use one of delorie's DPMI (free) programs or other (read DJGPP's FAQ)
    --CPU 80386 or newer is needed 
    --Long-filenames are supported only under windows (read also DJGPP's FAQ, especially for NT)
    --NO TCP/IP

    Statistical/generic functions are added: (thanks to Yannis Dondos (dondos@otenet.gr))
	ABSMIN, ABSMAX, SUMSQ, SUM, STATMEANDEV, STATMEAN, STATSPREADS, STATSPREADP

2001-08-09: ndc
    RUN() function added (returns the stdout of the command)
    HOME system variable added (user's directory)
    CWD system variable added (current working directory)
    CHDIR/MKDIR/RMDIR: only for non-palmos

    SOCL FS: socket client (virtual file system) added
    --This driver its not tested on PalmOS...
    --Only OPEN,CLOSE,READ,WRITE,EOF() are implemented

2001-08-08: ndc
    READ/WRITE command set: binary read/write to a file (for variables)
    bug fix: INSTR (caseless compare changed to case sensitive)
    POINT(): 0,1 functions added (returns the current graphics X/Y position)

    PalmOS IDE: import/export to/from PDOC
    PalmOS IDE: import/export to/from Memo

    PDOC FS:
	--filesystem emulation for PDOC files. (use OPEN "PDOC:filename")
	--Under non-palmos OSes, files PDoc_* are created in the current directory for emulation.
    --These files are real compressed PDB/PDOC files (you can hotsync them)
    --FILES() for PDOCFS: FILES("PDOC:*")
    --PDOC FS opens and uncompress the file on OPEN; and compress the file on CLOSE

    bug fix: memory leak on PRINT for files
    bug fix: PalmOS IDE, UserFileViewer save file

2001-08-06: ndc
    MemoDB FS:
	--filesystem emulation for memodb. (use OPEN "MEMO:memo-title")
	--the memo-record size is limited to 4000-65 bytes (the 65 bytes are reserved for the 'filename' + \n)
	--Under non-palmos OSes, files Memo_* are created in the current directory for emulation
    --FILES() for MEMOFS: FILES("MEMO:*")

    bug fix: FS auto-close files

2001-08-05: ndc
    RTE ... --- custom run-time-error (its working like PRINT command)
    PROGLINE --- returns the current source-line number (user's program)
    Unix: some /proc info are added
    EMPTY(x) -- used for variables
    FS: A lot of changes on file.c
    --Actually FS is working with more clever way now. Its supports multiple fs-drivers with mount/umount logic.

2001-08-04: ndc
    Trying to support nested arrays.
	--There are some problems with nested arrays.
	--Nested arrays are not visible to SB compiler so
	--SB does not stores optimized info for them.
	--(in few cases arrays will copied more than once on memory)

    console,file,log PRINT are using the same code for writting vars

2001-08-01: ndc
    PalmOS driver: some changes on the LOCATE
    FILES(x)
    LEN(x) now supports arrays too
    ENVIRON str, ENVIRON$("var") --- (non-palmos) environment variables
    SPC(x) --- alias of SPACE$(x)
    REPLACE$(s1,pos,s2[,len])
    LEFTOF$(s1,s2), LEFTOFLAST$(s1,s2)
    RIGHTOF$(s1,s2), RIGHTOFLAST$(s1,s2)

2001-07-31: ndc
    PalmOS: stack increased by 4KB (that means -4KB for BASIC progs)
    Fill for DRAWPOLY added (FILLED keyword)

    new framebuffer driver 
    --I wrote a new one without using any library (8,15,16,24,32 color modes);
	--its very stable in kernel 2.4.4 and its working very nice in console.
	--So, this is the default driver for unix (instead of svgalib)
	--note: scroll is slow

    several fixes on SDL driver
    bug fix: eval: "-"+40 now returns string "-40"
    bug fix: OSS driver now checks if /dev/dsp is available

    PalmOS IDE: 'restart' does not compile the source now

2001-07-29: ndc
    PalmOS driver: direct video-access (used instead of PalmOS APIs routines)
    --its faster :)

2001-07-25: ndc
    JOIN array(), delim, dest-var
    LINEQGJ(A,B[,toler])    (thanks to Yannis Dondos (dondos@otenet.gr)
    Arrays ops: [col,col,...[; col,col...]]
	define an array at code
ex:
	d=[1,2] ' 2
	d=[1;2] ' 2x1
	d=[11,12;21;cos(a)] ' 3x2
	d=[1;21,2+2] ' 2x2
	d=[1,2;3,4] ' 2x2 

    Matrices: (A-Z=arrays): A=2*B;B=-B;C=D*E;A=B+C;D=A-B
ex:
	a = [-3,  0; 2, -1]
	b = [ 4, -2; 3,  5]
	print a; " x "; b; " = "; a * b

    new: PRINT displays arrays now
    Bit-ops: BAND (AND), BOR (OR)

2001-07-23: ndc
	bug fix: RECT with out fill (diag. line)

2001-06-03: ndc
	bug fix: EXIT (REPEAT/UNTIL)
	VIEW,WINDOW

2001-06-01: ndc
	vector graphics:
		PTSIGN, PTDIST, PTDISTSEG, SEGLEN, SEGCOS, SEGSIN, INTERSECT
		M3IDENT, M3ROTATE, M3SCALE, M3TRANS, M3APPLY
		POLYEXT, POLYAREA
	bug fix: SPLIT: empty strings

2001-05-28: ndc
	bug fix: PAUSE seconds
	bug fix: var/label/proc names with '_'
	bug fix: delete section
	bug fix: &H prefix
	EVAL's stack is dynamic now
	Backup bit is enabled after copy/rename

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.6.0
--------------------------------------------------------------------------------------------------------------------------------
2001-05-13: ndc
	bug fix: v_set array copy
	backup-bit is enabled when the source file is modified
	Scientific notation added (both in code and in run-time (input))

2001-05-07: ndc
	#inc:file - #include for BASIC :)
	Background sound
	System events check changed (now works with ticks, checked every 50ms)

2001-05-06: ndc
	SPLIT str, del, v() - split text
	COPY/RENAME filename, newfilename - added
	ERASE array1, ... - destroy arrays
	bug fix: multi-dim arrays (dim > 1; element 0 returns the correct ptr)
	INPUT #N, ... - INPUT for files added
	Memory optimization (I got ~6-10KB for executor)
	Virtual Memory & Virtual Memory Tables (only for compiler; maybe later I'll add routines like VMDIM and VMLOCAL)
	UserFile Viewer - users can view/edit their files (up to 32KB)
	logfile support (LOGPRINT added for users)

2001-05-03: ndc
	INPUT$(len[,fileN]) - added
	Serial I/O added (OPEN "COM1:")	
	EXIT [FOR|LOOP|SUB|FUNC] - added
	pdb2bas & bas2pdb supports sections (up to 256 sections, up to 1MB text)
	Arrays & vars with the same name does not supported any more
	Assign arrays "DIM A(4):B()=A()"

2001-05-02: ndc
	SUB/FUNC code finshed
	LOCAL keyword added (dynamic local variables)
	DECLARE keyword added (declaration needed for multiple-sections, every section acts as module now)

2001-05-01: ndc
	bug fix: PLAY
	PEN(3) now supported

    These sound drivers does not working well. I just dont know anything about soundcards.
	DSP sound driver for Linux, added
	SDL sound driver...

2001-04-29: ndc
	PROC/FUNC - starting (todo: JMPs before & after, run-time code)
	A lot of changes on compiler (I can't write real compiler, there are a lot memory problems)

2001-04-16: ndc
	bug-fix: WHILE/WEND nested blocks

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.5.8
--------------------------------------------------------------------------------------------------------------------------------
2001-04-02: ndc
	DRAWPOLY array() added
	TRUE/FALSE system constants added
	LINECHART,BARCHART system constants added
	CHART added
	SVGALIB - clipping is now enabled
	a few syntax checks added

2001-03-30: ndc
	MAX/MIN added

2001-03-18: ndc
	bug fix: eq with doubles ((1=12/10) now returns false)
		this is the FOR-NEXT problem with fps
	bug fix: run-time error if the user had not allocate memory for arrays (DIM)

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.5.7
--------------------------------------------------------------------------------------------------------------------------------

2001-03-10: ndc
	Some minor bugs of multibyte charsets

2001-03-09: ndc
	Big5 charset support added - thanks to Daniel Yuan-Chih Lin (dan.lin@bigfoot.com)
	Generic multibyte support added
	bug fix: SOUND & BEEP volume

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.5.6
--------------------------------------------------------------------------------------------------------------------------------

2001-03-03: ndc
	SDL driver added
	Win32 port

2001-02-28: ndc
	Basic FILE I/O

2001-02-27: ndc
	circle's code is beautiful now.

2001-02-25: ndc
	4bit gray-colors are supported now (PalmOS 3.30 only!)
	8bit vga16 hi-colors are fixed
	bug fix: STR$()
	INPUT supports more variables

2001-02-24: ndc
	console supports more fonts now ("\e[8xm" x=0..7 for system fonts, "\e[9xm" x=0..4 for SB's fonts)
	console supports colors 
		("\e[3xm" x=0..7 ANSI foreground colors)
		("\e[4xm" x=0..7 ANSI background colors)
	RUN command added
	system variables (see: setsysvar_int|num|str)
		OSVER	- OS version (ex: 0x350 for PalmOS 3.5)
		OSNAME	- OS name
		SBVER	- SmallBASIC version (ex: if sbver < &H506 then ? "RQ 0.5.6+")
		PI      - 3.14..
		XMAX,YMAX - graphics display maximum x & y
		BPP     - bits per pixel
	TXTW(s),TXTH(s) added (text font width & height)
	X/Win driver added (it needs work, but you can see a preview)

2001-02-22: ndc
	SJIS (Japanese) charset support, thanks to Toshiya Fujii (araiguma@earthlink.net)
	INPUT stores numeric values if the input-string is a number
	new method for Palm's PEN events
	new key codes (new keys FIND & CALC)
	Arrays & common variables with the same names are acceptable now
		I don't like it, but its needed (GWBASIC compatibility).
	DATA skips its code, does not need the first RESTORE any more, strings (DATA) does needs quotes
	bug fix: (\) integer division operator is now recognized
	CIRCLE & ARC are working now, but the algorithms are bad. I think 'aspect' does not working well
	DRAW added (not all commands) - UNTESTED
	PLAY added - Someone must check the compatibility (QB).

2001-02-20: ndc
	STKDUMP	added
	Several changes on IDE (like fastest scroll)

2001-02-19: ndc
	bug fix: IDE text field focus

2001-02-16: ndc
	bug fix: beam
	More launch types are supported (useful for Launchers)
	CAT(x) added, LOCATE y,x added
	ON x GOTO ... and ON x GOSUB added ...	(warning: goto has problems with the stack)

2001-02-14: ndc
	Platform API
	new method for expressions (ceval, eval modules)

2001-02-12: ndc
	Color support added

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.5.5
--------------------------------------------------------------------------------------------------------------------------------

2001-02-11: ndc
	decompiler (unix version, -s option)
	Several bugs of pseudo-compiler are fixed
	Pseudo-compiler: PASS2 supports GOTO shits (stack)
	More QB compatibility support
	New icons
	v_add() auto type convertion changed (NUM has priority)
	bug fix: INKEY & INPUT hardware keys codes (again?)

2001-02-09: ndc
	scan & brun: speed optimization ("little/big-endian" convertion code removed)
	INLINE-IF added (nested inline-if does not suppored). Syntax: IF x THEN [numeric-label]|[...] [ELSE [numeric-label]|[...]]
	?bug? fix: PEN(0) - (pen status) starts with status 0 (after a PEN ON command the PEN(0) was 1)
	bug fix: READ/DATA with arrays 
	bug fix: code_getvarptr() fixed. Now we can use arrays without fear :)
	bug fix: numeric labels without command next to it
	bug fix: LET|CONST next to label (ERROR: LET IS KEYWORD)
	bug fix: finaly the '$' is dead (I hope :). (That means LEFT(x,1) = LEFT$(x,1) but x$ <> x)
	bug fix: console supports \r
	bug fix: PAUSE command (it was removed!)

2001-02-08: ndc
	bug fix: BREAK for INPUT
	Unix <-> win32 (u2d, d2u, mksmall) convertion utilities
	C Headers & data-types changed;	Makefile, .rcp, README: minor changes; proc.h callback.h bcode.h: removed
	SB small icon, thanks to Christian G. Hvltje

2001-02-07: Gary A. Clark - clarkg@fireserve.net
	bug fix: READing strings now works
	bug fix: Crash when 'Save As' same file name (Rename did same)

2001-02-06: 0.5.5 Gary A. Clark - clarkg@fireserve.net
	Convert to SDK 3.5 using PalmCompatibility.h
	bug fix: Hardware keys caused INKEY$ to always return nothing
	bug fix: VAL(), OCT$(), MID$() and RTRIM$() now work correctly

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.5.4a
--------------------------------------------------------------------------------------------------------------------------------

2001-02-04: 0.5.4a ndc
	bug fix: last-line text without lf, thanks to Gary Clark
	Hardware keys supported (keys: 0x101 (up) 0x102 (dn) 0x103 (#1) 0x104 (#2) 0x105 (#3) BREAK (#4))

2001-02-04: 0.5.4 ndc
	bug fix: PalmOS 3.1 fatal exception, Thanks to Christian G. Hltje
	bug fix: PalmOS 3.1 WinDrawChar (displays garbage) changed to WinDrawChars
	bug fix: BASIC file header (version & signature)
	Save & Run (S&R) button (EDIT-FORM)
	New utilities: pdb2bas & bas2pdb for unix console, win32 console & win32 GUI
	PEN	support added (QB lightpen compatible)
		PEN ON|OFF, x=PEN(y)
			where y:0 = status
					1 = pen-down x, 2 = pen-down y
					3 = M$ shit (QBasic)
					4 = current x, 5 = current y
	DIM supports more variables now

--------------------------------------------------------------------------------------------------------------------------------
VERSION 0.5.3
--------------------------------------------------------------------------------------------------------------------------------

2001-01-22: 0.5.3 ndc
	more remarks

2000-05-??:	0.5.3 ndc
	version 0.5.3 ready


