0

How do I define a hex constant in 68000 assembly? I need to compute the logic expression X'Y + X'Z + YZ, where X, Y, and Z are hex constants, and the result is displayed in binary. I wrote the code to compute the expression, I'm just not sure how to define the constants in hex..and then display them in binary.

For reference, X is 000F, Y is 0033, and Z is 0055.

X: DC ???

nmar
  • 135
  • 1
  • 1
  • 7
  • 3
    Depends on the assembler, but *most* assemblers for the 68K prefixed hex constants with a dollar sign, as in: `X : DC $1234abcd` – Jerry Coffin Oct 29 '12 at 20:47
  • And most assemblers want a *size specification* with the `dc`- So its rather like `X: DC.L $1234abcd – tofro Jun 26 '16 at 10:03

1 Answers1

1

Depends on which assembler you're using. With gas syntax, for example, you would just write 0xF, 0x33 and 0x55, so something like

.int 0xF*0x33+0xF*0x55+0x33*0x55
hmakholm left over Monica
  • 23,074
  • 3
  • 51
  • 73