Skip to navigation

BBC Micro Elite

Workspaces: I/O Variables (6502SP version)

Name: I/O Variables [View in context] Type: Workspace Address: &2C40 to &2C60 Category: Workspaces Summary: Various variables used by the I/O processor
.XC EQUB 1 \ The x-coordinate of the text cursor (i.e. the text \ column), set to an initial value of 1 .YC EQUB 1 \ The y-coordinate of the text cursor (i.e. the text \ row), set to an initial value of 1 .K3 SKIP 1 \ Temporary storage, used in a number of places .U SKIP 1 \ Temporary storage, used in a number of places .LINTAB SKIP 1 \ The offset of the first free byte in the TABLE buffer, \ which stores bytes in the current line as they are \ transmitted from the parasite using the OSWRCH 129 and \ 130 commands .LINMAX SKIP 1 \ The number of points in the line currently being \ transmitted from the parasite using the OSWRCH 129 \ and 130 commands .YSAV SKIP 1 \ Temporary storage for saving the value of the Y \ register, used in a number of places .svn SKIP 1 \ "Saving in progress" flag \ \ * Non-zero while the disc is being accessed (so this \ is also the case for cataloguing, loading etc.) \ \ * 0 otherwise .PARANO SKIP 1 \ PARANO points to the last free byte in PARAMS, which \ is used as a buffer for bytes sent from the parasite \ by the #RDPARAMS and OSWRCH 137 commands when \ updating the dashboard .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 .VEC SKIP 2 \ VEC = &7FFE \ \ Set to the original IRQ1 vector by elite-loader.asm .HFX SKIP 1 \ A flag that toggles the hyperspace colour effect \ \ * 0 = no colour effect \ \ * Non-zero = hyperspace colour effect enabled \ \ When HFS is set to 1, the mode 1 screen that makes \ up the top part of the display is temporarily switched \ to mode 2 (the same screen mode as the dashboard), \ which has the effect of blurring and colouring the \ hyperspace rings in the top part of the screen. The \ code to do this is in the LINSCN routine, which is \ called as part of the screen mode routine at IRQ1. \ It's in LINSCN that HFX is checked, and if it is \ non-zero, the top part of the screen is not switched \ to mode 1, thus leaving the top part of the screen in \ the more colourful mode 2 .CATF SKIP 1 \ The disc catalogue flag \ \ Determines whether a disc catalogue is currently in \ progress, so the TT26 print routine can format the \ output correctly: \ \ * 0 = disc is not currently being catalogued \ \ * 1 = disc is currently being catalogued \ \ Specifically, when CATF is non-zero, TT26 will omit \ column 17 from the catalogue so that it will fit \ on-screen (column 17 is blank column in the middle \ of the catalogue, between the two lists of filenames, \ so it can be dropped without affecting the layout) .K SKIP 4 \ Temporary storage, used in a number of places .PARAMS SKIP 0 \ PARAMS points to the start of the dashboard parameter \ block that is populated by the parasite when it sends \ the #RDPARAMS and OSWRCH 137 commands \ \ These commands update the dashboard, but because the \ parameter block uses the same locations as the flight \ variables, these commands also have the effect of \ updating the following variables, from ENERGY to ESCP .ENERGY SKIP 1 \ Energy bank status \ \ * 0 = empty \ \ * &FF = full .ALP1 SKIP 1 \ Magnitude of the roll angle alpha, i.e. |alpha|, \ which is a positive value between 0 and 31 .ALP2 SKIP 1 \ Bit 7 of ALP2 = sign of the roll angle in ALPHA .BETA SKIP 1 \ The current pitch angle beta, which is reduced from \ JSTY to a sign-magnitude value between -8 and +8 \ \ This describes how fast we are pitching our ship, and \ determines how fast the universe pitches around us \ \ The sign bit is also stored in BET2, while the \ opposite sign is stored in BET2+1 .BET1 SKIP 1 \ The magnitude of the pitch angle beta, i.e. |beta|, \ which is a positive value between 0 and 8 .DELTA SKIP 1 \ Our current speed, in the range 1-40 .ALTIT SKIP 1 \ Our altitude above the surface of the planet or sun \ \ * 255 = we are a long way above the surface \ \ * 1-254 = our altitude as the square root of: \ \ x_hi^2 + y_hi^2 + z_hi^2 - 6^2 \ \ where our ship is at the origin, the centre of the \ planet/sun is at (x_hi, y_hi, z_hi), and the \ radius of the planet is 6 \ \ * 0 = we have crashed into the surface .MCNT SKIP 1 \ The main loop counter \ \ This counter determines how often certain actions are \ performed within the main loop. See the deep dive on \ "Scheduling tasks with the main loop counter" for more \ details .FSH SKIP 1 \ Forward shield status \ \ * 0 = empty \ \ * &FF = full .ASH SKIP 1 \ Aft shield status \ \ * 0 = empty \ \ * &FF = full .QQ14 SKIP 1 \ Our current fuel level (0-70) \ \ The fuel level is stored as the number of light years \ multiplied by 10, so QQ14 = 1 represents 0.1 light \ years, and the maximum possible value is 70, for 7.0 \ light years .GNTMP SKIP 1 \ Laser temperature (or "gun temperature") \ \ If the laser temperature exceeds 242 then the laser \ overheats and cannot be fired again until it has \ cooled down .CABTMP SKIP 1 \ Cabin temperature \ \ The ambient cabin temperature in deep space is 30, \ which is displayed as one notch on the dashboard bar \ \ We get higher temperatures closer to the sun \ \ CABTMP shares a location with MANY, but that's OK as \ MANY+0 would contain the number of ships of type 0, \ but as there is no ship type 0 (they start at 1), MANY \ is unused .FLH SKIP 1 \ Flashing console bars configuration setting \ \ * 0 = static bars (default) \ \ * &FF = flashing bars \ \ Toggled by pressing "F" when paused, see the DKS3 \ routine for details .ESCP SKIP 1 \ Escape pod \ \ * 0 = not fitted \ \ * &FF = fitted