This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re:about .code16


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]