在DOS中用C进行串行编程 [英] Serial programming in C , in DOS

查看:76
本文介绍了在DOS中用C进行串行编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用旧的16位MS-DOS在C中进行一些基本的串行编程。我知道基础知识,我已经编码了一些串行通讯。在几十年前的某些微控制器中,但这已经是古老的知识了,查找信息并不是那么容易。
我正在寻找一些可靠的(不一定是免费或开源的)库或代码以及一般信息。

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.

我也在寻找一些说明/ advise关于如何测试它的建议,假设我在Win7机器上进行开发。例如,如果可以模拟从Win7计算机中的控制台终端到在DOSBOX环境中运行DOS程序的模拟COM端口的模拟调制解调器连接,或者类似的东西。

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.

推荐答案

真是巧合。

这些将指导您(滚动自己的程序,没有库,不是很难!):

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

串行端口上的课程幻灯片

BeyondLogic教程就可以了

使用串行端口的实际项目中的课程实验室脚本

最后一个是葡萄牙语,但是代码示例/表是

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

祝你好运。

关于模仿。例如,Virtual PC允许使用文本文件通过虚拟串行端口传输数据。谷歌一下。您也可以将Windows 98与DJGPP一起使用进行编译。使用旧的command.com(基本上是一个自包含的dos模拟器)。您也可以在MS-DOS中重新启动。

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.

这篇关于在DOS中用C进行串行编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