Skip to navigation

Elite on the BBC Micro

Workspaces: ZP (6502SP version)

Name: ZP [View in context] Type: Workspace [Compare versions] Address: &0080 to &0089 Category: Workspaces Summary: Important variables used by the I/O processor
ORG &0080 .ZP SKIP 0 \ The start of the zero page workspace .P SKIP 1 \ Temporary storage, used in a number of places .Q SKIP 1 \ Temporary storage, used in a number of places .R SKIP 1 \ Temporary storage, used in a number of places .S SKIP 1 \ Temporary storage, used in a number of places .T SKIP 1 \ Temporary storage, used in a number of places .SWAP SKIP 1 \ Temporary storage, used to store a flag that records \ whether or not we had to swap a line's start and end \ coordinates around when clipping the line in routine \ LL145 (the flag is used in places like BLINE to swap \ them back) .T1 SKIP 1 \ Temporary storage, used in a number of places .COL SKIP 1 \ Temporary storage, used to store colour information \ when drawing pixels in the dashboard .OSSC SKIP 2 \ When the parasite sends an OSWORD command to the I/O \ processor (i.e. an OSWORD with A = 240 to 255), then \ the relevant handler routine in the I/O processor is \ called with OSSC(1 0) pointing to the OSWORD parameter \ block (i.e. OSSC(1 0) = (Y X) from the original call \ in the I/O processor) ORG &0090 .XX15 SKIP 0 \ Temporary storage, typically used for storing screen \ coordinates in line-drawing routines \ \ There are six bytes of storage, from XX15 TO XX15+5. \ The first four bytes have the following aliases: \ \ X1 = XX15 \ Y1 = XX15+1 \ X2 = XX15+2 \ Y2 = XX15+3 \ \ These are typically used for describing lines in terms \ of screen coordinates, i.e. (X1, Y1) to (X2, Y2) \ \ The last two bytes of XX15 do not have aliases .X1 SKIP 1 \ Temporary storage, typically used for x-coordinates in \ line-drawing routines .Y1 SKIP 1 \ Temporary storage, typically used for y-coordinates in \ line-drawing routines .X2 SKIP 1 \ Temporary storage, typically used for x-coordinates in \ line-drawing routines .Y2 SKIP 1 \ Temporary storage, typically used for y-coordinates in \ line-drawing routines SKIP 2 \ The last 2 bytes of the XX15 block .SC SKIP 1 \ Screen address (low byte) \ \ Elite draws on-screen by poking bytes directly into \ screen memory, and SC(1 0) is typically set to the \ address of the character block containing the pixel \ we want to draw .SCH SKIP 1 \ Screen address (high byte)