System variables, code & hooks in RAM after boot
This page was last modified 15:14, 4 February 2013 by NYYRIKKI. Based on work by AxelF.

DISK variables: (needs proper translation) (MSX-DOS1)

BIOS System variables

      Length
0004  2        Base Adress of the MSX Character Set
0006  1        Base Port Adress for the VDP data READ 
0007  1        Base Port Adress for the VDP data WRITE
002B  1        Basic ROM Character set / Date format / Default interrupt freq
               7 6 5 4 3 2 1 0
               | | | | +-+-+-+-- Character set
               | | | |           0 = Japanese, 1 = International, 2=Korean
               | +-+-+---------- Date format
               |                 0 = Y-M-D, 1 = M-D-Y, 2 = D-M-Y
               +---------------- Default interrupt frequency
                                 0 = 60Hz, 1 = 50Hz

002C  1        Basic ROM Keyboard type / Basic version
               7 6 5 4 3 2 1 0
               | | | | +-+-+-+-- Keyboard type
               | | | |           0 = Japanese, 1 = International
               | | | |           2 = French (AZERTY), 3 = UK, 4 = German (DIN)
               +-+-+-+---------- Basic version
                                 0 = Japanese, 1 = International

002D  1        MSX Version Nuber
               0 = MSX 1
               1 = MSX 2
               2 = MSX 2+
               3 = MSX Turbo R

002E  1        IF BIT 0 = 1 then internal MIDI is present ( Turbo R Only !!! )


F197 00 DRIVE           DPB drive A:+00 Drive bij the dpb (0=A, 1=B, etc)
F198 F9 ID                          +01 Media ID byte (0F8h/0F9h)
F199 00 SECSIZ (L)                  +02 Sector size (200h = 512 byte)
F19A 02 SECSIZ (H)                  +03 Idem
F19B 0F DIRMSK (SECSIZ/32)-1        +04 (Directory registraties in 1 sector)-1
F19C 04 DIRSHFT                     +05 Number of 1-bits in DIRMSK
F19D 01 CLUSMSK                     +06 (Number of sectors per cluster)-1
F19E 02 CLUSSHFT                    +07 (Number of 1-bits in CLUSMSK)+1
F19F 01 FIRFAT (L)                  +08 first sector of the FAT
F1A0 00 FIRFAT (H)                  +09 Idem
F1A1 02 FATCNT                      +0A number of FATs
F1A2 70 MAXENT                      +0B the max. number of directory registraties
F1A3 0E FIRREC (L)                  +0C first sector of the DATA gebied
F1A4 00 FIRREC (H)                  +0D Idem
F1A5 CA MAXCLUS (L)                 +0E the maximum number cluster
F1A6 02 MAXCLUS (H)                 +0F Idem
F1A7 03 FATSIZ                      +10 number sectors per FAT
F1A8 07 FIRDIR (L)                  +11 first sector of the DIRectory
F1A9 00 FIRDIR (H)                  +12 Idem
F1AA 97 FATADR (L)                  +13 address of the FAT storage in the RAM
F1AB E5 FATADR (H)                  +14 Idem

F1AC 00 DRIVE           DPB drive B +00 Drive bij the dpb (0=A, 1=B, etc)
F1AD F9 ID                          +01 Media ID byte (0F8h/0F9h)
F1AE 00 SECSIZ (L)                  +02 Sector size (200h = 512 byte)
F1AF 02 SECSIZ (H)                  +03 Idem
F1B0 0F DIRMSK (SECSIZ/32)-1        +04 (Directory registraties in 1 sector)-1
F1B1 04 DIRSHFT                     +05 Number of 1-bits in DIRMSK
F1B2 01 CLUSMSK                     +06 (Number of sectors per cluster)-1
F1B3 02 CLUSSHFT                    +07 (Number of 1-bits in CLUSMSK)+1
F1B4 01 FIRFAT (L)                  +08 first sector of the FAT
F1B5 00 FIRFAT (H)                  +09 Idem
F1B6 02 FATCNT                      +0A number of FATs
F1B7 70 MAXENT                      +0B the max. number directory registraties
F1B8 0E FIRREC (L)                  +0C first sector of the DATA gebied
F1B9 00 FIRREC (H)                  +0D Idem
F1BA CA MAXCLUS (L)                 +0E the maximum number cluster
F1BB 02 MAXCLUS (H)                 +0F Idem
F1BC 03 FATSIZ                      +10 number sectors per FAT
F1BD 07 FIRDIR (L)                  +11 first sector of the DIRectory
F1BE 00 FIRDIR (H)                  +12 Idem
F1BF 97 FATADR (L)                  +13 address of the FAT storage in the RAM
F1C0 E5 FATADR (H)                  +14 Idem
F1C1 00 Diskdrive Stop Counterr (00 = Off) 
   Poke value 1 to this adress and call 0FD9Fh HOOK, it will become 0,
   and the drive will stop spinning
F1C2 00 Diskdrive Stop , sub-counter
F1C3 00 Diskdrive Stop , sub-counter
F1C4 00 Active hardwarematic drive
F1C5 00 Last track-position of drive A before diskchange with drive B
F1C6 00 Last track-position of drive B before diskchange with drive A
F1C7 00 Active logic drive
F1C8 02 Number of hardwarematic drives available
F1C9 CD,6B,F3      CALL 0F36Bh          Print textpointer in [DE] until '$' is found
F1CC 1A            LD A,(DE)            Similar to BDOS function number 9 (String Output)
F1CD CD,68,F3      CALL 0F368h
F1D0 13            INC DE
F1D1 FE,24         CP "$"
F1D3 C8            RET Z
F1D4 CD,A8,53      CALL 053A8h          (in the diskrom)
F1D7 18,F0         JR 0F1C9h

F1D9 CD,6B,F3      CALL 0F36Bh          Move data to RAM beneath ROM
F1DC ED,B0         LDIR
F1DE CD,68,F3      CALL 0F368H          Rom on
F1E1 C9            RET

F1E2 CD,6B,F3      CALL 0F36Bh          Execute in RAM
F1E5 C3,00,00      JP ABORTADRESS        address to abort to
    Jump to ABORTADRESS after Abort option is selected in DOS (Abort,Retry Ignore)
    If the disk error handler is BEND (Changed) this will be called 
    after errorhandler returns (C=2 Abort) 

F1E8 Jump to address in pointer (HL)
     HL = address pointer
     Remark!: First switches RAM in Page 1 (F36B) then switches DISKROM Page 1(F368)

