Les articles Amstrad >Les produits Amstrad > Les CPC > Articles techniques > Firmware - System Variables (uk)

Firmware - System Variables (uk)

Firmware - System Variables
 
     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &0000 * &0000 * &40  * Restart block:
     &0000 * &0000 *      * RST0: complete machine reset
     &0008 * &0008 *      * RST 1: LOWJUMP: in-line two byte address:
           *       *      * b0 to b1*=address; b14=Low ROM disabled;
           *       *      * b15=Upper ROM disabled
     &000B * &000B *      * LOW PCHL: HL has address as RST 1
     &000E * &000E *      * 'JMP BC': BC has address to jump to
     &0010 * &0010 *      * RST 2: SIDE CALL: inline two byte address:
           *       *      * b0 to b1*=address-&C000; bl4 to b15=offset
           *       *      * to required ROM (used between sequenced
           *       *      * Foreground ROMs)
     &001* * &001* *      * SIDE PCHL: HL has address as RST 2
     &0016 * &0016 *      * 'JMP DE': DE has address to jump to
     &0018 * &0018 *      * RST *: FAR CALL: inline three byte address
           *       *      * block: bytes 1 and 2 hold the address;
           *       *      * byte * holds the ROM select address
     &001B * &001B *      * FAR PCHL: as RST *, but HL has address;
           *       *      * C has ROM select
     &001E * &001E *      * 'JMP HL': HL has address to jump to
     &0020 * &0020 *      * RST 4: RAM LAM: LD A,(HL) from RAM with
           *       *      * ROMs disabled
     &002* * &002* *      * FAR CALL: as RST *, but HL has address of
           *       *      * three byte address block
     &0028 * &0028 *      * RST 5: FIRM JUMP: inline two byte address
           *       *      * to jump to
     &00*0 * &00*0 *      * RST 6: User restart; default to RST 0
     &00*8 * &00*8 *      * RST 7: Interrupt entry (KB/Time etc)
     &00*B * &00*B *      * External interrupt (default to RET)
     &0040 * &0040 * &1*0 * 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 FNs area
           *       *      * Arrays area
           *       *      * Free space
           *       *      *   end of free space
           *       *      * Strings area
           *       *      *   end of Strings area (=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
           *       *      * ROM Upper reserved area, expandible during
           *       *      *   KL ROM WALK, including:
           *       * r*4  * ROM chaining blocks (arranged as follows):
     &A6FC * &A6FC * 4    * AMSDOS chain,ing 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
     ******Á*******Á******Á******************************************

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &A700 * &A700 * &500 * AMSDOS reserved area
           *       *      *   This area is moved down if any ROMs have
           *       *      *   numbers greater than eight (6128 only)
     &A700 * &A700 * 1    * Current drive number (0=A; 1=B)
     &A701 * &A701 * 1    * Current USER number
     &A702 * &A702 * 1    * flag?
     &A70* * &A70* * 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 * *    * file extension (BAS, BIN, BAK, etc)
           *       *      *   including:
     &A712 * &A712 * 1    * b7 set = Read Only
     &A71* * &A71* * 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)
     &A7*6 * &A7*6 * *    * file extension ($$$ while open; correct
           *       *      *   extension when finished)
     &A7*9 * &A7*9 * 1    * flag (&00=open; &FF=closed, ie finished)
     &A7*A * &A7*A * 1    *
     &A7*B * &A7*B * 1    * flag (&00=open; &FF=closed)
     &A7*C * &A7*C * 1    * number of 128 byte records saved so far
     &A7*D * &A7*D * 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
     &A75* * &A75* * 2    * address of next byte to read for ASCII, or
           *       *      *   of 2K buffer for BAS or BIN file

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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 * *    * 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 * *    * 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 * *    * extension
     &A7AB * &A7AB * 1    * flag (&00=Open)
     &A7AC * &A7AC * 1    *
     &A7AD * &A7AD * 1    * flag (&00=Open)
     &A7AE * &A7AE * *    * 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 * *    * 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** * Tape Jumpblock is stored here by AMSDOS
           *       *      *   - is moved to &BC77 etc after |TAPE
     &A88B * &A88B * *    * far address used by AMSDOS RST *s at &BC77
           *       *      *   etc (&CD*0,&07)
     ******Á*******Á*************************************************

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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 (&0*=1024 bytes;
           *       *      *   &04=2048 bytes)
     &A89* * &A89* * 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 signiflcant 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)
     &A8A* * &A8A* * 1    * format filler byte (&E5)
     &A8A4 * &A8A4 * 1    * log2(sector size)-7 (&02=512; &0*=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    *
     &A9*0 * &A9*0 * &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)

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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**  * groups of * 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 *       * 1    *
           * &AC2* * 1    *
     &AC09 * &AC24 * 1    * WIDTH (&84=1*2)
     &AC0A * &AC25 *      *
     &AC0B *       *      *
     &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 * &AC*0 * 1    * WHILE/WEND flag (&41=WEND not yet used;
           *       *      *   &04=used)
     &AC17 * &AC*1 *      *
     &AC18 * &AC*2 * 2    *
     &AClA * &AC*4 * 2    *
     &AC1C * &AC*6 * 2    * address of location holding ROM routine
           *       *      *   address for KB event block
     ****************************************************************
     &AC1E * &AC*8 * &0C  * Event Block for ON SQ(l):
     &AC1E * &AC*8 * 2    * chain address to next event block; &0000
           *       *      *   if last in chain, but &FFFF if unused
     &AC20 * &AC*A * 1    * count
     &AC21 * &AC*B * 1    * class: Far address, highest (ON SQ)
           *       *      *   priority, Normal & Synchronous event
     &AC22 * &AC*C * 2    * routine address (in BASIC ROM)
     &AC24 * &AC*E * 1    * ROM Select number (&FD ie ROM 0 enabled,
           *       *      *   Lower ROM disabled)
     &AC25 * &AC*F * 1    * (first byte of user field)
     &AC26 * &AC40 * 2    * address of the end of program line byte or
           *       *      *   ':' after 'ON SQ(x) 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
     &AC*6 * &AC50 * &0C  * Event block for ON SQ(4), arranged as
           *       *      *   &AC1E onwards - lowest ON SQ priority

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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 tbe line before the GOSUB routine
     &AC54 * &AC6E * &12  * Ticker and Event Block for AFTER/EVERY
           *       *      *   Timer 1 (*rd 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 * (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    *

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &AD99 * &ADB2 * &09  * Current SOUND parameter block (see
           *       *      *   Firmware Jump &BCAA)
     &AD99 * &ADB2 * 1    * channel andrendezvous status
     &AD9A * &ADB* * 1    * amplitude envelope (ENV) number
     &AD9B * &ADB4 * 1    * tone envelope (ENT) number
     &AD9C * &ADB5 * 2    * tone 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
     &ADA* * &ADBC * *    * first section of the envelope:
     &ADA* * &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 * *    * second section of the envelope, as &ADA*
     &ADA9 * &ADC2 * *    * third section of the envelope, as &ADA*
     &ADAC * &ADC5 * *    * fourth section of the envelope, as &ADA*
     &ADAF * &ADC8 * *    * fifth section of the envelope, as &ADA*
     &ADB2 * &ADCB * 5    *
     &ADB7 * &ADD0 * &*6  *
     &ADEB * &AE04 * 2    *
     &ADED * &AE06 * 6    *
           *       *      *
     &ADF* * &AE0C * 26*1 * table of DEFINT (&02), DEFSTR (&0*) 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 * &AE*0 * 2    * address of byte before next DATA item (eg
           *       *      *   comma or space)
     &AE19 * &AE*2 * 2    * address of next space on GOSUB etc stack,
           *       *      *   (see also &B06F)
     &AE1B * &AE*4 * 2    * address of byte before current statement
           *       *      *   (&00*F if in Direct Command mode)
     &AE1D * &AE*6 * 2    * address of line nurnber LB of line of
           *       *      *   current statement (&0000 if in Direct
           *       *      *   Command mode)
     &AE1F * &AE*8 * 1    * trace flag (0=TROFF; <>0=TRON)
     &AE20 * &AE*9 * 1    * flag used with Trace (&00 if in Direct
           *       *      *   Command mode; &01 if in a program)

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &AE21 * &AE*A *      *
     &AE22 * &AE*B * 2    *
     &AE24 * &AE*D * 2    *
     &AE26 * &AE*F * 2    * address to load cassette file to
     &AE28 * &AE41 *      *
     &AE29 * &AE42 * 1    * file type from cassette header
     &AE2A * &AE4* * 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
     &AE*A * &AE5* * 5    * start of buffer used to form hexadecimal
           *       *      *   numbers before printing etc
     &AE*A * &AE5* * 1    * Key Number used with INKEY (providing the
           *       *      *   Key Number is written as a decimal)
     &AE*E * &AE57 * 1    * last byte (usually &00 or &20) of the
           *       *      *   formed binary or hexadecimal number
     &AE4* * &AE5D * 1*   * buffer used to form decimal numbers before
           *       *      *   printing etc
     &AE4E * &AE68 * 1    * last byte (usually &00 or &20) of the
           *       *      *   formed decimal number
           * &AE6B * *    *
     &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 * &AE8* * 2    * as &AE68
     &AE68 * &AE85 * 2    * address of start of Variables and DEF FNs
           *       *      *   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    *

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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 FORs,*1 max for
           *       *      *   Integer FORs):
           *       * 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 FORs
           *       * 5    * value of STEP - two bytes for Integer FORs
           *       * 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 FORs; &10 for
           *       *      *   Integer FORs)
     ****************************************************************
           *       *      * 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

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &B071 * &B08D * 2    * address of end of free space (the byte
           *       *      *   before the Strings area)
     &B07* * &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** * 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; &0*=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    *
     &B0A* * &B0C5 * 2    *
     &B0A5 * &B0C7 * &5B  * (&*9 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    *
     &B11* * &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;
           *       *      *   &0*=opened; &05=IN char)
     &B11B * &B80* * 2    * address of 2K buffer for directories
     &B11D * &B805 * 2    * address of 2K buffer for loading blocks of
           *       *      *   files - often as &B11B

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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
     &B1*0 * &B818 * 1    * last block flag (&FF=last block; &00=not)
     &B1*1 * &B819 * 1    * file type (&00=BASIC; &01=Protected BASIC;
           *       *      *   &02=Binary; &08=Screen; &16=ASCII)
     &B1*2 * &B81A * 2    * length of this block
     &B1*4 * &B81C * 2    * address to load this or the next block
           *       *      *   at,or the address of the byte after last
           *       *      *   one loaded
     &B1*6 * &B81E * 1    * first block flag (&FF=first block;
           *       *      *   &00=not)
     &B1*7 * &B81F * 2    * total length of file (all blocks)
     &B1*9 * &B821 * 2    * execution address for BIN files (&0000 if
           *       *      *   not saved as such)
     &B1*B * &B82* * &24  * not allocated
     ****************************************************************
     &B15F * &B847 * 1    * file OUT flag (&00=closed; &02=IN file;
           *       *      *   &0*=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 &B1*1
     &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 * &B86* * 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 * &B8A* * 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 * &B5*9 *      * base address for calculating relevant
           *       *      *   Sound Channel ?
     &B1E4 * &B8CC * 1    *

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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
           *       *      *   &5*; SPEED WRITE 1 &29 @ 4æS)
     &B1EB * &B8D* * 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 * &*F  * Sound Channel A (1) data:
     &B212 * &B576 * 1    * number of sounds still queuing
     &B21* * &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; b* = Hold; b4 = Flush
     &B218 * &B57C * 1    * b0 to b* = 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 * &B58* * 8    * second sound in Channel 1 queue (as &B217)
     &B227 * &B58B * 8    * third sound in Channel 1 queue (as &B217)
     &B22F * &B59* * 8    * fourth sound in Channel 1 queue (as &B217)
     ****************************************************************
     &B2*7 * &B59B * &*F  * 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 * &*F  * 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    * *rd sound in Channel 4 queue (as &B217)
     &B2AD * &B611 * 8    * 4th sound in Channel 4 queue (as &B217)


     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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 * &B6*A * &10  * ENV *
     &B2E6 * &B64A * &10  * ENV 4
     &B2F6 * &B65A * &10  * ENV 5
     &B*06 * &B66A * &10  * ENV 6
     &B*16 * &B67A * &10  * ENV 7
     &B*26 * &B68A * &10  * ENV 8
     &B**6 * &B69A * &10  * ENV 9
     &B*46 * &B6AA * &10  * ENV 10
     &B*56 * &B6BA * &10  * ENV 11
     &B*66 * &B6CA * &10  * ENV 12
     &B*76 * &B6DA * &10  * ENV 1*
     &B*86 * &B6EA * &10  * ENV 14
     &B*96 * &B6FA * &10  * ENV 15
     ****************************************************************
     &B*96 * &B6FA *      * base address for calculating relevant ENT
           *       *      *   parameter block
     &B*A6 * &B70A * 15*16* ENT parameter block area (each arranged as
           *       *      *   &ADA2):
     &B*A6 * &B70A * &10  * ENT 1
     &B*B6 * &B71A * &10  * ENT 2
     &B*C6 * &B72A * &10  * ENT *
     &B*D6 * &B7*A * &10  * ENT 4
     &B*E6 * &B74A * &10  * ENT 5
     &B*F6 * &B75A * &10  * ENT 6
     &B406 * &B76A * &10  * ENT 7
     &B416 * &B77A * &10  * ENT 8
     &B426 * &B78A * &10  * ENT 9
     &B4*6 * &B79A * &10  * ENT 10
     &B446 * &B7AA * &10  * ENT 11
     &B456 * &B7BA * &10  * ENT 12
     &B466 * &B7CA * &10  * ENT 1*
     &B476 * &B7DA * &10  * ENT 14
     &B486 * &B7EA * &10  * ENT 15


     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &B496 * &B*4C * &50  * Normal Key Table:
           *       *      * Cur U Cur R Cur D f9    f6    f*    Enter f.
           *       *      * Cur L 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     *     e     w     s     d     c     x
           *       *      * 1     2     Esc   q     Tab   a     Caps  z
           *       *      * [VT]  [LF]  [BS]  [TAB] Fire2 Fire1       Del
     ****************************************************************
     &B4E6 * &B*9C * &50  * Shifted Key Table:
           *       *      * Cur U Cur R Cur D f9    f6    f*    Enter f.
           *       *      * Cur L 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     ->    A     Caps  Z
           *       *      * [VT]  [LF]  [BS]  [TAB] Fire2 Fire1       Del
     ****************************************************************
     &B5*6 * &B*EC * &50  * Control Key Table:
           *       *      * Cur U Cur R Cur D f9    f6    f*    Enter f.
           *       *      * Cur L 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) (DC*) (EOT) (ETX) (CAN)
           *       *      *       ~     Esc   (DC1) Ins   (SOH) S-lck (SUB)
           *       *      *                                     Del
     ****************************************************************
     &B586 * &B4*C * 10   * KB 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 * &B4E* * 2    * address of byte after end of DEF KEY area
     &B62F * &B4E5 * 1    *
     &B6*0 * &B4E6 * 1    *
     &B6*1 * &B4E7 * 1    * Shift lock flag (&00=off; &FF=on)
     &B6*2 * &B4E8 * 1    * Caps lock flag (&00=off; &FF=on)
     &B6** * &B4E9 * 1    * KB repeat period (SPEED KEY - default &02
           *       *      *   @ 0.02 seconds)
     &B6*4 * &B4EA * 1    * KB delay period (SPEED KEY - default &1E
           *       *      *   @ 0.02 seconds)

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &B6*5 * &B4EB * 2*10 * Tables used for key scanning; bits 0 to 7
           *       *      *   give the table columns (from left to
           *       *      *   right):
     &B6*5 * &B4EB * 1    * Cur U Cur R Cur D f9    f6    f*    Enter f.
     &B6*6 * &B4EC * 1    * Cur L Copy  f7    f8    f5    f1    f2    f0
     &B6*7 * &B4ED * 1    * Clr   [     Ret   ]     f4    Shift      Ctrl
     &B6*8 * &B4EE * 1    * ^     -     @     p     ;     :     /     .
     &B6*9 * &B4EF * 1    * 0     9     o     i     l     k     m     j
     &B6*A * &B4F0 * 1    * 8     7     u     y     h     j     n     Space
     &B6*B * &B4F1 * 1    * Down  Up    Left  Right Fire2 Fire1 (Joystick 1)
     &B6*B * &B4F1 * 1    * 6     5     r     t     g     f     b     v
     &B6*C * &B4F2 * 1    * 4     *     e     w     s     d     c     x
     &B6*D * &B4F* * 1    * 1     2     Esc   q     Tab   a     Caps  z
     &B6*E * &B4F4 * 1    * Down  Up    Left  Right Fire2 Fire1 (Joystick 2)
     &B6*E * &B4F4 * 1    *                                           Del
           *       *      *
     &B6*F * &B4F5 * 1    * complement of &B6*5
     &B640 * &B4F6 * 1    * complement of &B6*6
     &B641 * &B4F7 * 1    * complement of &B6*7
     &B642 * &B4F8 * 1    * complement of &B6*8
     &B64* * &B4F9 * 1    * complement of &B6*9
     &B644 * &B4FA * 1    * complement of &B6*A
     &B645 * &B4FB * 1    * complement of &B6*B
     &B646 * &B4FC * 1    * complement of &B6*C
     &B647 * &B4FD * 1    * complement of &B6*D
     &B648 * &B4FE * 1    * complement of &B6*E
     ****************************************************************
     &B64B * &B501 *      *
     &B65* * &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 * &B51* * 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 * &B5*C * 1    *
     &B687 * &B5*D * 1    * accumulated count of the number of keys
           *       *      *   pressed (MOD 20)
     &B688 * &B5*E * 1    * number of keys left in key buffer
     &B689 * &B5*F * 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 * &B54* * 2    * address of the shifted key table
     &B68F * &B545 * 2    * address of the control key table
     &B691 * &B547 * 2    * address of the KB repeats table

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &B692 *       * 1    *
     &B69* * &B*28 * 2    * ORIGIN x
     &B695 * &B*2A * 2    * ORIGIN y
     &B697 * &B*2C * 2    * graphics text x position (pixel)
     &B699 * &B*2E * 2    * graphics text y position(pixel)
     &B69B * &B**0 * 2    * graphics window x of one edge (pixel)
     &B69D * &B**2 * 2    * graphics window x of other edge (pixel)
     &B69F * &B**4 * 2    * graphics window y of one side (pixel)
     &B6A1 * &B**6 * 2    * graphics window y of other side (pixel)
     &B6A* * &B**8 * 1    * GRAPHICS PEN
     &B6A4 * &B**9 * 1    * GRAPHICS PAPER
     ****************************************************************
     &B6A5 * &B**A * 8/14 * (This area is 14 bytes on the 464) Used by
           *       *      *   line drawing (and other) routines, as
           *       *      *   follows:
     &B6A7 * &B**A * 2    * x+1()
     &B6A9 * &B**C * 2    * y/2+1()
     &B6AB * &B**E * 2    * y/2-x()
     &B6AD * &B*40 * 2    *
           * &B*42 * 2    *
     &B6AF * &B*44 * 1    *
     &B6B0 * &B*45 * 1    *
     &B6B1 * &B*46 * 1    *
     &B6B2 *       * 1    * first point on drawn line flag (<>0=to be
           *       *      *   plotted; 0=don't plot)
     &B6B* *       * 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 * &B2*A * 14/15* stream (window) * 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

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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)
     &B7*0 * &B290 * 1    * current PAPER number (encoded, not its INK
           *       *      *   number)
     &B7*1 * &B291 * 2    * address of text background routine:
           *       *      *   opaque=&1*92; transparent=&1*A0
     &B7** * &B29* * 1    * graphics character writing flag (0=off;
           *       *      *   <>0=on)
     &B7*4 * &B294 * 1    * ASCII number of the first character in
           *       *      *   User Defined Graphic (UDG) matrix table
     &B7*5 * &B295 * 1    * UDG matrix table flag (&00=non-existent;
           *       *      *   &FF=present)
     &B7*6 * &B296 * 2    * address of UDG matrix table
     &B7*8 * &B298 * 2    *
     &B758 * &B2B8 * 1    *
     &B759 * &B2B9 * 1    *

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &B76* * &B2C* * *2** * 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 *: address of the control
           *       *      *     code's handling routine
     &B76* * &B2C* * *    * ASC 0:  &80,&151*: NUL
     &B766 * &B2C6 * *    * ASC 1:  &81,&1**5: Print control code
           *       *      *     chararacter [,char]
     &B769 * &B2C9 * *    * ASC 2:  &80,&1297: Disable cursor
     &B76C * &B2CC * *    * ASC *:  &80,&1286: Enable cursor
     &B76F * &B2CF * *    * ASC 4:  &81,&0AE9: Set mode [,mode]
     &B772 * &B2D2 * *    * ASC 5:  &81,&1940: Print character using
           *       *      *     graphics mode [,char]
     &B775 * &B2D5 * *    * ASC 6:  &00,&1459: Enable VDU
     &B778 * &B2D8 * *    * ASC 7:  &80,&14E1: Beep
     &B77B * &B2DB * *    * ASC 8:  &80,&1519: Back-space
     &B77E * &B2DE * *    * ASC 9:  &80,&151E: Step-right
     &B781 * &B2E1 * *    * ASC 10: &80,&152*: Linefeed
     &B784 * &B2E4 * *    * ASC 11: &80,&1528: Previous line
     &B787 * &B2E7 * *    * ASC 12: &80,&154F: Clear window and locate
           *       *      *     the cursor at position  1,1
     &B78A * &B2EA * *    * ASC 1*: &80,&15*F: RETURN
     &B78D * &B2ED * *    * ASC 14: &81,&12AB: Set paper [,pen]
     &B790 * &B2F0 * *    * ASC 15: &81,&12A6: Set pen [,pen]
     &B79* * &B2F* * *    * ASC 16: &80,&155E: Delete the character at
           *       *      *     the cursor position
     &B796 * &B2F6 * *    * ASC 17: &80,&1599: Clear the line up to
           *       *      *     the current cursor position
     &B799 * &B2F9 * *    * ASC 18: &80,&158F: Clear from the cursor
           *       *      *     position to the end of the line
     &B79C * &B2FC * *    * ASC 19: &80,&1578: Clear from start of the
           *       *      *     window to the cursor position
     &B79F * &B2FF * *    * ASC 20: &80,&1565: Clear from the cursor
           *       *      *     position to the end of a window
     &B7A2 * &B*02 * *    * ASC 21: &80,&1452: Disable VDU
     &B7A5 * &B*05 * *    * ASC 22: &81,&14EC: Set text write mode
           *       *      *     [,mode]
     &B7A8 * &B*08 * *    * ASC 2*: &81,&0C55: Set graphics draw mode
           *       *      *     [,mode]
     &B7AB * &B*0B * *    * ASC 24: &80,&12C6: Exchange pen and paper
     &B7AE * &B*0E * *    * ASC 25: &89,&150D: Define user defined
           *       *      *     character [,char,8 rows of char]
     &B7B1 * &B*11 * *    * ASC 26: &84,&1501: Define window
           *       *      *     [,left,right,top,bottom]
     &B7B4 * &B*14 * *    * ASC 27: &00,&14EB: ESC (=user)
     &B7B7 * &B*17 * *    * ASC 28: &8*,&14F1: Set the pen inks
           *       *      *     [,pen,ink 1,ink 2]
     &B7BA * &B*1A * *    * ASC 29: &82,&14FA: Set border colours
           *       *      *     [,ink,ink2]
     &B7BD * &B*1D * *    * ASC *0: &80,&15*9: Locate the text cursor
           *       *      *     at position 1,1
     &B7C0 * &B*20 * *    * ASC *1: &82,&1547: Locate the text cursor
           *       *      *     at [,column,line]

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &B7C* * &B1C8 * 1    * MODE number
     &B7C4 * &B1C9 * 2    * screen offset
     &B7C6 * &B1CB * 1    * screen base HB (LB taken as &00)
     &B7C7 * &B1CC * *    * 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)
     &B7D* * &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 &1* = sw 20   (bright cyan)     pen 2
     &B7D8 * &B1DD * 1    * hw &0C = sw 6    (bright red)      pen *
     &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 * &B1E* * 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 1*
     &B7E* * &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 &1* = sw 20   (bright cyan)     pen 2
     &B7E9 * &B1EE * 1    * hw &0C = sw 6    (bright red)      pen *
     &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 * &B1F* * 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
     &B7F* * &B1F8 * 1    * hw &19 = sw 22   (pale green)      pen 1*
     &B7F4 * &B1F9 * 1    * hw &04 = sw 1    (bright yellow)   pen 14
     &B7F5 * &B1FA * 1    * hw &17 = sw 11   (pink)            pen 15

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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 &A* printer &2* (#)
     &B80D *       * 2    * screen &A6 printer &40 (@)
     &B80F *       * 2    * screen &AB printer &7C (|)
     &B811 *       * 2    * screen &AC printer &7D (})
     &B81* *       * 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    *
     &B8*1 * &B104 * 1    *
     &B8*2 * &B105 * 2    * temporary store for stack pointer (SP)
           *       *      *   during interrupt handling
     &B8*4 * &B107 * &70  * temporary machine stack (from &B8B*
           *       *      *   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 * &B19* * 2    * address of the first event block in chain
           *       *      *   (if any)
     &B8C2 * &B195 * 1    *
     &B8C* * &B196 * &10  * buffer for last RSX or RSX command name
           *       *      *   (last character has bit 7 set)
     &B8D* * &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)

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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 *  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 1* 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** * High Kernel Jumpblock (on the 464 this
           *       *      *   block is 11** 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** * Key Manager Jumpblock
     &BB4E * &BB4E * *6** * Text VDU Jumpblock
     &BBBA * &BBBA * 2*** * Graphics VDU Jumpblock
     &BBFF * &BBFF * *4** * Screen Pack Jumpblock
     &BC65 * &BC65 * 22** * Cassette (and Disc if fitted) Manager
           *       *      *   Jumpblock
     &BCA7 * &BCA7 * 11** * Sound Manager Jumpblock
     &BCC8 * &BCC8 * 25** * Kernel Jumpblock
     &BD1* * &BD1* * 26** * Machine Pack Jumpblock (on the 464 this
           *       *      *   block is 14** bytes in size)
     &BD61 * &BD*D * *2** * Maths Jumpblock (on the 464 this block is
           *       *      *   48** bytes in size)
     &BDCD * &BDCD * 14** * Firmware Indirections (on the 464 this
           *       *      *   block is 1*** 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

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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 &00*2; fastest
           *       *      *   &002* @ 20mS)
     &BE46 * &BE46 * 2    * motor off period (default &00FA; fastest
           *       *      *   &00C8 @ 20mS)
     &BE48 * &BE48 * 1    * write current off period (default &AF
           *       *      *   @ 10æS)
     &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 &0*)
     &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
     &BE5* * &BE5* * 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 (&A9*0)
     &BE62 * &BE62 * 2    * as &BE76 (ie&A9B0)
     &BE64 * &BE64 * 2    *
     &BE66 * &BE66 * 1    * disc retries (default &10)

     6128  * 464   * Size * Comments on the memory locations
     ****************************************************************
     &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)
     &BE7* * &BE7* * 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 MODEs.  For each byte:

