I have successfully made a 16bit program for COM communication using BIOS's "int 14h". Now I want to make the same thing using MASM32. I've used the "int 14h" but I get runtime error. I've also used the command "in" and the "out" but I still get runtime error.
My question is how to read and receive from a COM port using MASM32 and if possible without using WIN32 API's functions??
Thanks!!
In Win32 you're not allowed direct access to the Ints :P You're not allowed access to ports with in/out either :bdg
Look for functions with "comm" in their name - eg. "CommConfigDialog", "GetCommState", "SetupComm", "TransmitCommChar", etc
I think you need to get an id for the device, and then open it with CreateFile. You can then use the handle returned to access it.
DOing anything without using the Win32 API functions is impossible. I suggest you do what Tedd suggested.
However if you want to confuse yourself then download the KMD Kit and look at the giveio.sys driver as a way to give your program direct access to the in/out commands.
For the FAQ and GODlike (?):
Use the following link to set up the Com Port
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/configuring_a_communications_resource.asp
Then use the WriteFile and ReadFile function with the hCom handle created in the above link. This works fine and requires no special drivers. The CreateFile, WriteFIle, and ReadFile functions work fine for the parallel ports also.
farrier
That is good to know, thanks Farrier. :bg
Thanks for the support :U. I will try this and I'll post the results.