In the following tables, the following symbols are used:
<>
means 'not the value or bit which follows'*
means 'this applies to all machine with a disk drive fitted'b0
means bit 0b1
means bit 1b15
means bit 15HB
means 'most significant byte, hi-byte'LB
means 'least significant byte, lo-byte'
When addresses are given in the comments, they apply to the 6128.
When the 464's address is different, it is given in brackets, such as at the comment for &B763.
Please note that this section of the guide has been set out with all the addresses in the leftmost column in the correct order for the 6128. However, a Conversion Chart specifically for the 464 is printed in Appendix C.
6128 | 464 | Size | Comments on the memory locations |
---|---|---|---|
&0000 | &0000 | &40 | Restart block |
&0000 | &0000 | RST &00 -RESET ENTRY Complete machine reset |
|
&0008 | &0008 | RST &08 - LOW JUMP Inline two bytes address with b0 to b13=address, b14=Low ROM disabled and b15=Upper ROM disabled |
|
&000B | &000B | KL LOW PCHL HL has address as RST &08 |
|
&000E | &000E | JMP BC BC has address to jump to |
|
&0010 | &0010 | RST &10: SIDE CALL Inline two byte address with b0 to b13=address-&C000, b14 to b15=offset to required ROM (used between sequenced foreground ROMs) |
|
&0013 | &0013 | KL SIDE PCHL HL has address as RST &10 |
|
&0016 | &0016 | JMP DE DE has address to jump to |
|
&0018 | &0018 | RST &18 - FAR CALL Inline three byte address block: bytes 1 and 2 hold the address byte 3 holds the ROM select address |
|
&001B | &001B | KL FAR PCHL As RST &18, but HL has address; C has ROM select |
|
&001E | &001E | JMP HL HL has address to jump to |
|
&0020 | &0020 | RST &20 - RAM LAM Perform a LD A,(HL) from RAM with ROMs disabled |
|
&0023 | &0023 | KL FAR CALL As RST &18, but HL has address of three byte address block |
|
&0028 | &0028 | RST &28 - FIRM JUMP Inline two byte address to jump to |
|
&0030 | &0030 | RST &30 - User restart Default to RST 0 |
|
&0038 | &0038 | RST &38 - Interrupt entry Call to the Firmware interrupt service routine (Keyboard,Time,etc) |
|
&003B | &003B | External interrupt (default to RET) |
|
&0040 | &0040 | &130 | ROM lower foreground area: BASIC input area (tokenised) |
&016F | &016F | End of BASIC input | |
&0170 | &0170 | BASIC working area for program, variables, etc… | |
&0170 | &0170 | Program area Variables and DEF FN s areaArrays area Free space End of free space Strings area end of Strings area (= HIMEM ) |
|
HIMEM | HIMEM | Space for user machine code routines | |
end of user space, byte before user | |||
defined graphics area | |||
n*8 | User defined graphics area | ||
end of UDG area | |||
Upper ROMs reserved area, expandible during KL ROM WALK, including: | |||
r*4 | ROM chaining blocks | ||
&A6FC | &A6FC | 4 | AMSDOS chaining block |
&A6FC | &A6FC | 2 | address of next ROM block in chain (or &0000 if the last in chain) |
&A6FE | &A6FE | 1 | ROM Select address |
&A6FF | &A6FF | 1 | &00 |
&A700 | &A700 | &500 | AMSDOS reserved area This area is moved down if any ROMs have numbers greater than eight (664/6128 only) |
&A700 | &A700 | 1 | Current drive number (0=A; 1=B) |
&A701 | &A701 | 1 | Current USER number |
&A702 | &A702 | 1 | flag? |
&A703 | &A703 | 2 | address? |
&A705 | &A705 | 1 | flag? |
&A706 | &A706 | 2 | address? |
&A708 | &A708 | 1 | OPENIN flag (&FF=closed; <>&FF=opened) |
&A709 | &A709 | &20 | Copy of current or last Disc Directory entry for OPENIN /LOAD |
&A709 | &A709 | 1 | USER number |
&A70A | &A70A | 8 | filename (padded with spaces) |
&A712 | &A712 | 3 | file extension (BAS, BIN, BAK, etc) with attributes (see below) |
&A712 | &A712 | 1 | b7 set = Read Only |
&A713 | &A713 | 1 | b7 set = System (ie not listed by CAT or DIR) |
&A715 | &A715 | 1 | 16K block sequence nurnber for this directory entry (0 for first block; if <>0 part of a larger file) |
&A716 | &A716 | 2 | unused |
&A718 | &A718 | 1 | Length of this block in 128 byte records |
&A719 | &A719 | 16 | Sequence of Disc Block nurnbers containing file - &00 as end marker |
&A729 | &A729 | 1 | Number of 128 byte records loaded so far; before loading proper: &00 for ASCII (ie nothing loaded yet); &01 for BIN or BAS files (ie header record loaded) |
&A72A | &A72A | 1 | ? |
&A72B | &A72B | 1 | ? |
&A72C | &A72C | 1 | OPENOUT flag (&FF=closed; <>&FF=opened) |
&A72D | &A72D | &20 | Copy of current or last Disc Directory entry for OPENOUT /SAVE |
&A72D | &A72D | 1 | USER number |
&A72E | &A72E | 8 | Filename (padded with spaces) |
&A736 | &A736 | 3 | File extension ($$$ while open; correct extension when finished) |
&A739 | &A739 | 1 | Flag (&00=open; &FF=closed, ie finished) |
&A73A | &A73A | 1 | ? |
&A73B | &A73B | 1 | Flag (&00=open; &FF=closed) |
&A73C | &A73C | 1 | Number of 128 byte records saved so far |
&A73D | &A73D | 16 | Sequence of Disc Block numbers containing file - &00 as end marker |
&A74D | &A74D | 1 | Number of 128 byte records saved so far |
&A74E | &A74E | 1 | ? |
&A74F | &A74F | 1 | ? |
&A750 | &A750 | 1 | Flag (&00=OPENIN ; &01=In Char; &02=In Direct (whole file)) |
&A751 | &A751 | 2 | Address of 2K buffer for ASCII, or of start of current/last block if BIN or BAS file |
&A753 | &A753 | 2 | Address of next byte to read for ASCII, or of 2K buffer for BAS or BIN file |
&A755 | &A755 | &45 | First &45 bytes of BAS/BIN file (extended header) or of extended header made for ASCII file |
&A755 | &A755 | 1 | USER number |
&A756 | &A756 | 8 | filename (padded) |
&A75E | &A75E | 3 | extension |
&A761 | &A761 | 6 | unused |
&A767 | &A767 | 1 | file type (&00=BASIC; &01=protected BASIC; &02=Binary; &16=ASCII) |
&A768 | &A768 | 2 | unused |
&A76A | &A76A | 2 | address to load file into (=actual destination), or buffer for an ASCII file |
&A76C | &A76C | 1 | unused for disc |
&A76D | &A76D | 2 | length of file in bytes (&0000 for ASCII files) |
&A76F | &A76F | 2 | execution address fora BIN file |
&A770 | &A770 | &25 | unused |
&A795 | &A795 | 3 | length of actual file in bytes (as &A76D); BAS and BIN only |
&A798 | &A798 | 2 | simple checksum of first 67 bytes of header (LB first) - BAS and BIN only |
&A79A | &A79A | 1 | flag (&00=OPENOUT ; &01=Out Char; &02=Out Direct(whole file)) |
&A79B | &A79B | 2 | address of 2K block if an ASCII file, or of current/last block saved if a BAS or BIN file |
&A79D | &A79D | 2 | address of next byte to write for ASCII files, or of 2K buffer for BAS and BIN files |
&A79F | &A79F | &45 | First &45 bytes of BAS/BIN file (ie extended header) |
&A79F | &A79F | 1 | USER number |
&A7A0 | &A7A0 | 8 | Filename (padded) |
&A7A8 | &A7A8 | 3 | Extension |
&A7AB | &A7AB | 1 | Flag (&00=Open) |
&A7AC | &A7AC | 1 | ? |
&A7AD | &A7AD | 1 | Flag (&00=Open) |
&A7AE | &A7AE | 3 | unused |
&A7B1 | &A7Bl | 1 | File type (&00=BASIC; &01=protected BASIC; &02=Binary; &16=ASCII) |
&A7B2 | &A7B2 | 2 | unused |
&A7B4 | &A7B4 | 2 | Address to save file from (for BAS or BIN files), or of buffer for ASCII files |
&A7B6 | &A7B6 | 1 | Unused for disc |
&A7B7 | &A7B7 | 2 | Length of file in bytes |
&A7B9 | &A7B9 | 2 | Execution address for BIN files |
&A7BB | &A7BB | &25 | unused |
&A7DF | &A7DF | 3 | Length of actual file in bytes (as at &A7B7) - BAS and BIN only |
&A7E2 | &A7E2 | 2 | Simple checksum of first 67 bytes of header (LB first) - BAS and BIN only |
&A7E4 | &A7E4 | &80 | Buffer area for records sent to or loaded from Disc, or used in forming filename and extension |
&A864 | &A864 | 14*3 | Tape Jumpblock is stored here by AMSDOS - is moved to &BC77 etc after ùTAPE |
&A88B | &A88B | 3 | Far address used by AMSDOS RST 3s at &BC77 etc (&CD30,&07) |
&A890 | &A890 | &19 | Drive A Extended Disc Parameter Block (XDPB) |
&A890 | &A890 | 2 | Number of 128 byte records per track |
&A892 | &A892 | 1 | log2(Block size)-7 (&03=1024 bytes; &04=2048 bytes) |
&A893 | &A893 | 1 | (Block size)/128-1 (&07=1024 bytes; &0F=2048 bytes) |
&A894 | &A894 | 1 | (Block size)/1024 (if total of blocks <256, else /2048)-1 |
&A895 | &A895 | 2 | Number of blocks per disc side (excluding reserved tracks) |
&A897 | &A897 | 2 | Number of (directory entries)-1 |
&A899 | &A899 | 2 | Bit significant value of number of blocks for directory (&0080=1; &00C0=2) |
&A89B | &A89B | 2 | Number of bits in checksum =((&A894)+ 1)/4 |
&A89D | &A89D | 2 | Number of reserved tracks (&00=Data; &01=IBM; &02=System) |
&A89F | &A89F | 1 | Number of first sector (&01=IBM; &41=System; &C1=Data) |
&A8A0 | &A8A0 | 1 | Number of sectors per track (Data=9; System=9; IBM=8) |
&A8A1 | &A8Al | 1 | GAP length (Read/Write) |
&A8A2 | &A8A2 | 1 | GAP length (Format) |
&A8A3 | &A8A3 | 1 | Format filler byte (&E5) |
&A8A4 | &A8A4 | 1 | log2(sector size)-7 (&02=512; &03=1024) |
&A8A5 | &A8A5 | 1 | Records per sector |
&A8A6 | &A8A6 | 1 | Current track (not for use) |
&A8A7 | &A8A7 | 1 | 0=not aligned (not for use) |
&A8A8 | &A8A8 | 1 | Auto select flag (&00=Auto select; &FF= don't alter) |
&A8A9 | &A8A9 | ||
&A8B9 | &A8B9 | ||
&A8D0 | &A8D0 | &19 | Drive B Extended Disc Parameter Block (arranged as at &A890) |
&A8E9 | &A8E9 | (&17 bytes of &FF) | |
&A8F9 | &A8F9 | ||
&A900 | &A900 | (&12 bytes of &00) | |
&A910 | &A910 | ||
&A918 | &A918 | 2 | Address of area for reading directory entries for Drive A |
&A91A | &A91A | 2 | Address of Drive A XDPB |
&A91C | &A91C | 2 | Address of the byte after the end of Drive A XDPB |
&A91E | &A91E | 2 | |
&A920 | &A920 | (8bytes of &00) | |
&A928 | &A928 | 2 | Address of area for reading directory entries for Drive B |
&A92A | &A92A | 2 | Address of Drive B XDPB |
&A92C | &A92C | 2 | Address of the byte after the end of Drive B XDPB |
&A92E | &A92E | 2 | |
&A930 | &A930 | &80 | Block of directory entries, including last file loaded |
&A9B0 | &A9B0 | &200 | Buffer for loading; usually contains last sector loaded |
&ABB0 | &ABB0 | (&50 bytes of &00) | |
&AC00 | &AC00 | Start of BASIC Operating System reserved area | |
&AC00 | &AC00 | 1 | Program line redundant spaces flag (0=keep extra spaces; <>0=remove) |
&AC01 | 9*3 | Groups of 3 RET bytes (&C9) called by the Upper ROM | |
&AC01 | &AC1C | 1 | AUTO flag (0=off; <>0=on) |
&AC02 | &AC1D | 2 | Number of the next line (6128) or of the current line (464) for AUTO |
&AC04 | &AC1F | 2 | Step distance for AUTO |
&AC06 | &AC21 | 1 | |
&AC07 | &AC22 | 1 | |
&AC08 | &AC23 | 1 | |
&AC09 | &AC24 | 1 | WIDTH (&84=132) |
&AC0A | &AC25 | 2 | |
&AC0C | &AC26 | 1 | FOR /NEXT flag (0=NEXT not yet used; <>0=used) |
&ACOD | &AC27 | 5 | FOR start value (real). Only 2 bytes are used if % or DEFINT variable |
&AC12 | &AC2C | 2 | Address of ': ' or of the end of program line byte after a NEXT command |
&AC14 | &AC2E | 2 | Address of LB of the line number containing WEND |
&AC16 | &AC30 | 1 | WHILE /WEND flag (&41=WEND not yet used; &04=used) |
&AC17 | &AC31 | 1 | |
&AC18 | &AC32 | 2 | |
&AClA | &AC34 | 2 | |
&AC1C | &AC36 | 2 | Address of location holding ROM routine address for KB event block |
&AC1E | &AC38 | &0C | Event Block for ON SQ () |
&AC1E | &AC38 | 2 | Chain address to next event block; &0000 if last in chain, but &FFFF if unused |
&AC20 | &AC3A | 1 | Count |
&AC21 | &AC3B | 1 | Class: Far address, highest (ON SQ ) priority, Normal & Synchronous event |
&AC22 | &AC3C | 2 | Routine address (in BASIC ROM) |
&AC24 | &AC3E | 1 | ROM Select number (&FD ie ROM 0 enabled, Lower ROM disabled) |
&AC25 | &AC3F | 1 | (first byte of user field) |
&AC26 | &AC40 | 2 | Address of the end of program line byte or ':' after 'ON SQ() GOSUB line number statement |
&AC28 | &AC42 | 2 | Address of the end of program line byte of the line before the GOSUB routine |
&AC2A | &AC44 | &0C | Event block for ON SQ (2), arranged as &AC1E onwards - second ON SQ priority |
&AC36 | &AC50 | &0C | Event block for ON SQ (4), arranged as &AC1E onwards - lowest ON SQ priority |
&AC42 | &AC5C | &12 | Ticker and Event Block for AFTER /EVERY Timer 0 |
&AC42 | &AC5C | 2 | Chain address to next event block (usually to another timer or &00FF) |
&AC44 | &AC5E | 2 | “count down” count |
&AC46 | &AC60 | 2 | Recharge count (for EVERY only - &0000 if AFTER ) |
&AC48 | &AC62 | 2 | Chain address to next ticker block |
&AC4A | &AC64 | 1 | Count |
&AC4B | &AC65 | 1 | Class: Far address, lowest (timer) priority, Normal and Synchronous event |
&AC4C | &AC66 | 2 | Routine address (in BASIC ROM) |
&AC4E | &AC68 | 1 | ROM Select No (&FD ie ROM 0 enabled, Lower ROM disabled) |
&AC4F | &AC69 | 1 | (first byte of user field) |
&AC50 | &AC6A | 2 | Address of the end of prograrn line byte or ':' after statement in use when the timer 'timed-out' |
&AC52 | &AC6C | 2 | Address of tbe end of prograrn line byte of the line before the GOSUB routine |
&AC54 | &AC6E | &12 | Ticker and Event Block for AFTER /EVERY Timer 1 (3rd Timer priority) arranged as at &AC42 |
&AC66 | &AC80 | &12 | Ticker and Event Block for AFTER /EVERY Timer 2 (2nd Timer priority) arranged as at &AC42 |
&AC78 | &AC92 | &12 | Ticker and Event Block for AFTER /EVERY Timer 3 (highest priority) arranged as at &AC42 |
&AC8A | &ACA4 | &100 | BASIC input area for lines (as typed in and not tokenised) or for INPUT |
&AD8C | &ADA6 | 2 | Address of line number LB in line containing error |
&AD8E | &ADA8 | 2 | Address of byte before statement containing error - ie of ':' or of HB of Line No |
&AD90 | &ADAA | 1 | ERR (Error No) |
&AD91 | 1 | DERR (Disc Error No) |
|
&AD92 | &ADAB | 2 | As &AD8E if error is in a program (ie not if in Direct Command Mode) |
&AD94 | &ADAD | 2 | As &AD8C if error is in a program (ie not if in Direct Command Mode) |
&AD96 | &ADAF | 2 | Address of the length LB of line specified by the ON ERROR GOTO command |
&AD98 | &ADB1 | 1 | |
&AD99 | &ADB2 | &09 | Current SOUND parameter block (see Firmware Jump &BCAA) |
&AD99 | &ADB2 | 1 | Channel andrendezvous status |
&AD9A | &ADB3 | 1 | Amplitude envelope (ENV ) number |
&AD9B | &ADB4 | 1 | Rone envelope (ENT ) number |
&AD9C | &ADB5 | 2 | Rone period |
&AD9E | &ADB7 | 1 | Noise period |
&AD9F | &ADB8 | 1 | Initial amplitude |
&ADA0 | &ADB9 | 2 | Duration, or envelope repeat count |
&ADA2 | &ADBB | &10 | Current Amplitude or Tone Envelope parameter bloc (see &BCBC or &BCBF) |
&ADA2 | &ADBB | 1 | Number of sections (+&80 for a negative ENT number, ie the envelope is run until end of sound |
&ADA3 | &ADBC | 3 | First section of the envelope: |
&ADA3 | &ADBC | 1 | Step count (if <&80) otherwise envelope shape (not tone envelope) |
&ADA4 | &ADBD | 1 | Step size (if step count<&80) otherwise envelope period (not tone envelope) |
&ADA5 | &ADBE | 1 | Pause time (if step count<&80) otherwise envelope period (not tone envelope) |
&ADA6 | &ADBF | 3 | Second section of the envelope, as &ADA3 |
&ADA9 | &ADC2 | 3 | Rhird section of the envelope, as &ADA3 |
&ADAC | &ADC5 | 3 | Fourth section of the envelope, as &ADA3 |
&ADAF | &ADC8 | 3 | Fifth section of the envelope, as &ADA3 |
&ADB2 | &ADCB | 5 | |
&ADB7 | &ADD0 | &36 | |
&ADEB | &AE04 | 2 | |
&ADED | &AE06 | 6 | |
&ADF3 | &AE0C | 26*1 | Table of DEFINT (&02), DEFSTR (&03) or DEFREAL default (&05), for variables 'a' to 'z' |
&AE0D | &AE26 | ||
&AE0E | &AE27 | 2 | |
&AE10 | &AE29 | 2 | |
&AE12 | &AE2B | 2 | |
&AE14 | &AE2D | 1 | |
&AE15 | &AE2E | 2 | Address of line number LB of last BASIC line (or &FFFF) |
&AE17 | &AE30 | 2 | Address of byte before next DATA item (eg comma or space) |
&AE19 | &AE32 | 2 | Address of next space on GOSUB etc stack, (see also &B06F) |
&AE1B | &AE34 | 2 | Address of byte before current statement (&003F if in Direct Command mode) |
&AE1D | &AE36 | 2 | Address of line nurnber LB of line of current statement (&0000 if in Direct Command mode) |
&AE1F | &AE38 | 1 | Rrace flag (0=TROFF ; <>0=TRON ) |
&AE20 | &AE39 | 1 | Flag used with Trace (&00 if in Direct Command mode; &01 if in a program) |
&AE21 | &AE3A | ||
&AE22 | &AE3B | 2 | |
&AE24 | &AE3D | 2 | |
&AE26 | &AE3F | 2 | Address to load cassette file to |
&AE28 | &AE41 | ||
&AE29 | &AE42 | 1 | File type from cassette header |
&AE2A | &AE43 | 2 | File length from cassette header |
&AE2C | &AE45 | 1 | Program protection flag (<>0 hides program as if protected) |
&AE2D | &AE46 | 17 | Buffer used to form binary or hexadecimal numbers before printing etc |
&AE3A | &AE53 | 5 | Start of buffer used to form hexadecimal numbers before printing etc |
&AE3A | &AE53 | 1 | Key Number used with INKEY (providing the Key Number is written as a decimal) |
&AE3E | &AE57 | 1 | Last byte (usually &00 or &20) of the formed binary or hexadecimal number |
&AE43 | &AE5D | 13 | Buffer used to form decimal numbers before printing etc |
&AE4E | &AE68 | 1 | Last byte (usually &00 or &20) of the formed decimal number |
&AE6B | 3 | ||
&AE51 | 1 | ||
&AE52 | &AE6E | 2 | |
&AE54 | 1 | ||
&AE70 | 2 | Temporary store for address after using (&AE68) | |
&AE55 | &AE72 | 2 | Address of last used ROM or RSX JUMP instruction in its Jump Block |
&AE57 | &AE74 | 1 | ROM Select number if address above is in ROM |
&AE58 | &AE75 | 2 | BASIC Parser position, moved on to ':', or the end of program line byte after a CALL or an RSX |
&AE5A | &AE77 | 2 | The resetting address for machine Stack Pointer after a CALL or an RSX |
&AE5C | &AE79 | 2 | ZONE value |
&AE5D | 1 | ||
&AE7A | 1 | ||
&AE5E | &AE7B | 2 | HIMEM (set by MEMORY) |
&AE7D | 2 | Address of the byte before the UDG area (the end of the user M/C routine area or the Strings area) if the UDG area is still present, otherwise the highest byte of Program etc area | |
&AE60 | 2 | Address of highest byte of free RAM (ie last byte of UDG area) | |
&AE62 | &AE7F | 2 | Address of start of ROM lower reserved area (used for tokenised lines) |
&AE64 | &AE81 | 2 | Address of end of ROM lower reserved area (byte before Program area) |
&AE66 | &AE83 | 2 | As &AE68 |
&AE68 | &AE85 | 2 | Address of start of Variables and DEF FN s area |
&AE6A | &AE87 | 2 | Address of start of Arrays area (where next Variable or DEF FN entry is placed) |
&AE6C | &AE89 | 2 | Address of start of free space (where next Array entry is placed) |
&AE6E | 1 | ||
&AE70 | &AE8C | &1FF | GOSUB , FOR and WHILE stack. Entries are added above any existing ones in use (mixed as encountered) at address given by &B06F and must be used up in the opposite order. Completed entries are not deleted, just overwitten by the next new entry |
GOSUB (84 max capacity): |
|||
1 | (byte of &00) | ||
2 | Address of end of program line byte or ':' after GOSUB statement (the point to RETURN to) |
||
2 | Address of line number HB of line containing GOSUB |
||
1 | Byte of &06, ie the length of the GOSUB entry |
||
FOR (21 max for Real FOR s,31 max for Integer FOR s): |
|||
2 | Address of current value of control variable (in Variables area) | ||
5 | Value of limit (ie the TO value) - there are two bytes only for Integer FOR s |
||
5 | Value of STEP - two bytes for Integer FOR s |
||
1 | Sign byte (&00 for positive; &01 for negative) | ||
2 | Address of the end of program line byte, or ':' after the FOR statement (ie the address for the NEXT loop to restart at) |
||
2 | Address of line number LB of line containing FOR |
||
2 | Address of byte after NEXT statement (ie the address to continue at when the limit is exceeded) |
||
2 | Address of byte after NEXT statement again |
||
1 | Length byte (&16 for Real FOR s; &10 for Integer FOR s) |
||
WHILE (66 max capacity): |
|||
2 | Address of line number LB of line containing WHILE |
||
2 | Address of the end of program line byte or ':' after WEND statement (ie the address to continue at when the condition is false) |
||
2 | Address of condition after the WHILE command |
||
1 | Length byte of &07 - end of WHILE entry proper but: |
||
5 | Value of condition (0 or -1 as a floating point value) only while the WHILE entry is the last on the stack |
||
&B06F | &B08B | 2 | Address of the next space on the GOSUB etc stack (see also &AE19)NB: The free space on the stack is also used as a workspace by various routines for values and addresses and for Variable names |
&B071 | &B08D | 2 | Address of end of free space (the byte before the Strings area) |
&B073 | &B08F | 2 | Address of end of Strings area (=HIMEM ) |
&B075 | 1 | ||
&B091 | 1 | ||
&B092 | 2 | ||
&B076 | &B094 | 2 | |
&B078 | &B096 | 2 | address of the highest byte of free RAM disregarding UDGs (usually &A6FB) |
&B07A | &B098 | 2 | |
&B07C | &B09A | 2 | address for the next entry in the String Concatenation area |
&B07E | &B09C | 10*3 | concatenation area holding descriptors of strings being used |
&B09C | &B0BA | 1 | length of last String used |
&B09D | &B0BB | 2 | address of last String used |
&B0BD | 2 | ||
&BOBF | 2 | ||
&B09F | &BOC1 | 1 | type byte used with the Virtual Accumulator (&02=Integer; &03=String; &05=Real) |
&B0A0 | &B0C2 | 5 | Virtual Accurnulator used by the maths routines (two bytes for an Integer value; three bytes for a String Descriptor; five bytes for a Real value) |
&B0A0 | &B0C2 | 2 | |
&B0A2 | &B0C4 | 1 | |
&B0A3 | &B0C5 | 2 | |
&B0A5 | &B0C7 | &5B | (&39 bytes on 464) bytes of &FF |
&B100 | &B8E4 | 2 | &07, &C6 |
&B102 | &B8E6 | 2 | &65, &89 |
&B104 | &B8E8 | 5 | |
&B109 | &B8ED | 5 | |
&B10E | &B8F2 | 5 | |
&B113 | &B8F7 | 1 | DEG/RAD flag (&00=RAD; &FF=DEG) |
&B114 | &B8DC | 1 | |
&B115 | &B8DD | 1 | |
&B116 | &B8DE | 1 | |
&B117 | &B8DF | 1 | |
&B118 | &B800 | &D2 | Area used for Cassette handling: |
&B118 | &B800 | 1 | cassette handling messages flag (0=enabled; <>O=disabled) |
&B119 | &B801 | 1 | |
&B11A | &B802 | 1 | file IN flag (&00=closed; &02=IN file; &03=opened; &05=IN char) |
&B11B | &B803 | 2 | address of 2K buffer for directories |
&B11D | &B805 | 2 | address of 2K buffer for loading blocks of files - often as &B11B |
&B11F | &B807 | &40 | IN Channel header |
&B11F | &B807 | &10 | filename (padded with NULs) |
&B12F | &B817 | 1 | number of block being loaded, or next to be loaded |
&B130 | &B818 | 1 | last block flag (&FF=last block; &00=not) |
&B131 | &B819 | 1 | file type (&00=BASIC; &01=Protected BASIC; &02=Binary; &08=Screen; &16=ASCII) |
&B132 | &B81A | 2 | length of this block |
&B134 | &B81C | 2 | address to load this or the next block at,or the address of the byte after last one loaded |
&B136 | &B81E | 1 | first block flag (&FF=first block; &00=not) |
&B137 | &B81F | 2 | total length of file (all blocks) |
&B139 | &B821 | 2 | execution address for BIN files (&0000 if not saved as such) |
&B13B | &B823 | &24 | not allocated |
&B15F | &B847 | 1 | file OUT flag (&00=closed; &02=IN file; &03=opened; &05=IN char) |
&B160 | &B848 | 2 | address to start the next block save from, or the address of the buffer if it is OPENOUT |
&B162 | &B84A | 2 | address of start of the last block saved, or the address of the buffer if it is OPENOUT |
&B164 | &B84C | &40 | OUT Channel Header (details as IN Channel Header): |
&B164 | &B84C | &10 | filename |
&B174 | &B85C | 1 | number of the block being saved, or next to be saved |
&B175 | &B85D | 1 | last block flag (&FF=last block; &00=not) |
&B176 | &B85E | 1 | file type (as at &B131 |
&B177 | &B85F | 2 | length saved so far |
&B179 | &B861 | 2 | address of start of area to save, or address of buffer if it is an OPENOUT instruction |
&B17B | &B863 | 1 | first block flag (&FF=first block; &00=not) |
&B17C | &B864 | 2 | total length of file to be saved |
&B17E | &B866 | 2 | execution address for BIN files (&0000 if parameter not supplied) |
&B180 | &B868 | &24 | not allocated |
&B1A4 | &B88C | &40 | used to construct IN Channel header: |
&B1B5 | &B89D | 1 | |
&B1B7 | &B89F | 2 | |
&B1B8 | &B8A3 | 1 | |
&B1BE | &B8A6 | 1 | |
&B1B9 | &B51D | base address for calculating relevant Sound Channel block | |
&B1BC | &B520 | base address for calculating relevant Sound Channel ? | |
&B1BE | &B522 | base address for calculating relevant Sound Channel ? | |
&B1D5 | &B539 | base address for calculating relevant Sound Channel ? | |
&B1E4 | &B8CC | 1 | |
&B1E5 | &B8CD | 1 | synchronisation byte |
&B1E6 | &B8CE | 2 | &55, &62 |
&B1E8 | &B8D0 | 1 | |
&B1E9 | &B8D1 | 1 | cassette precompensation (default &06; SPEED WRITE 1 &0C @4æs) |
&B1EA | &B8D2 | 1 | cassette 'Half a Zero' duration (default &53; SPEED WRITE 1 &29 @ 4æS) |
&B1EB | &B8D3 | 2 | |
&B550 | 1 | used by sound routines | |
&B551 | 1 | used by sound routines | |
&B1ED | 1 | used by sound routines | |
&B1EE | &B552 | 1 | used by sound routines |
&B1F0 | &BB54 | 1 | used by sound routines |
&BB55 | 7 | used by sound and cassette routines | |
&B1F8 | &B55C | &3F | Sound Channel A (1) data: |
&B212 | &B576 | 1 | number of sounds still queuing |
&B213 | &B577 | 1 | number of sounds originally queuing |
&B217 | &B57B | 8 | first or fifth sound in Channel 1 (A) queue: |
&B217 | &B57B | 1 | status: b0 to b2 = rendezvous with channel 1, 2 or 4; b3 = Hold; b4 = Flush |
&B218 | &B57C | 1 | b0 to b3 = tone envelope number; b4 to b7 = volume envelope number (ie ENV nurnber*16) |
&B219 | &B57D | 2 | pitch |
&B21B | &B57F | 1 | noise |
&B21C | &B580 | 1 | volume |
&B21D | &B581 | 2 | duration (in 0.01 seconds) |
&B21F | &B583 | 8 | second sound in Channel 1 queue (as &B217) |
&B227 | &B58B | 8 | third sound in Channel 1 queue (as &B217) |
&B22F | &B593 | 8 | fourth sound in Channel 1 queue (as &B217) |
&B237 | &B59B | &3F | Sound Channel B (2) data - as described at &B1F8 |
&B256 | &B5BA | 8 | first or fifth sound in Channel 2 queue (as &B217) |
&B25E | &B5C2 | 8 | second sound in Channel 2 queue (as &B217) |
&B266 | &B5CA | 8 | third sound in Channel 2 queue (as &B217) |
&B26E | &B5D2 | 8 | fourth sound in Channel 2 queue (as &B217) |
&B276 | &B5DA | &3F | Sound Channel C (4) data - as described at &B1F8 |
&B295 | &B5F9 | 8 | first or fifth sound in Channel 4 queue (as &B217) |
&B29D | &B601 | 8 | 2nd sound in Channel 4 queue (as &B217) |
&B2A5 | &B609 | 8 | 3rd sound in Channel 4 queue (as &B217) |
&B2AD | &B611 | 8 | 4th sound in Channel 4 queue (as &B217) |
&B2A6 | &B60A | base address for calculating relevant ENV parameter block |
|
&B2B6 | &B61A | 15*16 | ENV parameter block area (each arranged as &ADA2): |
&B2B6 | &B61A | &10 | ENV 1 |
&B2C6 | &B62A | &10 | ENV 2 |
&B2D6 | &B63A | &10 | ENV 3 |
&B2E6 | &B64A | &10 | ENV 4 |
&B2F6 | &B65A | &10 | ENV 5 |
&B306 | &B66A | &10 | ENV 6 |
&B316 | &B67A | &10 | ENV 7 |
&B326 | &B68A | &10 | ENV 8 |
&B336 | &B69A | &10 | ENV 9 |
&B346 | &B6AA | &10 | ENV 10 |
&B356 | &B6BA | &10 | ENV 11 |
&B366 | &B6CA | &10 | ENV 12 |
&B376 | &B6DA | &10 | ENV 13 |
&B386 | &B6EA | &10 | ENV 14 |
&B396 | &B6FA | &10 | ENV 15 |
&B396 | &B6FA | base address for calculating relevant ENT parameter block |
|
&B3A6 | &B70A | 15*16 | ENT parameter block area (each arranged as &ADA2): |
&B3A6 | &B70A | &10 | ENT 1 |
&B3B6 | &B71A | &10 | ENT 2 |
&B3C6 | &B72A | &10 | ENT 3 |
&B3D6 | &B73A | &10 | ENT 4 |
&B3E6 | &B74A | &10 | ENT 5 |
&B3F6 | &B75A | &10 | ENT 6 |
&B406 | &B76A | &10 | ENT 7 |
&B416 | &B77A | &10 | ENT 8 |
&B426 | &B78A | &10 | ENT 9 |
&B436 | &B79A | &10 | ENT 10 |
&B446 | &B7AA | &10 | ENT 11 |
&B456 | &B7BA | &10 | ENT 12 |
&B466 | &B7CA | &10 | ENT 13 |
&B476 | &B7DA | &10 | ENT 14 |
&B486 | &B7EA | &10 | ENT 15 |
&B496 | &B34C | &50 | Normal Key Table: |
Up Right Down f9 f6 f3 Enter f. |
|||
Left Copy f7 f8 f5 f1 f2 f0 |
|||
Clr [ Ret ] f4 \ |
|||
^ - @ p ; : / . |
|||
0 9 o i l k m j |
|||
8 7 u y h j n Space |
|||
6 5 r t g f b v |
|||
4 3 e w s d c x |
|||
1 2 Esc q Tab a Caps z |
|||
[VT] [LF] [BS] [TAB] Fire2 Fire1 Del |
|||
&B4E6 | &B39C | &50 | Shifted Key Table: |
Up Right Down f9 f6 f3 Enter f. |
|||
Left Copy f7 f8 f5 f1 f2 f0 |
|||
Clr { Ret } f4 |
|||
œ = | P + * ? > |
|||
_ ) O I L K M < |
|||
( ' U Y H J N Space |
|||
& % R T G F B V |
|||
$ # E W S D C X |
|||
! ” Esc Q → ACaps Z |
|||
[VT] [LF] [BS] [TAB] Fire2 Fire1 Del |
|||
&B536 | &B3EC | &50 | Control Key Table: |
Up Right Down f9 f6 f3 Enter f. |
|||
Left Copy f7 f8 f5 f1 f2 f0 |
|||
Clr (ESC) Ret (GS) f4 (FS) |
|||
(RS) (NUL) (DLE) |
|||
(US) (SI) (HT) (FF) (VT) (CR) |
|||
(NAK) (EM) (BS) (LF) (SO) |
|||
(DC2) (DC4) (BEL) (ACK) (STX) (SYN) |
|||
(ENQ) (ETB) (DC3) (EOT) (ETX) (CAN) |
|||
~ Esc (DC1) Ins (SOH) S-lck (SUB) |
|||
Del |
|||
&B586 | &B43C | 10 | Keyboard repeats table (each byte/bit applies to all three key tables): 1 byte is used per line of the tables; b0 to b7 give the columns (left to right), repeat if set |
&B590 | &B446 | &98 | DEF KEY 's definition area (for Keys &80 to &9F in sequence): each definition has either a single byte of &00 if it is unused/unaltered, or: byte 1: length of definition bytes 2 to x: definition, either a single key or a string of keys |
&B628 | &B4DE | 1 | Byte after end of DEF KEY area |
&B629 | &B4DF | 1 | |
&B62A | &B4E0 | 1 | |
&B62B | &B4E1 | 2 | Address of DEF KEY area |
&B62D | &B4E3 | 2 | Address of byte after end of DEF KEY area |
&B62F | &B4E5 | 1 | |
&B630 | &B4E6 | 1 | |
&B631 | &B4E7 | 1 | Shift lock flag (&00=off; &FF=on) |
&B632 | &B4E8 | 1 | Caps lock flag (&00=off; &FF=on) |
&B633 | &B4E9 | 1 | Keyboard repeat period (SPEED KEY - default &02 @ 0.02 seconds) |
&B634 | &B4EA | 1 | Keyboard delay period (SPEED KEY - default &1E @ 0.02 seconds) |
&B635 | &B4EB | 2*10 | Tables used for key scanning; bits 0 to 7 give the table columns (from left to right): |
&B635 | &B4EB | 1 | Up Right Down f9 f6 f3 Enter f. |
&B636 | &B4EC | 1 | Left Copy f7 f8 f5 f1 f2 f0 |
&B637 | &B4ED | 1 | Clr [ Ret ] f4 Shift Ctrl |
&B638 | &B4EE | 1 | ^ - @ p ; : / . |
&B639 | &B4EF | 1 | 0 9 o i l k m j |
&B63A | &B4F0 | 1 | 8 7 u y h j n Space |
&B63B | &B4F1 | 1 | Down Up Left Right Fire2 Fire1 (Joystick 1) |
&B63B | &B4F1 | 1 | 6 5 r t g f b v |
&B63C | &B4F2 | 1 | 4 3 e w s d c x |
&B63D | &B4F3 | 1 | 1 2 Esc q Tab a Caps z |
&B63E | &B4F4 | 1 | Down Up Left Right Fire2 Fire1 (Joystick 2) |
&B63E | &B4F4 | 1 | Del |
&B63F | &B4F5 | 1 | Complement of &B635 |
&B640 | &B4F6 | 1 | Complement of &B636 |
&B641 | &B4F7 | 1 | Complement of &B637 |
&B642 | &B4F8 | 1 | Complement of &B638 |
&B643 | &B4F9 | 1 | Complement of &B639 |
&B644 | &B4FA | 1 | Complement of &B63A |
&B645 | &B4FB | 1 | Complement of &B63B |
&B646 | &B4FC | 1 | Complement of &B63C |
&B647 | &B4FD | 1 | Complement of &B63D |
&B648 | &B4FE | 1 | Complement of &B63E |
&B64B | &B501 | ||
&B653 | &B509 | 1 | |
&B654 | &B5OA | 1 | |
&B655 | &B50B | 1 | |
&B656 | &B50C | 1 | |
&B657 | &B50D | 7 | Event block for Keyboard handling, comprises: |
&B657 | &B50D | 2 | Chain address |
&B659 | &B50F | 1 | Count |
&B65A | &B510 | 1 | Class: express event |
&B65B | &B511 | 2 | ROM routine address: &C492 |
&B65D | &B513 | 1 | ROM select number: &FD |
&B65E | &B514 | 20*2 | store for last keys pressed and each entry is as follows: byte 1: +0 to +10=key tables line number; if bit 5 is set then Shift is pressed; bit 7=Control is pressed byte 2: b0 to b7=key tables column number - see &B496 etc |
&B67F | &B67F | 2 | Vestige from the 464? |
&B686 | &B53C | 1 | |
&B687 | &B53D | 1 | Accumulated count of the number of keys pressed (MOD 20) |
&B688 | &B53E | 1 | Number of keys left in key buffer |
&B689 | &B53F | 1 | Accumulated count of the number of keys removed from the buffer (MOD 20) |
&B68A | &B540 | 1 | |
&B68B | &B541 | 2 | Address of the normal key table |
&B68D | &B543 | 2 | Address of the shifted key table |
&B68F | &B545 | 2 | Address of the control key table |
&B691 | &B547 | 2 | Address of the Keyboard repeats table |
&B692 | 1 | ||
&B693 | &B328 | 2 | ORIGIN x |
&B695 | &B32A | 2 | ORIGIN y |
&B697 | &B32C | 2 | Graphics text x position (pixel) |
&B699 | &B32E | 2 | Graphics text y position(pixel) |
&B69B | &B330 | 2 | Graphics window x of one edge (pixel) |
&B69D | &B332 | 2 | Graphics window x of other edge (pixel) |
&B69F | &B334 | 2 | Graphics window y of one side (pixel) |
&B6A1 | &B336 | 2 | Graphics window y of other side (pixel) |
&B6A3 | &B338 | 1 | GRAPHICS PEN |
&B6A4 | &B339 | 1 | GRAPHICS PAPER |
&B6A5 | &B33A | 8/14 | (This area is 14 bytes on the 464) Used by line drawing (and other) routines, as follows |
&B6A7 | &B33A | 2 | x+1() |
&B6A9 | &B33C | 2 | y/2+1() |
&B6AB | &B33E | 2 | y/2-x() |
&B6AD | &B340 | 2 | |
&B342 | 2 | ||
&B6AF | &B344 | 1 | |
&B6B0 | &B345 | 1 | |
&B6B1 | &B346 | 1 | |
&B6B2 | 1 | First point on drawn line flag (<>0=to be plotted; 0=don't plot) | |
&B6B3 | 1 | Line MASK |
|
&B6B4 | 1 | ||
&B207 | 2 | ||
&B6B5 | &B20C | 1 | Current stream number |
&B6B6 | &B20D | 14/15 | (These areas are 15 bytes on the 464) |
Stream (window) 0 parameter block. | |||
These areas are arranged as &B726 | |||
&B6C4 | &B21C | 14/15 | Stream (window) 1 parameter block |
&B6D2 | &B22B | 14/15 | Stream (window) 2 parameter block |
&B6E0 | &B23A | 14/15 | Stream (window) 3 parameter block |
&B6EE | &B249 | 14/15 | Stream (window) 4 parameter block |
&B6FC | &B258 | 14/15 | Stream (window) 5 parameter block |
&B70A | &B267 | 14/15 | Stream (window) 6 parameter block |
&B718 | &B276 | 14/15 | Stream (window) 7 parameter block |
&B726 | &B285 | 14/15 | Current Stream (Window) parameter block |
&B726 | &B285 | 1 | Cursor y position (line) with respect to the whole screen (starting from 0) |
&B727 | &B286 | 1 | Cursor x position (column) with respect to the whole screen (starting from 0) |
&B728 | &B287 | ||
&B729 | &B288 | 1 | Window top line (y) with respect to the whole screen (starting from 0) |
&B72A | &B289 | 1 | Window left column (x) with respect to the whole screen (starting from 0) |
&B72B | &B28A | 1 | Window bottom line (y) with respect to the whole screen (starting from 0) |
&B72C | &B28B | 1 | Window right colwnn (x) with respect to the whole screen (starting from 0) |
&B72D | &B28C | 1 | Scroll count |
&B72E | &B28D | 1 | Cursor flag (&01=disable; &02=off; &FD=on; &FE=enable) |
&B28E | 1 | ||
&B72F | &B28F | 1 | Current PEN number (encoded, not its INK number) |
&B730 | &B290 | 1 | Current PAPER number (encoded, not its INK number) |
&B731 | &B291 | 2 | Address of text background routine: opaque=&1392; transparent=&13A0 |
&B733 | &B293 | 1 | Graphics character writing flag (0=off; <>0=on) |
&B734 | &B294 | 1 | ASCII number of the first character in User Defined Graphic (UDG) matrix table |
&B735 | &B295 | 1 | UDG matrix table flag (&00=non-existent; &FF=present) |
&B736 | &B296 | 2 | Address of UDG matrix table |
&B738 | &B298 | 2 | |
&B758 | &B2B8 | 1 | |
&B759 | &B2B9 | 1 | |
&B763 | &B2C3 | 32*3 | Control Code handling routine table - each code's entry comprises: byte 1: +0 to +9=number of parameters; +&80=re-run routine at a System Reset bytes 2 and 3: address of the control code's handling routine |
&B763 | &B2C3 | 3 | ASC 0: &80,&1513: NUL |
&B766 | &B2C6 | 3 | ASC 1: &81,&1335: Print control code chararacter [,char] |
&B769 | &B2C9 | 3 | ASC 2: &80,&1297: Disable cursor |
&B76C | &B2CC | 3 | ASC 3: &80,&1286: Enable cursor |
&B76F | &B2CF | 3 | ASC 4: &81,&0AE9: Set mode [,mode] |
&B772 | &B2D2 | 3 | ASC 5: &81,&1940: Print character using graphics mode [,char] |
&B775 | &B2D5 | 3 | ASC 6: &00,&1459: Enable VDU |
&B778 | &B2D8 | 3 | ASC 7: &80,&14E1: Beep |
&B77B | &B2DB | 3 | ASC 8: &80,&1519: Back-space |
&B77E | &B2DE | 3 | ASC 9: &80,&151E: Step-right |
&B781 | &B2E1 | 3 | ASC 10: &80,&1523: Linefeed |
&B784 | &B2E4 | 3 | ASC 11: &80,&1528: Previous line |
&B787 | &B2E7 | 3 | ASC 12: &80,&154F: Clear window and locate the cursor at position 1,1 |
&B78A | &B2EA | 3 | ASC 13: &80,&153F: RETURN |
&B78D | &B2ED | 3 | ASC 14: &81,&12AB: Set paper [,pen] |
&B790 | &B2F0 | 3 | ASC 15: &81,&12A6: Set pen [,pen] |
&B793 | &B2F3 | 3 | ASC 16: &80,&155E: Delete the character at the cursor position |
&B796 | &B2F6 | 3 | ASC 17: &80,&1599: Clear the line up to the current cursor position |
&B799 | &B2F9 | 3 | ASC 18: &80,&158F: Clear from the cursor osition to the end of the line |
&B79C | &B2FC | 3 | ASC 19: &80,&1578: Clear from start of the window to the cursor position |
&B79F | &B2FF | 3 | ASC 20: &80,&1565: Clear from the cursor position to the end of a window |
&B7A2 | &B302 | 3 | ASC 21: &80,&1452: Disable VDU |
&B7A5 | &B305 | 3 | ASC 22: &81,&14EC: Set text write mode [,mode] |
&B7A8 | &B308 | 3 | ASC 23: &81,&0C55: Set graphics draw mode [,mode] |
&B7AB | &B30B | 3 | ASC 24: &80,&12C6: Exchange pen and paper |
&B7AE | &B30E | 3 | ASC 25: &89,&150D: Define user defined character [,char,8 rows of char] |
&B7B1 | &B311 | 3 | ASC 26: &84,&1501: Define window [,left,right,top,bottom] |
&B7B4 | &B314 | 3 | ASC 27: &00,&14EB: ESC (=user) |
&B7B7 | &B317 | 3 | ASC 28: &83,&14F1: Set the pen inks [,pen,ink 1,ink 2] |
&B7BA | &B31A | 3 | ASC 29: &82,&14FA: Set border colours [,ink,ink2] |
&B7BD | &B31D | 3 | ASC 30: &80,&1539: Locate the text cursor at position 1,1 |
&B7C0 | &B320 | 3 | ASC 31: &82,&1547: Locate the text cursor at [,column,line] |
&B7C3 | &B1C8 | 1 | MODE number |
&B7C4 | &B1C9 | 2 | screen offset |
&B7C6 | &B1CB | 1 | screen base HB (LB taken as &00) |
&B7C7 | &B1CC | 3 | graphics VDU write mode indirection - JP &0C74 |
&B1CF | 8 | list of bytes having only one bit set, from b7 down to b0 | |
&B7D2 | &B1D7 | 1 | first flash period (SPEED INK - default &0A @ 0.02 seconds) |
&B7D3 | &B1D8 | 1 | second flash period (SPEED INK - default &0A @ 0.02 seconds) |
&B7D4 | &B1D9 | 1+16 | Border and Pens' First Inks (as hardware numbers): |
&B7D4 | &B1D9 | 1 | hw &04 = sw 1 (blue) border |
&B7D5 | &B1DA | 1 | hw &04 = sw 1 (blue) pen 0 |
&B7D6 | &B1DB | 1 | hw &0A = sw 24 (bright yellow) pen 1 |
&B7D7 | &B1DC | 1 | hw &13 = sw 20 (bright cyan)pen 2 |
&B7D8 | &B1DD | 1 | hw &0C = sw 6 (bright red) pen 3 |
&B7D9 | &B1DE | 1 | hw &0B = sw 26 (bright white) pen 4 |
&B7DA | &B1DF | 1 | hw &14 = sw 0 (black) pen 5 |
&B7DB | &B1E0 | 1 | hw &15 = sw 2 (bright blue)pen 6 |
&B7DC | &B1E1 | 1 | hw &0D = sw 8 (bright magenta) pen 7 |
&B7DD | &B1E2 | 1 | hw &06 = sw 10 (cyan) pen 8 |
&B7DE | &B1E3 | 1 | hw &1E = sw 12 (yellow)pen 9 |
&B7DF | &B1E4 | 1 | hw &1F = sw 14 (pale blue) pen 10 |
&B7E0 | &B1E5 | 1 | hw &07 = sw 16 (pink) pen 11 |
&B7E1 | &B1E6 | 1 | hw &12 = sw 18 (bright green) pen 12 |
&B7E2 | &B1E7 | 1 | hw &19 = sw 22 (pale green) pen 13 |
&B7E3 | &B1E8 | 1 | hw &04 = sw 1 (blue) pen 14 |
&B7E4 | &B1E9 | 1 | hw &17 = sw 11 (sky blue) pen 15 |
&B7E5 | &B1EA | 1+16 | Border and Pens' Second Inks (as hardware numbers): |
&B7E5 | &B1EA | 1 | hw &04 = sw 1 (blue) border |
&B7E6 | &B1EB | 1 | hw &04 = sw 1 (blue) pen 0 |
&B7E7 | &B1EC | 1 | hw &0A = sw 24 (bright yellow) pen 1 |
&B7E8 | &B1ED | 1 | hw &13 = sw 20 (bright cyan)pen 2 |
&B7E9 | &B1EE | 1 | hw &0C = sw 6 (bright red) pen 3 |
&B7EA | &B1FF | 1 | hw &0B = sw 26 (bright white) pen 4 |
&B7EB | &B1F0 | 1 | hw &14 = sw 0 (black) pen 5 |
&B7EC | &B1F1 | 1 | hw &15 = sw 2 (bright blue)pen 6 |
&B7ED | &B1F2 | 1 | hw &0D = sw 8 (bright magenta) pen 7 |
&B7EE | &B1F3 | 1 | hw &06 = sw 10 (cyan) pen 8 |
&B7EF | &B1F4 | 1 | hw &1E = sw 12 (yellow)pen 9 |
&B7F0 | &B1F5 | 1 | hw &1F = sw 14 (pale blue) pen 10 |
&B7F1 | &B1F6 | 1 | hw &07 = sw 16 (pink) pen 11 |
&B7F2 | &B1F7 | 1 | hw &12 = sw 18 (bright green) pen 12 |
&B7F3 | &B1F8 | 1 | hw &19 = sw 22 (pale green) pen 13 |
&B7F4 | &B1F9 | 1 | hw &04 = sw 1 (bright yellow) pen 14 |
&B7F5 | &B1FA | 1 | hw &17 = sw 11 (pink) pen 15 |
&B7F6 | &B1FB | 1 | |
&B7F7 | &B1FC | 1 | |
&B7F8 | &B1FD | 1 | |
&B7F9 | &BlFE | 2 | |
&B7FB | &B200 | 2 | |
&B7FD | |||
&B802 | 1+1 | ||
&B804 | 1 | number of entries in the Printer Translation Table (normally 10) | |
&B805 | 20*2 | Printer Translation Table; each entry comprises: byte 1: screen code byte 2: pnnter code |
|
&B805 | 2 | screen &A0 printer &5E (acute accent) | |
&B807 | 2 | screen &A1 printer &5C (\) | |
&B809 | 2 | screen &A2 printer &7B ({) | |
&B80B | 2 | screen &A3 printer &23 (#) | |
&B80D | 2 | screen &A6 printer &40 (@) | |
&B80F | 2 | screen &AB printer &7C (| ) |
|
&B811 | 2 | screen &AC printer &7D (}) | |
&B813 | 2 | screen &AD printer &7E (~) | |
&B815 | 2 | screen &AE printer &5D (]) | |
&B817 | 2 | screen &AF printer &SE ([) | |
&B819 | 20 | room for ten more translations | |
&B82D | &B100 | 1 | |
&B82E | &B101 | 1 | |
&B82F | &B102 | 2 | |
&B831 | &B104 | 1 | |
&B832 | &B105 | 2 | temporary store for stack pointer (SP) during interrupt handling |
&B834 | &B107 | &70 | temporary machine stack (from &B8B3 downwards) during interrupt handling |
&B8B4 | &B187 | 4 | TIME (stored with the LB first - four bytes give >166 days; three bytes give >15 hours) |
&B8B8 | &B18B | 1 | |
&B8B9 | &B18C | 2 | |
&B8BB | &B18E | 2 | |
&B8BD | &B190 | 2 | address of the first ticker block in chain (if any) |
&B8BF | &B192 | 1 | Keyboard scan flag (&00=scan not needed; &01=scan needed) |
&B8C0 | &B193 | 2 | address of the first event block in chain (if any) |
&B8C2 | &B195 | 1 | |
&B8C3 | &B196 | &10 | buffer for last RSX or RSX command name (last character has bit 7 set) |
&B8D3 | &B1A6 | 2 | address of first ROM or RSX chaining block in chain |
&B8D5 | 1 | RAM bank number | |
&B8D6 | &B1A8 | 1 | Upper ROM status (eg select number) |
&B8D7 | &B1A9 | 2 | entry point of foreground ROM in use (eg &C006 for BASIC ROM) |
&B8D9 | &B1AB | 1 | foreground ROM select address (0 for the BASIC ROM) |
&B8DA | 16*2 | ROM entry IY value (ie the address table) - the 6128 has ROMs numbered from 0 to 15 | |
&B1AC | 7*2 | ROM entry IY value (ie the address table) - the 464 has ROMs 1 to 7 only: | |
&B8DA | 2 | ROM 0 IY (not for the 464) | |
&B8DC | &B1AC | 2 | ROM 1 IY |
&B8DE | &B1AE | 2 | ROM 2 IY |
&B8E0 | &B1B0 | 2 | ROM 3 IY |
&B8E2 | &B1B2 | 2 | ROM 4 IY |
&B8E4 | &B1B4 | 2 | ROM 5 IY |
&B8E6 | &B1B6 | 2 | ROM 6 IY |
&B8E8 | &B1B8 | 2 | ROM 7 IY (usually &A700 for AMSDOS/CPM ROM) |
&B8EA | 2 | ROM 8 IY (not 464) | |
&B8EC | 2 | ROM 9 IY (not 464) | |
&B8EE | 2 | ROM 10 IY (not 464) | |
&B8F0 | 2 | ROM 11 IY (not 464) | |
&B8F2 | 2 | ROM 12 IY (not 464) | |
&B8F4 | 2 | ROM 13 IY (not 464) | |
&B8F6 | 2 | ROM 14 IY (not 464) | |
&B8F8 | 2 | ROM 15 IY (not 464) | |
&B8FA | 6 | 6 bytes of &FF | |
&B1BA | 14 | 14 bytes of &00 | |
&B900 | &B900 | 12*3 | High Kernel Jumpblock (on the 464 this block is 11*3 bytes in size) |
&B924 | &B921 | &1C0 | routines used by the High Kernel Jumpblock (on the 464 this is &1C8 bytes in size) |
&BAE4 | &BAE9 | bytes of &FF (&1C bytes on 6128, &17 bytes on 464) | |
&BB00 | &BB00 | 26*3 | Key Manager Jumpblock |
&BB4E | &BB4E | 36*3 | Text VDU Jumpblock |
&BBBA | &BBBA | 23*3 | Graphics VDU Jumpblock |
&BBFF | &BBFF | 34*3 | Screen Pack Jumpblock |
&BC65 | &BC65 | 22*3 | Cassette (and Disc if fitted) Manager Jumpblock |
&BCA7 | &BCA7 | 11*3 | Sound Manager Jumpblock |
&BCC8 | &BCC8 | 25*3 | Kernel Jumpblock |
&BD13 | &BD13 | 26*3 | Machine Pack Jumpblock (on the 464 this block is 14*3 bytes in size) |
&BD61 | &BD3D | 32*3 | Maths Jumpblock (on the 464 this block is 48*3 bytes in size) |
&BDCD | &BDCD | 14*3 | Firmware Indirections (on the 464 this block is 13*3 bytes in size |
&BDF7 | &BDF4 | bytes of &00 (&09 bytes on 6128, &0C bytes on the 464) the lower limit of Machine Stack if no Disc Drive | |
&BE00 | &BE00 | &40 | &40 bytes of &FF |
&BE40 | &BE40 | &4x | used by the AMSDOS ROM if a disc drive is fitted (otherwise &4x bytes of &FF) |
&BE40 | &BE40 | 2 | (address &A910) |
&BE42 | &BE42 | 2 | address of drive A XDPB |
&BE44 | &BE44 | 9 | Disc Set Up timing block: |
&BE44 | &BE44 | 2 | motor on period (default &0032; fastest &0023 @ 20mS) |
&BE46 | &BE46 | 2 | motor off period (default &00FA; fastest &00C8 @ 20mS) |
&BE48 | &BE48 | 1 | write current off period (default &AF @ 10mS) |
&BE49 | &BE49 | 1 | head settle time (default &0F @ 1mS) |
&BE4A | &BE4A | 1 | step rate period (default &0C; fastest &0A @ 1mS) |
&BE4B | &BE4B | 1 | head unload delay (default &01) |
&BE4C | &BE4C | 1 | b0=non DMA mode; b1 to b7=head load delay (default &03) |
&BE4D | &BE4D | 2 | |
&BE4F | &BE4F | 1 | Drive Header Information Block: |
&BE4F | &BE4F | 1 | last track used |
&BE50 | &BE50 | 1 | head number (&00) |
&BE51 | &BE51 | 1 | last sector used |
&BE52 | &BE52 | 1 | log2(sector size)-7 |
&BE53 | &BE53 | 1 | |
&BE54 | &BE54 | 1 | |
&BE55 | &BE55 | 1 | |
&BE56 | &BE56 | 1 | |
&BE58 | &BE58 | 1 | |
&BE59 | &BE59 | 1 | |
&BE5D | &BE5D | 1 | |
&BE5E | &BE5E | 1 | |
&BE5F | &BE5F | 1 | disc motor flag (&00=off;&01=on - strangely reversed) |
&BE60 | &BE60 | 2 | address of buffer for directory entries block (&A930) |
&BE62 | &BE62 | 2 | as &BE76 (ie&A9B0) |
&BE64 | &BE64 | 2 | |
&BE66 | &BE66 | 1 | disc retries (default &10) |
&BE67 | &BE67 | &11 | AMSDOS Ticker and Event Block: |
&BE67 | &BE67 | 2 | ticker chaining address |
&BE69 | &BE69 | 2 | tick count |
&BE6B | &BE6B | 2 | recharge count |
&BE6D | &BE6D | 2 | event chaining address |
&BE6F | &BE6F | 1 | count |
&BE70 | &BE70 | 1 | class (asynchronous event) |
&BE71 | &BE71 | 2 | ROM routine address (&C9D6) |
&BE73 | &BE73 | 1 | ROM select number (&07 ie the AMSDOS/CPM ROM) |
&BE74 | &BE74 | 1 | last sector number used |
&BE75 | &BE75 | 1 | |
&BE76 | &BE76 | 2 | address of «K buffer, or of header info block (for WRlTE SECTOR etc) |
&BE78 | &BE78 | 1 | disc error message flag (&00=on; &FF=off - reversed again) |
&BE7D | &BE7D | 2 | address of AMSDOS reserved area (&A700) |
&BE7F | &BE7F | x | area used by AMSDOS to copy routines into RAM for running |
&BE80 | &BE80 | &80 | &80 bytes of &FF (limit of machine stack if disc drive fitted) |
&BF00 | &BF00 | xy | &xy bytes of &00) |
&BFxy | machine stack (in theory this stack could extend down much further) | ||
&BFFF | &BFFF | upper limit of machine stack |
The area from &C000 to &FFFF is taken up by the screen memory - the layout of which is illustrated on the next page. Printed below are diagrams which show how the CPC uses the bytes of screen memory in the different MODE
s. For each byte:
MODE
2 (where there are two colours only, each pixel needs only one bit - either on or off)bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 p0 p1 p2 p3 p4 p5 p6 p7
(the pixels are arranged with p0 being the leftmost one, etc)
MODE
1 (where four colours are available and so two bits are needed for each pixel - 1 byte represents 4 pixels)bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 p0(1) p1(1) p2(1) p3(1) p0(0) p1(0) p2(0) p3(0)
(each pixel is twice as wide as in MODE
2)
MODE
0 (where sixteen colours are possible and four bits are needed for each pixel - 1 byte represents 2 pixels)bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 p0(0) p1(0) p0(2) p1(2) p0(1) p1(1) p0(3) p1(3)
(each pixel is four times as wide as in MODE
2)
NB: the numbers in brackets show which bit of the pixel's pen number the screen byte bit refers to. For example in MODE
1, the 4 most significant bits of the byte hold bit 1 of the pixel's pen value and the 41east signifcant bits hold bit 0 of the pen value.
6128 | 464 | Size | Comments on the memory locations ------+-------+------+------------------------------------------ &C000 &C000 &4000 normal (upper) screen area. The alternative (lower) screen area is from &4000 to &7FFF. The addresses of the starts of lines and rows in the normal screen area after a ''[[:documentations:software:locomotive.basic:start#mode|MODE]]'' instruction are: LINE R0W0 R0W1 R0W2 R0W3 R0W4 R0W5 R0W6 R0W7 1 C000 C800 D000 D800 E000 E800 F000 F800 2 C050 C850 D050 D850 E050 E850 F050 F850 3 C0A0 C8A0 D0A0 D8A0 E0A0 E8A0 F0A0 F8A0 4 C0F0 C8F0 D0F0 D8F0 E0F0 E8F0 F0F0 F8F0 5 C140 C940 D140 D940 E140 E940 F140 F940 6 C190 C990 D190 D990 E190 E990 F190 F990 7 C1E0 C9E0 D1E0 D9E0 E1E0 E9E0 F1E0 F9E0 8 C230 CA30 D230 DA30 E230 EA30 F230 FA30 9 C280 CA80 D280 DA80 E280 EA80 F280 FA80 10 C2D0 CAD0 D2D0 DAD0 E2D0 EAD0 F2D0 FAD0 11 C320 CB20 D320 DB20 E320 EB20 F320 FB20 12 C370 CB70 D370 DB70 E370 EB70 F370 FB70 13 C3C0 CBC0 D3C0 DBC0 E3C0 EBC0 F3C0 FBC0 14 C410 CC10 D410 DC10 E410 EC10 F410 FC10 15 C460 CC60 D460 DC60 E460 EC60 F460 FC60 16 C4B0 CCB0 D4B0 DCB0 E4B0 ECB0 F4B0 FCB0 17 C500 CD00 D500 DD00 E500 ED00 F500 FD00 18 C550 CD50 D550 DD50 E550 ED50 F550 FD50 19 C5A0 CDA0 D5A0 DDA0 E5A0 EDA0 F5A0 FDA0 20 C5F0 CDF0 D5F0 DDF0 E5F0 ED50 F550 FD50 21 C640 CE40 D640 DE40 E640 EE40 F640 FE40 22 C690 CE90 D690 DE90 E690 EE90 F690 FE90 23 C6E0 CEE0 D6E0 DEE0 E6E0 EEE0 F6E0 FEE0 24 C730 CF30 D730 DF30 E730 EF30 F730 FF30 25 C780 CF80 D780 DF80 E780 EF80 F780 FF80 spare start C7D0 CFD0 D7D0 DFD0 E7D0 EFD0 F7D0 FFD0 spare end C7FF CFFF D7FF DFFF E7FF EFFF F7FF FFFF
Once the whole screen has been scrolled in any direction, the above table will become incorrect. On scrolling, all the above addresses will have an offset (MOD &800) added, derived as follows:
+&02 per scroll to the left (=2, 1 or « character in MODE 2, MODE 1 or MODE 0 respectively) -&02 per scroll to the right (=2, 1 or « character in MODE 2, MODE 1 or MODE 0 respectively) +&50 per scroll up one line -&50 per scroll down one line
If scrolled far enough, a screen row may sit across the boundaries of the screen memory area, whose bottom end will then wrap around to join up with the top (ie byte &FFFF will be followed by byte &C000 assuming the normal screen area). If before scrolling however, a window had been set up smaller than the whole screen then the table will remain accurate despite any scrolling.
The 'spare' areas of screen memory are filled with bytes of the relevant PAPER
value each time there is a full screen CLS, and are not really available for other uses. After scrolling the spare areas may be used as screen with other bytes becoming spare.