Author Topic: IO ports  (Read 11143 times)

nobody

  • Guest
IO ports
« on: February 27, 2005, 09:33:50 PM »
When I try to compile a file where I read in from port 0x3f5, NASM tells me that  unsigned byte value exceeds bounds.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: IO ports
« Reply #1 on: February 28, 2005, 05:20:38 AM »
Well... 0x3F5 won't fit in a signed byte... or an unsigned byte, either. The value read may or may not fit in a signed byte. Question is, why does Nasm *think* it should fit in a signed byte? Can we see the code?

Best,
Frank

nobody

  • Guest
Re: IO ports
« Reply #2 on: May 05, 2005, 03:20:38 AM »
The instruction you want just don't exist. Try this instead:

mov dx, 0x3f5
in al, dx