Category : Files from Magazines
Archive   : WDJUL92.ZIP
Filename : 3N07025A

 
Output of file : 3N07025A contained in archive : WDJUL92.ZIP
'**************************************************************
'***** *****
'*** Fast Indexed Help November 1991 ***
'* Program: HELP.BAS *
'* *
'* Copyright (C) 1990, 1991 George R. Toft *
'* 92-902 Welo St, #94 *
'* Makakilo, HI 96707 *
'* Original creation date: March 1990 *
'* Reduced to minimum size: November 1991 *
'*** ***
'***** *****
'**************************************************************

'============== Type Declaration Section ==============
DEFINT A-Z

'============== Procedure Declaration Section =========
DECLARE SUB Display (MasterHelpText$, RecordNum AS INTEGER)
DECLARE SUB GetEnter ()
DECLARE SUB GetMasterHelpText (Record AS INTEGER, MasterHelpText
AS STRING)
DECLARE SUB HelpMain (MasterHelpText$, Index AS INTEGER)
DECLARE SUB IINC (Argument AS INTEGER)

'============== Execution Section =====================
' This is the minimum program to retrieve help records.
' There is minimal processing performed on the data, it is
' simply retrieved and displayed.

FOR RecordToGet = 10 TO 1 STEP -1
HelpMain MasterHelpText$, RecordToGet
Display MasterHelpText$, RecordToGet
NEXT RecordToGet
CLS
END

SUB Display (MasterHelpText$, RecordNum AS INTEGER)
CLS
PRINT "Help record number"; RecordNum
PRINT "
PRINT MasterHelpText$
GetEnter
END SUB' Display

SUB GetEnter
PRINT
PRINT TAB(34); "Press [Enter]";
DO WHILE INKEY$ <> CHR$(13): LOOP
END SUB' GetEnter

DEFSNG H
SUB GetMasterHelpText (Record AS INTEGER, MasterHelpText AS
STRING)
' This routine looks up the location of MasterHelpText in
' HELP.IDX, then retrieves it from HELP.TXT.

' use index to look up help location
OPEN "HELP.IDX" FOR RANDOM AS 1 LEN = 5
FIELD #1, 5 AS CountField$
GET #1, Record
HelpStart = CVS(CountField$)
GET #1, Record + 1
HelpEnd = CVS(CountField$) - 2' Remove CR+LF at end
CLOSE 1

' Retrieve the MasterHelpText
SELECT CASE HelpStart
CASE IS = 1
OPEN "HELP.TXT" FOR RANDOM AS 1 LEN = HelpEnd
FIELD #1, (HelpEnd - HelpStart) AS FieldLine$
GET #1, 1
MasterHelpText = FieldLine$
CLOSE 1
CASE IS <= 1000
OPEN "HELP.TXT" FOR RANDOM AS 1 LEN = HelpEnd
FIELD #1, HelpStart AS Trash$, (HelpEnd - HelpStart) AS
FieldLine$
GET #1, 1
MasterHelpText = FieldLine$
CLOSE 1
CASE ELSE
RecordToGet = HelpStart \ 1000 + 1
HelpStart = HelpStart - (RecordToGet - 1) * 1000!
HelpEnd = HelpEnd - (RecordToGet - 1) * 1000!
IF HelpEnd > 1000 THEN ' Text crosses record boundary
OPEN "HELP.TXT" FOR RANDOM AS 1 LEN = 1000
' get first piece of MasterHelpText
FIELD #1, HelpStart AS Trash$, (1000! - HelpStart)
AS FieldLine$
GET #1, RecordToGet
MasterHelpText = FieldLine$
' get middle pieces
FIELD #1, 1000 AS FieldLine$
FOR i = 1 TO HelpEnd \ 1000 - 1
IINC RecordToGet
GET #1, RecordToGet
MasterHelpText = MasterHelpText + FieldLine$
NEXT i
' get last piece
FIELD #1, (HelpEnd MOD 1000) AS FieldLine$
GET #1, RecordToGet + 1
MasterHelpText = MasterHelpText + FieldLine$
CLOSE 1
ELSE
OPEN "HELP.TXT" FOR RANDOM AS 1 LEN = 1000
FIELD #1, HelpStart AS Trash$, (HelpEnd - HelpStart)
AS FieldLine$

GET #1, RecordToGet
MasterHelpText = FieldLine$
CLOSE 1
END IF
END SELECT
END SUB' GetMasterHelpText

DEFINT H
SUB HelpMain (MasterHelpText$, Index AS INTEGER)
' load in help pages
' A sequential file is used to allow for a variable
' length record. The record is terminated with a .

GetMasterHelpText Index, MasterHelpText$

' clear up free string space
Temp! = FRE("")
END SUB' HelpMain

SUB IINC (Argument AS INTEGER)
Argument = Argument + 1
END SUB' IINC


  3 Responses to “Category : Files from Magazines
Archive   : WDJUL92.ZIP
Filename : 3N07025A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/