Upam, da si se spomnil na ioperm.
Ce ne - poglej si prilozeni programcek.
#include <stdio.h>
#include <asm/io.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv){
char *s;
unsigned char lights = 0;
int n;
for (n = 1; (n < argc) && (argc > 1); n++){
s = argv[n];
if (strlen(s) < 2) lights = lights + (1 << (s[0] - 49));
};
if(ioperm(0x278,1,1)) {
fprintf(stderr, "ioperm error!\n");
exit(1);
};
outb(lights, 0x278);
printf("The Port Status : %i\n",inb(0x278));
exit(0);
}