## Get Status Commands

The computer's I/O driver includes OS-9 Get Status commands that return the display status and joystick values, respectively. These are accessable via the Basic09 Graphics Interface Module, or by the assembly language system calls listed below:

#### GET DISPLAY STATUS:

Calling Format

    lda #1        (path number)
    ldb #SS.DStat (Getstat code $12)
    os9 I$GSTT     call OS-9

Passed | nothing
Returns | X = address of graphics display memory Y = graphics cursor address x=MSB y =LSB A = color code of pixel at cursor address

#### GET JOYSTICK VALUES:

Calling Format

    lda #1        (path number)
    ldb #SS.Joy   (Getstat code $13)
    os9 I$GSTT     call OS-9

Passed | X = 0 for right joystick; 1 for left joystick
Returns | X = selected joystick x value (0-63) Y = selected joystick y value (0-63) A = $FF if fire button on; $00 if off

#### RETURN ALFA DISPLAY STATUS:

Calling Format

    lda #1        (path number)
    ldb #SS.AlfaS (Getstat code $1C)
    os9 I$GSTT     call OS-9

Passed | nothing
Returns | X = Base address of alpha mode screen buffer. Y = Cursor position in bytes from base address. A = FF if shift lock is engaged, 0 otherwise

Table B.5. Display Control Codes Condensed Summary

1st Byte | 2nd Byte | 3rd Byte | Function
--- | --- | --- | ---
00 |  |  | Null
01 |  |  | Home Alpha Cursor
02 | Column+32 | Row+32 | Position Alpha Cursor
03 |  |  | Erase Line
06 |  |  | Cursor Right
08 |  |  | Cursor Left
09 |  |  | Cursor Up
10 |  |  | Cursor Down
12 |  |  | Clear Screen
13 |  |  | Carriage Return
14 |  |  | Select Alpha Mode
15 | Mode | Color Code | Select Graphics Mode
16 | Color Code |  | Preset Screen
17 | Color Code |  | Select Color
18 |  |  | Quit Graphics Mode
19 |  |  | Erase Screen
20 |  |  | Home Graphics Cursor
21 | X Coord | Y Coord | Move Graphics Cursor
22 | X Coord | Y Coord | Draw Line to X/Y
23 | X Coord | Y Coord | Erase Line to X/Y
24 | X Coord | Y Coord | Set Point at X/Y
25 | X Coord | Y Coord | Clear Point at X/Y
26 | Radius |  | Draw Circle