I'm attempting to write a FAT 12 boot loader. Doing so the "header" of my boot sector contains
the BIOS Parameter block. It looks as follows (AT&T)
Code: Select all
.code16
.text
.global _start
_start:
jmp begin
nop
bpbHeadsPerCylinder: .word 2
The problem is when I try to access the value of the entries in the header, e.g
Code: Select all
mov bpbHeadsPerCylinder,%ax
I wrote the following tiny linux program (that does what is intended,set a "header" variable as the exit status
Code: Select all
code
.section .text
.global _start
var: .byte 4
_start:
mov var,%bx
mov $1,%ax
int $0x80
Thx