The Graphics VDU


&BBBAGRA INITIALISE
ActionInitialises the graphics VDU to its default set-up (ie its set-up when the computer is switched on)
EntryNo entry conditions
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved
NotesSets the graphics indirections to their defaults, sets the graphic paper to text pen 0 and the graphic pen to text pen 1, reset the graphics origin and move the graphics cursor to the bottom left of the screen, reset the graphics window and write mode to their defaults
&BBBDGRA RESET
ActionResets the graphics VDU
EntryNo entry conditions
ExitAF, BC, DE and HL are corrupt, and all others are preserved
NotesResets the graphics indirections and the graphics write mode to their defaults
&BBC0GRA MOVE ABSOLUTE
ActionMoves the graphics cursor to an absolute screen position
EntryDE contains the user X-coordinate and HL holds the user Y-coordinate
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved
&BBC3GRA MOVE RELATIVE
ActionMoves the graphics cursor to a point relative to its present screen position
EntryDE contains the X-distance to move and HL holds the Y-distance
ExitAF, BC, DE and HL are corrupt, and all others are preserved
&BBC6GRA ASK CURSOR
ActionGets the graphics cursor's current position
EntryNo entry conditions
ExitDE holds the user X-coordirlate, HL holds the user Y-coordinate, AF is corrupt, and all others nre preserved
&BBC9GRA SET ORIGIN
ActionSets the graphics user origin's screen position
EntryDE contains the standard X-coordinate and HL holds the standard Y-coordinate
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved
&BBCCGRA GET ORIGIN
ActionGets the graphics user origin's screen position
EntryNo entry conditions
ExitDE contains the standard X-coordinate and HL holds the standard Y-coordinate, and all others are preserved
&BBCFGRA WIN WIDTH
ActionSets the left and right edges of the graphics window
EntryDE contains the standard X-coordinate of one edge and HL holds the standard X-coordinate of the other side
ExitAF, BC, DE and HL are corrupt, and all the other registers are preserved
NotesThe default window covers the entire screen and is restored to its default when the mode is changed; used in conjunction with GRA WIN HEIGHT
&BBD2GRA WIN HEIGHT
ActionSets the top and bottom edges of the graphics window
EntryDE contains the standard Y-coordinate of one side and HL holds the standard Y-coordinate of the other side
ExitAF, BC, DE and HL are corrupt, and all others are preserved
NotesSee GRA WIN WIDTH for further details
&BBD5GRA GET W WIDTH
ActionGets the left and right edges of the graphics window
EntryNo entry conditions
ExitDE contains the standard X-coordinate of the left edge and HL contains the standard Y-coordinate of the right edge, AF is corrupt, and all other registers are preserved
&BBD8GRA GET W HEIGHT
ActionGets the top and bottom edges of the graphics window
EntryNo entry conditions
ExitDE contains the standard Y-coordinate of the top edge and HL contains the standard Y-coordinate of the bottom edge, AF is corrupt, and all other registers are preserved
&BBDBGRA CLEAR WINDOW
ActionClears the graphics window to the graphics paper colour and moves the cursor back to the user origin
EntryNo entry conditions
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved
&BBDEGRA SET PEN
ActionSets the graphics PEN
EntryA contains the required text PEN number
ExitAF is corrupt, and all other registers are preserved
&BBE1GRA GET PEN
ActionGets the graphics PEN
EntryNo entry conditions
ExitA contains the text PEN number, the flags are corrupt, and all other registers are preserved
&BBE4GRA SET PAPER
ActionSets the graphics PAPER
EntryA contains the required text PEN number
ExitAF corrupt, and all others are preserved
&BBE7GRA GET PAPER
ActionGets the graphics PAPER
EntryNo entry conditions
ExitA contains the text PEN number, the flags are corrupt, and all others are preserved
&BBEAGRA PLOT ABSOLUTE
ActionPlots a point at an absolute user coordinate, using the GRA PLOT indirection
EntryDE contains the user X-coordinate and HL holds the user Y-coordinate
ExitAF, BC, DE and HL are corrupt, and all others are preserved
&BBEDGRA PLOT RELATIVE
ActionPlots a point at a position relative to the current graphics cursor, using the GRA PLOT indirection
EntryDE contains the relative X-coordinate and HL contains the relative Y-coordinate
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved
&BBF0GRA TEST ABSOLUTE
ActionMoves to an absolute position, and tests the point there using the GRA TEST indirection
EntryDE contains the user X-coordinate and HL holds the user Y-coordinate for the point you wish to test
ExitA contains the pen at the point, and BC, DE, HL and flags are corrupt, and all others are preserved
&BBF3GRA TEST RELATIVE
ActionMoves to a position relative to the current position, and tests the point there using the GRA TEST indirection
EntryDE contains the relative X-coordinate and HL contains the relative Y-coordinate
ExitA contains the pen at the point, and BC, DE, HL and flags are corrupt, and all others are preserved
&BBF6GRA LlNE ABSOLUTE
ActionDraws a line from the current graphics position to an absolute position, using GRA LINE
EntryDE contains the user X-coordinate and HL holds the user Y-coordinate of the end point
ExitAF, BC, DE and HL are corrupt, and all others are preserved
NotesThe line will be plotted in the current graphics pen colour (may be masked to produce a dotted line on a 6128)
&BBF9GRA LINE RELATIVE
ActionDraws a line from the current graphics position to a relative screen position, using GRA LINE
EntryDE contains the relative X-coordinate and HL contains the relative Y-coordinate
ExitAF, BC, DE and HL are corrupt, and all other registers are preserved
NotesSee GRA LINE ABSOLUTE above for details of how the line is plotted
&BBFCGRA WR CHAR
ActionWrites a character onto the screen at the current graphics position
EntryA contains the character to be put onto the screen
ExitAF, BC, DE and HL are corrupt, and all the other registers are preserved
NotesAs in BASIC, all characters including control codes are printed; the character is printed with its top left corner at the current graphics position; the graphics position is moved one character width to the right so that it is ready for another character to be printed


David Cantrell, March 1996