Hello,
Your
jmp 0x1000:0x0 instruction in the boot record (
1BL.s) implies that the program is running at 64k linear. Thus using
org 0x1000 would be lying to the assembler;
org just tells the assembler to base local labels from a common origin. If you really want to use it, it should be
org 0x10000 but see below first.
I advise using
org 0 and setting the segment registers to
0x1000 for consistency and to avoid any additional misuse;
org should be avoided anyways.
Code: Select all
bits 16
org 0
cli
mov ax, 0x1000
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
;; allocate stack space and set ss:sp -> stack
sti
jmp init_aa_2bl
align 4
Also, please take note,
Code: Select all
jmp 0x1000:0x0 ;jmp to 0x1000 and pass execution
This actually jumps to
0x1000:0 which is
0x10000 linear not 0x1000. 0x1000 is the segment number, where each segment is aligned on 16 bytes. That is, you can convert it using
segment:offset = segment*16+offset => 0x1000:0x0 = 0x1000*16+0=
0x10000 linear. This is why your
org 0x1000 is lying to the assembler and resulting in errors. I'd advise doing the above and just use
org 0 to avoid any farther problems.