QWK Rep Reader

 BBS: Inland Empire Archive
Date: 06-14-93 (13:02)             Number: 391
From: EARL MONTGOMERY              Refer#: NONE
  To: STEVE DEMO                    Recvd: NO  
Subj: QWK Rep Reader                 Conf: (2) Quik_Bas
'part 2 of 2
DIM inregs AS RegTypeX, outregs AS RegTypeX
filespec$ = "*.rep" + CHR$(0)
PRINT STRING$(75, 196)
inregs.ax = &H2F00
CALL INTERRUPTX(&H21, inregs, outregs)
data.seg = outregs.es
data.off = outregs.bx
inregs.ax = &H4E00
inregs.dx = SADD(filespec$)
inregs.ds = -1
CALL INTERRUPTX(&H21, inregs, outregs)
cy = outregs.flags AND 1
IF cy = 0 THEN
WHILE cy = 0
DEF SEG = data.seg
f.name$ = ""
i = data.off + 30
WHILE PEEK(i) <> 0
f.name$ = f.name$ + CHR$(PEEK(i))
i = i + 1
WEND
DEF SEG
PRINT f.name$ + " ";
checkfilename$(counter) = f.name$
counter = counter + 1
inregs.ax = &H4F00
CALL INTERRUPTX(&H21, inregs, outregs)
cy = outregs.flags AND 1
WEND
ELSE GOTO NOREPFILES
END IF
PRINT STRING$(75, 196)
INPUT "Filename to view <No Extension>"; n$
n$ = UCASE$(n$)
FOR x = 1 TO 10
IF n$ + ".REP" = checkfilename$(x) THEN RETURN
NEXT
GOTO fixerror
NOREPFILES:
PRINT "There are no .REP files in this directory."
PRINT STRING$(75, 196)
WHILE INKEY$ = "": WEND
DEF SEG : CLS : SCREEN 0: WIDTH 80: END
fixerror:
CLS
PRINT "You have entered an Invalid Filename."
PRINT "DO NOT include the extension <.REP> in the FileName"
PRINT "Check your INPUT for spelling before pressing <ENTER>"
INPUT "Do you wish to try again? <Y> <N>"; q$
q$ = UCASE$(q$)
IF q$ = "Y" THEN RUN
IF q$ = "N" THEN GOTO BYE
IF q$ <> "Y" OR q$ <> "N" THEN BEEP: GOTO fixerror
BYE:
CLS : SCREEN 0: DEF SEG : CLEAR : END
"end of 2 of 2
$$
--- Maximus 2.01wb
 * Origin: Verbose Ink * Dallas * 214-437-0914 * V32b/HST (1:124/5125)
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