Title Format Program for MD-HD series Micro Decisions (16_Oct_84) ; ; Copyright 1984 ; Morrow Designs, Inc. ; San Leandro, Ca. ; John Zalabak ; .z80 Aseg org 0100h .sall ;Suppress all Macro Expansions page 60 ;---------------------------------------------------------------------- ; Index (16_Oct_84) ;------------------ ; ; Format_Main Main Proceedure of Format ; ; Get_Drive_Data Get the Drive Data From the Mtab ; Format_Floppy Format a Floppy Disk ; Floppy_Setup Setup for a Floppy Format Operation ; ; Format_Common Common Format Routine ; Verify_Common Verify the Data ; ; Print_Number Print a Number in the Current Base ; Erase_Character Erase a character from the console screen ; Pause_for_Rtn Wait the Return Key ; Get_Character Get a Character from the Console ; Put_Character Put a Character to the Console ; ; Divide 16 bit Divide ; Multiply 16 bit Multiply ; Extended_Bios Call the Extended Bios Entry ; Get_Buffer Read a Buffer (Extended Bios) ; Put_Buffer Write a Buffer (Extended Bios) ; Print_Message Print a Message on the Console ; ; Data Areas page ;---------------------------------------------------------------------- ; General Equates (4_Oct_84) ;--------------------------- ; FRev equ 10h ;Revision Number ;Bios/Bdos Equates Bios_Entry equ 0 ;Bios Entry Point Bdos_Entry equ 5 ;Bdos: Entry Vector Location Bdos_PString equ 9 ; Print a Sting on the Console Bdos_ConBuf_in equ 10 ; Read Console input buffer Bdos_Ret_Ver equ 12 ; Return CP/M version Bdos_Select equ 14 ; Select Disk Bdos_Open_File equ 15 ; Open a File Bdos_Close_File equ 16 ; Close a File Bdos_Search equ 17 ; Search for File Bdos_Read_Seq equ 20 ; Read Sequential Bdos_Write_Seq equ 21 ; Write Sequential Bdos_Crnt_Disk equ 25 ; Return the Current Disk Number Bdos_Set_DMA equ 26 ; Set the DMA Address ;Extended Bios Function Calls EB_Get_Sys_Mem equ 0 ;Read from System Memory EB_Put_Sys_Mem equ 1 ;Write to System Memory EB_Get_RamDatY equ 2 ;Copy RamDatY and Apif to Tpa EB_Get_Mtabs equ 3 ;Copy System Mtabs to Tpa EB_Char_Tbl equ 6 ;Read the Character Table EB_Format equ 9 ;Format a Track EB_Inject_Ims equ 11 ;Inject an Ims String EB_Execute equ 14 ;Execute a in the System Bank EB_Verify_D equ 15 ;Verify a Track with Re:Mapping EB_ID_Frame equ 18 ;Read the ID Frame EB_Read_Host equ 20 ;Read a Physical Sector EB_Write_Host equ 21 ;Write a Physical Sector ConIn_Offset equ 9 ;Bios Console Input Offset ConOut_Offset equ 0Ch ; " Console Output Offset ConSt_Offset equ 33h ; " Console Status Offset SetTrk_Offset equ 1Eh ; " Jump Table Set Track Offset HstDsk_Offset equ 0 ;Drive Number from Start of Apif HstTrk_Offset equ 1 ;Track " " " " " HstSec_Offset equ 3 ;Sector " " " " " OpFlag equ 2Eh ;Offset to OpFlag from start of RamDatY ;Message Codes Msg_Banner equ 20 ;Title Banner Msg_Ready equ 26 ;Ready to Fromat Prompt Msg_Format equ 27 ;Beginning Format Msg_Verify equ 28 ;Beginning Verification Msg_Warning equ 29 ;Some Errors were made Msg_Format_Done equ 30 ;Formatting Done Msg_Bad_Rpt equ 33 ;Bad Sectors Found Msg_No_Bad_Rpt equ 34 ;No Bad Sectors Found Msg_Pause equ 35 ;Pause for Input Prompt Msg_Press_Rtn equ 38 ;Press Return to Exit Msg_CrLf equ 39 ;New Line ;Non Printing Ascii Equates Control_C equ 03h ;Control C (Force CPM Warm Boot) Bell equ 07h ;Console Bell BackSpace equ 08h ;Back Space One Character Tab equ 09h ;Tab Lf equ 0Ah ;Line Feed Cr equ 0Dh ;Carriage Return Clear_Screen equ 1Ah ;Clear Screen Esc equ 1Bh ;Escape Bright equ '(' ;Hight Brightness Dim equ ')' ;Low Brightness ;Termination Codes Again equ 'A' ;Repeat previous format again Restart equ 'R' ;Restart format program Exit equ Control_C ;Exit to Cp/m ;Length Definitions Sector_Length equ 400h ;Length of a Sector Descriptor_Leng equ 9+15+1 ;Combined Length of Mtab/Dpb (Md3 format) ;Other Equates Sys_Disk_Buffer equ 2800h ;System's Disk Buffer Default_Dma equ 80h ;Cpm Default Dma Address Response_Max equ 10h ;Maximum Length of the Response Buffer @SerUR equ 6 ;Suppress Error Response Flag @SerD equ 7 ;Suppress Error Display Flag $HdMsk equ 00011100b ;Head Mask (DskDef0) $HrdDsk equ 00000010b ;Hard Disk Mask (DskDef0) page ;====================================================================== ; Main Line of Format Routine (5_Oct_84) ;======================================= ; Format_Main: ld sp,Local_Stack ;Set the Stack Pointer call Get_Drive_Data ;Get Drive Data From Mtabs call Format_Floppy ;Do Floppy Disk Format ld c,Bdos_Select ;C:= Select Disk Function ld a,(Initial_Drive) ld e,a ;E:= Drive to Select call Bdos_Entry ;Reselect drive we started with jp Bios_Entry ;Exit page ;====================================================================== ; Get the Drive Data From the Mtab (2_Oct_84) ;============================================ ; 1) This routine figures the number of Logical Tracks and whether or ; not this is a hard disk. ; 2) Register Usage: ; A -> Returned 0 for Floppy; Non-Zero for Hard Disk ; DE -> Used to hold offsets ; HL -> Used as a Pointer and as a 16 bit accumulator ; Get_Drive_Data: ld a,EB_Get_Mtabs call Get_Buffer ;Read the System Mtabs ld a,(Drive_Number) sla a sla a sla a sla a ld e,a ld d,0 ;DE:= Drive_Number * 16 ld hl,Buffer ;HL:= Base of Mtabs add hl,de ;HL:= Pointer to Start of Current Mtab ld a,(hl) ;A:= DskDef0 push af and $HdMsk ;Remove all But the Head Number srl a srl a ;Move Heads to Lsb's inc a ;A:= Absolute Number of Heads inc hl ;(DskDef1) inc hl ;(DskDef2) inc hl ;(PrkOff) inc hl ;(MaxCyl) ld e,(hl) inc hl ld d,(hl) ex de,hl ;HL:= Max Cylinders ld e,a ld d,0 ;DE:= Number of Heads call Multiply dec hl ;HL:= Number of Logical Tracks (0 base) ld (Highest_Track),hl ;Save the Number of Logical Tracks pop af ;A:= DskDef0 and $HrdDsk ;(Hard_Disk=2, Floppy_Disk=0) ret ;Return page ;====================================================================== ; Format a Floppy Disk (3_Oct_84) ;================================ ; 1) This routine formats a floppy disk. ; 2) Boot_Reminder is set true if the floppy disk being formatted is ; the Logical A: drive. ; 3) Register Usage: ; A -> Returned equal to Control_C (Exit) or ReStart ; Format_Floppy: ld a,(Drive_Number) ;A:= Current Drive Number add a,'A' ld (Fdrive),a ;Install Drive Letter in format message ld de,79 ;DE:= Number of Tracks ld (Highest_Track),de ;Save the Number of Tracks ld a,Msg_Ready call Print_Message ;Print the Ready Message call Pause_for_Rtn ;Wait for the Return Key cp Control_C ;If (Repsonse is Control C) ret z ; Return ld hl,Flp_Gap_Skew ;HL:= Floppy Disk Gap/Skew Table call Format_Common ;Format the Disk or a ;If (Fatal Errors eq False) jr nz,FfSk2 call Verify_Common ; Verify the Disk or a ; If (Fatal Errors eq False) jr nz,FfSk2 ld hl,(ReMap_Count) ; Get ReMap Count ld a,h or l jr z,FfSk2 ; If (Errors eq True) ld a,Msg_Warning call Print_Message ; Print Warning FfSk2: ld a,Control_C ret ;Return page ;---------------------------------------------------------------------- ; Common Format Routine (3_Oct_84) ;--------------------------------- ; 1) This routine formats from Highest_Track down to Track 0 for ; both hard and floppy disks. ; 2) At the end of routine the first 2 sectors are written with the ; contents of local buffer (Buffer). ; 3) Notice that a pointer to the appropriate Gap/Skew table is ; passed in the HL register pair. ; 4) Register Usage: ; A -> Returned equal to 0 for no errors. ; HL -> On entry contains a pointer to the Gap/Skew table ; ----> All other registers are destroyed. ; Format_Common: ld (Apif+HstSec_Offset),hl ld a,Msg_Banner call Print_Message ;ReDisplay the Banner ld a,Msg_Format call Print_Message ;Print the Formatting Message ld a,(Drive_Number) ld (Apif+HstDsk_Offset),a ;Install The Drive Number ld hl,(Highest_Track) ;Install the Track Number FcLp1: ld (Apif+HstTrk_Offset),hl ;Loop push hl ld a,Cr call Put_Character ld a,Tab call Put_Character ld hl,(Apif+HstTrk_Offset) call Print_Number ; Print the Track Number ld ix,Apif ; IX:= Pointer to Local Apif ld de,MsDos_Mtab_Dpb ; DE:= Pointer to Mtab/Dpb ld a,EB_Format ; A:= Format a Track Function call Extended_Bios ; Format the Track pop hl ld a,d ; A:= Returned Status or a ; If (There was an Error) ret nz ; Return ld a,h ; If (Track Number eq 0) or l ret z ; Return dec hl ; Track_Number:= Track_Number - 1 jr FcLp1 page ;---------------------------------------------------------------------- ; Verify the Data (1_Oct_84) ;--------------------------- ; 1) This routine verifies tracks on the selected disk from 0 to ; Highest_Track for both hard and floppy disks. ; 2) The variable ReMap_Count holds the number of soft error encountered. ; 3) Notice that after a soft error the entire screen is reprinted. ; 4) Register Usage: ; A -> Returned 0 if NO Error ; ----> all other registers destroyed. ; Verify_Common: ld hl,0 ld (ReMap_Count),hl ;ReMapped Sector Count ld a,Msg_Banner call Print_Message ;Print the Banner ld a,Msg_Verify call Print_Message ;Print Verifying ld bc,0 ;BC:= 0 (Current Track Number) VdLp1: push bc ;Loop ld hl,(Bios_Entry+1) ld l,SetTrk_Offset ; HL:= Vector to SetTrk ld a,EB_Execute ; A:= Execute in the System Bank call Extended_Bios ; Set the Track Number (in BC) ld a,Cr call Put_Character ld a,Tab call Put_Character pop hl push hl call Print_Number ; Print the Track Number ld a,EB_Verify_D ; A:= Verify Destructive call Extended_Bios ; Verify the Track pop bc ld a,d ; A:= Returned Error Status or a ; If (There was an Abort) ret nz ; Return ld a,e ; A:= Bad Sectors Found or a jr z,VdSk1 ; If (There were Bad Sectors) ld d,0 ; DE:= Number of ReMaps ld hl,(ReMap_Count) ; HL:= ReMaps made so far add hl,de ld (ReMap_Count),hl ; Update Total ReMap Count push bc ld a,Msg_Banner call Print_Message ; ReDisplay the Banner ld a,Msg_Verify call Print_Message ; Print Verifying pop bc VdSk1: ld hl,(Highest_Track) ; HL:= Track Number xor a ; (Clear Carry and Set Accm to 0) sbc hl,bc ; If (Current_Track eq Highest_Track) ret z ; Return inc bc ; Track_Number:= Track_Number + 1 jr nz,VdLp1 page ;---------------------------------------------------------------------- ; Print a Number in the Current Base (1_Oct_84) ;---------------------------------------------- ; 1) This routine prints the 16 bit number (passed in the HL) in ascii ; in the current radix. ; 2) Note that this routine makes use of the divide routine at the end ; of this file. ; 3) Register Usage: ; HL -> On Entry is the 16 bit number to be printed ; Print_Number: ld a,l ;If (The Number is Zero) or h jr nz,Dsk1 ld a,' ' ; call Put_Character ; Print a Space ld a,'0' call Put_Character ; Print the zero ret ; Return Dsk1: ld bc,0FFFFh push bc ;Put end flag on stack DLp2: ld bc,(Output_Radix) ;Repeat divisor:= Current Radix call divide ; Divide push hl ; Save the remainder ld hl,9 or a sbc hl,de ex de,hl ; (Move quotient to dividend) jp c,DLp2 ;Until (quotient is less than 9) DLp3: ld a,l ;While (Result eq 0) or a jr nz,DLp4 ld a,' ' call Put_Character ; Print a Space pop hl ; Get the next number jr DLp3 DLp4: add a,'0' ;Repeat Convert number to ascii call Put_Character ; Print the number pop hl ; Get the next number ld a,l cp 0FFh jr nz,DLp4 ;Until (end of stack flag has been read) ld a,' ' ; call Put_Character ;Print a Space ret ;Return page ;---------------------------------------------------------------------- ; Erase a Character from the Console Screen (1_Oct_84) ;----------------------------------------------------- ; 1) This routine erases one character from the console screen. ; 2) None of the Registers are effected. ; Erase_Character: push af ld a,BackSpace call Put_Character ;Backup over the Character ld a,' ' call Put_Character ;Print a Space over the Character ld a,BackSpace call Put_Character ;Backup the cursor pop af ret ;Return ;---------------------------------------------------------------------- ; Wait for the Return Key to be Pressed (3_Oct_84) ;------------------------------------------------- ; 1) This routine prints a prompting message and then loops, waiting ; for either a carriage return or a Control C to by typed. ; 2) Register Usage: ; A -> Returned equal to ReStart or Control_C (Exit) ; ----> None of the other registers are effected ; Pause_for_Rtn: push bc push de push hl ld a,Msg_Pause call Print_Message ;Print the Prompt pop hl pop de pop bc PrLp1: call Get_Character ;Loop Wait for the Response cp Control_C ; If (Response eq Return to CP/M) ret z ; Return cp Cr ; If (Response eq Cr) ld a,ReStart ; A:= ReStart ret z ; Return call Erase_Character ; Else Erase the Character jr PrLp1 page ;---------------------------------------------------------------------- ; Get a Character from the Console (1_Oct_84) ;-------------------------------------------- ; 1) This routine gets one character from the console device by ; vectoring through the bios jump table and then echoes the ; character by calling Put_Character. ; 2) Notice that Control Characters are echoed as spaces. ; 2) Register Usage: ; A -> On exit holds the character read ; ----> No other register effected ; Get_Character: push bc push de push hl ld de,(Bios_Entry+1) ld e,0 ;DE:= Base of Bios Jump Table ld hl,ConIn_Offset ;HL:= Offset to ConIn Jump in Bios Table add hl,de ;HL:= Pointer to ConIn Jump ld a,EB_Execute ;A:= Execute in the System Bank call Extended_Bios ;Get a Character push af cp 20h ;If (Character is Control) jr nc,GcSk1 ld a,' ' ; Echo a Space GcSk1: call Put_Character ;Echo the Character pop af pop hl pop de pop bc ret ;Return page ;---------------------------------------------------------------------- ; Put a Character to the Console (1_Oct_84) ;------------------------------------------ ; 1) This routine prints one character on the console screen by ; vectoring through the bios jump table. ; 2) Register Usage: ; A -> On entry and exit holds the character printed ; ----> No other register effected ; Put_Character: push bc push de push hl push af ld c,a ;C:= Character to Print ld de,(Bios_Entry+1) ld e,0 ;DE:= Base of Bios Jump Table ld hl,ConOut_Offset ;HL:= Offset to ConOut Jump in Bios Table add hl,de ;HL:= Pointer to ConOut Jump ld a,EB_Execute ;A:= Execute in the System Bank call Extended_Bios ;Print the Character pop af pop hl pop de pop bc ret ;Return page ;---------------------------------------------------------------------- ; 16 bit Divide ;-------------- ; divide 16-bit number in [hl] by [bc] ; on exit, [de] is 16-bit quotient, [hl] is remainder ; Divide: add hl,hl ;hi *2 ex de,hl ;[de] becomes lo ld hl,0 ;init hi ld a,16 ;16 bits divid0: adc hl,hl ;Repeat hi *2 or a ; clear borrow sbc hl,bc ; sbc hl,bc ;hi=hi-divisor ccf ; invert borrow for shift later jr c,divid1 ; if borrow { adc hl,bc ; Restore the value of the HL ccf divid1: ex de,hl ; get lo adc hl,hl ; lo *2 + remainder ex de,hl dec a ; count-- jr nz,divid0 ;Until (bit count eq 0) ret page ;---------------------------------------------------------------------- ; 16 bit Multiply ;---------------- ; 1) This routine multiplies the contents of the HL register by the ; contents of the DE register leaving the result in the HL register. ; 2) Register Usage: ; BC -> [Preserved] Temp Storage ; DE -> [Preserved] Multiplier ; HL -> Multiplicand/Result ; Multiply: push bc push de ;(Save Registers) ld c,l ld b,h ld hl,00000h MuLp1: ld a,b ;While (Count ne zero) or c jr nz,MuSk1 pop de pop bc ; (Restore Registers) ret ; (Return) MuSk1: ld a,b rra ld b,a ld a,c rra ld c,a jr nc,MuSk2 add hl,de MuSk2: ex de,hl add hl,hl ex de,hl jr MuLp1 page ;---------------------------------------------------------------------- ; Call the Bios Extended Bios (Cold Boot) Entry Point (1_Aug_84) ;--------------------------------------------------------------- ; 1) The Cold Boot Entry point to the bios (1st entry in the bios ; jump table) is located by looking at locations 1 & 2 which ; point to the warm boot address (the desired address + 3). ; Extended_Bios: push hl ;Save the HL Register Pair ld hl,(1) ;HL:= Warm Boot Address ld l,0 ;HL:= Cold Boot Address ex (sp),hl ;HL:= Entry Value; Stack:= Cold Boot Entry ret ;Goto The Cold Boot entry ;---------------------------------------------------------------------- ; Move system memory into the local buffer (30_Jul_84) ;----------------------------------------------------- ; 1) This routine forces the destination to be the local buffer, calls ; the cold start (extended bios functions) entry point, and then saves ; the registers. ; 2) Enter with Accm equal to the extended bios function desired ; Get_Buffer: ld de,Buffer ;DE:= Pointer to Local Buffer call Extended_Bios ;Move System Memory into local buffer ld (Save_BC),bc ;Save the returned registers ld (Save_DE),de ld (Save_HL),hl ret ;Return ;---------------------------------------------------------------------- ; Put the Local Buffer into System Memory (30_Jul_84) ;---------------------------------------------------- ; 1) This is the inverse of GetBuf; It replaces the system's memory ; with the contents of the local buffer. ; Put_Buffer: ld a,1 ;Function_1:= Write to system memory ld bc,(Save_BC) ld de,(Save_DE) ld hl,(Save_HL) ;Restore the Returned Registers ex de,hl ;HL:= Swap Source and Destination call Extended_Bios ;Write Buffer back into system memory ret page ;---------------------------------------------------------------------- ; Print a Message on the Console (25_Sept_84) ;-------------------------------------------- ; 1) This routine prints the message string, whose code is passed in the ; accm, on the console. ; 2) Register Usage: ; A -> Has Message Code on entry and exit ; B -> Counter ; C -> Holds copy of Message Code ; DE -> Used to hold pointers/Bdos print string functions ; HL -> Used to hold pointers ; Print_Message: ld c,a ;C:= Message Code to Find ld b,Max_Message ld hl,Msg_Table ;HL:= Start of the Message Table PmLp1: ld a,(hl) ;Repeat A:= Table's Message Code inc hl ld e,(hl) inc hl ld d,(hl) ; DE:= Pointer to String inc hl ; (HL equal to start next entry) cp c ; If (Code eq table) jr z,Pmprn ; Goto Print djnz PmLp1 ;Until (the whole tables been checked) ld de,NoCode ;(Pointer:= 'Unrecognized Message') PmPrn: push bc ld c,Bdos_PString ;C:= Bdos Print String Function call Bdos_Entry ;Print the Message pop bc ld a,c ;A:= Message Code ret page ;---------------------------------------------------------------------- ; Message Vector Table (3_Oct_84) ;-------------------------------- ; Msg_Table: db Msg_Banner ;Title Banner dw MsgOpn db Msg_Ready ;Ready to Fromat Prompt dw MsgRdy db Msg_Format ;Beginning Format dw MsgFmt db Msg_Verify ;Beginning Verification dw MsgVer db Msg_Warning ;Some Errors were made dw MsgWrn db Msg_Format_Done ;Formatting Done (Again ReStart Exit) dw MsgFmd db Msg_Bad_Rpt ;Bad Sectors Found dw MsgBs db Msg_No_Bad_Rpt ;No Bad Sectors Found dw MsgNbs db Msg_Pause ;Pause for Input Prompt dw MsgPas db Msg_Press_Rtn ;Press Return to Exit dw MsgRet db Msg_CrLf ;New Line dw CrLf End_Table: Max_Message equ ( (End_Table - Msg_Table)/3 ) + 1 page ;---------------------------------------------------------------------- ; Error Strings (3_Oct_84) ;------------------------- ; NoCode: db Cr,Lf,Tab db 'Unrecognized Error $' page ;---------------------------------------------------------------------- ; Message Strings (5_Oct_84) ;--------------------------- ; MsgOpn: db Clear_Screen,Esc,Dim,Cr db 'MD-HD ' db Esc,Bright db 'Format ' db Esc,Dim db 'Program Rev ' db ((FRev and 0F0h) shr 4) + '0', '.', (FRev and 0Fh) + '0' db Tab,Tab,Tab,Tab,Tab,' Copyright 1984' db Cr,Lf db 'Morrow Designs Inc.' db Tab,Tab,Tab,Tab,Tab,Tab,'San Leandro, Ca' db Cr,Lf,'$' MsgRet: db Cr,Lf,Tab db Esc,Dim db 'or Press RETURN to exit to CP/M ' db Esc,Bright,'$' MsgRdy: db Cr,Lf,Lf,Tab db Esc,Dim db 'Insert the diskette to be formatted into your ' db Esc,Bright Fdrive: db 0,': drive. ' db Esc,Dim,'$' MsgFmt: db Cr,Lf,Lf,Lf,Tab db Esc,Dim db Tab,'is the Track being ' db Esc,Bright db 'Formatted $' MsgVer: db Cr,Lf,Lf,Lf,Tab db Esc,Dim db Tab,'is the Track being ' db Esc,Bright db 'Verified $' MsgWrn: db Cr,Lf,Lf,Tab db Esc,Bright db 'Some errors were found on this diskette,' db ' use it at your own risk.' db Esc,Dim,'$' MsgFmd: db Cr,Lf,Lf,Tab db Esc,Bright db 'Formatting Operation Finished$' MsgBs: db Cr,Lf,Lf,Tab db Esc,Bright db 'Bad sectors found on this disk totaled $' MsgNbs: db Cr,Lf,Lf,Tab db Esc,Dim db 'There were No bad sectors found. $' MsgPas: db Cr,Lf,Tab db Esc,Dim db 'Press ' db Esc,Bright db 'RETURN ' db Esc,Dim db 'when you are ready to continue. ' db Esc,Bright,'$' CrLf: db Cr,Lf,'$' page ;---------------------------------------------------------------------- ; Data Area (4_Oct_84) ;--------------------- ; ;Other Parameters Initial_Drive: db 0 ;Current Drive when program started Total_Drives: db 0 ;Number of Logical Drives Available Drive_Number: db 1 ;Format Disk Number (A:= 0) Highest_Track: dw 0 ;Highest Logical Track Number ReMap_Count: dw 0 ;ReMapped Sector Count Output_Radix: dw 10 ;Radix for Print Number Routine ;Register Save Locations for Get/Put Buffer Functions Save_BC: dw 0 ;Save location for the BC register pair Save_DE: dw 0 ; " " " " DE " " Save_HL: dw 0 ; " " " " HL " " page ;---------------------------------------------------------------------- ; Default Application Interface area (26_Sept_84) ;------------------------------------------------ ; Apif: db 0 ;(HSTDSK) BDOS Drive Number (1st floppy) dw 0000 ;(HSTTRK) Desired Cylinder (lo,hi) dw 0 ;(HSTSEC) Desired Sector (lo,hi) db 0 ;(SECCNT) Number of sectors to transfer db 2 ;(RETRY) Retry Count dw Sys_Disk_Buffer ;(HSTBUF) Buffer Address (lo,hi) db 0 ;(ERFLAG) Error Code db 18h ;(OPFLAG) Options Flag dw 0 ;(PHYTRK) Physical track number (lo,hi) db 0 ;(PHYSEC) Physical sector number db 0 ;(PHYHD) Desired Head db 0 ;(PHYDRV) Physical Drive Number dw 0 ;(IOADD) Execution Address (lo,hi) ;Floppy Disk Skew/Gap Table Flp_Gap_Skew: db 50 db 32h db 80 db 9,8,7,6,5,4,3,2,1 ; Mtab/DPB MsDos_Mtab_Dpb: db 0 db 4 ds 7,0 dw 24h ds 13,0 db 20h page ;---------------------------------------------------------------------- ; Local Buffers (3_Oct_84) ;------------------------- ; Response_Buf: db Response_Max ;Maximum Length of Input Line db 0 ;Current Line Length ds Response_Max,0 ;Response Buffer ds 40h ;Local Stack Space Local_Stack: dw 0 Buffer: ds 10h,0 ;Local Buffer (up to 1k is actually used) end page