From a47c6d65c1fbab9d821b869fc0bd30ae441f24fc Mon Sep 17 00:00:00 2001 From: hpa Date: Mon, 10 Dec 2001 06:46:18 +0000 Subject: Yet another snapshot. Now we can actually compile the sucker... --- memdisk/memdisk.asm | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'memdisk/memdisk.asm') diff --git a/memdisk/memdisk.asm b/memdisk/memdisk.asm index 46e19236..3c9513dd 100644 --- a/memdisk/memdisk.asm +++ b/memdisk/memdisk.asm @@ -127,8 +127,16 @@ GetDriveType: pop ax ; Drop return address mov ah,[DriveNo] shr ah,7 + pushf or ah,02h ; CF = 0 mov P_AH,ah + popf + jz .floppy + mov ax,[DiskSize] ; For hard disk return the size + mov P_DX,ax + mov ax,[DiskSize+2] + mov P_CX,ax +.floppy: mov [LastStatus],byte 0 ; Success, but AH returns a value jmp short DoneWeird @@ -402,15 +410,12 @@ Mover_dst1: db 0, 0, 0 ; Low 24 bits of target addy db 00h ; Extended access rights Mover_dst2: db 0 ; High 8 bits of source addy +LastStatus db 0 ; Last return status + section .bss alignb 4 PatchArea equ $ ; This gets filled in by the installer -DriveNo resb 1 ; Our drive number -DriveType resb 1 ; Our drive type (floppies) -LastStatus resb 1 ; Last return status - resb 1 ; pad - Cylinders resw 1 ; Cylinder count Heads resw 1 ; Head count Sectors resd 1 ; Sector count (zero-extended) @@ -425,6 +430,11 @@ MemInt1588 resd 1 ; 1MB-65MB memory amount (1K) OldInt13 resd 1 ; INT 13h in chain OldInt15 resd 1 ; INT 15h in chain +OldDosMem resw 1 ; Old position of DOS mem end + +DriveNo resb 1 ; Our drive number +DriveType resb 1 ; Our drive type (floppies) + ; End patch area Stack resd 2 ; Saved SS:ESP on invocation -- cgit v1.2.1