in MODE 2 (where there are two colours only, each pixel needs only one
           bit - either on or off)

    bit7 bit6 bit5 bit4 bit* bit2 bit1 bit0
     p0   p1   p2   p*   p4   p5   p6   p7

(the pixels are arranged with p0 being the leftmost one, etc)

in 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  bit*  bit2  bit1  bit0
    p0(1) p1(1) p2(1) p*(1) p0(0) p1(0) p2(0) p*(0)

(each pixel is twice as wide as in MODE 2)

in MODE 0 (where sixteen colours are possible and four bits are needed
           for each pixel - 1 byte represents 2 pixels)

    bit7  bit6  bit5  bit4  bit*  bit2  bit1  bit0
    p0(0) p1(0) p0(2) p1(2) p0(1) p1(1) p0(*) p1(*)

(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 MODE instruction
                              are:

    LINE    R0W0   R0W1   R0W2   R0W*   R0W4   R0W5   R0W6   R0W7
    1       C000   C800   D000   D800   E000   E800   F000   F800
    2       C050   C850   D050   D850   E050   E850   F050   F850
    *       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       C2*0   CA*0   D2*0   DA*0   E2*0   EA*0   F2*0   FA*0
    9       C280   CA80   D280   DA80   E280   EA80   F280   FA80
    10      C2D0   CAD0   D2D0   DAD0   E2D0   EAD0   F2D0   FAD0
    11      C*20   CB20   D*20   DB20   E*20   EB20   F*20   FB20
    12      C*70   CB70   D*70   DB70   E*70   EB70   F*70   FB70
    1*      C*C0   CBC0   D*C0   DBC0   E*C0   EBC0   F*C0   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
    2*      C6E0   CEE0   D6E0   DEE0   E6E0   EEE0   F6E0   FEE0
    24      C7*0   CF*0   D7*0   DF*0   E7*0   EF*0   F7*0   FF*0
    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.

FIRMWARE SUMMARY

   The Firmware Jumpblock is the  recommended method of communicating
with the routines in the lower  ROM  -  it  is  used by BASIC, and it
should also be used  by  other  programs.  The  reason  for using the
jumpblock is that  the  routines  in  the  lower  ROM  are located at
different positions on the  different  machines.   The entries in the
jumpblock, however, are all in the  same  place - the instructions in
the jumpblock redirect the computer to the correct place in the lower
ROM.  Thus, providing a program uses the jumpblock, it should work on
any CPC computer. By altering  the  firmware jumpblock it is possible
to make the computer run a different routine from normal.  This could
either be a different routine in the lower or upper ROM, or a routine
written by the user - this is  known as 'patching the jumpblock'.  It
is worth noting that because BASIC  uses the firmware jumpblock quite
heavily, it is possible to  alter  the  effect of BASIC commands. The
following example will change  the  effect  of  calling  SCR SET MODE
(&BCOE) - instead of changing  the  mode,  any calls to this location
will print the letter 'A'.  The first  thing to do is to assemble the
piece of code that will be used to print the letter - this is printed
below and starts at &4000.

ORG &4000
LD A,65      ; 65 IS ASCII FOR 'A'
CALL &BB5A   ; TXT OUTPUT
RET          ; RETURN FROM SUBROUTINE

   The jumpblock entry for SCR  SET  MODE  is  now patched so that it
reroutes all calls to &BC0E away from the lower ROM and to our custom
routine at &4000.  This is done by changing the bytes at &BC0E, &BC0F
and &BC10 to &C*, &00, &40 respectively  (ie JP &4000).  Any calls to
&BC0E or MODE  commands  will  now  print  the  letter  A  instead of
changing mode.  The indirections jumpblock contains a small number of
routines which are called by the  rest  of the firmware.  By altering
this jumpblock, it is possible to alter the way in which the firmware
operates on a large scale - thus  it is not always necessary to patch
large numbers of entries  in  the  firmware  jumpblock. There are two
jumpblocks which are to do with the Kemel (ie the high and low Kernel
jumpblocks).  The high jumpblock allows  ROM states and interrupts to
be altered, and also  controls  the  introduction  of  RSXs.  The low
jumpblock contains general  routines  and  restart instructions which
are used by the computer for its own purposes.

  Voir cet article au format PDF Imprimer cet article

RECHERCHE
LANGUE
* Donathon 2017 *

145 €

 

 

 

 En savoir plus

Le Chat
 Smiles  Loading...
EN LIGNE
19 Personne(s) en ligne (1 Personne(s) connectée(s) sur Les articles Amstrad)

Utilisateur(s): 7
Invité(s): 12

Moonbeam, Golem13, rity, loopng, moudubou, BDCIRON, Fagal, Plus ...
Musiques CPC

Lecteur MP3
CPC-Scene Radio

 

 

ROLAND RADIO

Connexion
Identifiant :

Mot de passe :

Se souvenir de moi



Mot de passe perdu ?

Inscrivez-vous !

 

Informations
________________________________

Suivre Amstrad.eu

________________________________

Autres Créations web

________________________________

 

Declaration CNIL : 1005884

Association : 0540200002843

Charte

Avertissements

Plan du site

Carte de France des membres

 

 

 

Facebook.

Twitter.

RSS forum.

RSS News.

Contact.

 

Gaston-Phoebus.com

Amstrad.eu

untour.fr

Cathydeco.com

Higoogle

Harloup.fr

** Faire un don **

 

Conception Phenix © 2000 - 2014