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]
Other format: [Raw text]

I need help with 8 bit instructions


Hi,

I've been trying to modify the MSP430 port of binutils so 
that I can have 8 bit instructions. I'm doing this because 
I'm trying to create a new port for the 80196KC processor.

I'm having trouble when I want to output say an immediate 
value like '10'. When I use the following bit of code in 
tc-msp430.c
                   int temp = 10;
                   frag = frag_more(1);
                   ((bfd_byte*) frag)[0] = (bfd_byte)temp;
                   
Now what I thought I would see in the hex file was '0A', but 
instead I got '0A00'. Can anyone explain how I can get '0A' 
to come out in the hex file and not the 16 bit value of 
'0A00'.

Thankyou so much if anyone can give even the slightest clue 
as to how to solve this.


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