flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 21 Sep 2013, 21:52
In 16-bit mode "0001:0000" is linear address 0x1000 (1 shl 12). But regardless, you need to use org 0 for the 16-bit code because your IP is zero. And use a long mode segment that maps to address 0x1000.
There are already code examples on this board about booting and entering long mode. A search might generate some fruitful source code for you. |
|||
![]() |
|
Bargest 22 Sep 2013, 21:56
I misunderstand why do you need to place loader after kernel. Also, you cannot switch direclty in long-mode without using protected (x32) mode.
About your question, you can use a trick: Code: org 0h ; as revolution said - "0001:0000" -> ip == 0 start16: ; code jmp sel32:code32 end16: org 1000h + end16 - start16 code32: ; 32-bit code |
|||
![]() |
|
SeproMan 25 Sep 2013, 10:24
revolution wrote :
Quote:
0001 represents the segment 0000 represents the offset So this address actually means linear address 16 (NOT 0x1000 = 4096) _________________ Real Address Mode. |
|||
![]() |
|
revolution 26 Sep 2013, 07:44
SeproMan wrote: revolution wrote : |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.