System variables and work area
This page was last modified 19:09, 15 August 2018 by Mars2000you. Based on work by Gdx and NYYRIKKI and others.

System Variables and Work Area

Note: For F85Fh to F87Dh, FB20h to FB34h, FCBEh to FCBFh and FD99h: see System variables for disks

Address Name Length Description
Subroutines For Inter-Slot Read/Write/Call:
F380h RDPRIM 5 Read from primary slot, used by RDSLT (000Ch) routine from Main-ROM
F385h WRPRIM 7 Write to primary slot, used by WRSLT (0014h) routine from Main-ROM
F38Ch CLPRIM 14 Call primary slot, used by CALSLT (001Ch) routine from Main-ROM
Addresses For Extra Subroutines In Language Machine:
F39Ah USRTAB 20 Table that contains addresses of routine specified with the instruction DEFUSRX=.
(Contains the error routine address of the Basic by default.)
USRTAB+0 = Address specified with DEFUSR0=
USRTAB+2 = Address specified with DEFUSR1=
USRTAB+4 = Address specified with DEFUSR2=
USRTAB+6 = Address specified with DEFUSR3=
USRTAB+8 = Address specified with DEFUSR4=
USRTAB+10 = Address specified with DEFUSR5=
USRTAB+12 = Address specified with DEFUSR6=
USRTAB+14 = Address specified with DEFUSR7=
USRTAB+16 = Address specified with DEFUSR8=
USRTAB+18 = Address specified with DEFUSR9=
Screen Parameters:
F3AEh LINL40 1 Screen width per line in SCREEN 0 (Default 39)
F3AFh LINL32 1 Screen width per line in SCREEN 1 (Default 29)
F3B0h LINLEN 1 Current screen width per line
F3B1h CRTCNT 1 Number of lines of current screen (default 24)
F3B2h CLMLST 1 X-location in the case that items are divided by commas in PRINT.
F3B3h TXTNAM 2 Pattern name tabte
F3B5h TXTCOL 2 SCREEN 0 Color table
F3B7h TXTCGP 2 SCREEN 0 Pattern ganarator table
F3B9h TXTATR 2 Unused
F3BBh TXTPAT 2 Unused
F3BDh T32NAM 2 SCREEN 1 Pattern name tabte
F3BFh T32COL 2 SCREEN 1 Color table
F3C1h T32CGP 2 SCREEN 1 Pattern ganarator table
F3C3h T32ATR 2 Sprite attribute table
F3C5h T32PAT 2 SCREEN 1 Sprite generator table
F3C7h GRPNAM 2 SCREEN 2 Pattern name tabte
F3C9h GRPCOL 2 SCREEN 2 Color table
F3CBh GRPCGP 2 SCREEN 2 Pattern ganarator table
F3CDh GRPATR 2 SCREEN 2 Sprite attribute table
F3CFh GRPPAT 2 SCREEN 2 Sprite generator table
F3D1h MLTNAM 2 SCREEN 3 Pattern name tabte
F3D3h MLTCOL 2 SCREEN 3 Color table
F3D5h MLTCGP 2 SCREEN 3 Pattern ganarator table
F3D7h MLTATR 2 SCREEN 3 Sprite attribute table
F3D9h MLTPAT 2 SCREEN 3 Sprite generator table
Cursor and function Key Parameters:
F3DBh CLIKSW 1 Key click switch. (0 = Disabled / 1 = Enabled)
F3DCh CSRY 1 Y-coordinate of text cursor
F3DDh CSRX 1 X-coordinate of text cursor
F3DEh CNSDFG 1 Flag to know if the function keys are displayed (255) or not (0).
Area To Save The Last Writting Value In VDP Registers:
F3DFh RG0SAV 1 System saves here the byte written to the register R#00, Used by VDP(0) in Basic.
F3E0h RG1SAV 1 System saves here the byte written to the register R#01, Used by VDP(1) in Basic.
F3E1h RG2SAV 1 System saves here the byte written to the register R#02, Used by VDP(2) in Basic.
F3E2h RG3SAV 1 System saves here the byte written to the register R#03, Used by VDP(3) in Basic.
F3E3h RG4SAV 1 System saves here the byte written to the register R#04, Used by VDP(4) in Basic.
F3E4h RG5SAV 1 System saves here the byte written to the register R#05, Used by VDP(5) in Basic.
F3E5h RG6SAV 1 System saves here the byte written to the register R#06, Used by VDP(6) in Basic.
F3E6h RG7SAV 1 System saves here the byte written to the register R#07.at start, Used by VDP(7) in Basic.
F3E7h STATFL 1 System saves here the byte read from the status register R#00, Used by VDP(0) in Basic.
Space bar / Triggers:
F3E8h TRGFLG 1 Stores trigger button status of joystick.
Byte Format:
 7 6 5 4 3 2 1 0
 | | | |       +- Space bar on the keyboard (0 when pressed)
 | | | +-------- Trigger 1 on the joystick 1 (0 when pressed)
 | | +--------- Trigger 2 on the joystick 1 (0 when pressed)
 | +---------- Trigger 1 on the joystick 2 (0 when pressed)
 +----------- Trigger 2 on the joystick 2 (0 when pressed)
Color and drawing parameters:
F3E9h FORCLR 1 Foreground colour
F3EAh BAKCLR 1 Background colour
F3EBh BDRCLR 1 Border colour
F3ECh MAXUPD 3 Work area used by the instruction CIRCLE, contains JP 0000h at start.
F3EFh MINUPD 3 Work area used by the instruction CIRCLE, contains JP 0000h at start.
F3F2h ATRBYT 1 Attribute byte (Plot color) of graphic routines.
The Instruction PLAY:
F3F3h QUEUES 2 QUETAB table address (F959h by default), used by PLAY.
F3F5h FRCNEW 1 Work area size for PLAY (255 by default)
Key Input:
F3F6h SCNCNT 1 Interval for the key scan. Permanently set by the Basic.
F3F7h REPCNT 1 Delay until the auto-repeat of the key begins. (50 by default)
F3F8h PUTPNT 2 Address of first free byte in the Keyboard Buffer. (FBF0h by default)
F3FAh GETPNT 2 Address of the next data from the keyboard (in the Keyboard Buffer).
Parameters For Cassette:
F3FCh CS120 5 Work area of the data recorder. (Until MSX2+)
CS120+0 = LOW signal length of bit 0. (53h by default)
CS120+1 = HIGH signal length of bit 0. (5Ch by default)
CS120+2 = Length of LOW signal of bit 1. (26h by default)
CS120+3 = Length of HIGH signal of bit 1. (2Dh by default)
CS120+4 = Length of the header signal calculated by HEADLEN * 2/256
          (HEADLEN = 2000)
F401h CS240 5 Work area of the data recorder. (Until MSX2+)
CS240+0 = LOW signal length of bit 0. (25h by default)
CS240+1 = HIGH signal length of bit 0. (2Dh by default)
CS240+2 = Length of LOW signal of bit 1. (0Eh by default)
CS240+3 = Length of HIGH signal of bit 1. (16h by default)
CS240+4 = Length of the header signal calculated by HEADLEN * 2/256
          (HEADLEN = 2000)
F406h LOW 2 Settings for the tape player. (Until MSX2+)
LOW+0 = LOW signal length which represents bit 0 at the current
        transmission rate. (53h by default)
LOW+1 = HIGH signal length that represents bit 0 at the current
        transmission rate.(5Ch by default)
F408h HIGH 2 Settings for the tape player. (Until MSX2+)
HIGH+0 = Length of the LOW signal that represents bit 1 at the current
         transmission rate. (26h by default)
HIGH+1 = Length of the HIGH signal that represents bit 1 at the current
         transmission rate. (2Dh by default)
