Top Document: comp.os.msdos.programmer FAQ part 3/5 Previous Document: Section 6. Serial ports (COM ports) Next Document: See reader questions & answers on this topic! - Help others by sharing your knowledge Unless your machine is fairly old, it's probably already set up. After installing the board that contains the extra COM port(s), check the I/O addresses in word 0040:0004 or 0040:0006. (In DEBUG, type "D 40:4 L4" and remember that every word is displayed low byte first, so if you see "03 56" the word is 5603.) If those addresses are nonzero, your PC is ready to use the ports and you don't need the rest of this answer. If the I/O address words in the 0040 segment are zero after you've installed the I/O board, you need some code to store these values into the BIOS data segment: 0040:0004 word I/O address of COM3 0040:0006 word I/O address of COM4 0040:0011 byte (bits 3-1): number of serial ports installed The documentation with your I/O board should tell you the port addresses. When you know the proper port addresses, you can add code to your program to store them and the number of serial ports into the BIOS data area before you open communications. Or you can use DEBUG to create a little program to include in your AUTOEXEC.BAT file, using this script: n SET_ADDR.COM <--- or a different name ending in .COM a 100 mov AX,0040 mov DS,AX mov wo [0004],aaaa <--- replace aaaa with COM3 address or 0 mov wo [0006],ffff <--- replace ffff with COM4 address or 0 and by [0011],f1 or by [0011],8 <--- use number of serial ports times 2 mov AH,0 int 21 <--- this line must be blank rCX 1f rBX 0 w q User Contributions:Top Document: comp.os.msdos.programmer FAQ part 3/5 Previous Document: Section 6. Serial ports (COM ports) Next Document: Part1 - Part2 - Part3 - Part4 - Part5 - Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: jeffrey@carlyle.org (Jeffrey Carlyle)
Last Update March 27 2014 @ 02:11 PM
|
Comment about this article, ask questions, or add new information about this topic: