How do you get the new inline assembly format to work with rust? I would like to have a function that calls outb.
unsafe fn outb(value: u8, port: u16) {
asm!(
"outb {0}, {1}",
in(reg_byte) value,
in(reg_abcd) port,
);
}
This was the only version that almost produced code. There error message was:
error: invalid operand for instruction
|
29 | "outb {0}, {1}",
| ^
|
note: instantiated into assembly here
--> <inline asm>:2:2
|
2 | outb dil, rax
| ^