Hallo, in Asm I have a problem reading from the disk , the file is on the disk built cant read it .
File : Readdsik.asm
ReadDisk:
mov ah, 0x02 ; Read disk
mov bx, PROGRAM_SPACE ; Set disk info into PROGRAM_SPACE
mov al, 4
mov dl, [BOOT_DISK]
mov ch, 0x00
mov dh, 0x00
mov cl, 0x02 ; Read Sector 2
int 0x13
file on the disk: Extend.asm
[org 0x7e00]
mov bx, ExetendspacheSpaceSucess
call PrintString
jmp $
%include "print.asm"
ExetendspacheSpaceSucess:
db 'We are seccessfully in extended space' , 0
times 2048-($-$$) db 0
ASKER
[org 0x7c00]
mov [BOOT_DISK] , dl
mov bp, 0x7c00
mov sp, bp
mov bx, Print_text
call PrintString
call ReadDisk
mov ah, 0x0e
mov al, [PROGRAM_SPACE]
int 0x10
jmp $
%include "print.asm"
%include "Diskread.asm"
times 510-($-$$) db 0
dw 0xaa55
ASKER
[org 0x7c00]
mov [BOOT_DISK] , dl ; load program disk nummer into the system
mov bp, 0x7c00
mov sp , bp
mov bx, TestString
call PrintString
call ReadDisk
mov ah, 0x0e
mov al, [PROGRAM_SPACE]
int 0x10
jmp $
%include "print.asm"
%include "Diskread.asm"
times 510-($-$$) db 0
dw 0x55aa
Readdisk.asm
PROGRAM_SPACE equ 0x7e00
ReadDisk:
mov ah, 0x02 ; Set bios funcion read disk
mov bx, PROGRAM_SPACE
mov al, 2 ; read 2000byts
mov dl, [BOOT_DISK] ; from whits disk need to by read from
mov ch, 0x00 ; set the cilinder data to 0
mov dh, 0x00 ; set head from the disk
mov cl, 0x02 ; read sectror 2
int 0x13 ; BIOS read interupt.
jc DiskReadFaild
ret
BOOT_DISK:
db 0
DiskReadErrorString:
db 'Disk read Faild', 0
DiskReadFaild:
mov bx, DiskReadErrorString
call PrintString
jmp $
Programming includes both the specifics of the language you’re using, like Visual Basic, .NET, Java and others, but also the best practices in user experience and interfaces and the management of projects, version control and development. Other programming topics are related to web and cloud development and system and hardware programming.
TRUSTED BY
p.s. the [code][/code] tags use square brackets ;)