home *** CD-ROM | disk | FTP | other *** search
- DOSSEG
- .MODEL SMALL
-
- .STACK
-
- .DATA
-
- EXTRN SECTOR:BYTE
-
- .CODE
-
- EXTRN DISP_HALF_SECTOR:PROC
- ;-----------------------------------------------------------------------;
- ; This procedure reads the first sector on disk A and dumps the first ;
- ; half of this sector. ;
- ;-----------------------------------------------------------------------;
- READ_SECTOR PROC
- MOV AX,DGROUP ;Put data segment into AX
- MOV DS,AX ;Set DS to point to data
-
- MOV AL,0 ;Disk drive A (number 0)
- MOV CX,1 ;Read only 1 sector
- MOV DX,0 ;Read sector number 0
- LEA BX,SECTOR ;Where to store this sector
- INT 25h ;Read the sector
- POPF ;Discard flags put on stack by DOS
- XOR DX,DX ;Set offset to 0 within SECTOR
- CALL DISP_HALF_SECTOR ;Dump the first half
-
- MOV AH,4Ch ;Return to DOS
- INT 21h
- READ_SECTOR ENDP
-
-
- END READ_SECTOR