Welcome, Guest. Please login or register.

Author Topic: port in/out like under x86 question.  (Read 1970 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline kas1eTopic starter

port in/out like under x86 question.
« on: March 30, 2005, 03:56:42 PM »
Hi 2 all. So, for example i want to work with LPT directly, and set DATA 0,1,2,etc pins to 1 or 0 directly from code. for x86 under dos/linux i can to use in/out mnemonics (at&t syntax):
Code: [Select]

  movw $0x37a,%dx   // 37a = lpt1
  inb (%dx),%al     // read control bytes

  orb $1,%al       // set some state
  outw %ax,(%dx)   // put to port directly

Well, how i can do it this under aos, from C/ASM ?

thanks