TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: SAUL LEVY
from: ARNIE SOSSNER
date: 1997-04-19 01:00:00
subject: Re: Windows 95

 -=> Quoting Saul Levy to Arnie Sossner <=-
 SL> Arnie,
 SL> I used to have my modem on COM2, but the 9-pin connector on my
 SL> HD/FD/IO card is now on COM1!  Should it be surprising that you have
 SL> to configure programs to use the correct port?  That's the only help I
 SL> can offer you right now... Saul
I've got no problem with configuring the port number. Thhe problem I
have is in conviguring the port address.  I thought my Win95 BIOS
I/O address for com2 was at the standard 2FE but, no, it is 2F8.  Thhe
  Once I set that value for COM2, the OPEN COM statement works.  Is this
numbering either a Windows 95 or Plug and Play "feature"?
'Set up
 CP$      = "COM2"               'value entered by user of program
 PortAdr$ = "02F8"               'ditto
 POKEI 1026, 0                   'for demo only. Initialize i/o adr to 0
'Main
 address% = VAL("&H"+PortAdr$)
 port%    = VAL(RIGHT$( CP$, 1))
 IF PeekPortAdr(port%) = 0 THEN   'Leave location alone if already set
    CALL SetPortAdr (BYVAL port%, BYVAL address%)
 END IF
 PRINT "Expected: 2F8  Actual: " HEX$(PeekPortAdr(port%)) 'for demo only
 END
'Function and Subroutine
 FUNCTION PeekPortAdr (BYVAL port%)
    offset% = (( port% - 1) * 2) + &H400
    PeekPortAdr = (PEEKI( offset%))
 END FUNCTION
 SUB SetPortAdr (BYVAL port%, BYVAL address%)
    offset% = (( port% -1) * 2) + &H400
    POKEI offset%, address%
 END SUB
 
... I cna ytpe 300 wrods pre mniuet!
--- Blue Wave/Max v2.12 [NR]
---------------
* Origin: Druid's Grove BBS -- 914-876-2237 (1:2624/306)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.