How to send and recive a long.(SysOutLong and SysInLong)
Will this work??
unsigned long inportlong (unsigned long _port)
{
unsigned long rv;
__asm__ __volatile__ ("inl %1, %0" : "=a" (rv) : "dN" (_port));
return rv;
}
Are there any more other than inb,outb,outw,inw,inlong,outlong for a x86 32bit System.
SysLongOut & SysLongIn
- gravaera
- Member
- Posts: 737
- Joined: Tue Jun 02, 2009 4:35 pm
- Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.
Re: SysLongOut & SysLongIn
Yo:
I think you should consider reading far more extensively about port-mapped I/O and the x86 port address space. It should explain things a lot better.
--Good luck,
gravaera
I think you should consider reading far more extensively about port-mapped I/O and the x86 port address space. It should explain things a lot better.
--Good luck,
gravaera
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
Re: SysLongOut & SysLongIn
How many types are there like that?, i am new so dont know so much.
Other than these ,inb,outb,inw,outw,inl,outl what else more is there.
And the code mentioned by yashas ,is it correct??
I got copied it so i need to ask.
Other than these ,inb,outb,inw,outw,inl,outl what else more is there.
And the code mentioned by yashas ,is it correct??
I got copied it so i need to ask.
Re: SysLongOut & SysLongIn
Hi,
For 64-bit code there's also the 64-bit versions, but you can't use them in 32-bit code.
Cheers,
Brendan
There's string versions ("OUTSB/W/D" and "INSB/W/D") but these instructions are only really used for some hard disk drivers (and only if the hard disk supports the fastest PIO modes and the OS is too lame to support DMA instead ).Yashas wrote:Are there any more other than inb,outb,outw,inw,inlong,outlong for a x86 32bit System.
For 64-bit code there's also the 64-bit versions, but you can't use them in 32-bit code.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.