flat assembler
Message board for the users of flat assembler.

Index > OS Construction > 0000:7C00h in pmode

Author
Thread Post new topic Reply to topic
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
when I jmp 0000:7C00h in pmode

when I disassemble it and it shows EA00:7C00
instead of 0000:7C00h ???
Post 09 Apr 2009, 02:26
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17249
Location: In your JS exploiting you and your system
revolution
Which disassembler are you using? Check you set the use32/16 assembler mode correctly.

BTW: A jump to a zero segment in protected mode should cause a GP fault, since zero in the CS segment register is not permitted by design.
Post 09 Apr 2009, 02:30
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Are your descriptors zero based ?, if so you can just jmp 7C000h or you can try the address - the base, if they are not 0 based.
Anyway as your trying to jump to the boot code, you should be in realmode anyway Wink
Post 09 Apr 2009, 19:00
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
in pmode, you can jump to [base=7c0h,size=512]:0
in rel mode you can too.
then, what does the BIOS?
does it load at [0:7C00h]?
[7:c0]?, [7c:0]?,[7c0:0]
then, what is preferable?

it is also possible to make an org independant bootloader.
something that can be executed from anywhere in ram?
Post 09 Apr 2009, 19:22
View user's profile Send private message Visit poster's website Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
jmp 0:7C00h

or


push WORD [0x0000]
push WORD [0x7C00]
retf

or

org 0x7C00

Quote:

it is also possible to make an org independant bootloader.
something that can be executed from anywhere in ram?


real mode or PMode? or both.. which do you refer to..
Post 10 Apr 2009, 05:23
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17249
Location: In your JS exploiting you and your system
revolution
So you are using real mode then. Those instructions above all would not work in pmode.
Post 10 Apr 2009, 06:05
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
Quote:
real mode or PMode? or both.. which do you refer to..

both, using only instructions common to both modes, or maybe a sort of LUT with a higher level instruction set.

if PM, then, translate with LUTPM
if RM, translate with LUTRM.

something like this.
this is possible to make a very simple object oriented design.
Post 10 Apr 2009, 16:21
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
dosin wrote:
when I jmp 0000:7C00h in pmode


Then you WILL get a GPF because the selector value of ZERO is deliberately made invalid in PM. Also, you didn't reveal what disassembler you use nor whether you use 16-bit or 32-bit PM nor how you initialize it (GDT ???) Sad
Post 12 Apr 2009, 07:23
View user's profile Send private message Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
I used different disasmeblers.. but any way..
I think I have it now..

Thanks for the replies..
Post 13 Apr 2009, 18:10
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.