The Firmware Indirections


&BDCDTXT DRAW CURSOR
ActionPlaces the cursor on the screen, if the cursor is enabled
EntryNo entry conditions
ExitAF is corrupt, and all other registers are preserved
NotesThe cursor is an inverse blob which appears at the current text position
&BDD0TXT UNDRAW CURSOR
ActionRemoves the cursor from the screen, if the cursor is enabled
EntryNo entry conditions
ExitAF is corrupt, and all the other registers are preserved
&BDD3TXT WRITE CHAR
ActionWrites a character onto the screen
EntryA holds the character to be wntten, H holds the physical column number, and L holds the physical line number
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved
&BDD6TXT UNWRITE
ActionReads a character from the screen
EntryH contains the physical column number, and L contains the physical line number to read from
ExitIf a character was found, then Carry is true, and A contains the character; if no character was found, then Carry is false, and A contains zero; in either case, BC, DE, HL and the other nags are corrupt, and all other registers are preserved
NotesThis routine works by comparing the image on the screen with the character matrices; therefore if the character matrices have been altered the routine may not find a readable a character
&BDD9TXT OUT ACTION
ActionWrites a character to the screen or obeys a control code (&00 to &1F)
EntryA contains the character or code
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved
NotesControl codes may take a maximum of nine parameters; when a control code is found, the required number of parameters is read into the control code buffer, and then the control code is acted upon; if the graphics character wnte mode is enabled, then characters and codes are printed using the graphics VDU; when using the graphics VDU control codes are printed and not obeyed
&BDDCGRA PLOT
ActionPlots a point in the current graphics PEN
EntryDE contains the user X coordinate, and HL contains the user Y coordinate of the point
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved
NotesThis routine uses the SCR WRITE indirection to write the point to the screen
&BDDFGRA TEST
ActionTests a point and finds out what PEN it is set to
EntryDE contains the user X coordinate, and HL contains the user Y coordinate of the point
ExitA contains the PEN that the point is written in, BC, DE and HL are corrupt, and all others are preserved
NotesThis routine uses the SCR READ indirection to test a point on the screen
&BDE2GRA LINE
ActionDraws a line in the current graphics PEN, from the current graphics position to the specified point
EntryDE contains the user X coordinate, and HL contains the user Y coordinate for the endpoint
ExitAF, BC, DE and HL are corrupt, and all others are preserved
NotesThis routine uses the SCR WRITE indirection to write the points of the line on the screen
&BDE5SCR READ
ActionReads a pixel from the screen and returns its decode a PEN
EntryHL contains the screen address of the pixel, and C contains the mask for the pixel
ExitA contains the decoded PEN of the pixel, the flags are corrupt, and all others are preserved
NotesThe mask should be for a single pixel, and is dependent on the screen mode
&BDE8SCR WRITE
ActionWrites one or more pixels to the screen
EntryHL contains the screen address of the pixel, C contains the mask, and B contains the encoded PEN
ExitAF is corrupt, and all other registers are preserved
NotesThe mask should determine which pixels in the screen byte are to be plotted
&BDEBSCR MODE CLEAR
ActionFills the entire screen memory with &00, which clears the screen to PEN 0
EntryNo entry conditions
ExitAF, BC, DE and HL are corrupt, and all the other registers are preserved
&BDEEKM TEST BREAK
ActionTests if the ESC key has been pressed, and acts accordingly
EntryC contains the Shift and Control key states, and interrupts must be disabled
ExitAF and HL are corrupt, and all other registers are preserved
NotesIf bit 7 of C is set, then the Control key is pressed; if bit 5 of C is set, then the Shift key is pressed; if ESC, Shift and Control are pressed at the sarne time, then it initiates a system reset; otherwise it reports a break event
&BDF1MC WAIT PRINTER
ActionSends a character to the printer if it is not busy
EntryA contains the character to be sent to the printer
ExitIf the character was printed successfully, then Carry is true; if the printer was busy for too long (more than 0.4 seconds), then Carry is false; in either case, A and BC are corrupt, and all other registers are preserved
&BDF4KM SCAN KEYS
ActionScans the keyboard every 1/50th of a second, and updates the status of all keys
EntryAll interrupts must be disabled
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved


David Cantrell, March 1996