real mode offsets using the GNU assembler! 
Author Message
 real mode offsets using the GNU assembler!

Hello people!

I'm using the GNU assembler for one of my projects.
I'm writing real mode code, using the .code16 pseudo-op.

But how do I get an offset to data/routine ?

        movw    $0f, %sp

This doesn't work. ``ld truncates it.

0:crtbegin.o(.text+0x3): relocation truncated to fit: R_386_16 text

How can I solve this?  

--
Johan Rydberg

Ingenj?rsv?gen 3         http://www.*-*-*.com/
SE-117 43 STOCKHOLM     phone:+46-8-685 04 16
Sweden                  fax:  +46-8-449 22 40
                        mob: +46-704-53 57 21



Tue, 18 Dec 2001 03:00:00 GMT  
 real mode offsets using the GNU assembler!
On 2 Jul 1999 12:23:01 GMT,

Quote:

> I'm using the GNU assembler for one of my projects.
> I'm writing real mode code, using the .code16 pseudo-op.
> But how do I get an offset to data/routine ?
>         movw    $0f, %sp

I'm not sure why you want to reset the stack pointer and call
the result an offset to data/routine.

Are you sure you didn't mean the index register, %si,
instead of the stack pointer?

Make sure that you know where the data segment register, %ds,
is pointing.  Remember that the %ds register points to a 16
byte paragraph of memory.  The offset, $0f, will point to the
last byte in that paragraph.

Quote:
> This doesn't work. ``ld truncates it.
> 0:crtbegin.o(.text+0x3): relocation truncated to fit: R_386_16 text
> How can I solve this?

.


Sun, 23 Dec 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Jumping to 32-bit offset in real mode

2. Using the GNU as assembler

3. Using the real-mode IDT in pmode. :)

4. Using extended memory from real mode

5. Real Mode vs. Protected Mode

6. Protected Mode / Real Address Mode

7. protected-mode and real-mode

8. switch from prot mode to real mode IA32

9. Protected mode call in Real Mode

10. switching from protected mode to real mode

11. real mode vs protected mode

12. real mode or protected mode?

 

 
Powered by phpBB® Forum Software