6809/6811/8912 API Entries ========================== $0365-$036F Acorn System entries $F800-$F8xx BIOS API entries $F870-$F87F Acorn System entries $FF80-$FFFF Acorn API entries BIOS API entry block at F800 ============================= $F800 COLD cold start $F802 WARM warm start $F804 INCH character input $F806 INCHE character input with echo $F808 INCHECK test for character input $F80A OUTCH character output $F80C PDATA output string until EOT $F80E PCRLF output CR/LF $F810 PSTRING output CR/LF then string until EOT $F812 LRA Load Real Address $F814 WARMS FLEX compatibile WARMS entry JSR [$F800] - COLD: cold start ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: no parameters call does not return JSR [$F802] - WARM: warm start ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: no parameters call does not return JSR [$F804] - INCH: wait for character input ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: no parameters A=input character JSR [$F806] - INCHE: wait character input with echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: no parameters A=input character will be echoed to the display JSR [$F808] - INCHECK: test for character input ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: no parameters EQ: no input character pending NE: input character pending JSR [$F80A] - OUTCH: character output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: A=character A=preserved JSR [$F80C] - PDATA: output string until termining $04 byte ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: X=>string X=>after the terminating $04 A= $04 JSR [$F80E] - PCRLF: output CR/LF ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: no parameters A=corrupted JSR [$F810] - PSTRING: output CR/LF then string until termining $04 byte ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: X=>string X=>after the terminating $04 A= $04 JSR [$F812] - LRA: Load Real Address ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: X=logical address X=b0-b15 of physical address A=b16-b23 of physical address JMP $F814 - WARMS: FLEX compatibile WARMS entry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: no parameters call does not return Acorn 6809 Card Monitor API =========================== JSR [$0365] OSWRCH Console output JSR [$0367] OSRDCH Console input JSR [$0369] OSBPUT Cassette output JSR [$036B] OSBGET Cassette input JSR [$036D] OSPRNT Printer output JSR $F871 OSCLI Execute command line JSR [$0365] OSWRCH: Send character to display ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: A=character to display all preserved JSR [$0367] OSRDCH: Wait for character from keyboard ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: none A=character from keyboard buffer ECHOF $0360 must be set to $00 JSR [$036D] OSPRNT: Send character to printer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: A=character to print all preserved JSR [$0369] OSBPUT: Send byte to file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: A=byte to write all preserved JSR [$036B] OSBGET: Read byte from file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: none A=byte read JSR $F871 OSCLI: Execute command line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On entry: On exit: X=>command line, X=corrupted ends with <00> A=$00 Ok, A<>$00 Error Acorn MOS system entry points ============================= Called with JMP addr or JSR addr. OS_CLI $FFF7 Execute -terminated command string pointed to by X. On return, A may have a return value with A=0 being 'ok'. OSBYTE $FFF4 Read/write information passed in A, X, Y. On return, b0-b7 of Y is copied to b8-b16 of X so that X can be used as a 16-bit value. OSWORD $FFF1 Read/write information passed in control block at X, function in A. Note: address of text buffer in X+0,X+1 in OSWORD 0 is native 68xx big-endian address. All other calls use control block contents as specified for the BBC host. OSWORD 0 returns values in Y and Carry. Acorn MOS character entry points -------------------------------- OSWRCH $FFEE Writes raw character to output stream. OSWRCR $FFEC Writes to output stream. OSNEWL $FFE7 Writes newline sequence to output stream. OSASCI $FFE3 Writes ASCII character in A to output stream. OSRDCH $FFE0 Waits for character from input, returns in A and Carry. Acorn MOS file entry points --------------------------- OSFILE $FFDD OSFILE with A=function, X=>control block. Returns A=result, control block updated, X preserved. OSARGS $FFDA Calls OSARGS with A=function, Y=channel, X=>control block. Returns A=result, control block updated, X and Y preserved. OSBGET $FFD7 Reads a byte from the channel in Y. Returns character in A and EOF in Carry, Y preserved. OSBPUT $FFD4 Writes byte in A to channel in Y. Returns A and Y preserved. OSGBPB $FFD1 Calls OSGBPB with A=function, X=>control block. Returns A=result, Cy=EOF, control block updated, X preserved. OSFIND $FFCE Calls OSFIND with A=0 and Y=channel or A<>0 and X=>filename. Returns A=0 or channel, X and Y preserved. Acorn 6809 MOS entry points --------------------------- OSINIT $FFBF Initialise error handler and other environment settings. On entry, A=$00 to become the current program A=$FF to read the current settings Returns X=>BRKV, Y=>ESCFLG, DP=>Direct Page, A,B=various CC set from contents of A on return A.b7=1: little-endian filing system calls (CC=MI) A.b7=0: big-endian filing system calls (CC=PL) This must be called by application code as part of its startup, before writing anything to memory. Before making this call, code does not known where BRKV and ESCFLG are, as they can be anywhere in memory. OSERROR $FFBC Generate an inline error. Can be used when not possible to generate an error with SWI. Entered with the address of the error block on the stack. OSQUIT $FFB9 Quit current process, A=return value. Returns to any calling process. By default, returns to the Supervisor. PRTEXT $FFB3 Print inline text terminated with $00. Execution continues after the $00 terminator. On return, A=$00. USERINT $FFB0 Pass on FIRQs if not Tube FIRQ. PR2HEX $FFAD Print X as 16-bit hex. On return A/B is corrupted. PR1HEX $FFAA Print A as 8-bit hex. On return A is corrupted. SCANHEX $FFA1 Scan line at X for hex number. Returns Y=number, X=>terminating character, D corrupted. PRSTRING $FF9B Print text at X terminated with $00. Returns A=$00, X=>byte after terminating $00 so multiple strings can be called by multiple calls to PRSTRING.