1lstoff 2 3; MSX BIOS functions definition 4; 5; December 2007 6; $Id: msxbios.def,v 1.2 2016-06-06 15:40:54 stefano Exp $ 7; 8 9 10defc CHKRAM = $0000 ; Check RAM and sets slot for command area. 11defc RESET = $0000 12defc BOOT = $0000 13defc STARTUP = $0000 14 15defc SYNCHR = $0008 ; Checks if then current character pointed by 16 ; HL is one desired.If not,generates 17 ; 'Syntax error',otherwise falls into CHRGTB. 18defc RDSLT = $000C ; Reads the value of an address in another slot 19defc CHRGTB = $0010 ; Gets next character (or token) from BASIC text. 20defc WRTSLT = $0014 ; Writes a value to an address in another slot. 21defc OUTDO = $0018 ; Output to the current device. 22defc CALSLT = $001C ; Performs inter-slot call to specified address. 23defc DCOMPR = $0020 ; Compare HL with DE. 24defc ENASLT = $0024 ; Switches indicated slot at indicated page on perpetual 25defc GETYPR = $0028 ; Return the type FAC. 26defc CALLF = $0030 ; Performs far_call (i.e. inter-slots call) 27defc KEYINT = $0038 ; Performs hardware interrupt procedures. 28 29; I/O initialization. 30 31defc INITIO = $003B ; Dev. initialization. 32defc INIFNK = $003E ; Initializes function key strings. 33 34; Accessing to the VDP (T19918) 35 36defc DISSCR = $0041 ; Disables screen display. 37defc ENASCR = $0044 ; Enables screen display. 38defc WRTVDP = $0047 ; Writes to the VDP register. 39defc RDVRM = $004A ; Reads the VRAM address by [HL]. 40defc WRTVRM = $004D ; Write to the VRAM address by [HL]. 41defc SETRD = $0050 ; Sets up the VDP for read. 42defc SETWRT = $0053 ; Sets up the VDP for write. 43defc FILVRM = $0056 ; Fill the vram with specified data 44defc LDIRMV = $0059 ; Block transfer to memory from VRAM 45defc LDIRVM = $005C ; Block transfer to VRAM from memory 46defc CHGMOD = $005F ; Sets the VDP mode according to SCRMOD. 47defc CHGCLR = $0062 ; Changes the color of the screen. 48defc NMI = $0066 ; Performs non-maskable interrupt procedures. 49defc CLRSPR = $0069 ; Initializes all sprites. 50defc INITXT = $006C ; Initializes screen for text mode (40*24) and sets the VDP. 51defc INIT32 = $006F ; Initializes screen for text mode (32*24) and sets the VDP. 52defc INIGRP = $0072 ; Initializes screen for high-resolution mode and sets the VDP. 53defc INIMLT = $0075 ; Initializes screen for multi-color mode and sets the VDP. 54defc SETTXT = $0078 ; Sets the VDP for text (40*24) mode. 55defc SETT32 = $007B ; Sets the VDP for text (32*24) mode. 56defc SETGRP = $007E ; Sets the VDP for high-resolution mode. 57defc SETMLT = $0081 ; Sets the VDP for multicolor mode. 58defc CALPAT = $0084 ; Returns address of sprite pattern table. 59defc CALATR = $0087 ; Returns address of sprite atribute table. 60defc GSPSIZ = $008A ; Returns the current sprite size. 61defc GRPPRT = $008D ; Prints a character on the graphic screen. 62 63; Accessing to the PSG. 64 65defc GICINI = $0090 ; Initializes PSG,and static data for PLAY 66defc WRTPSG = $0093 ; Writes data to the PSG register. 67defc RDPSG = $0096 ; Reads data from PSG register. 68defc STRTMS = $0099 ; Checks/starts background tasks for PLAY. 69 70; Console (i.e. the keyboard and the CRT) 71 72defc CHSNS = $009C ; Check the status of keyboard buffer. 73defc CHGET = $009F ; Waits for character being input and returns the character codes. 74defc CHPUT = $00A2 ; Outputs a character to the console. 75defc LPTOUT = $00A5 ; Output a character to the line printer. 76defc LPTSTT = $00A8 ; Check the line priter status. 77defc SNVCHR = $00AB ; Check graphic header byte and converts codes. 78defc PINLIN = $00AE ; Accepts a line from console until a CR or STOP 79 ; is typed,and stores the line in a buffer. 80defc INLIN = $00B1 ; Same as PINLIN,exept if AUTFLO if set. 81defc QINLIN = $00B4 ; Output a '?' mark and a space then falls into the INLIN routine. 82defc BREAKX = $00B7 ; Check the status of the Control-STOP key. 83defc ISCNTC = $00BA ; Check the status of the SHIFT-STOP key. 84defc CKCNTC = $00BD ; Same as ISCNTC,used by BASIC 85defc BEEP = $00C0 ; Sounds the buffer 86defc CLS = $00C3 ; Clear the screen. 87defc POSIT = $00C6 ; Locate cursor at the specified position. 88defc FNKSB = $00C9 ; Check if function key display is active. If 89 ; it is,it display it,otherwise does nothing. 90defc ERAFNK = $00CC ; Hide the function key diplay. 91defc DSPFNK = $00CF ; Show the function key display. 92defc TOTEXT = $00D2 ; Forcidly places the screen in text mode. 93 94; Game I/O devices 95 96defc GTSTCK = $00D5 ; Return the current joystick status. 97defc GTTRIG = $00D8 ; Return the current trigger button status. 98defc GTPAD = $00DB ; Check the current touch PAD status. 99defc GTPDL = $00DE ; Return the value of the paddle. 100 101; Tape device routines 102 103defc TAPION = $00E1 ; Reads the header block after turning the cassette motor on 104defc TAPIN = $00E4 ; Read data from the tape 105defc TAPIOF = $00E7 ; Stops reading from the tape 106defc TAPOON = $00EA ; Turns on the cassette motor and writes the header 107defc TAPOUT = $00ED ; Writes data on the tape 108defc TAPOOF = $00F0 ; Stops writing on the tape 109defc STMOTR = $00F3 ; Sets the cassette motor action 110 111; Queue routines 112 113defc LFTQ = $00F6 ; Gives number of bytes in queue 114defc PUTQ = $00F9 ; Put byte in queue 115 116; Graphic routines 117 118defc RIGHTC = $00FC ; Shifts screenpixel to the right 119defc LEFTC = $00FF ; Shifts screenpixel to the left 120defc UPC = $0102 ; Shifts screenpixel up 121defc TUPC = $0105 ; Tests whether UPC is possible, if possible, execute UPC 122defc DOWNC = $0108 ; Shifts screenpixel down 123defc TDOWNC = $010B ; Tests whether DOWNC is possible, if possible, execute DOWNC 124defc SCALXY = $010E ; Scales X and Y coordinates 125defc MAPXY = $0111 ; Places cursor at current cursor address 126defc FETCHC = $0114 ; Gets current cursor addresses mask pattern 127defc STOREC = $0117 ; Record current cursor addresses mask pattern 128defc SETATR = $011A ; Set attribute byte 129defc READC = $011D ; Reads attribute byte of current screenpixel 130defc SETC = $0120 ; Returns currenct screenpixel of specificed attribute byte 131defc NSETCX = $0123 ; Set horizontal screenpixels 132defc GTASPC = $0126 ; Gets screen relations 133defc PNTINI = $0129 ; Initalises the PAINT instruction 134defc SCANR = $012C ; Scans screenpixels to the right 135defc SCANL = $012F ; Scans screenpixels to the left 136 137; Misc routines 138 139defc CHGCAP = $0132 ; Alternates the CAP lamp status 140defc CHGSND = $0135 ; Alternates the 1-bit sound port status 141defc RSLREG = $0138 ; Reads the primary slot register 142defc WSLREG = $013B ; Writes value to the primary slot register 143defc RDVDP = $013E ; Reads VDP status register 144defc SNSMAT = $0141 ; Returns the value of the specified line from the keyboard matrix 145defc PHYDIO = $0144 ; Executes I/O for mass-storage media like diskettes 146defc FORMAT = $0147 ; Initialises mass-storage media like formatting of diskettes 147defc ISFLIO = $014A ; Tests if I/O to device is taking place 148defc OUTDLP = $014D ; Printer output 149defc GETVCP = $0150 ; Returns pointer to play queue 150defc GETVC2 = $0153 ; Returns pointer to variable in queue number VOICEN (byte op #FB38) 151defc KILBUF = $0156 ; Clear keyboard buffer 152defc CALBAS = $0159 ; Executes inter-slot call to the routine in BASIC interpreter 153 154defc SETBORDER = $8035 ; Set border color (color in 'A') 155 156 157lston 158