F1E8 11,DE,F1      LD DE,0F1DEh         JP (HL) to routine in RAM
F1EB D5            PUSH the              Returns adress on the STACK of the ROM
F1EC 5E            LD E,(HL)             Put back On
F1ED 23            INC HL
F1EE 56            LD D,(HL)            Get adress
F1EF EB            EX DE,HL
F1F0 CD,6B,F3      CALL 0F36Bh          switches RAM in Page 1
F1F3 E9            JP (HL)
F1F4 C3,04,56      JP 5604              Check filename (HL=pointer). Results stored in pointer [DE,->)
F1F7 50,52,4E,20   "PRN "               Device names
F1FB 4C,53,54,20   "LST "
F1FF 4E,55,4C,20   "NUL "
F203 41,55,58,20   "AUX "
F207 43,4F,4E,20   "CON "

F20B 20,20,20,20   storage  for found filename ( AUX,CON etc )
F20F 20,20,20,20
F213 20,20,20      Extension

F216 80            Ge-NEG-t device number. PRN=-5, LST=-4 ... CON=-1
F217 00
F218 00
F219 00
F21A 00
F21B 00
F21C 00
F21D 00
F21E 00
F21F 00
F220 00

F221 00,00         DATE of the Found file from the FCB
F223 00,00         TIME of the Found file from the FCB

F225 00
F226 00
F227 00
F228 00
F229 00
F22A 00

F22B 1F January      Number of days in January this month in this year
F22C 1C February     Number of days in February this month in this year
F22D 1F March        Number of days in March this month in this year
F22E 1E April        Number of days in April this month in this year
F22F 1F May          Number of days in May this month in this year
F230 1E June         Number of days in June this month in this year
F231 1F July         Number of days in July this month in this year
F232 1F August       Number of days in August this month in this year
F233 1E September    Number of days in September this month in this year
F234 1F October      Number of days in October this month in this year
F235 1E November     Number of days in November this month in this year
F236 1F December     Number of days in December this month in this year

F237 00,00,00,00 Variables of BUFINP (BDOS function 10)

F23B 00 Printer on (Dos : ^P) NZ = On

F23C 00

F23D 79 Current DMA adres
F23E DD

F23F FE Sector number
F240 01
F241 00
F242 01

F243 97 DPB address of the current drive
F244 F1

F245 00 Current sector inside directory (0-based), Used by SEARCH FIRST and NEXT routines
F246 00 Drive of the current directory
F247 00 Default drive 0=A, 1=B etc.

F248 10 Day
F249 0B Month
F24A 09 Year (L)
F24B 00 Year (H) -1980
F24C 17 Time
F24D 0E Time
F24E 04 Day of the week

F24F C9 (625A) From "Insert disk for drive" routine
F250 C9        [AF] Contains the drive in CHAR format (41h = "A")
F251 C9

F252 C9 (41FA)
F253 C9
F254 C9

F255 C9 (425A) From the fix-filename routine.
F256 C9
F257 C9

F258 C9 (42BC) Is used by several routines
F259 C9        With this adress (F2DC) can be changed to see sub-directory's 
F25A C9        when "FILES" command is used in BASIC (allways)

F25B C9 (4317) Is called by DIRENT increase routine,
F25C C9        after this the new DIRENT value is stored in [AF]
F25D C9

F25E C9 (4348) Is called by routine that loads the next sector of the current directory
F25F C9
F260 C9

F261 C9 (440E) From Fix filename routine
F262 C9
F263 C9

F264 C9 (4471) From the OPEN routine
F265 C9
F266 C9

F267 C9 (    )
F268 C9
F269 C9

F26A C9 (4553) From the GETDPB routine
F26B C9
F26C C9

F26D C9 (45CF) From the CLOSE routine
F26E C9
F26F C9

F270 C9 (46C5) DISKREAD        [HL]=DMA
F271 C9        Read sector     [DE]=Sector
F272 C9        BDOS:2Fh        [B] =Number of sectors

F273 C9 (470A)
F274 C9
F275 C9

F276 C9 (4748)
F277 C9
F278 C9

F279 C9 (4755) DISKWRT         [HL]=DMA
F27A C9        Write sector  [DE]=Sector
F27B C9        BDOS:30h        [B] =Number of sectors

F27C C9 (4916) From the HL=DE*BC routine
F27D C9
F27E C9

F27F C9 (492F) From the BC=BC/DE; HL=rest routine
F280 C9
F281 C9

F282 C9 (4989)
F283 C9
F284 C9

F285 C9 (49B1)
F286 C9
F287 C9

F288 C9 (4A36)
F289 C9
F28A C9

F28B C9 (4A46)
F28C C9
F28D C9

F28E C9 (4B56)
F28F C9
F290 C9

F291 C9 (4BE2)
F292 C9
F293 C9

F294 C9 (4C22)
F295 C9
F296 C9

F297 C9 (4C97)
F298 C9
F299 C9

F29A C9 (4D05)
F29B C9
F29C C9

F29D C9 (4D8C)
F29E C9
F29F C9

F2A0 C9 (4E48)
F2A1 C9
F2A2 C9

F2A3 C9 (4EDB)
F2A4 C9
F2A5 C9

F2A6 C9 (4F12)
F2A7 C9
F2A8 C9

F2A9 C9 (4F9E)
F2AA C9
F2AB C9

F2AC C9 (5104) BUFINP (BDOS 10), just before the DIRIN2 call (BDOS 02) is called
F2AD C9
F2AE C9

F2AF C9 (53A8) Is called at the beginning of the CONOUT routine
F2B0 C9
F2B1 C9

F2B2 C9 (5496)
F2B3 C9
F2B4 C9

F2B5 C9 (5523) Leap Year calculation (february = 28/29 days)
F2B6 C9
F2B7 C9

F2B8 00 DIRENT Current entry in the directory

F2B9 44 Filename storage
F2BA 49
F2BB 53
F2BC 4B
F2BD 52
F2BE 4F
F2BF 4D
F2C0 20
F2C1 56
F2C2 41
F2C3 52
F2C4 00 If BIT 7 of this attribute is SET then files with a NOT 0 attribute can be opend
    This can be done by setting bit 7 of the FCB-drive byte, when calling BDOS OPEN routine (=FCB+0)

F2C5 00
F2C6 00
F2C7 00
F2C8 00
F2C9 00
F2CA 00
F2CB 00
F2CC 00
F2CD 00
F2CE 00
F2CF 00 (2) Time
F2D0 00
F2D1 00 (2) Date
F2D2 00
F2D3 00 (2) first cluster ( The first file is allways 2)
F2D4 00
F2D5 00 (4) File size
F2D6 00
F2D7 00
F2D8 00
F2D9 00
F2DA 00
F2DB 00

