; ; PARK.A86 - MFM/RLL Head Parking Program For Two Hard Disks ; Version 0.3 ; Freeware from Kirk Lawrence ; cseg org 100h jmp start ; esc equ 1Bh header db 13,10,esc,'0',' PARK Version 0.3 - ' db 'MFM/RLL Hard Disk Head Parking Utility' db 13,10,' Freeware from Kirk Lawrence',13,10,'$' noone db 13,10,' No hard disks are present in this system.' db 13,10,07,'$' okone db 13,10,' First hard disk: PARKED$' notwo db 13,10,' Second hard disk: NOT INSTALLED',13,10,'$' oktwo db 13,10,' Second hard disk: PARKED',13,10,'$' over db 13,10,' Turn the power off now, ' db 'or press any key to return to CP/M-86. $' crlf db esc,'1',esc,'D ',13,10,'$' ; start: mov dx,offset header;point to the header message call prtstring ;print it ; ; park the first hard drive ; mov ax,1100h ;function 11h - recalibrate drive mov dx,0080h ;select first hard drive int 13h ;call BIOS disk services jc nodisk1 ;if carry flag is set, no hard disk mov ax,0800h ;function 8 - get disk parameters (CX/DX) int 13h ;call BIOS disk services mov ax,0C00h ;function 0Ch - seek to cylinder (in CX) mov dx,0080h ;select first hard drive int 13h ;call BIOS disk services mov dx,offset okone ;point to 'parked' message call prtstring ;print it ; ; park the second hard drive ; mov ax,1100h ;function 11h - recalibrate drive mov dx,0081h ;select second hard drive int 13h ;call BIOS disk services jc nodisk2 ;if carry flag is set, no hard disk mov ax,0800h ;function 8 - get disk parameters (CX/DX) int 13h ;call BIOS disk services mov ax,0C00h ;function 0Ch - seek to cylinder (in CX> mov dx,0081h ;select second hard drive int 13h ;call BIOS disk services mov dx,offset oktwo ;point to 'parked' message call prtstring ;print it jmp finis ;go end the program nodisk1: mov dx,offset noone ;point to 'no disk' message call prtstring ;print it jmp exit ;go exit the program nodisk2: mov dx,offset notwo ;point to 'no 2nd disk' message call prtstring ;print it finis: mov dx,offset over ;point to tail message call prtstring ;print it mov cl,1 ;function 1 - get console input int 224 ;call BDOS mov dx,offset crlf ;point to ending sequence call prtstring ;print it jmp exit ;go exit to CP/M-86 prtstring: mov cl,9 ;function 9 - print string int 224 ;call BDOS ret ;return exit: xor cx,cx ;function 0 - reset system int 224 ;call BDOS end