,0ffffh ; DIRBCB, DATBCB, TBLSEG. endif ; Disk Parameter Blocks. ; these tables define the drive physical attributes. dpbh0 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw hdsm0 ; disk size-1. dw hdir0 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw offset0 ; offset. db 2 db 3 if nhard gt 1 dpbh1 dw heads * hrdspt ; physical sectors per cylindere ptr dmasel1,al ;save in cmd channel head sel. mov al,byte ptr mwsectr ;load sector address. mov byte ptr dmarg3,al ; start the controller running and wait for completion. mwissue: mov dmastat,0 ; initialize status to busy. out attn,al ;start controller. mov dl,sekdsk ; dl = internal disk drive number. or dl,5 shl 5 ; dl = diskst poll code. call wait ; wait until not busy. mov al,dmastat ; al = status of transfer. cmp al,0ffh ;test for successful operation. jz mwiret ; hopag. ; these flags control the hard disk drivers. hrdsec db 0 ; logical sector number. hrdtrk dw 0 ; cylinder number. hrddsk db 0 ; hard disk drive number (0-3). mvdat db 0 ; move data flag. cerr db 0 ; offset strobe mask. chkmsk db 0 ; offset head number. chghd db 0 ; head change flag. mapptr dw 0 ; map buffer index. hdrtct db 0 ; retry counter. ; Disk Parameter Header tables. ; hard disk unit - 0. dph8 dw 0000h,0000h ; translate table. dw 0000h,0000h ; scratch areard gt 6 dph14 dw 0000h,0000h ; translate table. dw 0000h,0000h ; scratch area. dw dpbh6 ; disk parameter block. dw 00000h,0ffffh ; checksum, allocation. dw 0ffffh,0ffffh,0ffffh ; DIRBCB, DATBCB, TBLSEG. endif ; hard disk unit - 7. if nhard gt 7 dph15 dw 0000h,0000h ; translate table. dw 0000h,0000h ; scratch area. dw dpbh7 ; disk parameter block. dw 00000h,0ffffh ; checksum, allocation. dw 0ffffh,0ffffh,0ffffh ; DIRBCB, DATBCB, TBLSEG. endif ; hard fh dw 8000h ; check size. dw offset2 ; offset. db 2 db 3 endif if nhard gt 3 dpbh3 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw hdsm3 ; disk size-1. dw hdir3 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw offset3 ; offset. db 2 db 3 endif if nhard gt 4 dpbh4 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 2 db 3 endif if nhard gt 9 dpbh9 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw hdsm9 ; disk size-1. dw hdir9 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw offset9 ; offset. db 2 db 3 endif if nhard gt 10 dpbh10 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. ; *********** BEGINNING OF OTARI C-526 HARD DISK EQU's ***************** ; Otari C-526 Hard Disk Equates for CP/M-80, CP/M-86, and CCP/M-86. ; Created 10-15-85 by Don Tarbell. ; Changes by Don Tarbell: ; 11-05-85: made Otari C-526 version from Quantum 540 version. ; 12-05-85: moved Disk Parameter Blocks to BIOS module. ; Equates. nlp equ 3 ; 4 logical drivers for 1 physical drive. cyl equ 306 ; number of cylinders. heads equ 8 ; number of heads. precomp equ 128 ; cylinder to star; *********** BEGINNING OF CMI CM-6640 HARD DISK EQU's ***************** ; Equates for CP/M-80, CP/M-86, and Concurrent CP/M-86. ; Created 10-15-85 by Don Tarbell. ; Changes by Don Tarbell: ; 11-05-85: made Otari C-526 version from Quantum 540 version. ; 11-23-85: made CMI CM-6640 version from Otari C-526 version. ; 12-05-85: moved Disk Parameter Blocks to BIOS module. ; Equates. nlp equ 4 ; number of logical drives on each physical. cyl equ 640 ; number of cylinders. heads equ 6 db 0031 ; block mask. db 0001 ; extent mask. dw hdsm4 ; disk size-1. dw hdir4 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw offset4 ; offset. db 2 db 3 endif if nhard gt 5 dpbh5 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw hdsm5 ; disk size-1. dw hdir5 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size dw hdsm10 ; disk size-1. dw hdir10 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw offset10 ; offset. db 2 db 3 endif if nhard gt 11 dpbh11 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw hdsm11 ; disk size-1. dw hdir11 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw offset11 ; offset. db 2 db 3 endt write precompensatin. lowcurr equ 128 ; cylinder to start low current. stepdly equ 0 ; step delay. steprcl equ 30 ; recalibrate step delay. if teletek ; if teletek controller. hrdspt equ 16 ; sectors per track. headdly equ 1 ; settle delay (0-25.5 microsec.) hdsm0 equ 2047 ; logical disk 0 size minus one. hdir0 equ 2047 ; disk 0 directory size minus one. hdsm1 equ 2047 ; logical disk 1 size minus one. hdir1 equ 2047 ; disk 1 directory size minus one. hdsm2 equ 783 ; logical disk ; number of heads. precomp equ 128 ; cylinder to start write precompensatin. lowcurr equ 128 ; cylinder to start low current. stepdly equ 0 ; step delay. steprcl equ 30 ; recalibrate step delay. if teletek ; if teletek controller. hrdspt equ 16 ; sectors per track. headdly equ 1 ; settle delay (0-25.5 microsec.) hdsm0 equ 2047 ; logical disk 0 size minus one. hdir0 equ 2047 ; disk 0 directory size minus one. hdsm1 equ 2047 ; logical disk 1 size minus one. hdir1 equ 2047 ; disk 1. dw offset5 ; offset. db 2 db 3 endif if nhard gt 6 dpbh6 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw hdsm6 ; disk size-1. dw hdir6 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw offset6 ; offset. db 2 db 3 endif if nhard gt 7 dpbh7 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 0031 ; block mask. if ; ********* END OF MORROW HARD DISK CONTROLLER DRIVER ************** . dw offset10 ; offset. db 2 db 3 endif if nhard gt 11 dpbh11 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw hdsm11 ; disk size-1. dw hdir11 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw offset11 ; offset. db 2 db 3 end 2 size minus one. hdir2 equ 783 ; disk 2 directory size minus one. offset0 equ 1 ; first track of logical drive 0. offset1 equ 129 ; first track of logical drive 1. offset2 equ 257 ; first track of logical drive 2. endif if morrow ; if morrow controller. hrdspt equ 17 ; sectors per track. headdly equ 0 ; head settle delay. hdsm0 equ 2047 ; logical disk 0 size minus one. hdir0 equ 2047 ; logical disk 0 directory max. hdsm1 equ 2047 ; logical disk 1 size minus one. hdir1 equ 2047 ; directory size minus one. hdsm2 equ 2047 ; logical disk 2 size minus one. hdir2 equ 2047 ; disk 2 directory size minus one. hdsm3 equ 1511 ; logical disk 3 size minus one. hdir3 equ 1511 ; disk 3 directory size minus one. offset0 equ 1 ; first track of logical drive 0. offset1 equ 172 ; first track of logical drive 1. offset2 equ 343 ; first track of logical drive 2. offset3 equ 514 ; first track of logical drive 3. endif if morrow ; if morrow controller. hrdspt equ 17 ; sectors pe db 0001 ; extent mask. dw hdsm7 ; disk size-1. dw hdir7 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw offset7 ; offset. db 2 db 3 endif if nhard gt 8 dpbh8 dw heads * hrdspt ; physical sectors per cylinder. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw hdsm8 ; disk size-1. dw hdir8 ; directory max. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw offset8 ; offset. ееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееее logical disk 1 directory max. hdsm2 equ 1070 ; logical disk 2 size minus one. hdir2 equ 1070 ; logical disk 2 directory max. offset0 equ 1 ; first track of logical drive 0. offset1 equ 122 ; first track of logical drive 1. offset2 equ 243 ; first track of logical drive 2. endif cpmspc equ heads * hrdspt * 4 ; 128-byte sectors per cylinder. ; ********** END OF OTARI C-526 SPECIFIC CODE ********************* first track of logical drive 1. offset2 equ 323 ; first track of logical drive 2. offset3 equ 484 ; first track of logical drive 3. endif cpmspc equ heads * hrdspt * 4 ; 128-byte sectors per cylinder. ; ********** END OF CMI CM6640 SPECIFIC CODE ********************* nus one. hdir3 equ 1988 ; logical disk 3 directory max. offset0 equ 1 ; first track of logical drive 0. offset1 equ 162 ; ; *********** BEGINNING OF RMS-512 HARD DISK EQU's ***************** ; Equates for CP/M-80, CP/M-86, and Concurrent CP/M-86. ; Created 10-15-85 by Don Tarbell. ; Changes by Don Tarbell: ; 11-05-85: made Otari C-526 version from Quantum 540 version. ; 12-03-85: made CMI CM5619 version from Otari C-526 version. ; 12-05-85: moved Disk Parameter Blocks to Z816BIOS.A86. ; 12-05-85: derived RMS-512 version from CMI CM5619 version. ; Equates. nlp equ 2 ; logical drives for 1 physical dr; ********** ADES 33 HARD DISK DRIVER FOR CONCURRENT CP/M-86 ************** ; HARD DISK DRIVER FOR ADES CONTROLLER WITH PRIAM 33 MEGABYTE HARD DISK DRIVE. ; Copyright (c) 1981, 1986 Tarbell Electronics ; 08-13-82 Moved to FC00 and uses enable/disable phantom by Edwin E. Smith. ; 01-19-86 Translated from z80 source to 80186 source by Don Tarbell. ; 01-22-86 Added interface into Concurrent CP/M-86 by Don Tarbell. ; 01-24-86 Put buffer at segment FB00 and worked on integration. ; 01-25-86 Made mi hard disk interface. ; Entry: al = logical hard disk drive number from 0-3. ; Exit: cf (carry flag) set if error and register have parameters. adinit: cmp adiflg,0 ; have we already done this? clc ; clear carry for ok return. jne adiret ; return if so. mov adiflg,0ffh ; set flag if not. call adltp ; convert logical in al to physical. mov addsk,al ; set physical drive number. adiret: mov adcomp,0ffh ; driver operation complete. ret ; AD_TH - External Entry Point tееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееive. cyl equ 156 ; number of cylinders. heads equ 8 ; number of heads. precomp equ 0 ; cylinder to start write precompensatin. lowcurr equ 77 ; cylinder to start low current. stepdly equ 0 ; step delay. steprcl equ 30 ; recalibrate step delay. if teletek ; if teletek controller. hrdspt equ 16 ; sectors per track. headdly equ 1 ; settle delay (0-25.5 microsec.) hdsm0 equ 2047 ; logical disk 0 size minus one. hdir0 equ 2047 ; disk 0 directory size minus one. hdsm1 equ 431 ; logicanor changes, and debugged. ; 01-26-86 Got it working. ; 01-27-86 Got it working reliably. (put in a 186 memory wait state) ; ; ;s33 read/ write constants ; adnlog equ 4 ; number of logical drives. adnlp equ 4 ; number of logical per physical drives. ; for parameter blocks. adbps equ 512 ; bytes per sector. adhds equ 3 ; number of heads (tracks per cylinder). adspt equ 36 ; sectors per track. adsm0 equ 2037 ; logical drive 0 size - 1. adir0 equ 2047 ; logical drive 0 directory sizo all ades drivers. ; Read or Write the number of sectors indicated. ; Note: assumes all are on the same cylinder. ; Entry: ah = 0 for init, 1 for read, 2 for write, 3 for status . ; al = logical drive number from 0-3. ; es:di = transfer address. ; bx = cylinder number. ; cx = number of sectors to transfer. ; dx = sector within cylinder, starting at sector 0. ; Exit: if error, ; cf (carry flag) = 1 ; al = drive number ; ah = controller status ; bx = cylinder ; cееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееl disk 1 size minus one. hdir1 equ 431 ; disk 1 directory size minus one. offset0 equ 1 ; first track of logical drive 0. offset1 equ 129 ; first track of logical drive 1. endif if morrow ; if morrow controller. hrdspt equ 17 ; sectors per track. headdly equ 0 ; head settle delay. hdsm0 equ 2047 ; logical disk 0 size minus one. hdir0 equ 2047 ; logical disk 0 directory max. hdsm1 equ 577 ; logical disk 1 size minus one. hdir1 equ 577 ; logical disk 1 directory max. offset0 equ 1 ;e - 1. adof0 equ 1 ; logical drive 0 track offset. adsm1 equ 2037 ; logical drive 1 size - 1. adir1 equ 2047 ; logical drive 1 directory size - 1. adof1 equ 152 ; logical drive 1 track offset. adsm2 equ 2037 ; logical drive 2 size - 1. adir2 equ 2047 ; logical drive 2 directory size - 1. adof2 equ 303 ; logical drive 2 track offset. adsm3 equ 1389 ; logical drive 3 size - 1. adir3 equ 2047 ; logical drive 3 directory size - 1. adof3 equ 455 ; logical drive 3 track offset. adsprt equ 8h = head number. ; dx = sector number. ; if no error, ; cf = 0. ad_th: ; transfer parameters from registers to local variables. mov adop,ah ; operation code. cmp ah,3 ; is it a status check? je adst ; hop if so. mov adcomp,0 ; make driver busy. cmp ah,0 ; is it an init operation? je adinit ; hop if so. mov adsec,dx ; starting sector. mov adnsec,cx ; number of sectors. mov adtrk,bx ; cylinder number. call adltp ; convert logical in al to physical. movееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееее first track of logical drive 0. offset1 equ 122 ; first track of logical drive 1. endif cpmspc equ heads * hrdspt * 4 ; 128-byte sectors per cylinder. ; ********** END OF RMS-512 SPECIFIC CODE ********************* rack. headdly equ 0 ; head settle delay. hdsm0 equ 2047 ; logical disk 0 size minus one. hdir0 equ 2047 ; logical disk 0 directory max. hdsm1 equ 577 ; logical disk 1 size minus one. hdir1 equ 577 ; logical disk 1 directory max. offset0 equ 1 ;0h ; enable/disable buffer output port. adsegm equ 0f000h ; ps100 data buffer segment. adcom equ 512 ; ps100 command register offset. adstat equ adcom+8 ; ps100 adstat register offset. addrv equ adcom+1 ; drive number offset. adcyl equ adcom+2 ; cylinder offset. adhead equ adcom+4 ; head offset. adsect equ adcom+5 ; sector offset. ; adwcmd EQU 69H ;write command with retry adrcmd EQU 58H ;read with retry command adsequ equ 20h ; sequence drive up command. ; ADINIT - Initialize ADES: call addis ; disable command/status buffer. xor ax,ax ; set zero flag. clc ; clear error flag. mov adcomp,0ffh ; operation complete. ret ; ADST - Check ades hard disk controller status. ; Entry: none ; Exit: al = 0 if operation not complete. ; al = 0ff if operation complete. ; z flag set if operation not complete. adst: mov al,adcomp ; get status. cmp al,0 ; is it complete? ret ; return with error information. aderr: call adsets ; set es, di. mov bh,es:ad; mov es:adhead[di],al ; set head. mov ch,0 ; cx = sector number. mov cl,ah mov bx,offset ad33st add bx,cx mov al,[bx] ; translated sector. mov es:adsect[di],al mov es:adstat[di],al ; tell controller to go. call adwait ; wait for completion of operation. jc adrwx ; hop if error. cmp adop,2 ; was it a write operation? je adrwe ; exit if so. ; must be read operation, so transfer data from buffer to memory. mov es,adseg ; es = memory segment. mov di,adoff ; di = memory offv ah,0 ; ax = logical drive number. mov bl,adnlp ; bl = adnlp. div bl ; al = physical drive number. endif ret ; ;s33 physical sector translation table ; ad33st DB 0,24,12,1,25,13 ;translation of 3 sectors/ DB 2,26,14,3,27,15 ;2 revolutions DB 4,28,16,5,29,17 DB 6,30,18,7,31,19 DB 8,32,20,9,33,21 DB 10,34,22,11,35,23 ; local variables. adsec dw 0 ; sector. adnsec dw 0 ; number of sectors to transfer. adtrk dw 0 ; track. adoff dw 0 ; transfer address offset. adseg dxtent mask. dw adsm0 ; disk size-1. dw adir0 ; directory mask. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw adof0 ; offset. db 2 db 3 if adnlog gt 1 dpbh5 dw adhds * adspt ; physical sectors per cyl. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw adsm1 ; disk size-1. dw adir1 ; directory mask. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw adof1 ; offset. db 2 db 3 cyl[di] ; bx = cylinder number. mov bl,es:adcyl+1[di] mov ch,es:adhead[di] ; ch = head number. mov dl,es:adsect[di] ; dx = sector number. mov dh,0 mov al,es:addrv[di] ; al = drive number. mov ah,aderc ; ah = error status. call addis ; disable command/status buffer. or ah,ah ; clear zero flag. stc ; set carry flag. mov adcomp,0ffh ; operation complete. ret ; ; ADRW - Common ADES read/write routine. ; adrw: call aden ; enable command/status buffer. mov al,adrcmd ; set. push ds ; save ds. mov ax,adsegm ; ds = controller buffer segment. mov ds,ax mov si,0 ; si = beginning of buffer. mov cx,adbps ; cx = bytes per sector. cld ; direction = forward. rep movsb ; move data from buffer to memory. pop ds ; restore ds. adrwe: clc ; clear error flag. adrwx: ret ; ADEN - Enable command/status buffer. aden: push ax ; save ax. mov al,0 ; write 0 to port. out adsprt,al pop ax ; restore ax. ret ; ADDIS - Disable command/status buffer. w 0 ; transfer address segment. adiflg db 0 ; non-zero after mapper called once. adop db 0 ; operation code: 0=init, 1=read, 2=write, 3=status. addsk db 0 ; physical drive number. aderc db 0 ; controller status after operation. adcomp db 0 ; driver stats = 0 for busy, 1 for oeration complete. ; Hard Disk Parameter Headers. ; hard disk unit - 0. dph12 dw 0000h,0000h ; translate table. dw 0000h,0000h ; scratch area. dw dpbh4 ; disk parameter block. dw 00000h,0ffffh ; checksumendif if adnlog gt 2 dpbh6 dw adhds * adspt ; physical sectors per cyl. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw adsm2 ; disk size-1. dw adir2 ; directory mask. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw adof2 ; offset. db 2 db 3 endif if adnlog gt 3 dpbh7 dw adhds * adspt ; physical sectors per cyl. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw adsm3 ;default is al = read command. cmp adop,2 ; is it a write operation? jne adset ; hop if not. ; must be write, so transfer data into buffer first. call adsets ; es:di = buffer address. push ds ; save ds. mov si,adoff ; si = memory offset. mov cx,adbps ; cx = bytes per sector. mov ds,adseg ; ds = memory segment. cld ; direction = forward. rep movsb ; move the sector from memory to buffer. pop ds ; restore ds. mov al,adwcmd ; al = write command. adset: ; put command, drive, addis: push ax ; save ax. mov al,1 ; write 1 to port. out adsprt,al pop ax ; restore ax. ret ; ADSETS - Set buffer segment. adsets: push ax ; save ax. mov ax,adsegm ; es = buffer segment. mov es,ax mov di,0 ; use di as dummy for writes. pop ax ; restore ax. ret ; ADWAIT - Wait until the latest operation is complete. ; Then return with carry if error. adwait: call adsets ; es:di = buffer address. adwtlp: mov al,es:adstat[di] ; al = controller status. test al,80h ; , allocation. dw 0ffffh,0ffffh,0ffffh ; DIRBCB, DATBCB, TBLSEG. ; hard disk unit - 1. if adnlog gt 1 dph13 dw 0000h,0000h ; translate table. dw 0000h,0000h ; scratch area. dw dpbh5 ; disk parameter block. dw 00000h,0ffffh ; checksum, allocation. dw 0ffffh,0ffffh,0ffffh ; DIRBCB, DATBCB, TBLSEG. endif ; hard disk unit - 2. if adnlog gt 2 dph14 dw 0000h,0000h ; translate table. dw 0000h,0000h ; scratch area. dw dpbh6 ; disk parameter block. dw 00000h,0ffff disk size-1. dw adir3 ; directory mask. db 0ffh ; 16 bits for alloc. db 0ffh dw 8000h ; check size. dw adof3 ; offset. db 2 db 3 endif ; ************** END OF ADES 33 HARD DISK DRIVER **************************  db 0ffh dw 8000h ; check size. dw adof2 ; offset. db 2 db 3 endif if adnlog gt 3 dpbh7 dw adhds * adspt ; physical sectors per cyl. db 0005 ; block shift. db 0031 ; block mask. db 0001 ; extent mask. dw adsm3 ;and cylinder into command register. call adsets ; set es, di to buffer location. mov es:adcom[di],al ; store command in ps1