MSX DOS 2.xx documentation. presented by: //--------\ // /---\\ \ // / // / // / // / // / // / // / // / // /____// / //--/ //___________/ //__/ products. //--/ //---------/ //__/ // _______/ '94 ___ // / // / // ------/ // / // ______/ // / // / // / //--/ // ---------/ //--/ //__/ //__/ \\__________/ //__/ - Desire In Envy ~ Greetinx to all our friends and contacts on MSX ~ Here are some addresses found by D.I.E. for DOS2.xx. These addresses are mainly notes, so there can be a little confusing (sorry). E-mail: STW_DAM@HROVX1.HRO.NL welcome!) (ps: all documentation about MSX is *** DOS2 *** Warning! These addresses can be incompatibel. Maarten "The Arithmetic Master" Verheijdt & Vincent "Hacker" van Dam, 94/05/16 Adres Remarks ========================================================================= ===== 0005 BDOS entry 005C Allocate a 16k segment (memmory management) Input: [ A] - 0 = user segment 1 = system segment [ B] - 0 = primary mapper - FxxxSSPP = slot adress (primary mapper, if 0) xxx=000 = allocate specified slot only xxx=001 = allocate other slots than specified xxx=010 = try to allocate specified slot and, if it failed, try another slot (if any) xxx=011 = try to allocate other slots than specified and, if it failt, try specified slot Output: carry set = no free segment, else [ A] = segment number [ B] = slot adress of mapper slot (0 if called as [B]=0 005F Free a 16k segment (memmory management) Input: [ A] - segment number to free [ B] - 0 = primary mapper 0! = other is specified mapper (slot adres) Output: carry set = error 01CB Performs a malloc in the DOS2 buffer segment Input: [HL] - Number of bytes to reserve Output:[HL] - Address of allocated buffer [ A] - Error code (00=no error) Remark: DOS actualy allocates HL+2 bytes. The start address of the buffer - 2 contains the length of the buffer + 2. 0EC8 BDOS routine (#6F), get version number (see FUNCTION.DOC) 2D0F Performs a de-malloc in the DOS2 buffer segment Input: [HL] - Address of buffer ([HL]-2/[HL]-1 must contain the length) Output: < unknown > 4010 SCSI [HL] = [DE] = [B] = [C] = [A] = Carry= sector i/o (logical) DMA adress sector sectors media descipter (F0 = hard drive) drive number set for write, reset for read Out: Carry set = error [B] = remaining sectors [A] = error code 0 - write protected 2 - not ready 4 - CRC error 6 - seek error 8 - record not found 10 - write fault 12 - disk error 18 - not a dos disk 20 - incompatible disk 22 - unformatted disk 24 - disk change (no message because trapped internally?) 26 - user error 10 rest- disk error * If there is no SCSI driver: Out: [A] Carry= set 4013 SCSI [A] = [B] = [C] = [HL] = = 0C disk change drive number 0 media descripter (F0 = hard drive) base adress of DPB Out: Carry [B] = 0 -1 set = error; [A] = return error code (see SCSI i/o) 1 (disk unchanged) (unknown) (disk changed) * If there is no SCSI driver: Out: [A] Carry= set 4016 SCSI [A] = [HL] = [B] = [C] = = 0C get Drive parameter block drive number base adress of DPB first byte of FAT media descripter (F0 = hard drive) Out: [HL+1] ... [HL+18] = DPB * If there is no SCSI driver: Out: [A] Carry= set 4019 = 0C SCSI Used for SCSI format? * If there is no SCSI driver: Out: [HL]= 6ED1 401C SCSI [A] = [D] = [HL] = [BC] = format 1..9 (as specified in CHODAT=4019?) drive number (0-based) begin adress of work area length of work area Out: [A] = error code 0 - write protected 2 - not ready 4 - CRC error 6 - seek error 8 - record not found 10 - write fault 12 - bad parameter 14 - insufficient memmory 16 - other errors * If there is no SCSI driver: Out: [A] = 10, carry set 401F 4022 4025 4029 402D 4030 nothing (RET) Jump to BASIC Format routine (with questions) Stop drive(s) Where Am I (calculates slot number of DOS2) in: <none> out: [A] - slot number Out: [HL]=[F34B]=highest available ram adress 40FF into (in DOS2 ROM) Current block. The 64Kb DOS2 ROM system is divided 16Kb ROM segments. These segments can be swappen only in page 1. The legal segment numbers are 0,1,2 and 3. Bank-2 -----4FC8 BDOS-routine (6F = Get MSX-DOS version number) 6000 Swap address (for ROM banks). F1E5 F1E8 F1EB F1EE F1F1 F1F4 F1F7 F1FA F1FD Jumps to interrupt handler (only when processing BDOS functions) See BIOS #0C (only when processing BDOS functions) See BIOS #14 (only when processing BDOS functions) See BIOS #1C (only when processing BDOS functions) See BIOS #24 (only when processing BDOS functions) See BIOS #30 (only when processing BDOS functions) Switch to 'DOS-mode' (=page 0 & 2 system segments) Switch to 'user-mode' Select DOS system segment on page 0 Mapper Support Routines F200 Allocate a 16k segment F203 Free a 16k segment F206 Read byte from address A:HL to A F209 Write byte from E tofWD݈Ÿ< slot number of map block map block number runs from highest to lowest number slot number runs from highest to lowest number