Page 1 of 1

Few newbies questions

Posted: Tue Apr 05, 2005 11:00 pm
by Hery
1. [asm] In Intel synatx (NASM) i've written:

Code: Select all

mov word [es:00h], ax
, what i have to write in AT&T??
2. [C] when i write code like this:

Code: Select all

int (*something) (arguments) =0x80d09;
 (*something) (arguments);
Does it call address cs:80d09h or 80d09h (physical)?
3. [linker]I've got 16bit ELF object file (gcc), and i need good linker which made 16 bit binary file. Result file have to can run in alone (it'll be OS).

Thanks.

Re: Few newbies questions

Posted: Wed Apr 06, 2005 11:00 pm
by bubach
mov word [es:00h]
?

thats not valid. you must have missed something.

Re: Few newbies questions

Posted: Wed Apr 06, 2005 11:00 pm
by Hery
oh, yes, sorry. now is ok.

Re: Few newbies questions

Posted: Wed Apr 06, 2005 11:00 pm
by MisterIO
You're giving to 'something' 0x80d09,so you're talking about 32bit protected mode.Even without trying that code,do you really think that with that instruction you could break the hardware protection?
If you are not talking about 32bit protected mode,do you really think that you can give 0x80d09 to a 16bit variable?Also your question is wrong because if you are in real mode cs:'(16 bit number)'h is a "physical" address,because there is not virtual memory in real mode!Maybe it could work with something like :
far int etc. etc.
but I don't know,it depends on your compiler!

Re: Few newbies questions

Posted: Thu Apr 07, 2005 11:00 pm
by Hery
i read that logical address mean:

Code: Select all

0x6000:0x5FA6
(segment:offset) and physical:

Code: Select all

0x6000*16+0x5FA6=0x65FA6
(segment*16+offset)
UPDATE: it isn't important i can write it easier, what about other questions??