Mail Archives: djgpp/1995/01/12/15:03:05
I'm trying to replace the inportb() with inline asm. This is my first
attempt, so any help will be appreciated. Here it goes.
unsigned char data(SIZE);
unsigned char *data_ptr;
unsigned short port;
*data_ptr=inportb(port);
Is this equivalent to the following?
unsigned char data(SIZE);
unsigned char *data_ptr;
unsigned char port;
asm(" inb %1,%0"
: "=r" (*data_ptr)
: "r" (port);
Thank you in advance.
Yours,
Derrick Early
early AT finite DOT nrl DOT navy DOT mil
- Raw text -