F2DC 00 If Not Zero, Files with a NOT 0 attribute will be accepted  (F2C4 bit 7 overrules this !)

F2DD 01
F2DE 00
F2DF 01
F2E0 80
F2E1 00 Current drive of absolute disk read/write
F2E2 79
F2E3 DE
F2E4 00
F2E5 0A
F2E6 00
F2E7 00
F2E8 00
F2E9 01
F2EA 02
F2EB 00
F2EC FC
F2ED 00
F2EE 06
F2EF 00
F2F0 06
F2F1 00
F2F2 00
F2F3 00
F2F4 00
F2F5 0C
F2F6 00
F2F7 00
F2F8 00
F2F9 00
F2FA 00
F2FB 00
F2FC 00
F2FD 00
F2FE 2A Same as (F2B8) (subcounter)
F2FF 01
F300 00
F301 00
F302 CA
F303 02

F304 00 Store Stack Pointer (SP)
F305 00

F306 00 Default drive of MSXDOS

F307 00 storage of the (=FCB pointer), Same as [C] > 11, in the BDOS call (0F37Dh)
F308 00

F309 00 storage of the DPB address by Search first and next
F30A 00
F30B FF Current Directory entry when Searching.
F30C 00

F30D 00 Verify flag (NZ=on)

F30E 01 Date format (0 = YYMMDD, 1 = MMDDYY, 2 = DDMMYY)

F30F 00 (4) Is used by KANJI
F310 00
F311 00
F312 00
F313 00  Contains Disk Basic Version -  0 = Disk Basic 1.x     /    <> 0 = Disk basic 2.x  (Dos 2.x)
F314 00
F315 00
F316 00
F317 00
F318 00
F319 00
F31A 00
F31B 00
F31C 00
F31D 00
F31E 00
F31F 00
F320 00
F321 00
F322 00

F323 AE ERRADR Stores a adress to jump to, if an error occurs
F324 72

F325 6C CTRLCAD Stores a adress to jump to, if  ^C (CTRL + C) is pressed
F326 5C

F327 3E Cursor position  Is used in combination with (F329) by AUXINP (F371)
F328 1A Same            Only  then LD A,^Z
F329 C9                              RET

F32A C9
F32B C9

F32C C9 JP of AUXOUT
F32D C9
F32E C9
F32F C9
F330 C9

F331 F7 RST 30h                         Perform BDOS
F332 8F Slot ID (i.e.   3-3)
F333 D3 address   (i.e.   56D3)
F334 56
F335 C9 RET

F336 00 Keyboard readout. If  F336 = <> 0  (F337) contains a value
F337 00                       if both are 03 then CTRL-STOP is pressed
                              In some routines F336 <> 0 -> ^S is possible

F338 FF Clockchip indicator ( IF <> 0 then Clockchip is present / IF = 0 then No clockchip)

F339 00 (2) stores SP when calling (input-current-date routine) from (diskrom)
F33A 00
F33B B5 (2) stores HL when calling clockchip routine
F33C 05
F33D 01
F33E 00
F33F 00

F340 F3 REBOOT ( IF = 0 DOS will initialized all settings again )
F341 8B Slot ID of RAM in page 0 (DOS) (i.e.   3-2)
F342 8B Slot ID of RAM in page 1 (DOS)
F343 8B Slot ID of RAM in page 2 (DOS/BASIC)
F344 8B Slot ID of RAM in page 3 (DOS/BASIC)

F345 07 Is used when calculating free buffers (025h)

F346 00 Test if system is booted with DOS (CALL SYSTEM possible ? <> 0 = Yes /  0 = No)

F347 02 Totaal number logical drives connected        ( i.e. CALL FORMAT reads this value )

F348 8F Slot ID of the DISKROM (i.e.   3-3)

F349 95 HIGHMEM    RAM between HIGHMEM and (F37F) will be used by DISKROM
F34A DF

F34B 00 CLEAR    Start adress of free RAM in DOS. COMMAMD.COM is loaded from this adress (0100h)
F34C 00

F34D 97    Temporary storage for (FAT sector) pointer
F34E EF

F34F 97    Temporary storage for (DATA sector) pointer
F350 ED

F351 97    Temporary storage for (DIRECTORY sector) pointer (Also used by DSKI$ & DSKO as pointer to sector)
F352 EB

F353 92
F354 DE

'           Address of the Drive Parameter Block     
F355 97,F1                       drive A:
F357 AC,F1                       drive B:
F359 00,00                       drive C:
F35B 00,00                       drive D:
F35D 00,00                       drive E:
F35F 00,00                       drive F:
F361 00,00                       drive G:
F363 00,00                       drive H:

F365 DB IN A,(0A8H)
F366 A8
F367 C9 RET

F368 C9 ROMUSE Switch DISKROM to page 1 (DOS only)
F369 00
F36A 00

F36B C9 RAMUSE Switch RAM to page 1 (DOS only)
F36C 00
F36D 00

'       Inter slot Move
F36E C9 Move ROM to RAM HL = source, DE = destination, BC = length (DOS only)
F36F 00
F370 00

F371 C3 AUXINP Aux device input. Is bend to a routine and returns result in [AF] 
F372 27
F373 F3

F374 C3 AUXOUT Aux device output. Is bend to a routine and returns RET as result
F375 2C
F376 F3

F377 C3 Bload
F378 79
F379 DE

F37A C3 Bsave
F37B 87
F37C DE

F37D C3 ROMBDOS - ROM BDOS vector
F37E 31
F37F F3


        .WORK AREA LISTING
;
        .SUBROUTINES FOR READ/WRITE CALLS OF THE INTER-SLOT
;
F380 RDPRIM  Read from basic slot, used by RDSLT (0Ch) BIOS routine
F385 WRPRIM  Write to basic slot, used by WRSLT (14h) BIOS routine
F38C CLPRIM  Call basic slot, used by CALSLT (1Ch) BIOS routine
F39A USRTAB  USR function starting USR(0)
F39C USRTAB  USR function starting USR(1)
F39E USRTAB  USR function starting USR(2)
F3A0 USRTAB  USR function starting USR(3)
F3A2 USRTAB  USR function starting USR(4)
F3A4 USRTAB  USR function starting USR(5)
F3A6 USRTAB  USR function starting USR(6)
F3A8 USRTAB  USR function starting USR(7)
F3AA USRTAB  USR function starting USR(8)
F3AC USRTAB  USR function starting USR(9)
F3AE LINL40  Screen width per line in SCREEN 0 (Default 39)
F3AF LINL32  Screen width per line in SCREEN 1 (Default 29)
F3B0 LINLEN  Current screen width per line
F3B1 CRTCNT  Number of lines of current screen (default 24)
F3B2 CLMLST  Horizontal location in the case that items are divided by commas in PRINT statement

        .WORK FOR INITIALIZATION

