1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
SECTION .text global outw global inw outw: push ebp; mov ebp,esp mov dx, [ebp+8] ; port mov ax, [ebp+12] ; data out dx, ax mov esp,ebp pop ebp ret inw: push ebp; mov ebp,esp mov dx, [ebp+8] ; port in eax, dx mov esp,ebp pop ebp ret