i'm using visual c++6.0 to initialize the parallel port i try to use the command of _outp and _inp so as to write and read the signal but i can't success then i use inline aassembler to do it but it has errors again. i have tried for many times but i still can't success. i think the main problem are in the lines below, _asm out dx,al _asm in al,dx would anyone can help me? the programme is as follows, #include #include #include #define PortAddress 0x378 short PortOut(unsigned int portadr,unsigned char data) { _asm mov edx, portadr _asm mov al, data _asm out dx,al //Loaded 'C:\WINNT\system32\ntdll.dll', no matching symbolic information found. return(portadr,data); } unsigned char PortIn(unsigned int portadr) { unsigned char data; _asm mov edx,portadr _asm in al,dx _asm mov data,al return data; } int main(void) { short Dummy; short PortData=0; int pd=0; cout<<"Input portdata\n"; cin>>pd; Dummy=PortOut(PortAddress,pd); PortData=PortIn(PortAddress); cout<<"data at"<
U
User 1218055
@User 1218055