BBS: Inland Empire Archive Date: 12-13-92 (16:39) Number: 359 From: ROB MCKEE Refer#: NONE To: KEITH WESSEL Recvd: NO Subj: Re: Door Routines Conf: (2) Quik_Bas
Hi , In response to: MH> Sysop$ = "CONS:" MH> Modem$ = "COM1:9600,N,8,1" KW> Yes, but we want it to go to both at once, and look for KW> input from both at once. That way, we could watch people KW> as they played, and haccess to the keyboard at the same KW> time. A chat mode also might be nice. I guess what we're KW> looking for is a replacement for the print statement... SysOp%= FREEFILE Modem%= FREEFILE Open "CON:" for output as SysOp% Open "COM"+Port$+":"+Baud$+PWS$ as Modem%, len = 1024 nl$=chr$(13)+chr$(10) OutStr$="hello"+nl$ BPrint OutStr$ SUB BPrint (Jnk$) common shared Modem%, SysOp% If SysOp% then Print #SysOp%, OutStr$ If Modem% then PRINT #Modem%, OutStr$ End SUB FUNCTION BINKEY$ COMMON SHARED Modem%, SysOp%, Lk% ' SysOp% is alway going to be valid! If Modem% >0 then if not eof(Modem%) then jnk$=Input$(1,Modem%): Lk% = False else jnk$=inkey$: Lk% = True end if else jnk$=Inkey$: Lk% = True EndIf Binkey$=Jnk$ END FUNCTION ' Use Binkey$ instead of INKEY$ in your keyboard handling routine. TTYL -Rob ------------------------------ 8< --------------------------- --- EZPoint V2.2 * Origin: Flyer Proof Computer Services V# 510-237-8091 (1:125/1212.13)
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