Q
Q
Qreen2021-09-04 19:19:47
C++ / C#
Qreen, 2021-09-04 19:19:47

How to read register al in C?

Is there any way to read register al? It contains some data of type int, you need to get it from there into a variable. By the way,

int register_value;
asm("\t movl %%al, %0" "=r"(register_value));
doesn't work, gives "operand type mismatch for mov" error. The 32-bit eax and ebx registers are read normally.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2021-09-04
@Qreen

char register_value;
al is 8-bit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question