Few newbies questions

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Hery
Member
Member
Posts: 65
Joined: Sat Dec 04, 2004 12:00 am

Few newbies questions

Post 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.
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re: Few newbies questions

Post by bubach »

mov word [es:00h]
?

thats not valid. you must have missed something.
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Hery
Member
Member
Posts: 65
Joined: Sat Dec 04, 2004 12:00 am

Re: Few newbies questions

Post by Hery »

oh, yes, sorry. now is ok.
MisterIO
Posts: 1
Joined: Mon Apr 04, 2005 11:00 pm

Re: Few newbies questions

Post 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!
Last edited by MisterIO on Wed Apr 06, 2005 11:00 pm, edited 2 times in total.
Hery
Member
Member
Posts: 65
Joined: Sat Dec 04, 2004 12:00 am

Re: Few newbies questions

Post 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??
Last edited by Hery on Thu Apr 07, 2005 11:00 pm, edited 1 time in total.
Post Reply