hi ...
i want to read via int 13h a sector into memory from floppy.
this is my code :
;CODE-----------------------------------------------------------
jmp BEG
Sector DB 512 DUP (?)
;------------------------------------------
;read sektoren
;------------------------------------------
BEG:
MOV AH, 02h
MOV AL, 1 ;number of sectors to read
MOV CH, 0 ;track
MOV CL, 1 ;Sector
MOV DH, 0 ;Head
MOV DL, 0 ;A:
push cs / pop es
lea BX, Sector
INT 13h
JC ERROR
;------------------------------------------
;print sector to screen
;------------------------------------------
MOV AH, 13h ;print screen
MOV AL, 0
MOV BH, 0
MOV BL, 15 ;color
MOV DH, 1 ;row 1
MOV DL, 1 ;colum 1
MOV CX, 512 ;number of chars
push cs / pop es
lea BX, Sector
INT 10h
JMP ENDE
;------------------------------------------
;Error
;------------------------------------------
ERROR:
MOV AH, 0Eh ;Teletype function
MOV BH, 0
MOV AL, 'E'
int 10h
MOV AL, 'R'
int 10h
int 10h
MOV AL, 'O'
int 10h
MOV AL, 'R'
int 10h
;------------------------------------------
;End of Program
;------------------------------------------
ENDE:
.halt
;CODE-----------------------------------------------------------
.... the problem is that I'm not sure weather the sector is in memory or not ... because when i try to print the memory to screen then i only get black lines instead of the content of the sector ...
where is the bug ???!!!??? ... please help me ...
assembler is asm.exe
thx for help
i want to read via int 13h a sector into memory from floppy.
this is my code :
;CODE-----------------------------------------------------------
jmp BEG
Sector DB 512 DUP (?)
;------------------------------------------
;read sektoren
;------------------------------------------
BEG:
MOV AH, 02h
MOV AL, 1 ;number of sectors to read
MOV CH, 0 ;track
MOV CL, 1 ;Sector
MOV DH, 0 ;Head
MOV DL, 0 ;A:
push cs / pop es
lea BX, Sector
INT 13h
JC ERROR
;------------------------------------------
;print sector to screen
;------------------------------------------
MOV AH, 13h ;print screen
MOV AL, 0
MOV BH, 0
MOV BL, 15 ;color
MOV DH, 1 ;row 1
MOV DL, 1 ;colum 1
MOV CX, 512 ;number of chars
push cs / pop es
lea BX, Sector
INT 10h
JMP ENDE
;------------------------------------------
;Error
;------------------------------------------
ERROR:
MOV AH, 0Eh ;Teletype function
MOV BH, 0
MOV AL, 'E'
int 10h
MOV AL, 'R'
int 10h
int 10h
MOV AL, 'O'
int 10h
MOV AL, 'R'
int 10h
;------------------------------------------
;End of Program
;------------------------------------------
ENDE:
.halt
;CODE-----------------------------------------------------------
.... the problem is that I'm not sure weather the sector is in memory or not ... because when i try to print the memory to screen then i only get black lines instead of the content of the sector ...
where is the bug ???!!!??? ... please help me ...
assembler is asm.exe
thx for help