This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re:about .code16
- To: Nick Clifton <nickc at redhat dot com>
- Subject: Re:about .code16
- From: "YU Tang" <squalls_tang at 263 dot net>
- Date: Mon, 12 Feb 2001 10:59:35 +0800 (CST)
- Cc: binutils at sources dot redhat dot com
Hi Nick,
In fact,I just want to code something for PC bootstrap(x86)
under FreeBSD using gas,ld,objcopy;(First,make target to elf,then
use "objcopy"onvert it to format binary);And only the codes with directive .code16 works;So i want to know what's the difference it
makes.
BTW,I don't find any .code16 in FreeBSD boot assembly codes;
Is there something else could be done to make things right?
(FreeBSD3.2 on x86;/sys/boot2/*.s)
Thanks!
Tang Yu
----- Original Message -----
From: Nick Clifton <nickc@redhat.com>
To: <squalls_tang@263.net>
Cc: <binutils@sources.redhat.com>
Sent: Monday, February 12, 2001 5:40 AM
Subject: Re: about .code16
> Hi Yu,
>
> : hi,could someone told me that,what's the exact difference between
> : the instructions produced by gas with directive .code16 and without
> : it?
>
> You really need to provide some more context before a complete answer
> can be given. For example, what target are you talking about and
> which tool ?
>
> If you are talking about the assembler (gas) and you are takling about
> an ARM or a MIPS based target, then the .code16 directive tells the
> assembler to switch into the smaller, 16 bit instruction set. Both
> the ARM and the MIPS architectures support an alternative, smaller
> instruction set (16 bit vs 32 bit) which is intended to improve code
> density.
>
> Cheers
> Nick
_____________________________________________
263Commail,企业的电子邮件专家 http://mail.263.net