[OpenBIOS] Writing 16bit code using the GNU assembler!

Maciej W. Rozycki macro at ds2.pg.gda.pl
Mon Jul 5 15:53:14 CEST 1999


On Sat, 3 Jul 1999, Johan Rydberg wrote:

> How do you relocate a 16bit pointer ?  Do you use the ``addr32´´
> macro ?
> 
> Example:
> 
> 		addr32
> 		movw	$0f, %si
> 	0:

 No I don't.

> ELF doesn't support 16-bit relocations, how do you solve this?

 It does support.  It even supports 8-bit relocations (for jcxz, etc.). 
If you have old, buggy binutils please upgrade.

> And I have run into another problem with the GNU assembler. If
> you for example do the following:
> 
> 		lodsw	%cs:(%si), %ax
> 
> It generates the following code:
> 
> 		lodsw	%ds:(%si), %ax
> 
> You have to make the %cs prefix of your own in the code, by
> adding a ``.byte 0x2e´´ infront of the instruction. Have you
> also run into this problem 

 I haven't used the particular prefix and opcode combination.  But please
upgrade before you start to complain. 

 The latest stable binutils release seems to be 2.9.1.0.25.  You may also
get the current development snapshot or access the CVS tree of binutils
2.9.4 at http://sourceware.cygnus.com/ (which is what I am currently
using). 

 If you still find any of these problems in binutils 2.9.4 then please
report it to binutils people.  See address above for how to do it.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro at ds2.pg.gda.pl, PGP key available        +

-
To Unsubscribe: send mail to majordomo at freiburg.linux.de
with "unsubscribe openbios" in the body of the message



More information about the openbios mailing list