-
Notifications
You must be signed in to change notification settings - Fork 0
/
mbread.asm
47 lines (41 loc) · 973 Bytes
/
mbread.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
startmbrread:
push cs cs
pop ds es
mov bx,offset bufmbrread
mov dl,80h
mov ax,201h
xor dh,dh
xor cx,cx
mov cl,1
int 13h
mov ah,3ch
mov dx,offset fnmbrread
mov cx,0
int 21h
jc err_
mov bx,ax
mov ah,40h
mov cx,200h
mov dx,offset bufmbrread
int 21h
jc err_
mov ah,3eh
int 21h
; mov ah,09h
; mov dx,offset mes
; int 21h
exit:
ret
err_:
; mov ah,09h
; push cs
; pop ds
; mov dx,offset errormbrread
; int 21h
ret
fnmbrread DB 'mbr.sec',0
bufmbrread db 200h dup (?)
mes db 10,13,'Ok. $'
errormbrread db 10,13,'*** Error *** $'
;cseg ends
; end startmbrread