Code: Select all
;**********************bootstart.s**********************;
; The bootsector
[ORG 0x7c00]
[BITS 16]
jmp 0x0000:bootstart ; jump to set up CS:IP
bootstart:
; Clear interrupts
; cli
; Set our data segment
xor ax, ax
mov ds, ax
mov ah, 0xa
mov al, bootsectorload
mov bl, 0xf
int 0x10
; mov si, greeting
; call printString
; mov si, error
; call printString
; mov si, load
; call printString
hlt
printString:
lodsb ; Load character of string
or al, al ; Check to see if al is zero
mov bl, 0xf
jz psreturn
mov ah, 0x13
int 0x10
jmp printString
psreturn:
ret
data:
bootsectorload db 'A'
times 510-($-$$) db 0
dw 0x55AA
This works fine, however, when I load this into qemu or virtualbox, the top of the screen glitches. It doesn't complain about booting though. When I inspected the iso file produced by mkisofs, I noticed it had the file in it _DS_STOR, and when I change the directories I use in my iso creation script to mkisofs -no-emul-boot -o /Volumes/Macintosh\ HD\ 2/Users/daniel/Programming/Cube/source/build/CUBE.iso -A CUBE -b cube.img /Volumes/Macintosh\ HD\ 2/Users/daniel/Programming/Cube/source/build/bin
it no longer creates the _DS_STOR file.
Also as you can see from the screenshot, the interrupt isn't producing a character on screen.