Re: pushb assembler command in gas
- From: Eric <spamtrap@xxxxxxxxxx>
- Date: Sun, 26 Mar 2006 23:19:17 -0800
dude84 wrote:
According to the documentation I have there is supposed to be a pushb
command for gcc assemlber (gas). The pushw command works. I'm trying
to use the pushb command and it does not work. There are supposed to
be three corresponding types of commands with AT&T syntax when writing
assembler l,w, and b.
Here is an example of what I am trying to do.
pushb $0x13
Here is a copy of the error that I get:
Error: suffix or operands invalid for `push'
If I use an invalid command like pushi I get an error as follows:
Error: no such instruction
I believe it is possible that for some reason the pushb is a command
that is documented and should work, but for some reason it does not.
Can anyone tell me why a byte sized push in gas would not work (or
possibly the specific reason why this byte sized push is failing)? I
have a book that says the pushb command is supposed to be possible in
gas. Can anyone tell me why this wouldn't work?
you cant push a byte on the stack, the stack is either a word or dword wide
depending on environment, (I'm not sure but in EMT64 it might even be 64
bits wide?). you can however, push a 16 bit value or 32 bit value that is
less than 256. so, for example, push immed8 will be pushing a 16 bit word
with an 8 bit value. This reminds me of the guy who was teaching a P6
mindshare course and kept referring to "8 bit programs" which i repeatedly
pointed out to him that intel has no such thing. From 8088 to P4 its either
16, 32 or 64 bit programs depending on what CPU you have.
HTH
Eric
.
- References:
- pushb assembler command in gas
- From: dude84
- pushb assembler command in gas
- Prev by Date: Re: Error A2006
- Next by Date: Re: xchg & lock question
- Previous by thread: Re: pushb assembler command in gas
- Next by thread: Error A2006
- Index(es):
Relevant Pages
|