Splitting the Atom back exit forward page 24
FDEC Scroll-screen check, looks to see if the next character would cause a scroll, checks the page mode counter (?E6), and executes a scroll or waits for a keypress.
FE08 - Scroll the screen. Entry at FE0A with Y=40 will scroll all but the top line of the screen. Y-60 leaves the top two lines alone, etc.
FE22 - delete all current line.
FE24 - blank Y+1 characters in current line.
FE26 - fill Y+1 characters from current line onward with the character in the accumulator.
FE35 - Check Next Cursor Position, called by Backspace and Delete to see if the cursor is at the beginning of a line or Home position,
FE52 to FE65 Routine to print a character. This is indirected by (208), called by the OSWRCH at FFF4.
FE52 - Pass character to VIA printer, and execute.
FE55 - Pass character on screen or execute any recognisable control codes. X and Y registers preserved.
FE66 to FE70 A subroutine to synchronise to CRT Field Flyback, used to write on the screen without generating noise. Can be used as a timer.
FE66 - wait until the start of the next field flyback, even if already in flyback.
FE6B - return immediately if already in flyback, else wait until the next flyback. A, X, Y all preserved.
FE71 to FE93 The Keyscan Subroutine called by OSRDCH (see below). Does not examine <CTRL>, <SHIFT>, <RPT> or <BREAK>. It returns with the carry flag set if no key was pressed. If a key was pressed when this routine was called, the carry flag is cleared and the Y register holds the key pressed as its ASCII value minus hex 20.
FE94 to FECA OSRDCH Subroutine. This routine waits for a key to be pressed and then returns with its ASCII value in the accumulator. Cursor and some other control codes are executed BEFORE returning.
FECB to FEFA Data and look-up tables for executing control codes.
FEFB to FF3E A subroutine called by OSWRCH to pass the value of the accumulator to the printer using the VIA. <CTRL> B and C enable or disable this routine respectively.
FF10 - waits for handshake signal (see chapter 7).
FF3F to FF99 RESET - the machine comes here after hitting <BREAK> or at switch-on, by picking up the reset address at FFFC (common to all 6502 microprocessors).
FF3F - initialise page 2 vectors (204 and up)
FF4A - set stack pointer to FF.
FF53 - set all array pointers to FFFF.
FF69 - print message 'ACORN ATOM'.
FF7C - test for RAM at 2900, and set text pointer to default values if appropriate.
FF9A to FFB1 Data used by the RESET routine to initialise page two vectors.

back exit forward