F40Ah HEADER 1 Settings for the tape player. (Until MSX2+)
Length of the current header signal calculated by HEADLEN * 2/256 or
HEADLEN * 4/256 (HEADLEN = 2000)
Aspect Ratio settings For CIRCLE:
F40Bh ASPCT1 2 256/aspect ratio for Basic instruction CIRCLE.
F40Dh ASPCT2 2 256*aspect ratio for Basic instruction CIRCLE.
Basic Interpreter:
F40Fh ENDPRG 5 Dummy program end for instructions RESUME ... NEXT. (contains DB ":",0,0,0,0 by default)
F414h ERRFLG 1 Basic Error number.
F415h LPTPOS 1 Position of printer head.
F416h PRTFLG 1 Flag whether to send to printer. (0 = Print to screen / other = Print to printer)
F417h NTMSXP 1 0 If MSX printer (This converts Hiragana to Katakana on Japanese MSX)
F418h RAWPRT 1 0 to convert TAB's and unknown characters to spaces.
Other value to print in 'RAW MODE'.
F419h VLZADR 2 Address of character replaced by VAL.
F41Bh VLZDAT 1 Character replaced with 0 by VAL.
F41Ch CURLIN 2 Current execution line number of Basic.
F41Eh KBFMIN 1 Used if direct statement error occures.
F41Fh KBUF 318 Crunch buffer; translated into intermediate language from BUF.
F55Dh BUFMIN 1 Used by INPUT routine.
F55Eh BUF 258 Buffer to store characters displayed to screen under Basic in direct mode.
Used also by some Basic interpreter processes. For example the COPY instruction of Basic stores values as below.
BUF = SX (VDP R#32 & VDP R#33)
BUF+2 = SY (VDP R#34 & VDP R#35)
BUF+4 = DX (VDP R#36 & VDP R#37)
BUF+6 = DY (VDP R#38 & VDP R#39)
BUF+8 = NX (VDP R#40 & VDP R#41)
BUF+10 = NY (VDP R#42 & VDP R#43)
BUF+12 = CDUMMY (VDP R#44)
BUF+13 = ARG (VDP R#45)
BUF+14 = L_OP (VDP R#46)

The VDP is also 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 [http://map.grauw.nl/resources/subrom.php 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
F660h ENDBUF 1 Prevent overflow of BUF.
F661h TTYPOS 1 Virtual cursor location internally retained by BASIC.
F662h DIMFLG 1 ARRAY FLAG
F663h VALTYP 1 Contains the code of the type of variable that is currently in DAC.
2 = Integer
3 = String
4 = Single precision
8 = Double precision
F664h DORES 1 Indicates whether stored word can be crunched.
F665h DONUM 1 Flag for crunch.
F666h CONTXT 2 Text address used by CNRGET.
F668h CONSAV 1 Store token of constant after calling CHRGET.
F669h CONTYP 1 Type of stored constant.
F66Ah CONLO 8 Value of stored constant.
F672h MEMSIZ 2 Highest location in memory used by Basic.
F674h STKTOP 2 Top location to be used for the stack.
F676h TXTTAB 2 Starting address of BASIC text area.
F678h TEMPPT 2 Starting address of unused area of temporary descriptor.
F67Ah TEMPST 30 Temporary descriptors.
F698h DSCTMP 3 String descriptor wich is the result of string fun.
F69Bh FRETOP 2 Starting address of unused area of string area.
F69Dh TEMP3 2 Used for garbage collection or by USR function.
F69Fh TEMP8 2 Used for garbage collection.
F6A1h ENDFOR 2 Next address of the instruction FOR.
F6A3h DATLIN 2 Line number of the instruction DATA read by READ.
F6A5h SUBFLG 1 Flag for array for USR fun.
F6A6h FLGINP 1 Flag for the instruction INPUT or READ.
F6A7h TEMP 2 Location for temporary reservation for st.code
F6A9h PTRFLG 1 Pointer line number conversion flag for the Basic interpreter.
0 = Do not convert; other = Convert
F6AAh AUTFLG 1 Auto mode flag (0 = Yes / other = No)
F6ABh AUTLIN 2 Current line number for auto.
F6ADh AUTINC 2 Increment for auto.
F6AFh SAVTXT 2 Text pointer for resume.
F6B1h SAVSTK 2 Save stack when an error occurs.
F6B3h ERRLIN 2 Line number where last error.
F6B5h DOT 2 Current line number displayed by LIST.
F6B7h ERRTXT 2 Pointer to the error message, Used by RESUME.
F6B9h ONELIN 2 Line number to go when error, Used by ON ERROR GOTO.
F6BBh ONEFLG 1 Error flag for the instruction ON ERROR GOTO.
1 if an error processing is in progress, otherwise 0.
F6BCh TEMP2 2 Work area for the formula evaluation routine.
F6BEh OLDLIN 2 Line number stored after the execution of the instruction STOP or END, or by pressing CTRL+STOP.
F6C0h OLDTXT 2 Old text pointer. The pointer is directed to the instruction following the one where the stop occurred.
Data and Variables of Basic:
F6C2h VARTAB 2 Pointer to the beginning of single variables area.
F6C4h ARYTAB 2 Pointer to the beginning of array variables area.
F6C6h STREND 2 Address of the end of the variable area.
F6C8h DATPTR 2 Pointer to next data to read from the instruction DATA. Modified by RESTORE.
F6CAh DEFTBL 26 Declaration table of variables defined by the instructions DEFINT, DEFSTR, DEFSNG and DEFDBL of the Basic for each alphabet letter.
2 = integer, 3 = String, 4 = Simple precision, 8 = Double precision (default).
Function and parameters of Basic:
F6E4h PRMSTK 2 Previous definition block on the stack. (To clean the waste.)
F6E6h PRMLEN 2 Number of bytes used in PARM1.
F6E8h PARM1 100 Area 1 for parameters block storage.
F74Ch PRMPRV 2 Pointer to previous parameter block in PARM1.
F74Eh PRMLN2 2 Number of bytes used in PARM2.
F750h PARM2 100 Area 2 for to store the blocks being created.
F7B4h PRMFLG 1 Flag to indicate whether PARM1 was searching.
F7B5h ARYTA2 2 End point of search.
F7B7h NOFUNS 1 0 if no function active.
F7B8h TEMP9 2 Location of temporary storage for garbage collection.
F7BAh FUNACT 1 Count of active functions.
F7BCh SWPTMP 8 Value of first variable in instruction SWAP.
Graphic Tracing:
F7C4h TRCFLG 1 Tracing flag. 0 = No tracing; Other = Tracing in progress.
Math-Pack:
F7C5h FBUFFR 43 Buffer used by mathematical routines.
F7F0h DECTMP 2 Used to transform decimal integer to floating point number.
F7F2h DECTM2 2 Used by the divisions.
F7F4h DECCNT 2 Used by the divisions.
F7F6h DAC 16 Decimal accumulator.
F806h HOLD8 48 Work area for decimal multiplications.
F836h HOLD2 8 Work area in the execution of numerical operators.
F83Eh HOLD 8 Work area in the execution of numerical operators.
F847h ARG 16 Argument. (Value used to be calculate with DAC.)
F857h RNDX 8 Last random number generated.
Graphics:
F87Fh FNKSTR 160 Texts for function keys.
F91Fh CGPNT 2 Location of the character font used to initialise screen.
CGPNT = Slot ID
CGPNT+1 = Address
F922h NAMBAS 2 Base address of current pattern name table.
F924h CGPBAS 2 Base address of current pattern generator table.
F926h PATBAS 2 Base address of current sprite generator table.
F928h ATRBAS 2 Base address of current sprite attribute table.
F92Ah CLOC 2 Cursor Location.
F92Ch CMASK 1 Graphic cursor mask (SCREEN 2 to 4) or ordinate (SCREEN 5 to 12).
F92Dh MINDEL 2 Work area used by instruction LINE of Basic.
F92Fh MAXDEL 2 End of the work area used by instruction LINE of Basic.
Data Area For The instruction CIRCLE Of The Basic:
F931h ASPECT 2 Aspect ratio of the circle; set by <ratio> of CIRCLE.
F933h CENCNT 2 End count, Used set by CIRCLE.
F935h CLINEF 1 Flag to draw line to centre, Used set by CIRCLE.
F936h CNPNTS 2 Point to be plottted, Used set by CIRCLE.
F938h CPLOTF 1 Plot polarity flag, Used set by CIRCLE.
F939h CPCNT 2 Number of points in 1/8 of circle, Used set by CIRCLE.
F93Bh CPCNT8 2 Number of points in the circle. Used by CIRCLE.
F93Dh CRCSUM 2 Sum of the circle. Used by CIRCLE.
F93Fh CSTCNT 2 Variable to maintain the number of points of the starting angle. Used by the instruction CIRCLE.
F941h CSCLXY 1 Scale of X & Y. Used by the instruction CIRCLE.
The Instruction PAINT:
F942h CSAVEA 2 Address of the first pixel of different color, Used by the instruction PAINT.
F944h CSAVEM 1 Mask of the first pixel of different color, Used by the instruction PAINT.
F945h CXOFF 2 X offset from center, Used by the instruction PAINT.
F947h CYOFF 2 Y offset from center, Used by the instruction PAINT.
F949h LOHMSK 1 Leftmost position of an LH excursion, Used by the instruction PAINT in Basic.
F94Ah LOHDIR 1 New painting direction required by an LH excursion, Used by the instruction PAINT in Basic.
F94Bh LOHADR 2 Leftmost position of an LH, Used by the instruction PAINT in Basic.
F94Dh LOHCNT 2 Size of an LH excursion, Used by the instruction PAINT in Basic.
F94Fh SKPCNT 2 Skip count, Used by the instruction PAINT in Basic.
F951h MOVCNT 2 Movement count, Used by the instruction PAINT in Basic.
F953h PDIREC 1 Direction of the paint, Used by the instruction PAINT in Basic.
F954h LFPROG 1 Set to 1 when moving to the left. Used by the instruction PAINT in Basic.
F955h RTPROG 1 Set to 1 when moving to the right. Used by the instruction PAINT in Basic.
Instructions DRAW & PLAY:
F956h MCLTAB 2 Used by the instructions DRAW & PLAY in Basic.
F958h MCLFLG 1 Used by the instructions DRAW & PLAY in Basic.
F959h QUETAB 24 Queue tables (VOICAQ, VOICBQ, VOICCQ and RS2IQ (RS232)).
QUETAB:
;Voice A queue
	db 0		;Starting position
	db 0		;Position flag
	db 0		;Replacement flag
	db 7Fh		;size
	dw VOICAQ	;Address
;Voice C queue
	db 0		;Starting position
	db 0		;Position flag
	db 0		;Replacement flag
	db 7Fh		;size
	dw VOICBQ	;Address
;Voice C queue
	db 0		;Starting position
	db 0		;Position flag
	db 0		;Replacement flag
	db 7Fh		;size
	dw VOICCQ	;Address
;RS-232C queue (MSX1 only)
	db 0		;Starting position
	db 0		;Position flag
	db 0		;Replacement flag
	db 0		;size
	dw RS2IQ	;address (0000h by default)

The three music control tables are initialized by the GICINI routine (00090h) and then managed by the interrupt routine and the PUTQ routine (000F9h).

F971h QUEBAK 1 Replacement characters table of queues.

</pre> QUEBAK: db 0 ; Replacement characters (voice A) db 0 ; Replacement characters (voice B) db 0 ; Replacement characters (voice C) db 0 ; Replacement characters (RS-232C) </pre>

F975h VOICAQ 128 Voice A queue of instruction PLAY. (PSG)
If MSX-Music is present area #F9C0-#F9F8 is used to store copy of YM2413 registers.
F9F5h VOICBQ 128 Voice B queue of instruction PLAY. (PSG)
FA75h VOICCQ 128 Voice C queue of instruction PLAY. (PSG)
FAF5h RS2IQ 64 RC-232C queue. (MSX1 only)
FAF5h DPPAGE 1 Displayed page number. (MSX2~)
Modified by SETPAGE X.
FAF6h ACPAGE 1 Destination page number. (MSX2~)
Modified by SETPAGE ,X.
FAF7h AVCSAV 1 Copy of AV control port (#F7) content. (MSX2+~)
FAF8h EXBRSA 1 SUB-ROM Slot ID. (MSX2~)
FAF9h CHRCNT 1 Character counter in the buffer, used in KANA-ROM. (MSX2~)
FAFAh ROMA 2 Area to store KANA character (Japanese MSX2~ only)
FAFCh MODE 1 Flag for screen mode.
bit 7: 1 = conversion to Katakana; 0 = conversion to Hiragana. (MSX2+~)
bit 6: 1 if Kanji ROM level 2. (MSX2+~)
bit 5: 0/1 to draw in RGB / YJK mode SCREEN 10 or 11. (MSX2+~)
bit 4: 0/1 to limit the Y coordinate to 211/255. (MSX2+~)
bit 3: 1 to apply the mask in SCREEN 0~3.
bits 1-2: VRAM size
	   00 for 16kB
	   01 for 64kB
	   10 for 128kB
	   11 for 192kB
bit 0: 1 if the conversion of Romaji to Kana is possible. (MSX2~)
FAFDh NORUSE 1 Used by KANJI-ROM for rendering KANJI fonts in graphic modes. (MSX2~)
bit 7 Don't return to textmode
bit 6 if 1 and F7F4h (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 for PSET
	  1 for AND
	  2 for OR
	  3 for XOR
	  4 for NOT
FAFEh XSAVE 2 X-coordinate Mouse/Trackball/Lightpen. (MSX2~)
XSAVE = X-coordinate
XSAVE+1 = 10000000
FB00h YSAVE 2 Y-coordinate Mouse/Trackball/Lightpen. (MSX2~)
YSAVE = X-coordinate
YSAVE+1 = *0000000
FB02h LOGOPR 1 Logical operation code. (MSX2~)
Data Area Used By RS-232C:
FB03h RSTMP 1 Temporary data storage for RS232 Driver
FB03h TOCNT 1 Counter used by the RS-232C interface.
FB04h RSFCB 2 FCB ("File Control Block") address of the RS-232C.
FB06h RSIQLN 1 Byte DATA used by the RS-232C interface.
FB07h MEXBIh 5 Hook called by the RS-232C.
MEXBIh = RST 30h (0F7h)
MEXBIh+1 = Slot ID
MEXBIh+2 = Address
MEXBIh+4 = RET (0C9h)
FB0Ch OLDSTT 5 Hook called by the RS-232C.
OLDSTT = RST 30h (0F7h)
OLDSTT+1 = Slot ID
OLDSTT+2 = Address
OLDSTT+4 = RET (0C9h)
FB0Ch OLDINT 5 Hook called by the RS-232C.
OLDINT = RST 30h (0F7h)
OLDINT+1 = Slot ID
OLDINT+2 = Address
OLDINT+4 = RET (0C9h)
FB16h DEVNUM 1 Byte offset. (RS-232C)
FB17h DATCNT 3 DATA area. (RS-232C)
DATCNT = Slot ID
DATCNT+1 = Address
FB1Ah ERRORS 1 RS-232C error code.
FB1Bh FLAGS 1 RS-232C flags.
FB1Ch ESTBLS 1 Bit boolean. (RS-232C)
FB1Dh COMMSK 1 RS-232C mask.
FB1Eh LSTCOM 1 Byte Data. (RS-232C)
FB1Fh LSTMOD 1 Byte Data. (RS-232C)
Variables For Instruction PLAY:
FB35h PRSCNT 1 Command counter.
FB36h SAVSP 2 Stack pointer when instruction PLAY is used.
FB38h VOICEN 1 Number of voice played.
FB39h SAVVOL 2 The volume is saved here when Pause.
FB3Bh MCLLEN 1 Length of the macro being analyzed.
FB3Ch MCLPTR 2 Address of the macro being analyzed.
FB3Eh QUEUEN 1 Number of the current queue.
FB3Fh MUSICF 1 Music interruption flags.
FB40h PLYCNT 1 Number of macro strings in the PLAY queue.
FB41h VCBA 37 Data for voice A.
FB66h VCBB 37 Data for voice B.
FB8Bh VCBC 37 Data for voice C.
Keyboard:
FBB0h ENSTOP 1 <>0 if warm start enabled (CTRL+SHIFT+GRPH+KANA/CODE for warm start)
FBB1h BASROM 1 <>0 if basic is in rom. (CTRL+STOP disabled)
FBB2h LINTTB 24 Table of 24 end-of-line flags for each physical line. (used by the Basic interpreter.)
0 = The corresponding line contains a program line that continues on the next physical line,
Other value = The corresponding line contains a program line that ends here.
FBCAh FSTPOS 2 first position for inlin.
FBCCh CODSAV 1 Code save area for cursor (ASCII of character under the current cursor position)
FBCDh FNKSWI 1 Indicate which function keys is displayed.
FBCEh FNKFLG 10 Function key which have subroutine.
FBD8h ONGSBF 1 Global event flag.
FBD9h CLIKFL 1 Flag to know if the click has already occurred.
FBDAh OLDKEY 11 Previous status of each keyboard matrix row.
FBE5h NEWKEY 11 New status of each keyboard matrix row. The status is updated by the KEYINT interrupt routine.
Bit correspondence for a European Keyboard Layout:
NEWKEY+0  = 7      6      5      4      3      2      1      0
NEWKEY+1  = ;      ]      [      \      =      -      9      8
NEWKEY+2  = B      A    ACCENT   /      .      ,      `      '
NEWKEY+3  = J      I      H      G      F      E      D      C
NEWKEY+4  = R      Q      P      O      N      M      L      K
NEWKEY+5  = Z      Y      X      W      V      U      T      S
NEWKEY+6  = F3     F2     F1    CODE   CAPS   GRPH   CTRL  SHIFT
NEWKEY+7  = RET    SEL    BS    STOP   TAB    ESC    F5     F4
NEWKEY+8  = RIGHT  DOWN   UP    LEFT   DEL    INS    HOME  SPACE
NEWKEY+9  = 4      3      2      1      0      /      +      *
NEWKEY+10 = .      ,      -      9      8      7      6      5

See here for other keyboard layouts.

FBF0h KEYBUF 40 Key code buffer.
Buffers and work areas:
FC18h LINWRK 40 Work area for screen management.
FC40h PATWRK 8 Work area for the name-to-form converter.
FC48h BOTTOM 2 Address of the beginning of the available RAM area.
FC4Ah HIMEM 2 Address of the end of the available RAM area.
Interruptions:
FC4Ch TRPTBL 78 Tables for each of the following instructions:
TRPTBL (3×10 bytes) => ON KEY GOSUB
TRPTBL+30 (3×1 byte) => ON STOP GOSUB
TRPTBL+33 (3×1 byte) => ON SPRITE GOSUB
TRPTBL+48 (3×5 bytes) => ON GOSUB STRIG
TRPTBL+51 (3×1 byte) => ON INTERVAL GOSUB
TRPTBL+54 => Reserved

The first octet serves as an flag. 0 = OFF, 1 = ON, 2 = STOP, 3 = Call in progress, 7 = Call waiting. The other 2 bytes contain the address of the line number of the routine to be called by the GOSUB in the Basic program.

FC9Ah RTYCNT 1 Interrupt control.
FC9Bh INTFLG 1 This flag is set if STOP or CTRL+STOP is pressed.
0 = Not Pressed
3 = CTRL +STOP Pressed
4 = STOP Pressed
FC9Ch PADY 1 Y-coordinate of a connected touch pad. (Until MSX2+)
FC9Dh PADX 1 X-coordinate of a connected touch pad. (Until MSX2+)
FC9Eh JIFFY 1 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 function 'TIME' or instruction 'TIME'.

FCA0h INTVAL 2 Contains length of the interval when the ON INTERVAL routine was established.
FCA2h INTCNT 2 ON INTERVAL counter (counts backwards).
FCA4h LOWLIM 1 Used by the Cassette system (minimal length of startbit).
FCA5h WINWID 1 Used by the Cassette system (store the difference between a low-and high-cycle).
FCA6h GRPHED 1 Heading for the output of graphic characters.
FCA7h ESCCNT 2 Escape sequence counter FCA8 INSFLG insert mode flag.
FCA9h CSRSW 1 Cursor display switch
FCAAh CSTYLE 1 Cursor style i.e. Used if INS Key is used. ( 0 = Full Cursor / other = Halve Cursor )
FCABh CAPST 1 Capital status. ( 0 = Off / other = On )
FCACh KANAST 1 Kana mode flags for MSX Japanese, Russian key status ou "Dead Key" status.
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
FCADh KANAMD 1 Flag to know if the keyboard type is "KANA" (0) or "JIS" (other value). (Japanese MSX only)
FCAEh FLBMEM 1 0 if loading basic program.
FCAFh SCRMOD 1 Screen mode.
FCB0h OLDSCR 1 Old screen mode.
FCB1h CASPRV 1 Work area for the cassette.
FCB2h BRDATR 1 Border color for paint.
FCB3h GXPOS 1 X-position of graphic cursor.
FCB5h GYPOS 1 Y-position of graphic cursor.
FCB7h GRPACX 1 X Graphics Accumulator.
FCB9h GRPACY 1 Y Graphics Accumulator.
FCBBh DRWFLG 1 Used by the instruction DRAW (DrawFlag).
Bit 7 = Draw Line 0 = No / 1 = Yes (,N)
Bit 6 = Move Cursor 0 = Yes / 1 = Yes (,B)
Bit 5 - 0 Unused
FCBCh DRWSCL 1 Used by the instruction DRAW (DrawScaling).
FCBDh DRWANG 1 Used by the instruction DRAW (DrawAngle).
0 = 0° rotation
1 = 90° rotation
2 = 180° rotation
3 = 270° rotation
FCC1h EXPTBL 4 Flags for each primary slot to know if these are expanded (80h) or not (0).
EXPTBL+0 = Flag for slot 0 (also [[slot ID]] of the Main-ROM!)
EXPTBL+1 = Flag for slot 1
EXPTBL+2 = Flag for slot 2
EXPTBL+3 = Flag for slot 3
FCC5h SLTTBL 4 Saves the state of the 4 secondary slot registers of each Extended Primary Slot.
SLTTBL+0 = Value for slot 0
SLTTBL+1 = Value for slot 1
SLTTBL+2 = Value for slot 2
SLTTBL+3 = Value for slot 3
 Format:
  Bits 1-0 = Extended slot on bank 0000h~3FFFh
  Bits 3-2 = Extended slot on bank 4000h~7FFFh
  Bits 5-4 = Extended slot on bank 8000h~BFFFh
  Bits 7-6 = Extended slot on bank C000h~FFFFh
FCC9h SLTATR 64 Slot atributes given during MSX start process.
Bit 7 = 1 if Basic program, else 0
Bit 6 = 1 if device extension, else 0
Bit 5 = 1 if statement extension, else 0
Bits 4~0 = Unused
FD09h SLTWRK 128 Table of work areas attribued in Main-RAM by programs in ROM for each Slot.
SLTWRK = Pointer or slot ID of work area for slot 0-0
SLTWRK+2 = Pointer or slot ID of work area for slot 0-1
SLTWRK+4 = Pointer or slot ID of work area for slot 0-2
   .
   .
   .
SLTWRK+124 = Pointer or slot ID of work area for slot 3-2
SLTWRK+126 = Pointer or slot ID of work area for slot 3-3

The pointer is used to reserve a work area from 8000h or higher to F37Fh.
The flag is used to reserve a work area on the banks 0 & 1 (0000h~7FFFh).
Slot ID format used in table SLTWRK:
LSB = 00h
MSB = F RMD APP RES SS1 SS0 PS1 PS0

  • PS = Primary slot number
  • SS = Seconary slot number
  • RES = Reserved
  • APP = Set if the RAM used by an application, 0 otherwise
  • RMD = Set if the RAM is used by instruction CALL MEMINI, 0 otherwise
  • F = Set if secondary slot, 0 if primary slot.
FD89h PROCNM 16 Name of the instruction executed by CALL.
FD9Ah Hooks 570 System hooks
Area Added For MSX2 To Save Each Value Written Into VDP Registers:
FFE7h RG08SAV 1 System saves the byte written to the register R#08 here, Used by VDP(9) in Basic. (MSX2~)
FFE8h RG09SAV 1 System saves the byte written to the register R#09 here, Used by VDP(10) in Basic. (MSX2~)
FFE9h RG10SAV 1 System saves the byte written to the register R#10 here, Used by VDP(11) in Basic. (MSX2~)
FFEAh RG11SAV 1 System saves the byte written to the register R#11 here, Used by VDP(12) in Basic. (MSX2~)
FFEBh RG12SAV 1 System saves the byte written to the register R#12 here, Used by VDP(13) in Basic. (MSX2~)
FFECh RG13SAV 1 System saves the byte written to the register R#13 here, Used by VDP(14) in Basic. (MSX2~)
FFEDh RG14SAV 1 System saves the byte written to the register R#14 here, Used by VDP(15) in Basic. (MSX2~)
FFEEh RG15SAV 1 System saves the byte written to the register R#15 here, Used by VDP(16) in Basic. (MSX2~)
FFEFh RG16SAV 1 System saves the byte written to the register R#16 here, Used by VDP(17) in Basic. (MSX2~)
FFF0h RG17SAV 1 System saves the byte written to the register R#17 here, Used by VDP(18) in Basic. (MSX2~)
FFF1h RG18SAV 1 System saves the byte written to the register R#18 here, Used by VDP(19) in Basic. (MSX2~)
FFF2h RG19SAV 1 System saves the byte written to the register R#19 here, Used by VDP(20) in Basic. (MSX2~)
FFF3h RG20SAV 1 System saves the byte written to the register R#20 here, Used by VDP(21) in Basic. (MSX2~)
FFF4h RG21SAV 1 System saves the byte written to the register R#21 here, Used by VDP(22) in Basic. (MSX2~)
FFF5h RG22SAV 1 System saves the byte written to the register R#22 here, Used by VDP(23) in Basic. (MSX2~)
FFF6h RG23SAV 1 System saves the byte written to the register R#23 here, Used by VDP(24) in Basic. (MSX2~)
FFF7h MINROM 1 Slot address of extra Main-ROM. Used for an expansion that require an adapted Bios (like MSX2 upgrade cartridge).
Use EXPTBL+0 to know slot ID of the internal Main-ROM. (MSX2~)
FFF8h 2 Reserved
Area Added for MSX2+ to save each value written into VDP registers:
FFFAh RG25SAV 1 System saves the byte written to the register R#25 here, Used by VDP(26) in Basic. (MSX2+~)
FFFBh RG26SAV 1 System saves the byte written to the register R#26 here, Used by VDP(27) in Basic. (MSX2+~)
FFFCh RG27SAV 1 System saves the byte written to the register R#27 here, Used by VDP(28) in Basic. (MSX2+~)
FFFDh 2 Reserved
FFFFh SLTSL 2 Access address to selection register of secondary slots. (Available in extended slots only.)
Format:
 Bits 1-0 = Extended slot on bank 0000h~3FFFh
 Bits 3-2 = Extended slot on bank 4000h~7FFFh
 Bits 5-4 = Extended slot on bank 8000h~BFFFh
 Bits 7-6 = Extended slot on bank C000h~FFFFh

Note: Read value has the INVERTED bits of previous written value.