-
Notifications
You must be signed in to change notification settings - Fork 5
/
DISK.ASM
64 lines (47 loc) · 790 Bytes
/
DISK.ASM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
; *******************************************************
; * *
; * Turbo Pascal Runtime Library Version 5.5 *
; * Disk Status Routines *
; * *
; * Copyright (C) 1988,89 Borland International *
; * *
; *******************************************************
TITLE DISK
LOCALS @@
CODE SEGMENT BYTE PUBLIC
ASSUME CS:CODE
PUBLIC DiskFree
DiskFree PROC FAR
Drive EQU (BYTE PTR [BP+6])
PUSH BP
MOV BP,SP
MOV DL,Drive
MOV AH,36H
INT 21H
MOV DX,AX
CMP AX,0FFFFH
JE @@1
MUL CX
MUL BX
@@1: POP BP
RET 2
DiskFree ENDP
PUBLIC DiskSize
DiskSize PROC FAR
Drive EQU (BYTE PTR [BP+6])
PUSH BP
MOV BP,SP
MOV DL,Drive
MOV AH,36H
INT 21H
MOV BX,DX
MOV DX,AX
CMP AX,0FFFFH
JE @@1
MUL CX
MUL BX
@@1: POP BP
RET 2
DiskSize ENDP
CODE ENDS
END