MSX2-Technical-Handbook

APPENDIX 1 - BIOS LISTING

This chapter lists the 126 BIOS entries available to the user.

 

Index

RSTs

I/O initialisation

VDP access

PSG

Keyboard, CRT, printer input-output

Game I/O access

Cassette input-output routine

Miscellaneous

Entries appended for MSX2

SUB-ROM

Changes from the original

 

There are two kinds of BIOS routines, the ones in MAIN-ROM and the ones in SUB-ROM. They each have different calling sequences which will be described later. The following is the entry notation.

Label name (address) *n*

The value of *n has the following meanings.

Routines without *n are appended for MSX2.

 

MAIN-ROM

To call routines in MAIN-ROM, the CALL or RTS instruction is used as an ordinary subroutine call.

 

RSTs

Among the following RSTs, RST 00H to RST 28H are used by the BASIC interpreter. RST 30H is used for inter-slot calls and RST 38H is used for hardware interrupts.

 

CHKRAM (0000H) *1

 

SYNCHR (0008H) *1

 

RDSLT (000CH) *1

 

CHRGTR (0010H) *1

 

WRSLT (0014H) *1

 

OUTDO (0018H) *2

 

CALSLT (001CH) *1

 

DCOMPR (0020H) *1

 

ENASLT (0024H) *1

 

GETYPR (0028H) *1

integer type                    single precision real type
   C = 1                                C = 1
   S = 1 *                              S = 0
   Z = 0                                Z = 0
   P/V = 1                              P/V = 0 *

string type                     double precision real type
   C = 1                                C = 0 *
   S = 0                                S = 0
   Z = 1 *                              Z = 0
   P/V = 1                              P/V = 1

Types can be recognised by the flag marked by "*".

 

CALLF (0030H) *1

 

KEYINT (0038H) *1

 

I/O initialisation

 

INITIO (003BH) *1

 

INIFNK (003EH) *1

 

VDP access

 

DISSCR (0041H) *1

 

ENASCR (0044H) *1

 

WRTVDP (0047H) *2

 

RDVRM (004AH) *1

 

WRTVRM (004DH) *1

 

SETRD (0050H) *1

 

SETWRT (0053H) *1

 

FILVRM (0056H) *4

 

LDIRMV (0059H) *4

 

LDIRVM (005CH) *4

 

CHGMOD (005FH) *3

 

CHGCLR (0062H) *1

 

NMI (0066H) *1

 

CLRSPR (0069H) *3

 

INITXT (006CH) *3

 

INIT32 (006FH) *3

 

INIGRP (0072H) *3

 

INIMLT (0075H) *3

 

SETTXT (0078H) *3

 

SETT32 (007BH) *3

 

SETGRP (007EH) *3

 

SETMLT (0081H) *3

CALPAT (0084H) *1

 

CALATR (0087H) *1

 

GSPSIZ (008AH) *1

 

GRPPRT (008DH) *2

 

PSG

 

GICINI (0090H) *1

 

WRTPSG (0093H) *1

 

RDPSG (0096H) *1

 

STRTMS (0099H) *1

 

Keyboard, CRT, printer input-output

 

CHSNS (009CH) *1

 

CHGET (009FH) *1

 

CHPUT (00A2H) *1

 

LPTOUT (00A5H) *1

 

LPTSTT (00A8H) *1

 

CNVCHR (00ABH) *1

 

PINLIN (00AEH) *1

 

INLIN (00B1H) *1

 

QINLIN (00B4H) *1

 

BREAKX (00B7H) *1

 

BEEP (00C0H) *3

 

CLS (00C3H) *3

 

POSIT (00C6H) *1

 

FNKSB (00C9H) *1

 

ERAFNK (00CCH) *1

 

DSPFNK (00CFH) *2

 

TOTEXT (00D2H) *1

 

Game I/O access

 

GTSTCK (00D5H) *1

 

GTTRIG (00D8H) *1

 

GTPAD (00DBH) *1

 

GTPDL (00DEH) *2

 

Cassette input-output routine

 

TAPION (00E1H) *1

 

TAPIN (00E4H) *1

 

TAPIOF (00E7H) *1

 

TAPOON (00EAH) *1

 

TAPOUT (00EDH) *1

 

TAPOOF (00F0H) *1

 

STMOTR (00F3H) *1

 

Miscellaneous

 

CHGCAP (0132H) *1

 

CHGSND (0135H) *1

 

RSLREG (0138H) *1

 

WSLREG (013BH) *1

 

RDVDP (013EH) *1

 

SNSMAT (0141H) *1

 

PHYDIO (0144H)

 

ISFLIO (014AH) *1

 

OUTDLP (014DH) *1

 

KILBUF (0156H) *1

 

CALBAS (0159H) *1

 

Entries appended for MSX2

 

SUBROM (015CH)

 

EXTROM (015FH)

 

EOL (0168H)

 

BIGFIL (016BH)

 

NSETRD (016EH)

 

NSTWRT (0171H)

 

NRDVRM (0174H)

 

NWRVRM (0177H)

 

SUB-ROM

The calling sequence of SUB-ROM is as follows:

                .
                .
                .
        LD      IX, INIPLT
                         ; Set BIOS entry address
        CALL    EXTROM
                         ; Returns here
                .
                .
                .

When the contents of IX should not be destroyed, use the call as shown below.

                .
                .
                .
INIPAL: PUSH    IX
                         ; Save IX
        LD      IX, INIPLT
                         ; Set BIOS entry address
        JP      SUBROM
                         ;Returns caller of INIPAL
                .
                .
                .

 

GRPRT (0089H)

 

NVBXLN (00C9H)

 

NVBXFL (00CDH)

 

CHGMOD (00D1H)

 

INITXT (00D5H)

 

INIT32 (00D9H)

 

INIGRP (00DDH)

 

INIMLT (00E1H)

 

SETTXT (00E5H)

 

SETT32 (00E9H)

 

SETGRP (00EDH)

 

SETMLT (00F1H)

 

CLRSPR (00F5H)

 

CALPAT (00F9H)

 

CALATR (00FDH)

 

GSPSIZ (0101H)

 

GETPAT (0105H)

 

WRTVRM (0109H)

 

RDVRM (010DH)

 

CHGCLR (0111H)

 

CLSSUB (0115H)

 

DSPFNK (011DH)

 

WRTVDP (012DH)

 

VDPSTA (0131H)

 

SETPAG (013DH)

 

INIPLT (0141H)

 

RSTPLT (0145H)

 

GETPLT (0149H)

 

SETPLT (014DH)

 

BEEP (017DH)

 

PROMPT (0181H)

 

NEWPAD (01ADH)

 

CHGMDP (01B5H)

 

KNJPRT (01BDH)

 

REDCLK (01F5H)

  00MMAAAA
    ------
    ||++++--- Address (0 to 15)
    ++------- Mode (0 to 3)

 

WRTCLK (01F9H)

 

Changes from the original