Skip to navigation

Elite on the BBC Micro

Workspaces: ZP [Elite-A, Loader]

Name: ZP [Show more] Type: Workspace Address: &0070 to &008C Category: Workspaces Summary: Important variables used by the loader
Context: See this workspace in context in the source code References: This workspace is used as follows: * Elite loader (Part 1 of 3) calls ZP * MVBL calls ZP * MVPG calls ZP * PIX calls ZP * PLL1 calls ZP * ROOT calls ZP
ORG &0004 .TRTB% SKIP 2 \ Contains the address of the keyboard translation \ table, which is used to translate internal key \ numbers to ASCII ORG &0020 .INF SKIP 2 \ Temporary storage, typically used for storing the \ address of a ship's data block, so it can be copied \ to and from the internal workspace at INWK ORG &0070 .ZP SKIP 2 \ Stores addresses used for moving content around .P SKIP 1 \ Temporary storage, used in a number of places .Q SKIP 1 \ Temporary storage, used in a number of places .YY SKIP 1 \ Temporary storage, used in a number of places .T SKIP 1 \ Temporary storage, used in a number of places .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 (see the deep dives on "Drawing \ monochrome pixels in mode 4" and "Drawing colour \ pixels in mode 5" for more details) .SCH SKIP 1 \ Screen address (high byte) .CHKSM SKIP 2 \ Used in the copy protection code ORG &008B .DL SKIP 1 \ Vertical sync flag \ \ DL gets set to 30 every time we reach vertical sync on \ the video system, which happens 50 times a second \ (50Hz). The WSCAN routine uses this to pause until the \ vertical sync, by setting DL to 0 and then monitoring \ its value until it changes to 30 .TYPE SKIP 1 \ The current ship type \ \ This is where we store the current ship type for when \ we are iterating through the ships in the local bubble \ as part of the main flight loop. See the table at XX21 \ for information about ship types ORG &0090 .key_tube SKIP 2 \ Contains the address of the I/O processor's keyboard \ translation table (as opposed to the parasite's \ table), which is used to translate internal key \ numbers to ASCII in the I/O processor code ORG &00F4 .LATCH SKIP 2 \ The RAM copy of the currently selected paged ROM/RAM \ in SHEILA &30