I write a simple code to read a port with the in instruction but when i run the program the in al, dx create a segmentation fault.
I find that to use in or out instruction in linux i first need permission but i don't know how?
The code:
global _start
section .data
section .text
_start:
mov dx, 03f8h
in al, dx
xor ebx, ebx ; send 0 as 'exit code'
mov eax, 1 ; terminate process
int 80h ; execute the syscall