-SCREEN 0
F3B3 TXTNAM  Pattern name tabte
F3B5 TXTCOL  Color table
F3B7 TXTCGP  Pattern ganarator table
F3B9 TXTATR  Unused
F3BB TXTPAT  Unused
-SCREEN 1
F3BD T32NAM  Pattern name tabte
F3BF T32COL  Color table
F3C1 T32CGP  Pattern ganarator table
F3C3 T32ATR  Sprite attribute table
F3C5 T32PAT  Sprite generator table
-SCREEN 2
F3C7 GRPNAM  Pattern name tabte
F3C9 GRPCOL  Color table
F3CB GRPCGP  Pattern ganarator table
F3CD GRPATR  Sprite attribute table
F3CF GRPPAT  Sprite generator table
-SCREEN 3
F3D1 MLTNAM  Pattern name tabte
F3D3 MLTCOL  Color table
F3D5 MLTCGP  Pattern ganarator table
F3D7 MLTATR  Sprite attribute table
F3D9 MLTPAT  Sprite generator table
F3DB CLIKSW  Key click switch 0 = Disabled / 1 = Enabled
F3DC CSRY    Y-coordinate of text cursor
F3DD CSRX    X-coordinate of text cursor
F3DE CNSDFG  Functon key display switch 0 = NOT Visible / 1 = Visible

        .AREA TO SAVE VDP REGISTERS

