home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
library
/
nor_asm
/
disk_i16.asm
< prev
next >
Wrap
Assembly Source File
|
1989-05-16
|
809b
|
35 lines
DOSSEG
.MODEL SMALL
.STACK
.DATA
EXTRN SECTOR:BYTE
.CODE
EXTRN INIT_SEC_DISP: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
CALL INIT_SEC_DISP ;Dump the first half
MOV AH,4Ch ;Return to DOS
INT 21h
READ_SECTOR ENDP
END READ_SECTOR