0

Putting the statement data byte 1h in the assembly program builds fine. But when I replace
the same with data byte AAh it throws an error

undefined symbol : AAh
What could be the reason for that AA is a valid hexadecimal character and AA is one byte long
So why it marks as undefined

pensee
  • 375
  • 1
  • 10
  • 2
    Numbers must begin with a digit, even if they are hex otherwise the assembler will mistake them for a symbol. Use `0AAh`. – Jester Mar 29 '21 at 20:04
  • Thanks that works. I have one more simple addition to it. `fib dword 01030205h` Now I want to print 5,2,3,1 for this i used this to print 5 : `mov al, byte ptr fib` but for printing all the 4 values I have to loop so I did `mov al, byte ptr [fib+4-cl]` this threw an error `invalid use of register` How do i access the other bytes in the fib data inside a loop. Here cl is the loop counter – pensee Mar 29 '21 at 20:28
  • 1
    Please ask this as a separate question. (When you do, please include the [tag:x86] tag, as well as one for whatever assembler you are using: MASM? NASM? etc). – Nate Eldredge Mar 29 '21 at 20:29
  • 1
    Consult a manual about available addressing forms in your operating mode. `cl` is not allowed in any mode. – Jester Mar 29 '21 at 20:32

0 Answers0