F3DF RG0SAV Content of VDP(0) register (R#0)
F3E0 RG1SAV Content of VDP(1) register (R#1)
F3E1 RG2SAV Content of VDP(2) register (R#2)
F3E2 RG3SAV Content of VDP(3) register (R#3)
F3E3 RG4SAV Content of VDP(4) register (R#4)
F3E4 RG5SAV Content of VDP(5) register (R#5)
F3E5 RG6SAV Content of VDP(6) register (R#6)
F3E6 RG7SAV Content of VDP(7) register (R#7)
F3E7 STATFL Content of VDP(8) register (MSX2- VDP status register 0  S#0)
F3E8 TRGFLG  Stores trigger button status of joystick
Information about trigger buttons and space bar state 
    7 6 5 4 3 2 1 0
    | | | |       +-- Space bar, trig(0) (0 = pressed)
    | | | +---------- Stick 1, Trigger 1 (0 = pressed)
    | | +------------ Stick 1, Trigger 2 (0 = pressed)
    | +-------------- Stick 2, Trigger 1 (0 = pressed)
    +---------------- Stick 2, Trigger 2 (0 = pressed)
F3E9 FORCLR  Foreground colour
F3EA BAKCLR  Background colour
F3EB BDRCLR  Border colour
F3EC MAXUPD  JMP 0000 (used by CIRCLE statement)
F3EF MINUPD  JMP 0000 (used by CIRCLE statement)
F3F2 ATRBYT  Color code in csing graphic

        .WORK AREA FOR PLAY STATEMENT

F3F3 QUEUES  Points to queue table at the execution of PLAY st.
F3F5 FRCNEW  DB 255

        .WORK AREA FOR KEY INPUT

F3F6 SCNCNT  Interval for the key scan
F3F7 REPCNT  Delay until the auto-repeat of the key begins
F3F8 PUTPNT  DW KEYBUF points to adress to write in the key buffer
F3FA GETPNT  DW KEYBUF points to adress to read from the key buffer

        .PARAMETERS FOR CASSETTE

F3FC CS120  DB LOW01,HIGH01,LOW11,HIGH11,HEDLEN*2/256 ; FOR 1200 BAUD
F401 CS120  DB LOW02,HIGH02,LOW12,HIGH22,HEDLEN*2/256 ; FOR 2400 BAUD
F406 LOW    DB LOW01,HIGH01    Width of LOW & HIGH wich represents bit 0
F408 HIGH   DB LOW11,HIGH11    Width of LOW & HIGH wich represents bit 1
F40A HEADER DB HEDLEN*2/256    Header bit for the short header
F40B ASPCT1  256/aspect ratio for BASIC Circle command
F40D ASPCT2  256*aspect ratio for BASIC Circle command
F40F ENDPGM  DB ":" Dummy program end for RESUME NEXT st.

        .WORK USED BY BASIC INTERNALLY

F414 ERRFLG  BASIC Error number
F415 LPTPOS  Position of printer head
F416 PRTFLG  Flag whether to send to printer 0 = Print to Screen / 1 = Print to printer
F417 NTMSXP  = 0 If MSX printer (This converts TAB's and unknown characters to spaces)
F418 RAWPRT  <>0 If printing is in 'RAW MODE'
F419 VLZADR  ADDRESS OF CHARACTER REPLACED BY VAL
F41B VLZDAT  CHARACTER REPLACED WITH 0 BY VAL
F41C CURLIN  Current execution line number of BASIC
F41E KBFMIN   Same as  ENDPRG, used if direct statement error occures
F41F KBUF    Crunch buffer;translated into intermediate language from BUF
F55D BUFMIN  used by INPUT routine
F55E BUF     Buffer to store characters typed( in ASCII code)

F562 SX       VDP R# 32, Source X Low
F563 SX       VDP R# 33, Source X High
F564 SY       VDP R# 34, Source Y Low
F565 SY       VDP R# 35, Source Y High
F566 DX       VDP R# 36, Dest. X Low
F567 DX       VDP R# 37, Dest. X High
F568 DY       VDP R# 38, Dest. Y Low
F569 DY       VDP R# 39, Dest. Y High
F56A NX       VDP R# 40, Nr of dots X Low
F56B NX       VDP R# 41, Nr of dots X High
F56C NY       VDP R# 42, Nr of dots Y Low
F56D NY       VDP R# 43, Nr of dots Y High
F56E CDUMMY   VDP R# 44, Color register
F56F ARG      VDP R# 45, Argument register
F570 L_OP     VDP R# 46, Command  register

The above Bit-blitten addresses are used by the COPY command in Basic.
The VDP is allso able to communicate with the DISKROM to 
save or load images from or to VRAM.
A 2Byte filename pointer is expected in SX for Loading and DX for Writing operation.
i.e. FNAAM: DEFB 34,"d:filename.ext",34,0 
See SUB-ROM / EXT-ROM (BIT-BLIT routines)

L_OP has 10 different operators: 0 - PSET 1 - AND 2 - OR 3 - XOR 4 - PRESET 8 - TPSET 9 - TAND 10 - TOR 11 - TXOR 12 - TPRESET

F660 ENDBUF Preventoverflow of BUF F661 TTYPOS Virtual cursor location internally retained by BASIC F662 DIMFLG ARRAY FLAG F663 VALTYP Contains the code of the type of variable that is currently in DAC

  2 = Integer
  3 = String
  4 = Single Precision
  5 = Double Precision

F664 DORES Indicates whether stored word can be crunched F665 DONUM flag for crunch F666 CONTXT Text address used by CNRGET F668 CONSAV Store token of constant after calling CHRGET F669 CONTYP Type of stored constant F66A CONLO Valu of stored constant F672 MEMSIZ HIGHEST LOCATION IN MEMORY USED BY BASIC F674 STKTOP TOP LOCATION TO BE USED FOR THE STACK F676 TXTTAB Starting address of BASIC text area F678 TEMPPT Starting address of unused area of temporary descriptor F67A TEMPST Temporary descriptors F698 DSCTMP String descriptor wich is the result of string fun. F69B FRETOP Starting address of unused area of string area F69D TEMP3 Used for garbage collection or by USR function F69F TEMP8 Used for garbage collection F6A1 ENDFOR Next address of FOR st. F6A3 DATLIN Line number of DATA st.read by READ st. F6A5 SUBFLG Flag for array for USR fun. F6A6 FLGINP Flag for INPUT or READ F6A7 TEMP Location for temporary reservation for st.code F6A9 PTRFLG LINE NUMBER CONVERTED TO POINTERS ( 00 = NO / 0D = Yes ) F6AA AUTFLG AUTO MODE FLAG ( 00 = Yes / 01 = No ) F6AB AUTLIN Current line number for auto F6AD AUTINC Increment for auto F6AF SAVTXT Text pointer for resume F6B1 SAVSTK Save stack when error occurs F6B3 ERRLIN Line where last error F6B5 DOT CURRENT LINE for edit & list F6B7 ERRTXT Text pointer for use by RESUME F6B9 ONELIN LINE to go when error F6BB ONEFLG =1 if executing an error trap routine F6BC TEMP2 F6BE OLDLIN OLD LINE NUMBER set up ^C ... F6C0 OLDTXT Points st. to be executed next F6C2 VARTAB Pointer to start of variable space F6C4 ARYTAB Pointer to begging of array table F6C6 STREND End of storage in use F6C8 DATPTR DATA pointer F6CA DEFTBL Default valtype for each letter

       .WARK FOR USER FUNCTION PARAMETER

F6E4 PRMSTK Previous definition block on stack F6E6 PRMLEN Number of bytes of objective table F6E8 PARM1 Objective prameter definition table F74C PRMPRV Pointer to previous parameter block F74E PRMLN2 Size of parameter block F750 PARM2 For parameter storage F7B4 PRMFLG Flag to indicate whether PARM1 was searching F7B5 ARYTA2 End point of search F7B7 NOFUNS 0 if no function active F7B8 TEMP9 Location of temporary storage for garbage collection F7BA FUNACT Count of active functions F7BC SWPTMP Value of first variable in SWAP st. F7C4 TRCFLG 0 MEANS NO TRACE

       .WORK FOR MATH-PACK

F7C5 FBUFFR Buffer for fout F7F0 DECTMP Used to transform decimal integer to floating point number F7F2 DECTM2 Used at division routine execution F7F4 DECCNT Used at division routine execution F7F6 DAC DECIMAL ACCUMULATOR (Interger in USR()-function stored to #F7F8) F806 HOLD8 Registers for decimal multiplication F836 HOLD2 Work area in the execution of numerical operators F83E HOLD Work area in the execution of numerical operators F847 ARG Area to set the value to be calculate with DAC F857 RNDX Last random number

       .DATA AREA USED BY BASIC INTERPRETER

F85F MAXFIL High legal file number F860 FILTAB Starting address of of file data area F862 NULBUF Points to file 0 buffer ( used in SAVE & LOAD st.) F864 PTRFIL Points to file data of currently accessing file F866 RUNFLG Non-zero for run after load F866 FILNAM Name for FILES, NAME & others F871 FILNM2 Second name for NAME F87C NLONLY When loading program ( 00 = NON BASIC / 01 = BASIC ) F87D SAVEND End address for BSAVE F87F FNKSTR FUNCTION KEY AREA F91F CGPNT Slot ID of the character FONT F920 Address of the character FONT F922 NAMBAS Base address of current pattern name table F924 CGPBAS Base address of current pattern generator table F926 PATBAS Base address of current sprite generator table F928 ATRBAS Base address of current sprite attribute table

F92A CLOC Cursor Location F92C CMASK Mask of Cursor F92D MINDEL Used by LINE command in BASIC F92F MAXDEL Used by LINE command in BASIC

        .DATA AREA FOR CIRCLE STATEMENT

F931 ASPECT Aspect ratio of the circle; set by <ratio> of CIRCLE F933 CENCNT End count F935 CLINEF Flag to draw line to centre F936 CNPNTS Point to be plottted F938 CPLOTF Plot polarity flag F939 CPCNT 1/8 of number of points in circle F93B CPCNT8 F93D CRCSUM F93F CSTCNT F941 CSCLXY Scale of X & Y F942 CSAVEA reservation area of ADVGRP F944 CSAVEM reservation area of ADVGRP F945 CXOFF X offset from center F947 CYOFF Y offset from center

       .DATA AREA FOR PAINT STATEMENT

F949 LOHMSK Used by PAINTcommand in BASIC F94A LOHDIR Used by PAINTcommand in BASIC F94B LOHADR Used by PAINTcommand in BASIC F94D LOHCNT Used by PAINTcommand in BASIC F94F SKPCNT Skip count, Used by PAINTcommand in BASIC F951 MOVCNT Movement count, Used by PAINTcommand in BASIC F953 PDIREC Direction of the paint, Used by PAINTcommand in BASIC F954 LFPROG Used by PAINTcommand in BASIC F955 RTPROG Used by PAINTcommand in BASIC F956 MCLTAB Used by DRAW / PLAY command in BASIC F958 MCLFLG Used by DRAW / PLAY command in BASIC F959 QUETAB queue information (VOICAQ, VOICBQ, VOICCQ and RS2IQ (RS232)) F971 QUEBAK F975 VOICAQ 1st Voice of Play Buffer (PSG) If MSX-Music is present area #F9C0-#F9F8 is used to store copy of YM2413 registers F9F5 VOICBQ 2st Voice of Play Buffer (PSG) FA75 VOICCQ 3st Voice of Play Buffer (PSG) FAF5 DPPAGE Display page number (SET PAGE X) FAF6 ACPAGE active page number (SET PAGE ,X) FAF7 AVCSAV Reserves AV control port FAF8 EXBRSA SUB_ROM / EXT-ROM slot address FAF9 CHRCNT Character counter in the buffer, used in KANA-ROM FAFA ROMA Area to store KANA character (Japan version only) FAFC MODE mode switch for VRAM size FAFD NORUSE unused <edit> Used by KANJI-ROM for rendering KANJI fonts in graphic modes:

bit 7 Don't return to textmode bit 6 if 1 and #f7f4 (DECCNT)=0, read SHIFT status ??? bit 5 Disable some functinality bit 4 Not in use bit 3 color 0 = Transparent BIT 0-2: Logical operation on kanji font draw: 0 PSET 1 AND 2 OR 3 XOR 4 NOT

FAFE XSAVE [10000000 XXXXXXXX] X-coordinate Mouse/Trackball/Lightpen FB00 YSAVE [*0000000 YYYYYYYY] Y-coordinate Mouse/Trackball/Lightpen FB02 LOGOPR Logical operation code

               Data area used by RS-232C or disk drive

FB03 RSTMP Temporary data storage for RS232 Driver FB03 TOCNT FB04 RSFCB Adress of the RS232 LOW FB05 RSFCB Adress of the RS232 HIGH FB06 RSIQLN Byte DATA FB07 MEXBIH Hook RST (&H30) FB08 Byte Data FB09 LOW FB0A HIGH FB0B OLDINT Old interupt ( RET &HC9 ) FB0C OLDSTT Hook FB10 Unknown FB11 Hook RST (&H30) FB12 OLDINT Byte DATA FB13 LOW FB14 HIGH FB15 ( RET &HC9 ) FB16 DEVNUM Byte OFFSET FB17 DATCNT Byte DATA FB18 Byte POINTER FB19 Byte POINTER FB1A ERRORS Byte DATA FB1B FLAGS BIT BOOLEAN FB1C ESTBLS BIT BOOLEAN FB1D COMMSK Byte DATA FB1E LSTCOM Byte DATA FB1F LSTMOD Byte DATA FB20

               .Data area used by MSX-DOS

BF21 DRVINV Nr. of drives connected to disk interface 1 BF22 DRVINV Slot adress of disk interface 1 BF23 DRVINV Nr. of drives connected to disk interface 2 BF24 DRVINV Slot adress of disk interface 2 BF25 DRVINV Nr. of drives connected to disk interface 3 BF26 DRVINV Slot adress of disk interface 3 BF27 DRVINV Nr. of drives connected to disk interface 4 BF28 DRVINV Slot adress of disk interface 4

                 music

FB35 PRSCNT Used by PLAY command in BASIC FB36 SAVSP Used by PLAY command in BASIC FB38 VOICEN Used by PLAY command in BASIC FB39 SAVVOL Used by PLAY command in BASIC FB3B MCLLEN Used by PLAY command in BASIC FB3C MCLPTR Used by PLAY command in BASIC FB3E QUEUEN FB3F MUSICF FB40 PLYCNT FB41 VCBA FB66 VCBB FB8B VCBC FBB0 ENSTOP <>0 if warm start enabled (CTRL+SHIFT+GRPH+KANA/CODE for warm start) FBB1 BASROM <>0 if basic is in rom (CTRL+STOP disabled) FBB2 LINTTB line terminator table (<>0 if line terminates) FBCA FSTPOS first position for inlin FBCC CODSAV code save area for cursor FBCD FNKSWI indicate which func key is displayed FBCE FNKFLG fkey which have subroutine FBD8 ONGSBF global event flag FBD9 CLIKFL FBDA OLDKEY FBE5 NEWKEY

- Example of European Keyboard Layout FBE5 0 => 7 6 5 4 3 2 1 0 FBE6 1 => ; ] [ \ = - 9 8 FBE7 2 => B A ACCENT / . , ` ' FBE8 3 => J I H G F E D C FBE9 4 => R Q P O N M L K FBEA 5 => Z Y X W V U T S FBEB 6 => F3 F2 F1 CODE CAPS GRPH CTRL SHIFT FBEC 7 => RET SEL BS STOP TAB ESC F5 F4 FBED 8 => RIGHT DOWN UP LEFT DEL INS HOME SPACE FBEE 9 => 4 3 2 1 0 / + * FBEF 10 => . , - 9 8 7 6 5

FBF0 KEYBUF key code buffer FC18 BUFEND end of key buffer FC18 LINWRK FC40 PATWRK Pattern Buffer FC48 BOTTOM FC4A HIMEM FC4C TRPTBL FC9A RTYCNT FC9B INTFLG This flag is set if STOP or CTRL + STOP is pressed

  0 = Not Pressed
  3 = CTRL +STOP Pressed
  4 = STOP Pressed
 

FC9C PADY Y-coordinate of a connected Graphics Tablet (PAD) FC9D PADX X-coordinate of a connected Graphics Tablet (PAD) FC9E JIFFY Contains value of the software clock, each interrupt of the VDP it is increased by 1.

           The contents can be read or changed by the 'TIME' function or 'TIME' statement.

FCA0 INTVAL Contains length of the interval when the ON INTERVAL routine was established. FCA2 INTCNT ON INTERVAL counter (counts backwards) FCA4 LOWLIM Used by the Cassette system (minimal length of startbit) FCA5 WINWID Used by the Cassette system (store the difference between a low-and high-cycle) FCA6 GRPHED flag for graph. char FCA7 ESCCNT escape sequence counter FCA8 INSFLG insert mode flag FCA9 CSRSW cursor display switch FCAA CSTYLE cursor style i.e. Used if INS Key is used ( 00# = Full Cursor / FF# = Halve Cursor ) FCAB CAPST capital status ( 00# = Off / FF# = On ) FCAC KANAST russian key status (Dead Keys)

       0 = No Dead Keys
       1 = Dead Key > Accent Grave
       2 = SHIFT + Dead Key > Accent Egu
       3 = CODE + Dead Key > Accent Circumflex
       4 = SHIFT + CODE + Dead Key > Trema

FCAD KANAMD FCAE FLBMEM 0 if loading basic programm FCAF SCRMOD screen mode FCB0 OLDSCR old screen mode FCB1 CASPRV FCB2 BRDATR border color for paint FCB3 GXPOS X-position FCB5 GYPOS Y-position FCB7 GRPACX FCB9 GRPACY FCBB DRWFLG Used by the DRAW statement (DrawFlag)

       Bit 7 = Draw Line 0 = No / 1 = Yes ( ,N )
       Bit 6 = Move Cursor 0 = Yes / 1 = Yes ( ,B )
       Bit 5 - 0 Unused

FCBC DRWSCL Used by the DRAW statement (DrawScaling) FCBD DRWANG Used by the DRAW statement (DrawAngle)

       0 = 0°  rotation
       1 = 90° rotation
       2= 180° rotation
       3= 270° Rotation

FCBE RUNBNF Run Binary File After loading ( Bload"File.Bin",R ) 0 = Don't Run / 1 = Run FCBF SAVENT start address for BSAVE / BLOAD operations FCC1 EXPTBL flag for primary expanded slot 0 80h = Expanded / 00h = NOT Expanded FCC2 EXPTBL flag for primary expanded slot 1 80h = Expanded / 00h = NOT Expanded FCC3 EXPTBL flag for primary expanded slot 2 80h = Expanded / 00h = NOT Expanded FCC4 EXPTBL flag for primary expanded slot 3 80h = Expanded / 00h = NOT Expanded FCC5 SLTTBL current expanded slot 0 reg FCC6 SLTTBL current expanded slot 1 reg FCC7 SLTTBL current expanded slot 2 reg FCC8 SLTTBL current expanded slot 3 reg FCC9 SLTATR Slotatributes found during start process

       Bit 7 = Basic programm 0 = No / 1 = Yes
       Bit 6 = Device Extention  0 = No / 1 = Yes
       Bit 5 = Statement Extention  0 = No / 1 = Yes
       Bit 4 - 0 = Unused

FD09 SLTWRK (free word = FD09H + 32*basic slot + 8*expansion slot + 2*page) FD89 PROCNM name of expanded statement FD99 DEVICE device ID for cartrige 0-3

HOOKS:


THE USE OF HOOKS
 Hooks provide a way to intercept the BASIC interpreter or operating system at
certain points,enabling additional,or alternative,processing to be carried out.To
expand on the last sentence it i s easiest to use an to be carried out.To expand
on the last sentence it iseasiest to use an example.Consider for example the BIOS
call CHPUT(see section 2.3).This routine is used to print text on the screen.Here
is a disassembly of the first few instructions of CHPUT :
        PUSH    HL      SAVE ALL THE REGISTERS USED
        PUSH    DE
        PUSH    BC
        PUSH    AF
        CALL    FDA4    CALL THE HOOK HCHPU
 First of all registers HL,BC,DE and AF are pushed on to the stack.Then memory
address FDA4 is called.Normally,the contents of FDA4 and the following 4
bytes,is a Z80 RET instruction,immediately passing control to the instruction
following the CALL.However,FDA4 is in RAM,so its contents can be altered.Let
the 3 bytes,starting at FDA4 be changed,so that control is passed to another
subroutine at D000,i.e.
FDA4    C3 00 D0        JP      D000
Also let the code at D000 be as shown below :
        POP     HL      GET RID OF THE FIRST ITEM ON THE
                        STACK(i.e.RETURN TO HOOK ADDRESS)
        POP     AF      RESTORE THE REGISTERS
        POP     BC
        POP     DE
        POP     HL
        RET             EXIT BIOS CALL CHPUT.
 Now the item on the top of the stack is 3 more than the address from which
FDA4 was called,i.e.the return address to CHPUT.Therefore,if this is removed
from the stack,this will restore the stack to the state it was in immediately
before calling FDA4.Also,if the next four items are popped as shown above,the
stack will be as it was on entering CHPUT,so the RET instruction will exit the
subroutine CHPUT.Consequently the character which was to be printed will not be !
This example demonstrates how the operating system can be intercepted.The five
bytes,starting at address FDA4,are know as a hook.Similar "hook" exist at many
other points in the operating system and BASIC interpreter,and a list of them,in
alphabetical order,is contained in the following pages.


-----------------------------------------------------------------
+       No RET on hook
+/c     No RET on hook if network is present
+/sc    Hook doesn't change for sc 8
-----------------------------------------------------------------
+/c     FD9A+   HKEYI   0C4A  Interrupt handler
        FD9F+   HTIMI   0C53  Interrupt handler
        FDA4+/scHCHPU   08C0  ÄÏ CHPUT(A-character;SAVE ALL)
        FDA9+/scHDSPC   09E6  Display cursor    (no param.)
        FDAE+/scHERAC   0A33  Errase cursor     (no param.)
        FDB3+/scHDSPF   0B2B  DSPFNK std routine(no param.)
        FDB8+/scHERAF   0B15  ERAFNK std routine(no param.)
        FDBD    HTOTE   0842  TOTEXT std routine
        FDC2+   HCHGE   10CE  CHGET  std routine
        FDC7+   HINIP   071E  Copy character set to VDP
        FDCC    HKEYC   1025  Keyboard decoder
        FDD1    HKYEA   0F10  Keyboard decoder
        FDD6    HNMI    1398  NMI std routine
        FDDB    HPINL   23BF  PINLIN std routine
        FDE0    HQINL   23CC  QINLIN std routine
        FDE5    HINLI   23D5  INLIN std routine
        FDEA    HONGO   7810  "ON DEVICE GOSUB"
        FDEF+   HDSKO   7C16  "DSKO$"
        FDF4    HSETS   7C1B  "SET"
        FDF9+   HNAME   7C20  "NAME"
        FDFE+   HKILL   7C25  "KILL"
        FE03    HIPL    7C2A  "IPL"
        FE08+   HCOPY   7C2F  "COPY"
        FE0D    HCMD    7C34  "CMD"
        FE12+   HDSKF   7C39  "DSKF"
        FE17+   HDSKI   7C3E  "DSKI$"
        FE1C    HATTR   7C43  "ATTR$"
        FE21+   HLSET   7C48  "LSET"
        FE26+   HRSET   7C4D  "RSET"
        FE2B+   HFIEL   7C52  "FIELD"
        FE30+   HMKI$   7C57  "MKI$"
        FE35+   HMKS$   7C5C  "MKS$"
        FE3A+   HMKD$   7C61  "MKD$"
        FE3F+   HCVI    7C66  "CVI"
        FE44+   HCVS    7C6B  "CVS"
        FE49+   HCVD    7C70  "CVD"
        FE4E+   HGETP   6A93  Locate FCB
        FE53    HSETF   6AB3  Locate FCB
        FE58+   HNOFO   6AF6  "OPEN": not found
        FE5D+   HNULO   6B0F  "OPEN"
        FE62+   HNTFL   6B3B  Close I/O buffer 0
        FE67    HMERG   6B63  "MERGE/LOAD"
        FE6C    HSAVE   6BA6  "SAVE"
        FE71+   HBINS   6BCE  "SAVE"
        FE76+   HBINL   6BD4  "MERGE/LOAD"
        FE7B+   HFILE   6C2F  "FILES"
        FE80+   HDGET   6C3B  "GET/PUT"
        FE85+   HFILO   6C51  Sequential output
        FE8A+   HINDS   6C79  Sequential input
        FE8F    HRSLF   6CD8  "INPUT$"
        FE94    HSAVD   6D03"LOC",6D14"LOF",6D25"EOF",6D39"FPOS"
        FE99+   HLOC    6D0F  "LOC"
        FE9E+   HLOF    6D20  "LOF"
        FEA3+   HEOF    6D33  "EOF"
        FEA8    HFPOS   6D43  "FPOS"
        FEAD+   HBAKU   6E36  "LINE INPUT#"
        FEB2+   HPARD   6F15  Parse device name
        FEB7+   HNODE   6F33  Parse device name
        FEBC+   HPOSD   6F37  Parse device name
        FEC1    HDEVN   This hook not used
        FEC6    HGEND   6F8F  I/O function despatcher
        FECB    HRUNC   629A  Run-clear
        FED0    HCLEA   62A1  Run-clear
        FED5    HLOPD   62AF  Run-clear
        FEDA    HSTKE   62F0  Reset stack
        FEDF    HISFL   145F  ISFLIO std routine
        FEE4    HOUTD   1B46  OUTDO std routine
        FEE9    HCRDO   7328  CR,LF to OUTDO
        FEEE    HDSKC   7374  Mainloop line input
        FEF3    HDOGR   593C  Line draw
        FEF8    HPRGE   4039  Program end
        FEFD+   HERRP   40DC  Error handler
        FF02    HERRF   40FD  Error handler
        FF07    HREAD   4128  Mainloop "OK"
        FF0C    HMAIN   4134  Mainloop
        FF11    HDIRD   41A8  Mainloop direct statement
        FF16    HFINI   4237  Mainloop finished
        FF1B    HFINE   4247  Mainloop finished
        FF20    HCRUN   42B9  Tokenise
        FF25    HCRUS   4353  Tokenise
        FF2A    HISRE   437C  Tokenise
        FF2F    HNTFN   43A4  Tokenise
        FF34    HNOTR   44EB  Tokenise
        FF39    HSNGF   45D1  "FOR"
+/c     FF3E+   HNEWS   4601  Runloop new statement
        FF43    HGONE   4646  Runloop execute
        FF48    HCNRG   4666  CHRGTR std routine
        FF4D    HRETU   4821  "RETURN"
        FF52    HPRTF   4A5E  "PRINT"
        FF57    HCOMP   4A94  "PRINT"
        FF5C    HFINP   4AFF  "PRINT"
        FF61    HTRMN   4B4D  "READ/INPUT" error
        FF66    HFRME   4C6D  Expression Evaluator
        FF6B    HNTPL   4CA6  Expression Evaluator
        FF70    HEVAL   4DD9  Factor Evaluator
        FF75    HOKNO   4F2C  Factor Evaluator
        FF7A    HFING   4F3E  Factor Evaluator
        FF7F    HISMI   51C3  Runloop execute
        FF84    HWIDT   51CC  "WIDTH"
        FF89    HLIST   522E  "LIST"
        FF8E    HBUFL   532D  Detokenise
        FF93    HFRQI   543F  Convert to integer
        FF98    HSCNE   5514  Line number to pointer
        FF9D    HFRET   67EE  Free descriptor
        FFA2    HPTRG   5EA9  Variable search
        FFA7+   HPHYD   148A  PHYDIO std routine
        FFAC+   HFORM   148E  FORMAT std routine
        FFB1    HERRO   406F  Error handler( ÎÁÞÁÌÏ )
        FFB6    HLPTO   085D  LPTOUT std routine
        FFBB    HLPTS   0884  LPTSTT std routine
        FFC0    HSCRE   79CC  "SCREEN"
        FFC5    HPLAY   73E5  "PLAY" statement
        FFCA    EXTBIO: xxxx Used to access external BIOS implementations
        FFCF    HBGFD   before physical operation with disk controller
        FFD4    HENFD   after physical operation with disk controller
        FFE7    RG08SAV   Content of VDP(09) register (R#08)
        FFE8    RG09SAV   Content of VDP(10) register (R#09)
        FFE9    RG10SAV   Content of VDP(11) register (R#10)
        FFEA    RG11SAV   Content of VDP(12) register (R#11)
        FFEB    RG12SAV   Content of VDP(13) register (R#12)
        FFEC    RG13SAV   Content of VDP(14) register (R#13)
        FFED    RG14SAV   Content of VDP(15) register (R#14)
        FFEE    RG15SAV   Content of VDP(16) register (R#15)
        FFEF    RG16SAV   Content of VDP(17) register (R#16)
        FFF0    RG17SAV   Content of VDP(18) register (R#17)
        FFF1    RG18SAV   Content of VDP(19) register (R#18)
        FFF2    RG19SAV   Content of VDP(20) register (R#19)
        FFF3    RG20SAV   Content of VDP(21) register (R#20)
        FFF4    RG21SAV   Content of VDP(22) register (R#21)
        FFF5    RG22SAV   Content of VDP(23) register (R#22)
        FFF6    RG23SAV   Content of VDP(24) register (R#23)
        FFF7    ROMSLT    Slotadress of Main-ROM
        FFF8                     Reserved
        FFFA    RG25SAV   Content of VDP(26) register (R#25) MSX2+
        FFFB    RG26SAV   Content of VDP(27) register (R#26) MSX2+
        FFFC    RG27SAV   Content of VDP(28) register (R#27) MSX2+
        FFFD              Temporary stack pointer storage
        FFFF    SLTSL   Secondary slot select register 
                (Reading returns INVERTED! previous written value)