Anyway, I'm still confused about segments, but I'm getting much better in that department, so sorry, also, if this is a noob question.
Now, I'm trying to write the boot loader so that it starts at the label 'START', and I want the CPU to far-jump to a another label, but also in the process, set the CS register to 7C00. So when it far-jumps, it sets the CS register and the IP register to the following: 07C0:(0000 + address of label) - where '07C0' is the CS register, and '0000' is the IP register that is set to the address of the label that was far-jumped towards. But I can't get it to work properly.
This is what I've tried so far:
Code: Select all
START:
; Far-Jump to the boot sector's main boot code.
MOV AX, 1984
MOV DS, AX
MOV ES, AX
LEA BX, [CHKDSK]
JMP FAR [ES:BX]
Code: Select all
START:
; Far-Jump to the boot sector's main boot code.
MOV AX, 1984
MOV DS, AX
MOV ES, AX
MOV BX, [CHKDSK]
JMP [ES:BX]
Code: Select all
START:
; Far-Jump to the boot sector's main boot code.
MOV AX, 1984
MOV ES, AX
MOV BX, CHKDSK
JMP [ES:BX]
Code: Select all
START:
; Far-Jump to the boot sector's main boot code.
MOV AX, 1984
MOV ES, AX
LEA BX, [CHKDSK]
JMP FAR [ES:BX]
Code: Select all
START:
; Far-Jump to the boot sector's main boot code.
MOV AX, 1984
MOV DS, AX
MOV ES, AX
MOV BX, CHKDSK
JMP FAR [ES:BX]
Thanks.
Best Regards,
~ Joe