开发者

Serial programming in C , in DOS

I need to do some basic serial programming in C, in old 16-bits MS-DOS. I know the basics, i had coded some serial comm. in开发者_运维百科 some microcontroller some decades ago, but that's now ancient knowledge, and it's not so easy to find information. I'm looking for some reliable (not necessarily free or open source) library or code, and general information.

I'm also looking for some instructions/advise about how to test it, assuming I'm developing on a Win7 machine. For example, if it would be possible to emulate a null-modem connection from a console terminal in my Win7 machine to a emulated COM port running my DOS program in a DOSBOX environment, or something like that.


What a coincidence. Just finished a college class on low level hardware using it.

These will guide you (rolling your own, no libs, not hard!):

Course slides on serial port

BeyondLogic tutorial on it

Course lab script on the practical project using the serial port

The last one's in Portuguese, but the code samples/tables are commented and with variable names in english.

Good luck.

About emulating. Virtual PC, for example, allows piping of data through a virtual serial port using a text file. Google it. You can also use Windows 98 with DJGPP for compiling this. Use old command.com (which is a self contained dos emulator, basically). You can also restart in MS-DOS.


Download virtual box, and install DOS (available with MSDN subscriptions, as are free alternatives as FreeDOS).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