Skip to content
Kota UCHIDA edited this page Dec 31, 2020 · 1 revision

インラインアセンブラに関する総合的なページにしたいけど、今のところはメモを雑に載せてます(by uchan)

インラインアセンブラで名前付き引数を使う方法

void asm_out8(uint16_t port, uint8_t value) {
  __asm__ __volatile__("outb %[value], %[port]"
                       :: [value] "a"(value), [port] "d"(port));
}
Clone this wiki locally