outsb
Output string bytes to I/O port
Loads a byte from [rsi] and writes it to the I/O port numbered in dx.
186 and later
CFPFAFZFSFDFOF –––––––
- Changes no flag
- Reads DF
Forms
outsb
The b suffix selects 1 byte per element; no quadword form exists. Flags are unchanged.
After the transfer, rsi increases by 1 when DF = 0 or decreases by 1 when DF = 1. In 64-bit mode addresses use this 64-bit register by default; a32 selects esi. The rep prefix repeats using rcx, or ecx with a32, as the counter. A zero initial repeat count performs no transfer. Access to I/O ports is subject to operating-system privilege checks.
global _start
section .text
_start:
mov rax, 12
mov rbx, 5
mov rcx, 3
mov rsi, 9
outsb
mov rax, 60 ; syscall 60: exit
xor rdi, rdi
syscall