![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-09-15 00:29 |
共 47,812 主题排行 / 349,917 发帖 / 今日 0 篇 / 48,268 会员排行 |
| DOS开发编程 & 发展交流 (开发室) » 谁能给我一份DOS下串口编程的资料或者源代码?谢谢! |
| 可打印版本 15,509 / 57 |
| 第16楼 shim | 发表于 2007-11-21 10:49 |
| 初级用户 发帖 73 积分 85 | |
|
谢谢分享!
|
|
| 第17楼 jojand | 发表于 2007-11-22 11:08 |
| 初级用户 发帖 57 积分 117 | |
|
A机的发送端(TX)与B机的接收端(RX)相连,A机的接收端(RX)与B机的发送端(TX)相连,两机的地线(GND)相连;
发送: OPEN "COM1:1200,N,8,1,RS,CS,DS" AS #1 PRINT #1,"OK" CLOSE #1 接收: OPEN "COM1:1200,N,8,1,RS,CS,DS" AS #1 INPUT #1,A$ CLOSE #1 |
|
| 第18楼 maclover815 | 发表于 2007-12-13 22:46 |
| 初级用户 发帖 47 积分 92 | |
|
nice good
|
|
| 第19楼 shlinno | 发表于 2007-12-19 15:49 |
| 新手上路 发帖 1 积分 2 | |
|
不错啊,我也需要一个
|
|
| 第20楼 gaoxy2008 | 发表于 2008-04-11 10:25 |
| 新手上路 发帖 3 积分 5 | |
|
非常感谢
|
|
| 第21楼 dragon123321 | 发表于 2008-04-11 17:30 |
| 新手上路 发帖 4 积分 7 | |
|
呵呵。。串口并口编程,我的代码
http://hi.baidu.com/大伦子 |
|
| 第22楼 dragon123321 | 发表于 2008-04-11 17:31 |
| 新手上路 发帖 4 积分 7 | |
|
转载时请留言哦。。我只是想认识几个朋友罢了,交流交流编程罢了,呵呵
|
|
| 第23楼 netwinxp | 发表于 2008-04-17 09:06 |
| 高级用户 发帖 366 积分 741 | |
Originally posted by jojand at 2007-11-22 11:08: 对,居于com设备句柄的操作更省事。 另:单片机方面可以用232芯片(如max232)来实现电平匹配从而降低对电源的要求,以前的电流环在设计中比较容易出现意外。 |
|
| 第24楼 danieldy | 发表于 2008-05-15 12:42 |
| 新手上路 发帖 3 积分 8 | |
|
我想下载,可是积分不够
|
|
| 第25楼 Pauly | 发表于 2008-05-15 13:53 |
| 新手上路 发帖 7 积分 14 | |
|
下来学习下
|
|
| 第26楼 ycjyh007 | 发表于 2008-05-16 16:15 |
| 新手上路 发帖 2 积分 4 | |
|
非常感谢~学习中
|
|
| 第27楼 yhoyo | 发表于 2008-05-16 17:03 |
| 新手上路 发帖 1 积分 2 | |
|
看看...学习
|
|
| 第28楼 saliwen302 | 发表于 2008-05-21 11:43 |
| 新手上路 发帖 9 积分 18 | |
|
ding qi !!
|
|
| 第29楼 lqhlqg123 | 发表于 2008-05-21 18:48 |
| 新手上路 发帖 2 积分 4 | |
|
下载了,谢谢
|
|
| 第30楼 saliwen302 | 发表于 2008-05-22 14:50 |
| 新手上路 发帖 9 积分 18 | |
|
贴一段phoenix 的int 14h的code吧 先是注释:
;---------------------------------------------------------------------------- ; ; I N T E R R U P T 1 4 ; ; coreBiosSerialInterface - The BIOS serial interface supports the ; Intel 8250 Serial chip. ; Functions available are init, send, receive, and status. ; ; ; AH = 00 - Initialize Communications Port ; Entry: DX - COM adapter to initialize (0-3) ; AL - Initialization values ; ; 7 6 5 4 3 2 1 0 ; Baud rate Parity stop bits Word length ; --------------------------------------- ; 000-110 00-None 0-1 10-7 Bits ; 001-150 01-Odd 1-2 11-8 Bits ; 010-300 10-None ; 011-600 11-Even ; 100-1200 ; 101-2400 ; 110-4800 ; 111-9600 ; Exit: AH - Line status ; ; ; AH = 01 - Send Character ; Entry: DX - Communication adapter number (0-3) ; AL - Character to send ; Exit: AH - Line Status ; ; ; AH = 02 - Receive Character ; Entry: DX - Communcation adapter number (0-3) ; Exit: AL - Character received ; AH - Line Status ; ; ; AH = 03 - Return Communication Status ; Entry: DX - Communication adapter number (0-3) ; Exit: AL - Modem status ; Bit 0 - Delta clear to send ; Bit 1 - Delta data set ready ; Bit 2 - Trailing edge ring indicator ; Bit 3 - Delta (RLSD) ; Bit 4 - Clear to send ; Bit 5 - Data set ready ; Bit 6 - Ring indicator ; Bit 7 - Received line signal detect ; ; AH - Line status ; Bit 0 - Data ready ; Bit 1 - Overrun error ; Bit 2 - Parity Error ; Bit 3 - Framing Error ; Bit 4 - Break detect ; Bit 5 - Trans holding register empty ; Bit 6 - Trans shift register empty ; Bit 7 - Time out error ; ; AH = 04 - Extended Initialize (PS2 compatibility) ; Entry: DX - Communication adapter number (0-3) ; AL - Break ; 00H - No Break ; 01H - Break ; BH - Parity ; 00H - None ; 01H - Odd ; 02H - Even ; 03H - Stick parity odd ; 04H - Stick parity even ; BL - Stop Bit ; 00H - One ; 01H - Two if 6,7, or 8 bit word length ; One and one-half if 5 bit word length ; CH - Word Length ; 00H - 5 bits ; 01H - 6 bits ; 02H - 7 bits ; 03H - 8 bits ; CL - Baud Rates ; 00H - 110 baud ; 01H - 150 baud ; 02H - 300 baud ; 03H - 600 baud ; 04H - 1200 baud ; 05H - 2400 baud ; 06H - 4000 baud ; 07H - 9600 baud ; 08H - 19200 baud ; ; Exit: AL - Modem status ; Bit 0 - Delta clear to send ; Bit 1 - Delta data set ready ; Bit 2 - Trailing edge ring indicator ; Bit 3 - Delta (RLSD) ; Bit 4 - Clear to send ; Bit 5 - Data set ready ; Bit 6 - Ring indicator ; Bit 7 - Received line signal detect ; ; AH - Line status ; Bit 0 - Data ready ; Bit 1 - Overrun error ; Bit 2 - Parity Error ; Bit 3 - Framing Error ; Bit 4 - Break detect ; Bit 5 - Trans holding register empty ; Bit 6 - Trans shift register empty ; Bit 7 - Time out error ; ; AH = 05 - Extended Communications Port Control (PS2 compatibility) ; Entry: AL = 0 Read modem control register ; DX - Communication adapter number (0-3) ; Exit BL = Modem control register ; ; Entry AL = 01 Write modem control register ; DX - Communication adapter number (0-3) ; BL - Modem Control Register ; ; Exit: AL - Modem status ; Bit 0 - Delta clear to send ; Bit 1 - Delta data set ready ; Bit 2 - Trailing edge ring indicator ; Bit 3 - Delta (RLSD) ; Bit 4 - Clear to send ; Bit 5 - Data set ready ; Bit 6 - Ring indicator ; Bit 7 - Received line signal detect ; ; AH - Line status ; Bit 0 - Data ready ; Bit 1 - Overrun error ; Bit 2 - Parity Error ; Bit 3 - Framing Error ; Bit 4 - Break detect ; Bit 5 - Trans holding register empty ; Bit 6 - Trans shift register empty ; Bit 7 - Time out error ; ;============================================================================ |
|
| 上一页 1 2 3 4 下一页 |
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |