1

Is there a way to enter in a character as an immediate in gas? For example:

mov $1,     %rax # decimal
mov $0xA,   %rbx # hex
mov $0b100, %rcx # binary

mov 'A', %rdx # something like this?

I know I can define this in the .ascii or .string directive but can this be done inline as an immediate?

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
David542
  • 104,438
  • 178
  • 489
  • 842
  • @Peter Cordes -- ok, it looks like your comment on that question answers the question. I just need to add the $: `mov $'A', %rdx` and it works. – David542 Sep 17 '20 at 22:48

0 Answers0