旧PC串行I / O地址 [英] Old PC serial I/O address

查看:54
本文介绍了旧PC串行I / O地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过直接访问操作uart,甚至无法获得正确的基址。每个人都说使用03F8用于Com1,但没有任何东西存在,或者更糟糕的是用quickbasic偷看其他地方。也可能是领先的FFFE或类似的东西,这是不可能找到的。然后QuickBasic使用defseg来选择页面,我对此一无所知。



我尝试使用Debug,它的转储和列表输出甚至都不同意。同样未知的是,有多少偏移是基址的一部分。我想找出如何使用Debug。



我寻找PC内存映射,但我猜com I / O对于专业人士来说太不重要了。 />


UART地址是靠近RAM底部还是RAM顶部?机器是否依赖?



为什么peek在某些地址给出两个字节而在另一些地址给出一个?



我的486工作正常,普通的qbasic程序使用com端口就好了。



连接到串行9针D的外围设备将仅为开关和LED。

I am trying to operate the uart by direct access and can''t even get the base address correct. Everyone says use 03F8 for Com1 but nothing is there or worse yet peeking with quickbasic gets somewhere else. Also likely is the leading FFFE or something like that which is not possible to find. Then QuickBasic uses defseg to choose the page, which I know nothing about.

I tried using Debug and it''s dump and list outputs don''t even agree. Also unknown is how much of the offset is part of the base address. I want to find out how to use Debug.

I look for the PC memory map but i guess com I/O is too unimportant for professionals to include.

Is the UART address near bottom of RAM or top of RAM? Is it machine dependent?

Why does peek give two bytes at some addresses and one at others?

My 486 works fine and ordinary qbasic programs talk using the com port just fine.

The peripheral device connected to the serial 9 pin D will be switches and LEDs only.

推荐答案

03F8应该是正确的,但检查你的BIOS以确保它不会模拟IBM PS / 2 Micro Channel安排,因为这显然可以完全重新排列COM1结束的地方。

说实话,你不需要关心,现代操作系统中的操作系统级别的COM API几乎没有什么可以做的。

除非您的外部设备超出了串行设备的正常规范,否则应该可以使用Win32或Linux termios函数,这些函数将映射到正确的硬件地址。您可以选择波特率,停止位,起始位和奇偶校验,无论您的设备是直接硬件还是通过USB,2线RS485或4线RS422,它都能正常工作。
03F8 should be correct but check your BIOS to make sure it''s not emulating IBM PS/2 Micro Channel arrangements as this can apparently completely rearrange where COM1 ends up.
To be honest you should not need to care, there''s very little or nothing that you can''t do with the OS level COM APIs in a modern OS.
Unless your external device is way out of the normal spec for serial devices it should be possible to use Win32 or Linux termios functions that will be mapped to the correct hardware address for you. You can select Baud Rate, Stop bits, Start bits and parity and it will work whether your device is direct hardware or via USB, 2 wire RS485 or 4 wire RS422.


这篇关于旧PC串行I / O地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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