i've recently started to experience very wierd problem with my OS. i'll try to describe what happens that you would be able to help me
so, when kernel reaches 64000 bytes or 125 sectors long everything is fine and it does what it should, but when i uncomment one line (set Floppy buffer some value) of my code and kernel becomes 64032 bytes or 126 sectors os boots but then everything hangs right at the start of the kernel. when i uncomment one more line (which works with that buffer) and kernel is 64096 bytes or 126 sectors long - os will not even boot. well i thought that it was smth with my code, so i tried "printf" function, but got the same result.
what i think is that the problem is in the bootsector this is how i read from the floppy :
Code: Select all
read:
xor ax, ax
mov dl, [drive]
int 0x13
jc read
; read first 17 + 18 sectors of kernel
; we have 575 KB
mov ax, 0xFA0
mov es, ax
mov bx, 0x600
mov ah, 0x2
mov al, 17
mov cx, 0x0002
mov dh, 0
int 0x13
mov ax, 0x11F8
mov es,ax
mov bx, 0x280
mov ah, 0x2
mov al, 18
mov cx, 0x0001
mov dh, 1
int 0x13
;********************************
mov si, 7 ; read n * 18 sectors of kernel, also change ecx
mov ax, 0x11F8
push ax
mov bx, 0x280
mov ch, 0x1 ; track
xor dh, dh
cycle:
pop ax
add ax, 0x1F4
mov es, ax
push ax
add bx, 0x4C0 ; offset
mov ah, 0x2
mov al, 18 ; 18 sectors
mov cl, 0x1 ; from first sector
int 0x13
cmp dh, 1
je trackDone
inc dh
dec si
jmp cycleDone
trackDone:
dec dh
inc ch
dec si
cycleDone:
cmp si, 0
jne cycle
;************************************
pop ax
jc read
if not, i attached all bootsector.
any help would be appreciated. thank you in advance.
[attachment deleted by admin]