Does masm32 have specific commands for the parrallel,serial ports interface?.. on windows xp? if so how does it bypass the xp restriction on direct hardware access?.. .
You will have to use a dll like inpout32 to access the parallel port.
randomnumber,
MASM32 doesn't have a special commands, but standard windows commands allow you to communicate with the serial and or parallel ports without having to use a non-standard dll. See:
http://www.masm32.com/board/index.php?topic=1786.msg13827#msg13827
hth,
farrier
\jigm
i have tried the inpout32.dll but i think am doing some thing wrong. ps.. i tried out 16bit 1st..
includelib inpout16,'c:\windows\system32\inpout16.dll'
out16 proto :word,:byte
mov dx,0378h
mov al,48h
out16 dx,al
are these the only lines i need in the program? :eek
Have you played with KMD Kit?
Paul
NO.. but i have just down loaded the kmd tutorials.. wat do they involve in relation to my problem?
I never tried 16-bit.
The 32 bit I tried used
invoke Out32,0x378,ebx
and it worked for me.
How did your program fail?
the program doesn't change the registers or read them.. i don't know wats wrong... i have tried other programs "userport" which open the port like windows 98 but i don't lyk that..
i have seen that createfile and the comm... like commands are the 'real' new ways to interact with the ports...
does any one have an example code i can look at?
randomnumber,
Attached is a proc that works everyday on Win95 ME SP and Vista computers. The variable SP2000 is set if a serial printer is being used, otherwise a parallel port is used. This even works with a serial port adapter that plugs into a USB port on a notebook running XP.
If you look at the link in the link I provided above, this code looks just like the C code provided in the SDK.
http://msdn.microsoft.com/en-us/library/aa363201%28VS.85%29.aspx
hth,
farrier
I don't do 16-bit, but my wild guess is some kind of segment register problem.
When you say it doesn't change the registers, I assume you are talking about the values at the port, not dx and al.
The only thing I ever used it for is to blink some led's attached to the end of a printer cable. It worked, but I can't seem to find the program now.
It was based upon information found at http://www.winasm.net/forum/index.php?showtopic=2341
I'll try to find the cable and recreate the program later if I get a chance, I'm fighting a video card problem at the moment.
deleted
As usual, I spoke a bit too soon. I took a short nap and realized what my problem was.
The attached project works for me.
I never use dll's, so there's probably a cleaner way to set up the out32 call.
thanks \jigm.. din't know you could use the comctls to load new dlls.. :thumbu
\farrier.. i think the method in your program is best and will try to implement it wen i don't have cats chasing me..