Page 1 of 1

about [ORG 0x0100]

Posted: Mon Jul 12, 2004 11:00 pm
by DIGO_RP
Please does anyone could tell me about what ORG 0x0100 reference at?

It makes a reference about a offset 0x0100 in a code in memory, or memory region??? I´m a littre confuse!

RE:about [ORG 0x0100]

Posted: Mon Jul 12, 2004 11:00 pm
by Lont
ORG 0x0100 tells your assembler (prob. NASM) that the begining of your code starts at 0x0100. So line 1 in your asm is 0x0100.

RE:about [ORG 0x0100]

Posted: Tue Jul 13, 2004 11:00 pm
by Chase
>> ORG 0x0100 tells your assembler (prob. NASM) that the begining of your code
>> starts at 0x0100. So line 1 in your asm is 0x0100.

And the reason you want this type of thing(other the making sure your assembled jmp instructions are going to the right place) is that when DOS/Windows loads a COM program into memory it gets loaded at that address because the first 0x100 bytes or the programs memory contains information about the program(command lines args, etc..) If you're really interested in what's loaded at the beginning of memory with com style apps do a search for PSP or Program Segment Prefix.

-Chase

RE:about [ORG 0x0100]  thank´s all

Posted: Wed Jul 14, 2004 11:00 pm
by DIGO_RP
many thank´s all :-)