Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %ifndef __DISK_LIB__
- %define __DISK_LIB__
- SegmentAddr dw 0000h
- OffsetAddr dw 0000h
- Sector db 0
- Track db 0
- Head db 0
- Drive db 0
- NumSectors db 0
- Reader db 02h
- Writer db 03h
- SectorPerTrack db 0
- TrackPerHead db 0
- ReadDisk:
- mov ah, byte[Reader]
- call DiskOperation
- ret
- WriteDisk:
- mov ah, byte[Writer]
- call DiskOperation
- ret
- DiskOperation:
- mov al, byte[NumSectors]
- mov ch, byte[Track]
- mov cl, byte[Sector]
- mov dh, byte[Head]
- mov dl, byte[Drive]
- mov bx, word[SegmentAddr]
- mov es, bx
- mov bx, word[OffsetAddr]
- int 13h
- ret
- %endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement