Writing to ports using C
Català
Dansk
Deutsch
Ελληνικά
English
Español
suomi
Français
Galego
magyar
Italiano
日本語
Nederlands
Polski
Português
Português Brasileiro
Wiadomość jest częścią wątku:
pełne drzewo wątku posortowane wg daty
Kevin Buettner at
2002-03-02 04:38
Załączniki:
Wiadomość jako email
(text/plain)
Autor:
Benjamin Bostow
Data:
2002-03-01 23:53
UTC
Temat:
Writing to ports using C
I am trying to write to a port using C. So far I can only send over one char
at a time. The following test code is below.
#include <asm/io.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
int main()
{
ioperm(0x3f0, 15, 1);
outw(0x56, 0x3F8);
}
Is there a way to print a string to the port, or is the only way to write an
entire string to convert every character to HEX and print that to the port?
Ben