I am creating a custom operating system. I have two nasm files:
boot.asm:
[BITS 16]
start.asm:
[BITS 16] MOV AL, 72 CALL PrintCharacter MOV AL, 101 CALL PrintCharacter MOV AL, 108 CALL PrintCharacter MOV AL, 108 CALL PrintCharacter MOV AL, 111 CALL PrintCharacter MOV AL, 44 CALL PrintCharacter MOV AL, 32 CALL PrintCharacter MOV AL, 87 CALL PrintCharacter MOV AL, 111 CALL PrintCharacter MOV AL, 114 CALL PrintCharacter MOV AL, 108 CALL PrintCharacter MOV AL, 100 CALL PrintCharacter MOV AL, 33 CALL PrintCharacter PrintCharacter: MOV AH, 0x0E MOV BH, 0x00 MOV BL, 0x07 INT 0x10 RET TIMES 512 - ($ - $$) db 0
I will compile them into .bin files using the following commands:
nasm boot.asm -f bin -o boot.bin nasm start.asm -f bin -o start.bin
Then add them to the floppy disk using the following commands:
dd if=boot.bin bs=512 of=MyOS.img count=1 dd if=start.bin bs=512 of=MyOS.img count=2
When I boot from a floppy disk into VirtualBox, it shows 2 exclamation points instead of one, and it doesn't even load into QEmu (Q.app). I am new to developing an operating system and so it would be nice if someone could tell me what I did wrong and give me some tips on how best to configure my OS.
source share