Blame | Last modification | View Log | Download
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="MSX%20BIOS%20calls_files/map.css" type="text/css"?><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><title>MSX BIOS calls</title><link rel="stylesheet" href="MSX%20BIOS%20calls_files/map.css" type="text/css" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head><body><h1 id="head">MSX Assembly Page</h1><div id="menu"><ul><li><a href="http://map.grauw.nl/">Main</a></li><li><a href="http://map.grauw.nl/articles/">Articles</a></li><li><a href="http://map.grauw.nl/resources/">Resources</a></li><li><a href="http://map.grauw.nl/sources/">Sources</a></li><li><a href="http://map.grauw.nl/links/">Links</a></li><li><a href="http://map.grauw.nl/contributing/">Contributing</a></li></ul></div><div id="content"><h1>MSX BIOS calls</h1><p>This is an overview of all official MSX BIOS calls.</p><ul><li><a href="#msx1bios">MSX 1 BIOS</a> (up till function call #159)</li><li><a href="#msx2bios">MSX 2 BIOS</a> (up till function call #177)</li><li><a href="#msx2pbios">MSX 2+ BIOS</a> (up till function call #17D)</li><li><a href="#msxtrbios">MSX turbo R BIOS</a> (up till function call #189)</li></ul><h1 id="msx1bios">MSX 1 BIOS Entries</h1><h2>RST-and other routines</h2><h3 id="CHKRAM">CHKRAM (also called STARTUP, RESET or BOOT)</h3><pre>Address : #0000Function : Tests RAM and sets RAM slot for the systemRegisters: AllRemark : After this, a jump must be made to INIT, for further initialisation.</pre><h3 id="SYNCHR">SYNCHR</h3><pre>Address : #0008Function : tests whether the character of [HL] is the specified characterif not, it generates SYNTAX ERROR, otherwise it goes to CHRGTR (#0010)Input : set the character to be tested in [HL] and the character to becompared next to RST instruction which calls this routine (inline parameter)Output : HL is increased by one and A receives [HL], When the tested character isnumerical, the CY flag is set the end of the statement (00h or 3Ah) causesthe Z flag to be setRegisters: AF, HL</pre><h3 id="RDSLT">RDSLT</h3><pre>Address : #000CFunction : Reads the value of an address in another slotInput : A - ExxxSSPP| || Primary slotnumber (00-11)| - Secundary slotnumber (00-11)+----------- Expanded slot (0 = no, 1 = yes)HL - Address to readOutput : A - Contains the vaule of the read addressRegisters: AF, C, DERemark : This routine turns off the interupt, but won't turn it on again</pre><h3 id="CHRGTR">CHRGTR</h3><pre>Address : #0010Function : Gets the next character (or token) of the Basic-textInput : HL - Address last characterOutput : HL - points to the next characterA - contains the characterC - flag set if it's a numberZ - flag set if it's the end of the statementRegisters: AF, HL</pre><h3 id="WRSLT">WRSLT</h3><pre>Address : #0014Function : Writes a value to an address in another slot.Input : A - Slot in which the value will be writtensee RDSLT for inputHL - Address of value to writeE - value to writeRegisters: AF, BC, DRemark : See RDSLT</pre><h3 id="OUTDO">OUTDO</h3><pre>Address : #0018Function : Output to current outputchannel (printer, diskfile, etc.)Input : A - PRTFIL, PRTFLGRemark : Used in basic, in ML it's pretty difficult</pre><h3 id="CALSLT">CALSLT</h3><pre>Address : #001CFunction : Executes inter-slot call.Input : IY - High byte with input for A in RDSLTIX - The address that will be calledRemark : Variables can never be given in alternative registersof the Z-80 or IX and IY</pre><h3 id="DCOMPR">DCOMPR</h3><pre>Address : #0020Function : Compares HL with DEInput : HL, DEOutput : Z-flag set if HL and DE are equal. C-flag set if HL is less than DE.Registers: AF</pre><h3 id="ENASLT">ENASLT</h3><pre>Address : #0024Function : Switches indicated slot at indicated page on perpetualInput : A - ExxxSSPP+-?------ see RDSLTH - Bit 6 and 7 must contain the page number (00-11)</pre><h3 id="GETYPR">GETYPR</h3><pre>Address : #0028Function : Returns Type of DACInput : DACOutput : S,Z,P/V, CYRegisters: AFRemark : Not a very clear routine to me, please mail us if you know more about it.</pre><h3 id="CALLF">CALLF</h3><pre>Address : #0030Function : Executes an interslot callOutput : depends on the calling routineRegisters: AF, and the other registers depending on the calling routineRemark : The following is the calling sequence:RST #30DB destination slot (see RDSLT accu)DW destination address</pre><h3 id="KEYINT">KEYINT</h3><pre>Address : #0038Function : Executes the timer interrupt process routine</pre><h2>Initialization-routines</h2><h3 id="INITIO">INITIO</h3><pre>Address : #003BFunction : Initialises the deviceRegisters: All</pre><h3 id="INIFNK">INIFNK</h3><pre>Address : #003EFunction : Initialises the contents of the function keysRegisters: All</pre><h2>VDP routines</h2><h3 id="DISSCR">DISSCR</h3><pre>Address : #0041Function : inhibits the screen displayRegisters: AF, BC</pre><h3 id="ENASCR">ENASCR</h3><pre>Address : #0044Function : displays the screenRegisters: AF, BC</pre><h3 id="WRTVDP">WRTVDP</h3><pre>Address : #0047Function : write data in the VDP-registerInput : B - data to writeC - number of the registerRegisters: AF, BC</pre><h3 id="RDVRM">RDVRM</h3><pre>Address : #004AFunction : Reads the content of VRAMInput : HL - address readOutput : A - value which was readRegisters: AF</pre><h3 id="WRTVRM">WRTVRM</h3><pre>Address : #004DFunction : Writes data in VRAMInput : HL - address writeA - value writeRegisters: AF</pre><h3 id="SETRD">SETRD</h3><pre>Address : #0050Function : Enable VDP to readInput : HL - for VRAM-addressRegisters: AF</pre><h3 id="SETWRT">SETWRT</h3><pre>Address : #0053Function : Enable VDP to writeInput : HL - AddressRegisters: AF</pre><h3 id="FILVRM">FILVRM</h3><pre>Address : #0056Function : fill VRAM with valueInput : A - data byteBC - length of the area to be writtenHL - start addressRegisters: AF, BC</pre><h3 id="LDIRMV">LDIRMV</h3><pre>Address : #0059Function : Block transfer to memory from VRAMInput : BC - blocklengthDE - Start address of memoryHL - Start address of VRAMRegisters: All</pre><h3 id="LDIRVM">LDIRVM</h3><pre>Address : #005CFunction : Block transfer to VRAM from memoryInput : BC - blocklengthDE - Start address of VRAMHL - Start address of memoryRegisters: All</pre><h3 id="CHGMOD">CHGMOD</h3><pre>Address : #005FFunction : Switches to given screenmodeInput : A - screen modeRegisters: All</pre><h3 id="CHGCLR">CHGCLR</h3><pre>Address : #0062Function : Changes the screencolorsInput : Foregroundcolor in FORCLRBackgroundcolor in BAKCLRBordercolor in BDRCLRRegisters: All</pre><h3 id="NMI">NMI</h3><pre>Address : #0066Function : Executes (non-maskable interupt) handling routine</pre><h3 id="CLRSPR">CLRSPR</h3><pre>Address : #0069Function : Initialises all spritesInput : SCRMODRegisters: Alles</pre><h3 id="INITXT">INITXT</h3><pre>Address : #006CFunction : Schakelt naar SCREEN 0 (tekst-scherm met 40*24 tekens)Input : TXTNAM, TXTCGPRegisters: All</pre><h3 id="INIT32">INIT32</h3><pre>Address : #006FFunction : Switches to SCREEN 1 (text screen with 32*24 characters)Input : T32NAM, T32CGP, T32COL, T32ATR, T32PATRegisters: All</pre><h3 id="INIGRP">INIGRP</h3><pre>Address : #0072Function : Switches to SCREEN 2 (high resolution screen with 256*192 pixels)Input : GRPNAM, GRPCGP, GRPCOL, GRPATR, GRPPATRegisters: All</pre><h3 id="INIMLT">INIMLT</h3><pre>Address : #0075Function : Switches to SCREEN 3 (multi-color screen 64*48 pixels)Input : MLTNAM, MLTCGP, MLTCOL, MLTATR, MLTPATRegisters: All</pre><h3 id="SETTXT">SETTXT</h3><pre>Address : #0078Function : Switches to VDP in SCREEN 0 modeInput : See INITXTRegisters: All</pre><h3 id="SETT32">SETT32</h3><pre>Address : #007BFunction : Schakelt VDP in SCREEN 1 modusInput : See INIT32Registers: All</pre><h3 id="SETGRP">SETGRP</h3><pre>Address : #007EFunction : Switches VDP to SCREEN 2 modeInput : See INIGRPRegisters: All</pre><h3 id="SETMLT">SETMLT</h3><pre>Address : #0081Function : Switches VDP to SCREEN 3 modeInput : See INIMLTRegisters: All</pre><h3 id="CALPAT">CALPAT</h3><pre>Address : #0084Function : Returns the address of the sprite pattern tableInput : A - Sprite IDOutput : HL - For the addressRegisters: AF, DE, HL</pre><h3 id="CALATR">CALATR</h3><pre>Address : #0087Function : Returns the address of the sprite attribute tableInput : A - Sprite numberOutput : HL - For the addressRegisters: AF, DE, HL</pre><h3 id="GSPSIZ">GSPSIZ</h3><pre>Address : #008AFunction : Returns current sprite sizeOutput : A - Sprite-size in bytesC-flag set when size is 16*16 sprites otherwise C-flag is resetRegisters: AF</pre><h3 id="GRPPRT">GRPPRT</h3><pre>Address : #008DFunction : Displays a character on the graphic screenInput : A - ASCII value of the character to print</pre><h2>PSG routines</h2><h3 id="GICINI">GICINI</h3><pre>Address : #0090Function : Initialises PSG and sets initial value for the PLAY statementRegisters: All</pre><h3 id="WRTPSG">WRTPSG</h3><pre>Address : #0093Function : Writes data to PSG-registerInput : A - PSG register numberE - data write</pre><h3 id="RDPSG">RDPSG</h3><pre>Address : #0096Function : Reads value from PSG-registerInput : A - PSG-register readOutput : A - value read</pre><h3 id="STRTMS">STRTMS</h3><pre>Address : #0099Function : Tests whether the PLAY statement is being executed as a backgroundtask. If not, begins to execute the PLAY statementRegisters: All</pre><h2>Console routines</h2><h3 id="CHSNS">CHSNS</h3><pre>Address : #009CFunction : Tests the status of the keyboard bufferOutput : Z-flag set if buffer is empty, otherwise not setRegisters: AF</pre><h3 id="CHGET">CHGET</h3><pre>Address : #009FFunction : One character input (waiting)Output : A - ASCII-code of the input characterRegisters: AF</pre><h3 id="CHPUT">CHPUT</h3><pre>Address : #00A2Function : Displays one characterInput : A - ASCII-code of character to display</pre><h3 id="LPTOUT">LPTOUT</h3><pre>Address : #00A5Function : Sends one character to printerInput : A - ASCII-code of character to sendOutput : C-flag set if failedRegisters: F</pre><h3 id="LPTSTT">LPTSTT</h3><pre>Address : #00A8Function : Tests printer statusOutput : A - #FF and Z-flag reset if printer is ready#00 and Z-flag set if not readyRegisters: AF</pre><h3 id="CNVCHR">CNVCHR</h3><pre>Address : #00ABFunction : tests for the graphic header and transforms the codeInput : A - charactercodeOutput : the C-flag is reset to not the graphic readerthe C-flag and Z-flag are set to the transformed code is set in Athe C-flag is set and Z-flag is reset to the untransformed code is set in ARegisters: AF</pre><h3 id="PINLIN">PINLIN</h3><pre>Address : #00AEFunction : Stores in the specified buffer the character codes input until the returnkey or STOP key is pressedOutput : HL - for the starting address of the buffer -1C-flag set when it ends with the STOP keyRegisters: All</pre><h3 id="INLIN">INLIN</h3><pre>Address : #00B1Function : Same as PINLIN except that AUGFLG (#F6AA) is setOutput : HL - for the starting address of the buffer -1C-flag set when it ends with the STOP keyRegisters: All</pre><h3 id="QINLIN">QINLIN</h3><pre>Address : #00B4Function : Prints a questionmark andone spaceOutput : HL - for the starting address of the buffer -1C-flag set when it ends with the STOP keyRegisters: All</pre><h3 id="BREAKX">BREAKX</h3><pre>Address : #00B7Function : Tests status of CTRL-STOPOutput : C-flag set when pressedRegisters: AFRemark : In this routine, interrupts are inhibited</pre><h3 id="ISCNTC">ISCNTC</h3><pre>Address : #00BAFunction : Tests status of SHIFT-STOP</pre><h3 id="CKCNTC">CKCNTC</h3><pre>Address : #00BDFunction : Same as ISCNTC. used in Basic</pre><h3 id="BEEP">BEEP</h3><pre>Address : #00C0Function : generates beepRegisters: All</pre><h3 id="CLS">CLS</h3><pre>Address : #00C3Function : Clears the screenRegisters: AF, BC, DERemark : Z-flag must be set to be able to run this routineXOR A will do fine most of the time</pre><h3 id="POSIT">POSIT</h3><pre>Address : #00C6Function : Plaatst cursor op aangegeven positieInput : H - Y coordinate of cursorL - X coordinate of cursorRegisters: AF</pre><h3 id="FNKSB">FNKSB</h3><pre>Address : #00C9Function : Tests whether the function key display is active (FNKFLG)If so, displays them, otherwise erase themInput : FNKFLG (#FBCE)Registers: All</pre><h3 id="ERAFNK">ERAFNK</h3><pre>Address : #00CCFunction : Erase functionkey displayRegisters: All</pre><h3 id="DSPFNK">DSPFNK</h3><pre>Address : #00CFFunction : Displays the function keysRegisters: All</pre><h3 id="TOTEXT">TOTEXT</h3><pre>Address : #00D2Function : Forces the screen to be in the text modeRegisters: All</pre><h2>Controller routines</h2><h3 id="GTSTCK">GTSTCK</h3><pre>Address : #00D5Function : Returns the joystick statusInput : A - Joystick number to test (0 = cursors, 1 = port 1, 2 = port 2)Output : A - DirectionRegisters: All</pre><h3 id="GTTRIG">GTTRIG</h3><pre>Address : #00D8Function : Returns current trigger statusInput : A - trigger button to test0 = spacebar1 = port 1, button A2 = port 2, button A3 = port 1, button B4 = port 2, button BOutput : A - #00 trigger button not pressed#FF trigger button pressedRegisters: AF</pre><h3 id="GTPAD">GTPAD</h3><pre>Address : #00DBFunction : Returns current touch pad statusInput : A - Function call number. Fetch device data first, then read.[ 0] Fetch touch pad data from port 1 (#FF if available)[ 1] Read X-position[ 2] Read Y-position[ 3] Read touchpad status from port 1 (#FF if pressed)[ 4] Fetch touch pad data from port 2 (#FF if available)[ 5] Read X-position[ 6] Read Y-position[ 7] Read touchpad status from port 2 (#FF if pressed)Output : A - ValueRegisters: AllRemark : On MSX2, function call numbers 8-23 are forwarded to<a href="http://map.grauw.nl/resources/subrom.php#NEWPAD">NEWPAD</a> in the SubROM.</pre><h3 id="GTPDL">GTPDL</h3><pre>Address : #00DEFunction : Returns currenct value of paddleInput : A - Paddle numberOutput : A - ValueRegisters: All</pre><h2>Tape device routines</h2><h3 id="TAPION">TAPION</h3><pre>Address : #00E1Function : Reads the header block after turning the cassette motor onOutput : C-flag set if failedRegisters: All</pre><h3 id="TAPIN">TAPIN</h3><pre>Address : #00E4Function : Read data from the tapeOutput : A - read valueC-flag set if failedRegisters: All</pre><h3 id="TAPIOF">TAPIOF</h3><pre>Address : #00E7Function : Stops reading from the tape</pre><h3 id="TAPOON">TAPOON</h3><pre>Address : #00EAFunction : Turns on the cassette motor and writes the headerInput : A - #00 short headernot #00 long headerOutput : C-flag set if failedRegisters: All</pre><h3 id="TAPOUT">TAPOUT</h3><pre>Address : #00EDFunction : Writes data on the tapeInput : A - data to writeOutput : C-flag set if failedRegisters: All</pre><h3 id="TAPOOF">TAPOOF</h3><pre>Address : #00F0Function : Stops writing on the tape</pre><h3 id="STMOTR">STMOTR</h3><pre>Address : #00F3Function : Sets the cassette motor actionInput : A - #00 stop motor#01 start motor#FF reverse the current actionRegisters: AF</pre><h2>Queue routines</h2><h3 id="LFTQ">LFTQ</h3><pre>Address : #00F6Function : Gives number of bytes in queueOutput : A - length of queue in bytesRemark : Internal use</pre><h3 id="PUTQ">PUTQ</h3><pre>Address : #00F9Function : Put byte in queueRemark : Internal use</pre><h2>Graphic routines</h2><h3 id="RIGHTC">RIGHTC</h3><pre>Address : #00FCFunction : Shifts screenpixel to the rightRegisters: AF</pre><h3 id="LEFTC">LEFTC</h3><pre>Address : #00FFFunction : Shifts screenpixel to the leftRegisters: AF</pre><h3 id="UPC">UPC</h3><pre>Address : #0102Function : Shifts screenpixel upRegisters: AF</pre><h3 id="TUPC">TUPC</h3><pre>Address : #0105Function : Tests whether UPC is possible, if possible, execute UPCOutput : C-flag set if operation would end outside the screenRegisters: AF</pre><h3 id="DOWNC">DOWNC</h3><pre>Address : #0108Function : Shifts screenpixel downRegisters: AF</pre><h3 id="TDOWNC">TDOWNC</h3><pre>Address : #010BFunction : Tests whether DOWNC is possible, if possible, execute DOWNCOutput : C-flag set if operation would end outside the screenRegisters: AF</pre><h3 id="SCALXY">SCALXY</h3><pre>Address : #010EFunction : Scales X and Y coordinates</pre><h3 id="MAPXY">MAPXY</h3><pre>Address : #0111Function : Places cursor at current cursor address</pre><h3 id="FETCHC">FETCHC</h3><pre>Address : #0114Function : Gets current cursor addresses mask patternOutput : HL - Cursor addressA - Mask pattern</pre><h3 id="STOREC">STOREC</h3><pre>Address : #0117Function : Record current cursor addresses mask patternInput : HL - Cursor addressA - Mask pattern</pre><h3 id="SETATR">SETATR</h3><pre>Address : #011AFunction : Set attribute byte</pre><h3 id="READC">READC</h3><pre>Address : #011DFunction : Reads attribute byte of current screenpixel</pre><h3 id="SETC">SETC</h3><pre>Address : #0120Function : Returns currenct screenpixel of specificed attribute byte</pre><h3 id="NSETCX">NSETCX</h3><pre>Address : #0123Function : Set horizontal screenpixels</pre><h3 id="GTASPC">GTASPC</h3><pre>Address : #0126Function : Gets screen relationsOutput : DE, HLRegisters: DE, HL</pre><h3 id="PNTINI">PNTINI</h3><pre>Address : #0129Function : Initalises the PAINT instruction</pre><h3 id="SCANR">SCANR</h3><pre>Address : #012CFunction : Scans screenpixels to the right</pre><h3 id="SCANL">SCANL</h3><pre>Address : #012FFunction : Scans screenpixels to the left</pre><h2>Misc routines</h2><h3 id="CHGCAP">CHGCAP</h3><pre>Address : #0132Function : Alternates the CAP lamp statusInput : A - #00 is lamp onnot #00 is lamp offRegisters: AF</pre><h3 id="CHGSND">CHGSND</h3><pre>Address : #0135Function : Alternates the 1-bit sound port statusInput : A - #00 to turn offnot #00 to turn onRegisters: AF</pre><h3 id="RSLREG">RSLREG</h3><pre>Address : #0138Function : Reads the primary slot registerOutput : A - for the value which was read33221100||||||- Pagina 0 (#0000-#3FFF)||||--- Pagina 1 (#4000-#7FFF)||----- Pagina 2 (#8000-#BFFF)------- Pagina 3 (#C000-#FFFF)Registers: A</pre><h3 id="WSLREG">WSLREG</h3><pre>Address : #013BFunction : Writes value to the primary slot registerInput : A - value value to (see RSLREG)</pre><h3 id="RDVDP">RDVDP</h3><pre>Address : #013EFunction : Reads VDP status registerOutput : A - Value which was readRegisters: A</pre><h3 id="SNSMAT">SNSMAT</h3><pre>Address : #0141Function : Returns the value of the specified line from the keyboard matrixInput : A - for the specified lineOutput : A - for data (the bit corresponding to the pressed key will be 0)Registers: AF</pre><h3 id="PHYDIO">PHYDIO</h3><pre>Address : #0144Function : Executes I/O for mass-storage media like diskettesInput : F - Set carry to write, reset carry to readA - Drive number (0 = A:, 1 = B:, etc.)B - Number of sectorsC - Media ID of the diskDE - Begin sectorHL - Begin address in memoryOutput : F - Carry set on errorA - Error code (only if carry set)0 = Write protected2 = Not ready4 = Data error6 = Seek error8 = Record not found10 = Write error12 = Bad parameter14 = Out of memory16 = Other errorB - Number of sectors actually written or readRegisters: AllRemark : Interrupts may be disabled afterwards. On some hard disk interfaces,when bit 7 of register C is set, a 23-bit addressing scheme is usedand bits 0-6 of register C contain bits 23-16 of the sector number.</pre><h3 id="FORMAT">FORMAT</h3><pre>Address : #0147Function : Initialises mass-storage media like formatting of diskettesRegisters: AllRemark : In minimum configuration only a HOOK is available</pre><h3 id="ISFLIO">ISFLIO</h3><pre>Address : #014AFunction : Tests if I/O to device is taking placeOutput : A - #00 if not taking placenot #00 if taking placeRegisters: AF</pre><h3 id="OUTDLP">OUTDLP</h3><pre>Address : #014DFunction : Printer outputInput : A - code to printRegisters: FRemark : Differences with LPTOUT:1. TAB is expanded to spaces2. For non-MSX printers, Hiragana is transformed to katakanaand graphic characters are transformed to 1-byte characters3. If failed, device I/O error occurs</pre><h3 id="GETVCP">GETVCP</h3><pre>Address : #0150Function : Returns pointer to play queueInput : A - Channel numberOutput : HL - PointerRegisters: AFRemark : Only used to play music in background</pre><h3 id="GETVC2">GETVC2</h3><pre>Address : #0153Function : Returns pointer to variable in queue number VOICEN (byte op #FB38)Input : L - Pointer in play bufferOutput : HL - PointerRegisters: AF</pre><h3 id="KILBUF">KILBUF</h3><pre>Address : #0156Function : Clear keyboard bufferRegisters: HL</pre><h3 id="CALBAS">CALBAS</h3><pre>Address : #0159Function : Executes inter-slot call to the routine in BASIC interpreterInput : IX - for the calling addressOutput : Depends on the called routineRegisters: Depends on the called routine</pre><h1 id="msx2bios">MSX 2 BIOS Entries</h1><h3 id="SUBROM">SUBROM</h3><pre>Address : #015CFunction : Calls a routine in SUB-ROMInput : IX - Address of routine in SUB-ROMOutput : Depends on the routineRegisters: Alternative registers, IYRemark : Use of EXTROM or CALSLT is more convenient.In IX a extra value to the routine can be given by firstPUSH'ing it to the stack.</pre><h3 id="EXTROM">EXTROM</h3><pre>Address : #015FFunction : Calls a routine in SUB-ROM. Most common wayInput : IX - Address of routine in SUB-ROMOutput : Depends on the routineRegisters: Alternative registers, IYRemark : Use: LD IX,addressCALL EXTROM</pre><h3 id="CHKSLZ">CHKSLZ</h3><pre>Address : #0162Function : Search slots for SUB-ROMRegisters: Alles</pre><h3 id="CHKNEW">CHKNEW</h3><pre>Address : #0165Function : Tests screen modeOutput : C-flag set if screenmode = 5, 6, 7 or 8Registers: AF</pre><h3 id="EOL">EOL</h3><pre>Address : #0168Function : Deletes to the end of the lineInput : H - x-coordinate of cursorL - y-coordinate of cursorRegisters: All</pre><h3 id="BIGFIL">BIGFIL</h3><pre>Address : #016BFunction : Same function as FILVRM (total VRAM can be reached).Input : HL - addressBC - lengthA - dataRegisters: AF,BC</pre><h3 id="NSETRD">NSETRD</h3><pre>Address : #016EFunction : Same function as SETRD.(with full 16 bits VRAM-address)Input : HL - VRAM addressRegisters: AF</pre><h3 id="NSTWRT">NSTWRT</h3><pre>Address : #0171Function : Same function as SETWRT.(with full 16 bits VRAM-address)Input : HL - VRAM addressRegisters: AF</pre><h3 id="NRDVRM">NRDVRM</h3><pre>Address : #0174Function : Reads VRAM like in RDVRM.(with full 16 bits VRAM-address)Input : HL - VRAM addressOutput : A - Read valueRegisters: F</pre><h3 id="NWRVRM">NWRVRM</h3><pre>Address : #0177Function : Writes to VRAM like in WRTVRM.(with full 16 bits VRAM-address)Input : HL - VRAM addressA - Value to writeRegisters: AF</pre><h1 id="msx2pbios">MSX 2+ BIOS Entries</h1><h3 id="RDRES"><span id="RDBTST">RDRES</span></h3><pre>Address : #017AFunction : Read value of I/O port #F4Input : noneOutput : A = value readRegisters: AF</pre><h3 id="WRRES"><span id="WRBTST">WRRES</span></h3><pre>Address : #017DFunction : Write value to I/O port #F4Input : A = value to writeWhen bit 7 is reset it shows the MSX 2+ startup screen on boot,and counts and initialises the RAM.Output : noneRegisters: none</pre><h1 id="msxtrbios">MSX turbo R BIOS Entries</h1><h3 id="CHGCPU">CHGCPU</h3><pre>Address : #0180Function : Changes CPU modeInput : A = LED 0 0 0 0 0 x x| 0 0 = Z80 (ROM) mode| 0 1 = R800 ROM mode| 1 0 = R800 DRAM modeLED indicates whether the Turbo LED is switched with the CPUOutput : noneRegisters: none</pre><h3 id="GETCPU">GETCPU</h3><pre>Address : #0183Function : Returns current CPU modeInput : noneOutput : A = 0 0 0 0 0 0 x x0 0 = Z80 (ROM) mode0 1 = R800 ROM mode1 0 = R800 DRAM modeRegisters: AF</pre><h3 id="PCMPLY">PCMPLY</h3><pre>Address : #0186Function : Plays specified memory area through the PCM chipInput : A = v 0 0 0 0 0 x x| | || +-+-- Quality parameter (Speed: 0 = Fast)+---------------- VRAM usage flagHL= Start address in RAM or VRAMBC= Length of area to playD = Bit 0 = Bit 17 of area length when using VRAME = Bit 0 = Bit 17 os start address when using VRAMOutput : C-flag set when aborted with CTRL-STOPRegisters: all</pre><h3 id="PCMREC">PCMREC</h3><pre>Address : #0189Function : Records audio using the PCM chip into the specified memory areaInput : A = v t t t t c x x| | | | | | | || | | | | | +-+-- Quality parameter (Speed: 0 = Fast)| | | | | +------ Zero-data compression| +-+-+-+-------- Treshold+---------------- VRAM usage flagHL= Start address in RAM or VRAMBC= Length of area to playD = Bit 0 = Bit 17 of area length when using VRAME = Bit 0 = Bit 17 os start address when using VRAMOutput : C-flag set when aborted with CTRL-STOPRegisters: all</pre><p class="signed">BiFi</p></div><div id="foot">© 2020 MSX Assembly Page. MSX is a trademark of MSX Licensing Corporation.</div></body></html>