664 and 6128 only


&BD3AKM SET LOCKS
ActionTurns the shift and caps locks on and off
EntryH contains the caps lock state, and L contains the shift lock state
ExitAF is corrupt, and all others are preserved
NotesIn this routine, &00 means turned off, and &FF means turned on
&BD3DKM FLUSH
ActionEmpties the key buffer
EntryNo entry conditions
ExitAF is corrupt, and all other registers are preserved
NotesThis routine also discards any current expansion string
&BD40TXT ASK STATE
ActionGets the VDU and cursor state
EntryNo entry conditions
ExitA contains the VDU and cursor state, the flags are corrupt, and all others are preserved
NotesThe value in the A register is bit significant, as follows:
if bit 0 is set, then the cursor is disabled, otherwise it is enabled
if bit 1 is set, then the cursor is turned off, otherwise it is on
if bit 7 is set, then the VDU is enabled, otherwise it is disabled
&BD43GRA DEFAULT
ActionSets the graphics VDU to its default mode
EntryNo entry conditions
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved
NotesSets the background to opaque, the first point of line is plotted, lines aren't dotted, and the write mode is force
&BD46GRA SET BACK
ActionSets the graphics background mode to either opaque or transparent
EntryA holds zero if opaque mode is wanted, or holds &FF to select transparent mode
ExitAll registers are preserved
&BD49GRA SET FIRST
ActionSets whether the first point of a line is plotted or not
EntryA holds zero if the first point is not to be plotted, or holds &FF if it is to be plotted
ExitAll registers are preserved
&BD4CGRA SET LINE MASK
ActionSets how the points in a line are plotted - ie defines whether a line is dotted or not
EntryA contains the line mask that will be used when drawing lines
ExitAll registers are preserved
NotesThe first point in the line corresponds to bit 7 of the line mask and after bit 0 the mask repeats; if a bit is set then that point will be plotted; the mask is always applied from left to right, or from bottom to top
&BD4FGRA FROM USER
ActionConverts user coordinates into base coordinates
EntryDE contains the user X coordinate, and HL contains the user Y coordinate
ExitDE holds the base X coordinate, and HL holds the base Y coordinate, AF is corrupt, and all others are preserved
&BD52GRA FILL
ActionFills an area of the screen starting from the current graphics position and extending until it reaches either the edge of the window or a pixel set to the PEN
EntryA holds a PEN to fill with, HL holds the address of the buffer, and DE holds the length of the buffer
ExitIf the area was filled properly, then Carry is true; if the area was not filled, then Carry is false; in either case, A, BC, DE, HL and the other flags are corrupt, and all others are preserved
NotesThe buffer is used to store complex areas to fill, which are remembered and filled when the basic shape has been done; each entry in the buffer uses seven bytes and so the more complex the shape the larger the buffer; if it runs out of space to store these complex areas, it will fill what it can and then return with Carry false
&BD55SCR SET POSITION
ActionSets the screen base and offset without telling the hardware
EntryA contains the screen base, and HL contains the screen offset
ExitA contains the masked screen base, and HL contains the masked screen offset, the flags are corrupt, and all other registers are preserved
&BD58MC PRINT TRANSLATION
ActionSets how ASCII characters will be translated before being sent to the printer
EntryHL contains the address of the table
ExitIf the table is too long, then Carry is false (ie more than 20 entries); if the table is correctly set out, then Carry is true; in either case, A, BC, DE, HL and the other flags are corrupt, and all others are preserved
NotesThe first byte in the table is the number of entries; each entry requires two bytes, as follows:
byte 0 - the character to be translated byte 1 - the character that is to be sent to the printer If the character to be sent to the printer is &FF, then the character is ignored and nothing is sent
&BD5BKL BANK SWITCH (6128 only)
ActionSets which RAM banks are being accessed by the Z80
EntryA contains the organisation that is to be used
ExitA contains the previous organisation, the flags are corrupt, and all other registers are preserved

David Cantrell, March 1996