-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathModules.asm
More file actions
45 lines (33 loc) · 975 Bytes
/
Modules.asm
File metadata and controls
45 lines (33 loc) · 975 Bytes
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
;--------------------Reading Sector MOdule-----------------
ReadSector:
mov ah,0x02
push dx
mov cx,0x05
ReadSector.L:
push cx
mov al,[_SectorsToRead]
mov ch,0x00
mov dh,0x00
mov cl,[_Sectors]
int 0x13
jnc ReadSector.ReadSectorDone
pop cx
loop ReadSector.L
jmp ReadSector.Error
ReadSector.ReadSectorDone:
pop cx
pop dx
cmp dh,al
mov si,_SRS
call PrintString
jmp ReadSector.EndRad
ReadSector.Error:
mov si,_SecReadError
call PrintString
ReadSector.EndRad:
ret
;----------------End Reading Sector MOdule--------------------
;--------------------Variables--------------------------------
_SRS db "[SRM] Sector Read Done!",0x0d,0x0a,0
_SecReadError db "[SRM] Error While Reading Sector!",0x0d,0x0a,0
;-------------------------------------------------------------