-
Outputting data to ports
I am trying to ouput data to the parrallel portbut am having some trouble.
I am using Vc++.Net
I said
void outportb(UINT portid,BYTE value)
{
__asm mov edx,portid
__asm mov al,value
__asm out dx,al
}
But I am getting many errors from this. Wut is wrong? Any ideas?
I included iostream,stdlib,stdio. Anybetters ways of doing it? Thanks!
-
> But I am getting many errors from this.
The errors most likely come from your use of UINT and BYTE with no prior declarations. Change the function tag to
void outportb(unsigned portid, char value)
And it will compile...
-Prelude