I has been some time since I haven't been doing anything related to osdev, but I have decided to try again.
Now this is how my code looks like:
Code: Select all
org 0x7C00
bits 16
jmp 0x0000:start
;BIOS Parameter block:
times 0xB-($-$$) db 0
BPB:
.bytesPerSector dw 512
.sectorsPerCluster db 1
.reservedLogicalSectors dw 1
.numberOfFATs db 2
.rootDirEntriesMax dw 224
.totalLogicalSectors dw 2880 ;assume 1.44MB floppy
.mediaType db 0xF0
.sectorsPerFAT dw 9
.sectorsPerTrack dw 18
.headsPerCylinder dw 2
.huddenSectorsCnt dd 0
.totalSectors dd 80
.driveNumber db 0
.flags db 0
.bootSignature db 0x29
.serialNumber dd 0xa0a1a2a3
.label db "MOS FLOPPY "
.fstype db "FAT12 "
start:
xor bx, bx
mov ds, bx
mov es, bx
mov ah, 0x0e
mov al, 'a'
int 0x10
jmp $
cli
hlt
times 446 - ($-$$) db 0
db 0x80
db 0x00;head
db 0x01;sector
db 0x00;cylinder
db 0x01
db 0x01, 0x02, 0x04
dd 0x00
dd 0x80
times 510-($-$$) db 0
dw 0xaa55
Edit. When I run it on a real machine it just displays a blinking cursor