This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Getting the character out of the .irpc directive
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: mccoards at netscape dot net
- Cc: binutils at sources dot redhat dot com
- Date: 30 Dec 2003 10:10:12 -0500
- Subject: Re: Getting the character out of the .irpc directive
- References: <31B5AECA.216451EC.009F8F08@netscape.net>
mccoards@netscape.net writes:
> In as version 2.9.1 I get the error message "Error: unexpected end of file in irp or irpc" when trying to use the .irpc directive/macro to generate a character value. Is there a work around to calculate the caracter value in the repeat character directive? Actually I really just want val = "cat" since "cat" will fit in a 4-byte wide integer.
>
> .set val,0
> .irpc arg,cat
> .set val,val<<8
> .set val,val+'\arg'
> .endr
The single quote character in assembler input doesn't mean what you
think it does.
http://sources.redhat.com/binutils/docs-2.12/as.info/Chars.html#Chars
I don't really understand what you are trying to do.
Ian