Re: pushb assembler command in gas



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

.



Relevant Pages

  • Re: pushb assembler command in gas
    ... The pushw command works. ... to use the pushb command and it does not work. ... Can anyone tell me why a byte sized push in gas would not work (or ... instruction, as either a word or the CPU size [longword ...
    (comp.lang.asm.x86)
  • Re: A more structured approach
    ... I still find Gas fairly cryptic, but I haven't spent much time with it. ... If we started with no command line parameters, this would point at an environment variable, If we started with one or more command line parameters, this might point to one of them, or to the zero that separates command line args from environment variables. ... I suspect what you tried that *didn't* work was a memory to memory compare "cmpb, ...
    (alt.lang.asm)
  • Re: Saving a single worksheet
    ... I used the script for Mil one sheet in Outlook object model. ... I am trying to apply this macro to a command button in the sheet. ... if I use display under the lines for OutMail will it stop at the point where I will have to push the send button for the message to go? ... > Private Sub CommandButton1_Click ...
    (microsoft.public.excel.programming)
  • Re: Different results with opening form with docmd.
    ... <MS ACCESS MVP> ... The problem I am having is that the sometimes I push the command button ... Debug.Print "Will update " & strDecision ...
    (microsoft.public.access.formscoding)
  • Re: [opensuse] ipconfrig--where?
    ... Only true if you have an automatic transmission, you can actually push ... New coke was marketing, not engineering. ... Those users don't use command lines at all, ...
    (SuSE)