BBS: Inland Empire Archive Date: 03-25-93 (15:32) Number: 287 From: DIRK THEURER Refer#: NONE To: ALL Recvd: NO Subj: CND-DET routines 2/8 Conf: (2) Quik_Bas
' ' CND-DET routines (part 2) ' FUNCTION GetChar$ GetChar$ = "" Regs.AX = &H300 ' Get FOSSIL status Regs.DX = PortNo Interrupt &H14, Regs, Regs IF Regs.AX >= 0 THEN IF (Regs.AX AND &H100) THEN Regs.AX = &H200 ' Receive character with wait Regs.DX = PortNo Interrupt &H14, Regs, Regs GetChar$ = CHR$(Regs.AX) END IF END IF END FUNCTION FUNCTION GetCNDNumber% ' ' GetCNDNumber% returns three values: ' ' 0 - (actually shouldn't be returned - indicates that number has been ' processed but function is not exitted) ' 1 - complete CND number and data received in CND ' 2 - function exit requested (Q from keyboard) ' 3 - junk in 'U's data stream ' 4 - junk between 'U's data stream and CTRL-D ' 5 - timed out getting number of chars in data ' 6 - time-out while receiving data ' 7 - received invalid number of characters (not the same as indicated) ' 8 - time-out receiving CRC value ' 9 - got CTRL-D without 'U's stream ' '
------- ' ' CND data format: ' ' UUUUUUUUUUUUUUUUUUUUUUUUUUUUUU*nmmddhhmm###############c ' ' ^ ^^^ ^ ^ ^ ^ ^ ' ÀÄÄÄÄÄÄÄ series of 30 'U's ³³³ ³ ³ ³ ³ ³ ' start of data (ASCII 4) ÄÄÄÙ³³ ³ ³ ³ ³ ³ ' number of characters in data ÄÄÄÄÙ³ ³ ³ ³ ³ ³ ' 2 digit month (leading 0) ÄÄÄÄÄÙ ³ ³ ³ ³ ³ ' 2 digit day (leading 0) ÄÄÄÄÄÄÄÙ ³ ³ ³ ³ ' 2 digit hour (leading 0) ÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ' 2 digit minute (leading 0) ÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ' phone number data (if any) ÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ' crc (???) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ' ' Continues... ' --- * Origin: RAVE * Burnaby, BC (1:153/810)
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