How to stop infinite loop?
Posted: Sat Dec 15, 2012 9:13 pm
Hey I got a problem, my os is stuck at this one line of code it is meant to jump beyond the boot sector but it just loops infinitely.
Code: Select all
jmp 0x200The Place to Start for Operating System Developers
https://f.osdev.org/
Code: Select all
jmp 0x200No, the jmp itself do not perform loop.gabemaiberger wrote:Hey I got a problem, my os is stuck at this one line of codeit is meant to jump beyond the boot sector but it just loops infinitely.Code: Select all
jmp 0x200
Code: Select all
mov cx, WORD [0x0080]
mov di, 0x0200
.LOOP:
push cx
mov cx, 0x000C ;length of filename
mov si, ImageName ;move image name into si
push di
rep cmpsb
pop di
je LOAD_FILE
pop cx
add di, 0x0020
loop .LOOP
jmp FAILURE
LOAD_FILE:
mov si, msgCRLF
call DisplayMessage
mov dx, WORD [di + 0x001A]
mov WORD [cluster], dx
mov ax, 0x0100
mov es, ax
mov bx, 0
xor cx, cx
mov cl, BYTE[SectorsPerCluster]
mov ax, WORD[cluster]
call ClusterLBA
call ReadSectors
jmp DONE
My crystal ball says it isn't. How are you trying to get it there?gabemaiberger wrote:It is supposed to be in the first nine sectors of a floppy disk
Code: Select all
dd if=boot.bin of=/dev/sdfSounds like you're using an USB mass storage device rather than a true floppy drive.floppy disk
(...)
/dev/sdf