Small 6809-BASIC for 6809 CoPro =============================== Only dependant on OSWRCH and OSRDCH for character I/O, and OSBYTE for INKEY and to clear Escapes. If you make sure the EXBAS09 file has load and execution addresses set to 8000 you can run it with: *RUN EXBAS09 or *EXBAS09 This should then start up with: 6809 EXTENDED BASIC (C)1982 MICROSOFT OK If you have a *GO command, you can also use the following to load EXBAS09 to memory and enter at &8000: *LOAD EXBAS09 8000 *GO 8000 LOAD and SAVE will load and save Basic programs as binary files. You can also load and save programs as text with *EXEC and *SPOOL. To save a program as text do: *SPOOL filename LIST *SPOOL To load a program as text, do: NEW *EXEC filename Commands available ------------------ CLEAR CLS CONT DATA DEL startline,endline DIM EDIT END EXEC addr FOR var=start TO end [STEP step] GOTO line GOSUB line IF test THEN statements ELSE statements INPUT LIST LOAD NEXT var NEW ON POKE addr,num PRINT READ RENUM increment RESTORE linenum REM comment RETURN RUN [linenum] SAVE STOP TROFF TRON VDU commands can be sent with CHR$, for instance PRINT CHR$22;CHR$7; to perform MODE 7 or PRINT CHR$17;CHR$1; to perform COLOUR 1. Functions available ------------------- SGN INT ABS USR RND SIN PEEK LEN STR$ VAL ASC CHR$ ATN COS TAN EXP FIX LOG POS SQR HEX$ LEFT$ RIGHT$ MID$ INKEY$ MEM VARPTR INSTR STRING$ &Hhex &Ooct Machine code ------------ EXEC loads the registers with the contents of locations 160 to 169 ($A0-$A9) and saves the returned registers in the same locations: $A0 160 CC $A1 161 A $A2 162 B $A3 163 DP $A4 164 XHI $A5 165 XLO $A6 166 YHI $A7 167 YLO $A8 168 UHI $A9 169 ULO Notes ----- EXBAS09 has the following modifications to interface to the Tube MOS: * Escape flag polled and acknowledged with OSBYTE 126 * ADVAL(-1) called to check for pending keypress for Ctrl-C to stop * BRKV claimed to catch and report host errors * *commands passed to OSCLI * OSBYTE &84 is called to find the top of user memory * LOAD and SAVE call OSFILE EXBAS09 has a valid code header, so could be put in a sideways ROM/RAM and entered with *FX142,.