COM4 and COM3

 BBS: Inland Empire Archive
Date: 02-05-93 (08:51)             Number: 362
From: JERRY HUNTER                 Refer#: NONE
  To: DIK COATES                    Recvd: NO  
Subj: COM4 and COM3                  Conf: (2) Quik_Bas
 > My BIOS (?) does not premit use of the ports associated
 > with COM3 and 4, and the port values are zero and zero
 > for these locations...

 > Simply swapping port addresses does not work...

Cram the base port address (BPA) for the port you want to use
into the slot for COM1: or COM2: (Use the port with the
correct IRQ, e.g. if you're trying to access COM4:, cram it
to COM2's BPA, since the IRQ for COM4 and COM2 share IRQ 3
by default.)
A typical method for obtaining this result might be as follows :

DEF SEG = &H40
Poke 0,&HE8
Poke 1,&H03

This example (untested, but really pretty hard to screw up)
crams 3E8 (the semi-standard BPA for COM3:) into the slot
for COM1. (Grin - the ONLY way I could have screwed it up
is to have flipped the high- and low-order bytes.... use

d 0040:0<CR>

to view the BIOS data area to verify that they're falling into place as

.   E8 03 F8 02 E8 03 E8 02

This _should_ work (off the top of my head, but I've been
forced to use it enough times that I should be able to
sleepwalk thru it)... that is, unless I'm accused of
blatant OPPORTUNISM or something (giggle)...

Hope it helps,

--- GEcho 1.00/beta
 * Origin: DarkStar - QB45 Comes ALIVE! - (501) 631-5976 (1:391/2090)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET