home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / BASIC / QBS_0103 / QBS103-7.DOC < prev    next >
Text File  |  1993-04-30  |  39KB  |  1,137 lines

  1. ════════════════════════════════════════════════════════════════════════════════
  2.  Area:    QuickBasic
  3.   Msg:    #2737
  4.  Date:    03-25-93 15:31 (Public)
  5.  From:    DIRK THEURER
  6.  To:      ALL
  7.  Subject: CND-DET routines 1/8
  8. ────────────────────────────────────────────────────────────────────────────────
  9. Zack,
  10.  
  11. Thanks for allowing me to post the following code (8 messages total, all
  12. less than 80 lines).
  13.  
  14. '--------8<-------------------- snip here -------------------->8--------
  15. '
  16. ' CND-DET routines (part 1)
  17. '
  18. ' Calling Number Display ("Caller ID" in the US) routines
  19. '
  20. ' (c)opyright 1993, Dirk Theurer
  21. '
  22. ' This code is placed in the public domain. Use as you see fit. It is NOT
  23. ' completely free of 'bugs' but it works in the program it was written for.
  24. '
  25. ' Notes: - All of the following code was really a 'hack' to see what could
  26. '          be derived from CND (CID). It is not documented very well but I
  27. '          think that most of it should be decipherable.
  28. '        - There are references to other routines and/or programs. Ignore
  29. '          them as best as you can.
  30. '        - USE AT YOUR OWN RISK!
  31. '        - Enjoy! :-)
  32. '
  33. TYPE CNDType
  34.   '
  35.   ' Data TYPE for CND routines/programs
  36.   '
  37.   CNDDate     AS STRING * 6
  38.   CNDTime     AS STRING * 6
  39.   CNDNumber   AS STRING * 13
  40.   CNDName     AS STRING * 35
  41.   CNDCRC      AS INTEGER
  42.   CNDAttrib   AS INTEGER
  43.   '
  44.   ' CNDAttrib
  45.   '
  46.   ' 1  - in-area-code (7 digits)
  47.   ' 2  - other-area-code (10 digits)
  48.   ' 3  - in-area-code/DAT            ' /in CND.DAT number attributes are
  49.   ' 4  - other-area-code/DAT         ' gained by adding 2 to previous
  50.   '                                  ' -area-code attribute
  51.   ' 5  - in-area-code/DAT/BAD        ' /BAD number attributes are gained
  52.   ' 6  - out-area-code/DAT/BAD       ' by adding 2 to previous -area-code
  53.   '                                  ' /DAT attribute
  54.   ' 7  - out of area
  55.   ' 8  - private
  56.   '
  57.   ' 9  - unknown number format (not 7 or 10 digits but processed anyway)
  58.   ' 10 - error getting CND data
  59.   '     (non-fatal - data is processed but not reliable)
  60.   '
  61.   CNDOther    AS INTEGER
  62.  
  63.   '
  64.   ' CNDOther is used by other programs to determine various attributes
  65.   '
  66.   ' Currently, only CND-CHK uses bit 0 to see if it's already read the last
  67.   ' entry.
  68.   '
  69.   CRLF        AS STRING * 2
  70. END TYPE
  71.  
  72. DIM SHARED CND AS CNDType
  73.  
  74. DECLARE FUNCTION GetCNDNumber% ()
  75. DECLARE FUNCTION GetChar$ ()
  76.  
  77. CND.CRLF = CHR$(13) + CHR$(10)
  78.  
  79. '
  80. ' Continues...
  81. '
  82.  
  83.  
  84.  
  85. ---
  86.  * Origin: RAVE * Burnaby, BC (1:153/810)
  87.  
  88.  
  89.  
  90. ════════════════════════════════════════════════════════════════════════════════
  91.  Area:    QuickBasic
  92.   Msg:    #2738
  93.  Date:    03-25-93 15:32 (Public)
  94.  From:    DIRK THEURER
  95.  To:      ALL
  96.  Subject: CND-DET routines 2/8
  97. ────────────────────────────────────────────────────────────────────────────────
  98. '
  99. ' CND-DET routines (part 2)
  100. '
  101. FUNCTION GetChar$
  102.  
  103.   GetChar$ = ""
  104.   Regs.AX = &H300                ' Get FOSSIL status
  105.   Regs.DX = PortNo
  106.   Interrupt &H14, Regs, Regs
  107.   IF Regs.AX >= 0 THEN
  108.     IF (Regs.AX AND &H100) THEN
  109.       Regs.AX = &H200            ' Receive character with wait
  110.       Regs.DX = PortNo
  111.       Interrupt &H14, Regs, Regs
  112.       GetChar$ = CHR$(Regs.AX)
  113.     END IF
  114.   END IF
  115.  
  116. END FUNCTION
  117.  
  118. FUNCTION GetCNDNumber%
  119.  
  120.   '
  121.   ' GetCNDNumber% returns three values:
  122.   '
  123.   ' 0 - (actually shouldn't be returned - indicates that number has been
  124.   '     processed but function is not exitted)
  125.   ' 1 - complete CND number and data received in CND
  126.   ' 2 - function exit requested (Q from keyboard)
  127.   ' 3 - junk in 'U's data stream
  128.   ' 4 - junk between 'U's data stream and CTRL-D
  129.   ' 5 - timed out getting number of chars in data
  130.   ' 6 - time-out while receiving data
  131.   ' 7 - received invalid number of characters (not the same as indicated)
  132.   ' 8 - time-out receiving CRC value
  133.   ' 9 - got CTRL-D without 'U's stream
  134.   '
  135.  
  136.   '-------------------------------------------------------------------------
  137.   '
  138.   ' CND data format:
  139.   '
  140.   '   UUUUUUUUUUUUUUUUUUUUUUUUUUUUUU*nmmddhhmm###############c
  141.   '
  142.   '   ^                             ^^^ ^ ^ ^ ^              ^
  143.   '   └─────── series of 30 'U's    │││ │ │ │ │              │
  144.   '      start of data (ASCII 4) ───┘││ │ │ │ │              │
  145.   ' number of characters in data ────┘│ │ │ │ │              │
  146.   '    2 digit month (leading 0) ─────┘ │ │ │ │              │
  147.   '      2 digit day (leading 0) ───────┘ │ │ │              │
  148.   '     2 digit hour (leading 0) ─────────┘ │ │              │
  149.   '   2 digit minute (leading 0) ───────────┘ │              │
  150.   '   phone number data (if any) ─────────────┘              │
  151.  
  152.   '                    crc (???) ────────────────────────────┘
  153. '
  154. ' Continues...
  155. '
  156.  
  157.  
  158.  
  159. ---
  160.  * Origin: RAVE * Burnaby, BC (1:153/810)
  161.  
  162.  
  163.  
  164. ════════════════════════════════════════════════════════════════════════════════
  165.  Area:    QuickBasic
  166.   Msg:    #2739
  167.  Date:    03-25-93 15:33 (Public)
  168.  From:    DIRK THEURER
  169.  To:      ALL
  170.  Subject: CND-DET routines 3/8
  171. ────────────────────────────────────────────────────────────────────────────────
  172. '
  173. ' CND-DET routines (part 3)
  174. '
  175.   '
  176.   ' Notes:
  177.   '
  178.   '  - I have NO idea why an "End of transmission" (ASCII 4) is used to
  179.   '    signal the START of the actual phone number data stream!... and
  180.   '    nothing is used to signal the actual END of data! What gives?!?!
  181.   '  - number of characters in data indicates exactly how many characters
  182.   '    there are between itself and the CRC value
  183.   '  - phone number data can be single character indicating some "other"
  184.   '    condition on the data:
  185.   '    - out of area (a single upper-case O)
  186.   '    - private (a single upper-case P)
  187.   '    - others??? (I haven't seen any yet)
  188.   '  - I have not been able to completely figure out how the CRC is
  189.   '    calculated. I got this 'explanation' from a friend:
  190.   '      "The CRC is the twos compliment of the modulo 256 sum of the other
  191.   '      words in the data message". I suppose that the 'data message' is
  192.   '      just the date/time/phone number portion...???
  193.   '
  194.   '  - I've recently received a CRC routine that might work for the CRC
  195.   '    portion of CND data. I've placed in a commented block near where it
  196.   '    would "do the most good". Thanks go to Quinn Tyler Jackson for the
  197.   '    'snippet'!
  198.   '
  199.   '-------------------------------------------------------------------------
  200.  
  201.   DIM Private    AS INTEGER
  202.   DIM OutOfArea  AS INTEGER
  203.   DIM PreviousNo AS INTEGER
  204.   DIM CTRLD      AS INTEGER
  205.   DIM NoOfUs     AS INTEGER
  206.   DIM Junk       AS INTEGER
  207.   DIM DataLength AS INTEGER
  208.   DIM CNDData    AS STRING
  209.   DIM TempCRCSum AS LONG
  210.  
  211.   Private = False
  212.   OutOfArea = False
  213.   PreviousNo = False
  214.   CTRLD = False
  215.   NoOfUs = 0
  216.   Junk = False
  217.   DataLength = 0
  218.   CNDData = ""
  219.   '
  220.   ' initialize CND data
  221.   '
  222.   CND.CNDAttrib = 0
  223.   CND.CNDDate = ""
  224.   CND.CNDTime = ""
  225.  
  226.   CND.CNDNumber = ""
  227.   CND.CNDCRC = 0
  228.   CND.CNDName = ""
  229.   CND.CNDOther = 0
  230. '
  231. ' Continues...
  232. '
  233.  
  234.  
  235.  
  236. ---
  237.  * Origin: RAVE * Burnaby, BC (1:153/810)
  238.  
  239.  
  240.  
  241. ════════════════════════════════════════════════════════════════════════════════
  242.  Area:    QuickBasic
  243.   Msg:    #2740
  244.  Date:    03-25-93 15:34 (Public)
  245.  From:    DIRK THEURER
  246.  To:      ALL
  247.  Subject: CND-DET routines 4/8
  248. ────────────────────────────────────────────────────────────────────────────────
  249. '
  250. ' CND-DET routines (part 4)
  251. '
  252.   '
  253.   ' initialize function value
  254.   '
  255.   GetCNDNumber% = 0
  256.   '
  257.   ' main loop checks for incoming CND data or keyboard data
  258.   '
  259.   ' start of loop
  260.   '   if incoming CND data
  261.   '     process data (ignore keyboard)
  262.   '   if keyboard data
  263.   '     process keyboard data (ignore CND)
  264.   ' end of loop
  265.   '
  266.  
  267.   DO
  268.     '
  269.     ' check for incoming CND data
  270.     '
  271.     i$ = GetChar$
  272.     IF i$ <> "" THEN
  273.       SELECT CASE ASC(i$)
  274.  
  275.         CASE 85 ' U
  276.  
  277.           IF NoOfUs = 0 THEN
  278.             Junk = False
  279.           ELSE
  280.             IF Junk THEN
  281.               '
  282.               ' fatal error - junk in middle of "U"s stream
  283.               '
  284.               FOR i = 1 TO 500: NEXT i
  285.               FOSSILFlush
  286.               GetCNDNumber% = 3
  287.               EXIT FUNCTION
  288.             END IF
  289.           END IF
  290.           NoOfUs = NoOfUs + 1
  291.  
  292.         CASE 4  ' CTRL-D
  293.  
  294.           IF NoOfUs THEN
  295.             IF NOT Junk THEN
  296.               IF NoOfUs <> 30 THEN
  297.                 '
  298.                 ' non-fatal error in data stream?
  299.                 ' (at least till someone tells me otherwise)
  300.                 '
  301.                 CND.CNDAttrib = 10
  302.  
  303.               END IF
  304.             ELSE
  305.               '
  306.               ' fatal error - got junk between "U"s and CTRL-D
  307.               '
  308.               FOR i = 1 TO 500: NEXT i
  309.               FOSSILFlush
  310.               GetCNDNumber% = 4
  311.               EXIT FUNCTION
  312.             END IF
  313. '
  314. ' Continues...
  315. '
  316.  
  317.  
  318.  
  319. ---
  320.  * Origin: RAVE * Burnaby, BC (1:153/810)
  321.  
  322.  
  323.  
  324. ════════════════════════════════════════════════════════════════════════════════
  325.  Area:    QuickBasic
  326.   Msg:    #2741
  327.  Date:    03-25-93 15:35 (Public)
  328.  From:    DIRK THEURER
  329.  To:      ALL
  330.  Subject: CND-DET routines 5/8
  331. ────────────────────────────────────────────────────────────────────────────────
  332. '
  333. ' CND-DET routines (part 5)
  334. '
  335.             '
  336.             ' get number of characters in data to follow
  337.             '
  338.             NoOfUs = 0
  339.             Timeout = 0
  340.             DO
  341.               i$ = GetChar$
  342.               IF i$ <> "" THEN
  343.                 Timeout = 0
  344.                 EXIT DO
  345.               END IF
  346.               Timeout = Timeout + 1
  347.             LOOP WHILE Timeout < 500
  348.  
  349.             IF Timeout THEN
  350.               '
  351.               ' fatal error - timed out getting number of chars in data
  352.               '
  353.               FOR i = 1 TO 500: NEXT i
  354.               FOSSILFlush
  355.               GetCNDNumber% = 5
  356.               EXIT FUNCTION
  357.             END IF
  358.  
  359.             DataLength = ASC(i$)
  360.             NoOfGottenChars = 0
  361.             '
  362.             ' Timeout should be zero coming in here
  363.             '
  364.             DO
  365.               i$ = GetChar$
  366.               IF i$ <> "" THEN
  367.                 SELECT CASE ASC(i$)
  368.                   CASE 48 TO 57 ' 0 to 9
  369.                     '
  370.                     ' number is fine
  371.                     '
  372.                   CASE 79, 80   ' O (out of area) or P (private)
  373.                     '
  374.                     ' should only occur at end of data - non-fatal error
  375.                     ' otherwise
  376.                     '
  377.                     IF NoOfGottenChars + 1 <> DataLength THEN
  378.                       CND.CNDAttrib = 10
  379.                     END IF
  380.                   CASE ELSE
  381.                     '
  382.                     ' any other characters during data stream indicates
  383.                     ' non-fatal error
  384.                     '
  385.  
  386.                     CND.CNDAttrib = 10
  387.                 END SELECT
  388.                 CNDData = CNDData + i$
  389.                 NoOfGottenChars = NoOfGottenChars + 1
  390.                 Timeout = 0
  391.               ELSE
  392.                 Timeout = Timeout + 1
  393.                 IF Timeout > 500 THEN
  394.                   '
  395.                   ' fatal error - timed out trying to receive indicated
  396.                   '               number of data characters
  397.                   '
  398.                   FOR i = 1 TO 50: NEXT i
  399.                   FOSSILFlush
  400.                   GetCNDNumber% = 6
  401.                   EXIT FUNCTION
  402.                 END IF
  403.               END IF
  404.             LOOP WHILE NoOfGottenChars < DataLength
  405. '
  406. ' Continues...
  407. '
  408.  
  409.  
  410.  
  411. ---
  412.  * Origin: RAVE * Burnaby, BC (1:153/810)
  413.  
  414.  
  415.  
  416. ════════════════════════════════════════════════════════════════════════════════
  417.  Area:    QuickBasic
  418.   Msg:    #2742
  419.  Date:    03-25-93 15:36 (Public)
  420.  From:    DIRK THEURER
  421.  To:      ALL
  422.  Subject: CND-DET routines 6/8
  423. ────────────────────────────────────────────────────────────────────────────────
  424. '
  425. ' CND-DET routines (part 6)
  426. '
  427.  
  428.             IF NoOfGottenChars < DataLength THEN
  429.               GetCNDNumber% = 7
  430.               FOR i = 1 TO 500: NEXT i
  431.               FOSSILFlush
  432.               EXIT FUNCTION
  433.               '
  434.               ' fatal error - number of characters received did not match
  435.               '               indicated number of characters
  436.               '
  437.             ELSE
  438.               Timeout = 0 ' might not need to set this one
  439.               DO
  440.                 i$ = GetChar$
  441.                 IF i$ <> "" THEN
  442.                   Timeout = 0
  443.                   EXIT DO
  444.                 END IF
  445.                 Timeout = Timeout + 1
  446.               LOOP WHILE Timeout < 500
  447.  
  448.               IF Timeout THEN
  449.                 '
  450.                 ' fatal error - timed out getting CRC value
  451.                 '
  452.                 GetCNDNumber% = 8
  453.                 FOR i = 1 TO 500: NEXT i
  454.                 FOSSILFlush
  455.                 EXIT FUNCTION
  456.               END IF
  457.  
  458.               '
  459.               ' received all CND data for current call
  460.               '
  461.               ' format into CND data type
  462.               '
  463.               CND.CNDCRC = ASC(i$)
  464. '
  465. ' - The following 'snippet' is from Quinn Tyler Jackson. It is a POSSIBLE
  466. '   method of calculating the CRC for the CND data packet. (It makes sense
  467. '   to me too, Quinn. :-) )
  468. ' - I've modified Quinn's original snippet to use my own variable
  469. '   names ("CNDData" which is DIMmed as variable length string and
  470. '   I DIMmed TempCRCSum as LONG for the temporary sum).
  471. ' - This snippet has NOT BEEN TESTED! (I _hope_ it works. %-} )
  472. '
  473. ' Verbal description given to me:
  474. '   "The CRC is the twos compliment of the modulo 256 sum of the other
  475. '   words in the data message."
  476. '
  477.  
  478. ' Quinn's interpretation (most likely accurate or VERY close):
  479. '   "Add up the ASCII values of the bytes of the data, MOD 256 the
  480. '   result, and NOT that."
  481. '
  482. ' TempCRCSum = 0
  483. ' FOR i% = LEN(CNDData)
  484. '   TempCRCSum = TempCRCSum + ASC(MID$(CNDData, i%, 1))
  485. ' NEXT i%
  486. ' TempCRCSum = NOT(TempCRCSum MOD 256)
  487. '
  488. ' TempCRCSum can be converted to an integer and compared directly to
  489. ' CND.CNDCRC. If they match, then all the credit goes to Quinn! :-)
  490. '
  491. '
  492. ' Continues...
  493. '
  494.  
  495.  
  496.  
  497. ---
  498.  * Origin: RAVE * Burnaby, BC (1:153/810)
  499.  
  500.  
  501.  
  502. ════════════════════════════════════════════════════════════════════════════════
  503.  Area:    QuickBasic
  504.   Msg:    #2743
  505.  Date:    03-25-93 15:37 (Public)
  506.  From:    DIRK THEURER
  507.  To:      ALL
  508.  Subject: CND-DET routines 7/8
  509. ────────────────────────────────────────────────────────────────────────────────
  510. '
  511. ' CND-DET routines (part 7)
  512. '
  513.               CND.CNDDate = LEFT$(CNDData, 2) + "-" + MID$(CNDData, 3, 2)
  514.               CND.CNDTime = MID$(CNDData, 5, 2) + ":" + MID$(CNDData, 7, 2)
  515.  
  516.               SELECT CASE RIGHT$(CNDData, 1)
  517.                 CASE "O"
  518.                   IF NOT CND.CNDAttrib THEN CND.CNDAttrib = 7
  519.                   CND.CNDNumber = "Out of area  "
  520.                 CASE "P"
  521.                   IF NOT CND.CNDAttrib THEN CND.CNDAttrib = 8
  522.                   CND.CNDNumber = "Private      "
  523.                 CASE ELSE
  524.                   SELECT CASE DataLength - 8 ' phone data length
  525.                     CASE 7
  526.                       IF NOT CND.CNDAttrib THEN CND.CNDAttrib = 1
  527.                       ' the following 2 lines can be 'concatenated' into
  528.                       ' a single line
  529.                       CND.CNDNumber = MID$(CNDData, 9, 3) + "-"
  530.                       CND.CNDNumber = CND.CNDNumber + MID$(CNDData, 12, 4)
  531.                     CASE 10
  532.                       IF NOT CND.CNDAttrib THEN CND.CNDAttrib = 2
  533.                       ' the following 4 lines can be 'concatenated' into
  534.                       ' a single line
  535.                       CND.CNDNumber = MID$(CNDData, 9, 3) + "-"
  536.                       CND.CNDNumber = CND.CNDNumber + MID$(CNDData, 12, 3)
  537.                       CND.CNDNumber = CND.CNDNumber + "-"
  538.                       CND.CNDNumber = CND.CNDNumber + MID$(CNDData, 15, 4)
  539.                     CASE ELSE
  540.                       IF NOT CND.CNDAttrib THEN CND.CNDAttrib = 9
  541.                       CND.CNDNumber = MID$(CNDData, 9, DataLength - 9)
  542.                   END SELECT
  543.               END SELECT
  544.               '
  545.               ' GetCNDNumber% got and parsed all CND info for this call
  546.               '
  547.               CNDData = ""
  548.               GetCNDNumber% = 1
  549.               FOR i = 1 TO 500: NEXT i
  550.               FOSSILFlush
  551.               EXIT FUNCTION
  552.             END IF
  553.           ELSE
  554.             '
  555.             ' got CTRL-D without 'U's stream
  556.             '
  557.             GetCNDNumber% = 9
  558.             FOR i = 1 TO 500: NEXT i
  559.             FOSSILFlush
  560.             EXIT FUNCTION
  561.           END IF
  562.           '
  563.  
  564.           ' end of CTRL-D case
  565.           '
  566.         CASE ELSE
  567.           Junk = True
  568.  
  569.       END SELECT
  570.       '
  571.       ' end of get character from FOSSIL
  572.       '
  573.     END IF
  574. '
  575. ' Continues...
  576. '
  577.  
  578.  
  579.  
  580. ---
  581.  * Origin: RAVE * Burnaby, BC (1:153/810)
  582.  
  583.  
  584.  
  585. ════════════════════════════════════════════════════════════════════════════════
  586.  Area:    QuickBasic
  587.   Msg:    #2744
  588.  Date:    03-25-93 15:37 (Public)
  589.  From:    DIRK THEURER
  590.  To:      ALL
  591.  Subject: CND-DET routines 8/8
  592. ────────────────────────────────────────────────────────────────────────────────
  593. '
  594. ' CND-DET routines (part 8)
  595. '
  596.     '
  597.     ' see if anything in keyboard
  598.     '
  599.     i$ = INKEY$
  600.     SELECT CASE LEN(i$)
  601.       CASE 0
  602.         '
  603.         ' no character
  604.         '
  605.       CASE 1
  606.         SELECT CASE ASC(UCASE$(i$))
  607.           CASE 81 ' Q uit
  608.             GetCNDNumber% = 2
  609.             FOR i = 1 TO 500: NEXT i
  610.             FOSSILFlush
  611.             EXIT FUNCTION
  612.           CASE ELSE
  613.         END SELECT
  614.       CASE 2
  615.         SELECT CASE ASC(RIGHT$(i$, 1))
  616.           CASE 72 ' up arrow
  617.             FOR i = 1 TO 500: NEXT i
  618.             FOSSILFlush
  619.             GetCNDNumber% = 72
  620.             EXIT FUNCTION
  621.           CASE 80 ' down arrow
  622.             FOR i = 1 TO 500: NEXT i
  623.             FOSSILFlush
  624.             GetCNDNumber% = 80
  625.             EXIT FUNCTION
  626.           CASE 71 ' Home
  627.             FOR i = 1 TO 500: NEXT i
  628.             FOSSILFlush
  629.             GetCNDNumber% = 71
  630.             EXIT FUNCTION
  631.           CASE 79 ' End
  632.             FOR i = 1 TO 500: NEXT i
  633.             FOSSILFlush
  634.             GetCNDNumber% = 79
  635.             EXIT FUNCTION
  636.           CASE 73 ' PgUp
  637.             FOR i = 1 TO 500: NEXT i
  638.             FOSSILFlush
  639.             GetCNDNumber% = 73
  640.             EXIT FUNCTION
  641.           CASE 81 ' PgDn
  642.             FOR i = 1 TO 500: NEXT i
  643.             FOSSILFlush
  644.             GetCNDNumber% = 81
  645.             EXIT FUNCTION
  646.  
  647.           CASE ELSE
  648.         END SELECT
  649.       CASE ELSE
  650.         '
  651.         ' shouldn't be any such case!
  652.         '
  653.     END SELECT
  654.  
  655.   LOOP
  656.   '
  657.   ' end of GetCNDNumber%
  658.   '
  659. END FUNCTION
  660. ,
  661. ,--------8<-------------------- snip here -------------------->8--------
  662.  
  663. Use and ENJOY!
  664.  
  665. Dirk
  666.  
  667.  
  668.  
  669. ---
  670.  * Origin: RAVE * Burnaby, BC (1:153/810)
  671.  
  672.  
  673.  
  674. ════════════════════════════════════════════════════════════════════════════════
  675.  Area:    QuickBasic
  676.   Msg:    #2931
  677.  Date:    03-26-93 09:24 (Public)
  678.  From:    DOUGLAS LUSHER
  679.  To:      ROBERT CHURCH
  680.  Subject: DISK NOT READY, AND GENER
  681. ────────────────────────────────────────────────────────────────────────────────
  682. RC>How can I detect these before they happen?  Here's the scenario.
  683. RC>I call FindFirst.  Remember this is on a floppy drive.  If the disk isn't
  684. RC>there the system locks up!  I don't wan't to use error trapping if I can
  685. RC>help it.  What can I do?  BTW, the FindFirst routine sets an error flag if
  686. RC>an error occured (DOSError%).
  687.  
  688. You can use the function below to determine if there is a disk in
  689. a floppy drive. It returns True (-1) if the specified floppy drive is
  690. has a disk in it and is ready to go. Be sure to load QB with the /L
  691. switch. Then use the function as follows:
  692.  
  693. '$INCLUDE: 'QB.BI'
  694. D$ = "A:"
  695. IF FloppyDriveReady(D$) THEN
  696.   'do whatever you want on the drive, there's a disk in it
  697. ELSE
  698.   'no disk is present in the drive, or there is some other
  699.   'problem with it.
  700. END IF
  701.  
  702.  
  703. FUNCTION FloppyDriveReady% (Drive$)
  704. DIM Register as RegType
  705.  
  706. Drive% = (ASC(Drive$) OR 32) - 97
  707.  
  708. 'reset floppy drive
  709. Register.AX = 0
  710. Register.DX = Drive%
  711. CALL Interrupt(&H13, Register, Register)
  712.  
  713. Register.AX = &H401
  714. Register.CX = &H101
  715. Register.DX = Drive%
  716. CALL Interrupt(&H13, Register, Register)
  717. 'call the interrupt twice since if a disk has just been inserted,
  718. 'the first time gives a wrong answer
  719. Register.AX = &H401
  720. Register.CX = &H101
  721. Register.DX = Drive%
  722. CALL Interrupt(&H13, Register, Register)
  723.  
  724. FloppyDriveReady% = ((Register.Flags AND 1) = 0)
  725.  
  726. END FUNCTION
  727.  
  728. By the way, if you're doing a lot of work on floppy drives, you might
  729. also want to check if the disk in the drive is write-protected or not.
  730. I have code for that also, if you need it. The function above tests only
  731. that a disk is present. If you try to write to a protected disk, you'll
  732. still get an error.
  733.  
  734. ---
  735.  
  736.  ■ SLMR 2.1a ■ I love it when a plan comes together.
  737.  
  738. --- TMail v1.30.4
  739.  * Origin: TC-AMS MLTBBS 2.2 - Minnetonka, MN (612)-938-4799 (1:282/7)
  740.  
  741.  
  742.  
  743. ════════════════════════════════════════════════════════════════════════════════
  744.  Area:    QuickBasic
  745.   Msg:    #3296
  746.  Date:    03-25-93 05:57 (Public)
  747.  From:    JOHN GUILLORY
  748.  To:      DICK DENNISON
  749.  Subject: CD-ROM
  750. ────────────────────────────────────────────────────────────────────────────────
  751. ---------------------------------------------
  752. INT 2F - Multiplex - CDROM - INSTALLATION CHECK
  753.         AX = 1500h
  754.         BX = 0000h
  755. Return: BX = number of CDROM drive letters used
  756.         CX = starting drive letter (0=A:)
  757. Note:   this installation check DOES NOT follow the format used by other
  758.           software
  759. ---------------------------------------------
  760. INT 2F - Multiplex - CDROM - GET DRIVE DEVICE LIST
  761.         AX = 1501h
  762.         ES:BX -> buffer to hold drive letter list (5 bytes per drive letter)
  763. Return: buffer filled, for each drive letter
  764.           BYTE  subunit number in driver
  765.           DWORD address of device driver header
  766. ---------------------------------------------
  767. INT 2F - Multiplex - CDROM - GET COPYRIGHT FILE NAME
  768.         AX = 1502h
  769.         ES:BX -> 38-byte buffer for name of copyright file
  770.         CX = drive number (0=A:)
  771. Return: CF set if drive is not a CDROM drive
  772.             AX = 15 (invalid drive)
  773. SeeAlso: AX=1503h
  774. ---------------------------------------------
  775. INT 2F - Multiplex - CDROM - GET ABSTRACT FILE NAME
  776.         AX = 1503h
  777.         ES:BX -> 38-byte buffer for name of abstract file
  778.         CX = drive number (0=A:)
  779. Return: CF set if drive is not a CDROM drive
  780.             AX = 15 (invalid drive)
  781. SeeAlso: AX=1502h
  782. ---------------------------------------------
  783. INT 2F - Multiplex - CDROM - GET BIBLIOGRAPHIC DOC FILE NAME
  784.         AX = 1504h
  785.         ES:BX -> 38-byte buffer for name of bibliographic documentation file
  786.         CX = drive number (0=A:)
  787. Return: CF set if drive is not a CDROM drive
  788.             AX = 15 (invalid drive)
  789. ---------------------------------------------
  790. INT 2F - Multiplex - CDROM - READ VTOC
  791.         AX = 1505h
  792.         ES:BX -> 2048-byte buffer
  793.         CX = drive number (0=A:)
  794.         DX = sector index (0=first volume descriptor,1=second,...)
  795. Return: CF set on error
  796.             AX = error code (15=invalid drive,21=not ready)
  797.         CF clear if successful
  798.             AX = volume descriptor type (1=standard,FFh=terminator,0=other)
  799. ---------------------------------------------
  800. INT 2F - Multiplex - CDROM - TURN DEBUGGING ON
  801.         AX = 1506h
  802.         BX = debugging function to enable
  803. Note:   reserved for development
  804.  
  805. SeeAlso: AX=1507h
  806. ---------------------------------------------
  807. INT 2F - Multiplex - CDROM - TURN DEBUGGING OFF
  808.         AX = 1507h
  809.         BX = debugging function to disable
  810. Note:   reserved for development
  811. SeeAlso: AX=1506h
  812. ---------------------------------------------
  813. INT 2F - Multiplex - CDROM - ABSOLUTE DISK READ
  814.         AX = 1508h
  815.         ES:BX -> buffer
  816.         CX = drive number (0=A:)
  817.         SI:DI = starting sector number
  818.         DX = number of sectors to read
  819. Return: CF set on error
  820.             AL = error code (15=invalid drive,21=not ready)
  821. SeeAlso: AX=1509h
  822. ---------------------------------------------
  823. INT 2F - Multiplex - CDROM - ABSOLUTE DISK WRITE
  824.         AX = 1509h
  825.         ES:BX -> buffer
  826.         CX = drive number (0=A:)
  827.         SI:DI = starting sector number
  828.         DX = number of sectors to write
  829. Note:   corresponds to INT 26h and is currently reserved and nonfunctional
  830. SeeAlso: AX=1508h
  831. ---------------------------------------------
  832. INT 2F - Multiplex - CDROM - RESERVED
  833.         AX = 150Ah
  834. ---------------------------------------------
  835. INT 2F - Multiplex - CDROM 2.00 - DRIVE CHECK
  836.         AX = 150Bh
  837.         CX = drive number (0=A:)
  838. Return: BX = ADADh if MSCDEX.EXE installed
  839.             AX = 0000h if drive not supported
  840.                 nonzero if supported
  841. SeeAlso: AX=150Dh
  842. ---------------------------------------------
  843. INT 2F - Multiplex - CDROM 2.00 - GET MSCDEX.EXE VERSION
  844.         AX = 150Ch
  845. Return: BH = major version
  846.         BL = minor version
  847. Note:   MSCDEX.EXE versions prior to 1.02 return BX=0
  848. ---------------------------------------------
  849. INT 2F - Multiplex - CDROM 2.00 - GET CDROM DRIVE LETTERS
  850.         AX = 150Dh
  851.         ES:BX -> buffer for drive letter list (1 byte per drive)
  852. Return: buffer filled with drive numbers (0=A:).  Each byte corresponds
  853.         to the drive in the same position for function 1501h
  854. SeeAlso: AX=150Bh
  855. ---------------------------------------------
  856. INT 2F - Multiplex - CDROM 2.00 - GET/SET VOLUME DESCRIPTOR PREFERENCE
  857.         AX = 150Eh
  858.  
  859.         BX = subfunction
  860.             00h get preference
  861.                 DX = 0000h
  862.                 Return: DX = preference settings
  863.             01h set preference
  864.                 DH = volume descriptor preference
  865.                     01h = primary volume descriptor
  866.                     02h = supplementary volume descriptor
  867.                 DL = supplementary volume descriptor preference
  868.                     01h = shift-Kanji
  869.         CX = drive number (0=A:)
  870. Return: CF set on error
  871.             AX = error code (15=invalid drive,1=invalid function)
  872. ---------------------------------------------
  873. INT 2F - Multiplex - CDROM 2.00 - GET DIRECTORY ENTRY
  874.         AX = 150Fh
  875.         CX = drive number (0=A:)
  876.         ES:BX -> ASCIZ path name
  877.         SI:DI -> 255-byte buffer for directory entry
  878. Return: CF set on error
  879.             AX = error code
  880.         CF clear if succesful
  881.             AX = disk format (0=High Sierra,1=ISO 9660)
  882.  
  883. Format of directory entry:
  884. Offset  Size    Description
  885.  00h    BYTE  length of directory entry
  886.  01h    BYTE  length of XAR in LBN's (don't ask me what that means...)
  887.  02h    DWORD LBN of data, Intel (little-endian) format
  888.  06h    DWORD LBN of data, Motorola (big-endian) format
  889.  0Ah    DWORD length of file, Intal format
  890.  0Eh    DWORD length of file, Motorola format
  891. ---High Sierra---
  892.  12h  6 BYTEs date and time
  893.  18h    BYTE  bit flags
  894.  19h    BYTE  reserved
  895. ---ISO 9660---
  896.  12h  7 BYTEs date and time
  897.  19h    BYTE  bit flags
  898. ---both formats---
  899.  1Ah    BYTE  interleave size
  900.  1Bh    BYTE  interleave skip factor
  901.  1Ch    WORD  volume set sequence number, Intel format
  902.  1Eh    WORD  volume set sequence number, Motorola format
  903.  20h    BYTE  length of file name
  904.  21h  N BYTEs file name
  905.         BYTE (optional) padding if filename is odd length
  906.       N BYTEs system data
  907. ---------------------------------------------
  908. INT 2F - Multiplex - CDROM 2.10 - SEND DEVICE DRIVER REQUEST
  909.         AX = 1510h
  910.         CX = CD-ROM drive letter (0 = A, 1 = B, etc)
  911.         ES:BX -> CD-ROM device driver request header (see AX=0802h)
  912.  
  913. ---------------------------------------------
  914. INT 2F - Multiplex - ???
  915.         AH = 16h
  916.         ???
  917. Return: ???
  918. Note:   called by MS Windows
  919. ---------------------------------------------
  920. INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - IDENTIFY WinOldAp VERSION
  921.         AX = 1700h
  922. Return: AX = 1700h if this version of WINOLDAP doesn't support clipboard
  923.         AX <> 1700h
  924.                 AL = WINOLDAP major version
  925.                 AH = WINOLDAP minor version
  926. Note:   WinOldAp (WINOLDAP.MOD) is a Microsoft Windows extension supporting
  927.           "old" (character-mode) application access to Dynamic Data Exchange,
  928.           menus, and the Windows clipboard.
  929. ---------------------------------------------
  930. INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - OPEN CLIPBOARD
  931.         AX = 1701h
  932. Return: AX <> 0  success
  933.         AX = 0   clipboard is already open
  934. ---------------------------------------------
  935. INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - EMPTY CLIPBOARD
  936.         AX = 1702h
  937. Return: AX <> 0  clipboard has been emptied
  938.         AX = 0   failure
  939. ---------------------------------------------
  940. INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - SET CLIPBOARD DATA
  941.         AX = 1703h
  942.         DX = clipboard format supported by WinOldAp:
  943.                 01h text
  944.                 02h bitmap
  945.                 03h metafile picture
  946.                 04h SYLK
  947.                 05h DIF
  948.                 06h TIFF
  949.                 07h OEM text
  950.         ES:BX -> data (see below for formats)
  951.         SI:CX = size of data
  952. Return: AX <> 0 data copied into the Clipboard
  953.         AX = 0 failure
  954.  
  955. Format of bitmap:
  956. Offset  Size    Description
  957.  00h    WORD    type (0000h)
  958.  02h    WORD    width of bitmap in pixels
  959.  04h    WORD    height of bitmap in pixels
  960.  06h    WORD    bytes per line
  961.  08h    BYTE    number of color planes
  962.  09h    BYTE    number of adjacent color bits in pixel
  963.  0Ah    DWORD   pointer to start of data
  964.  0Eh    WORD    width in 0.1mm units
  965.  10h    WORD    height in 0.1mm units
  966.  
  967.  12h  N BYTEs   bitmap data
  968.  
  969. Format of metafile picture:
  970. Offset  Size    Description
  971.  00h    WORD    mapping mode
  972.  02h    WORD    X extent
  973.  04h    WORD    Y extent
  974.  06h    WORD    picture data
  975. ---------------------------------------------
  976. INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - GET CLIPBOARD DATA SIZE
  977.         AX = 1704h
  978.         DX = clipboard format supported by WinOldAp (see AX=1703h)
  979. Return:  DX:AX = size of data in bytes, including any headers
  980. Failure: DX:AX = 0  no data in this format in the Clipboard
  981. ---------------------------------------------
  982. INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - GET CLIPBOARD DATA
  983.         AX = 1705h
  984.         DX = clipboard format supported by WinOldAp (see AX=1703h)
  985.         ES:BX -> buffer
  986. Return: AX <> 0  success
  987.         AX = 0   error, or no data in this format in Clipboard
  988. ---------------------------------------------
  989. INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - CloseClipboard
  990.         AX = 1708h
  991. Return: AX <> 0 success
  992.         AX = 0 failure
  993. ---------------------------------------------
  994. INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - COMPACT CLIPBOARD
  995.         AX = 1709h
  996.         SI:CX = desired size in bytes
  997. Return: DX:AX = number of bytes in largest block of free memory
  998. Note:   WinOldAp is responsible for including the size of any headers
  999. ---------------------------------------------
  1000. INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - GET DEVICE CAPABILITIES
  1001.         AX = 170Ah
  1002.         DX = GDI information index
  1003.             00h device driver version
  1004.             02h device classification
  1005.             04h width in mm
  1006.             06h height in mm
  1007.             08h width in pixels
  1008.             0Ah height in pixels
  1009.             0Ch bits per pixel
  1010.             0Eh number of bit planes
  1011.             10h number of brushes supported by device
  1012.             12h number of pens supported by device
  1013.             14h number of markers supported by device
  1014.             16h number of fonts supported by device
  1015.             18h number of colors
  1016.             1Ah size required for device descriptor
  1017.             1Ch curve capabilities
  1018.             1Eh line capabilities
  1019.             20h polygon capabilities
  1020.  
  1021.             22h text capabilities
  1022.             24h clipping capabilities
  1023.             26h bitblt capabilities
  1024.             28h X aspect
  1025.             2Ah Y aspect
  1026.             2Ch length of hypotenuse of aspect
  1027.             58h logical pixels per inch of width
  1028.             5Ah logical pixels per inch of height
  1029. Return:  AX = integer value of the desired item
  1030.                 device classification
  1031.                     00h vector plotter
  1032.                     01h raster display
  1033.                     02h raster printer
  1034.                     03h raster camera
  1035.                     04h character-stream, PLP
  1036.                     05h Metafile, VDM
  1037.                     06h display-file
  1038.                 curve capabilities
  1039.                     bit 0  circles
  1040.                     bit 1  pie wedges
  1041.                     bit 2  chord arcs
  1042.                     bit 3  ellipses
  1043.                     bit 4  wide lines
  1044.                     bit 5  styled lines
  1045.                     bit 6  wide styled lines
  1046.                     bit 7  interiors
  1047.                 line capabilities
  1048.                     bit 1  polylines
  1049.                     bit 2  markers
  1050.                     bit 3  polymarkers
  1051.                     bit 4  wide lines
  1052.                     bit 5  styled lines
  1053.                     bit 6  wide styled lines
  1054.                     bit 7  interiors
  1055. -end-
  1056.  
  1057.  
  1058. ════════════════════════════════════════════════════════════════════════════════
  1059.  Area:    QuickBasic
  1060.   Msg:    #4422
  1061.  Date:    03-26-93 16:32 (Public)
  1062.  From:    ANDY WARREN
  1063.  To:      ALL
  1064.  Subject: VOLUME SERIAL NUMBERS
  1065. ────────────────────────────────────────────────────────────────────────────────
  1066. 'Recently I asked for some assistance in learning to change the volumer
  1067. 'serial numbers on disks formatted by DOS 4.0+. Here's a short program
  1068. 'that will allow the user to display/change the serial number. BTW, what
  1069. 'got me started on this was an idea I had to use the serial number as a
  1070. 'way to limit distribution of beta copies of a program I wrote. Any
  1071. 'comments?
  1072.  
  1073. CLS:?STRING$(50,178):'This file created by PostIt! v4.0
  1074. DEFINT A-Z:FOR A=0 TO 6:P(A)=2^A:NEXT:OPEN "B",1,"SERIAL.BAS"
  1075. T$="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789()"
  1076. G"NOnXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXet
  1077. G"mXetmXetmXetmXetmXetmXetmXetmXe)BdkCYSGaLupDKub1ei6aYufjvsbXKlcf0uGaci
  1078. G"GaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaYSnO
  1079. G"WjZccuvjfupnvrGOdisvwyK9YqOfMBNvgieL2CRbYuLjxAHXgiovxBIvMCOivzXvxAYv2C
  1080. G"Gq0ttbsp(acnUatkGaciGaciGaciGaciZ2GcNmlibvfvi9KuGaIoGeKBKLhixfMCYvMBGa
  1081. G"ciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGmBd
  1082. G"kCYSGivrwL0uj9Kt6asmUadiGedmG0uyYbsoZaciGaciGaciGaciGaciGaciGaciGaciGa
  1083. G"ciGaciGaciGaciGaciGaciGaciGaciGaYSnOWjZcYuufevvnfiGOdiqvNySL2yGq0BTfwA
  1084. G"UbciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciZ2
  1085. G"GcNmlio9evfnfiGaIoG0uEGqhAH52AZbcDVbcrPn2AGquzU5wAZ9MBGy2BYbcDOvgiOvgB
  1086. G"WLMBNbcAH5gzHaciGaciGaciGaciGaciGmBdkCcWetmXetmXetmXetmXetmXetmXetmXet
  1087. G"mXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetC2
  1088. G"nOqdkCcjj50qmvfrfPdiNeNyUiwANaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGC
  1089. G"IyLbYC1jxzGq3BGmhDHjhDGeLqnOqcjKqcjKqcjKqcjKWj1nxAUDgi0HwzG8ctG8gC0L2B
  1090. G"UfsdkqvwqveitvMCPfgBefgDH1GcjKKBM9gibnfij5evfDurs1GcjmvzYLwyS5uDTbsqtb
  1091. G"ctp50rnOqcgfgDGe0uGmfvsLKthbIkGGtdkKatHjwzSjdibnfitrLuj50rGOciXetdkKat
  1092. G"HjwzSndibnfitrLuj50rGOciXetdkuKtebcvzbvrnOqdkqusnbIuLDwAZrxzYnhibnfisv
  1093. G"0zuLhCL1GceLutGivzNnhibnfisv2zuLhCLHfiGaciGaciGaciGaciGaciGaciGaciGaci
  1094. G"GaciNmxz0bsDWbcDOvgiYv2zPnhDLj3CnOarj1eiuvwBWbsqtbYuLjxAHXgrHrxyGaciGa
  1095. G"ciGaciGaciGaciGaciGaciGaciGaYjMacDOvgiKfgDH1GcnOqdkivzNL2C0vMCZ5sqybsp
  1096. G"GycsZadmWaciGaciGaciGaciGaciGaciGaciGaciGaciGCIjOndmG0dihvgDe92CwvMCnO
  1097. G"WqbXetGKKB0vMCYvhC0HIjijtmSaIuLDwAZrxzYnhlGivzNL2C0vMCZLciGaciGaYjJfgB
  1098. G"SbsA05IlU0GcnOqsgbIuLDwAZrxzYnNlbHfib5erGitn1acpGqdiuHurobciGaciGaciGa
  1099. G"ciGaciGaYjNvgDGyxySvxzGmhDVjxzKbsAUbsqm1GcjaLuj5evGiIuLfxDPjxzZbcrpnfi
  1100. G"wvMCZL2BUbcnUadiVjhiOL2zOvMCIaciNeMB5rhAP52zGWwzZnhi0HwyUbcnnOqcf5erGa
  1101. G"ciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaYj39MBNqhi39MCR1Gc
  1102. G"f5erGKKrnOqdkKKrGWuroHIuujvsnrckd9utnfKterskPaspGidiuHurobciGaciGaciGa
  1103. G"ciGaciGCICLfgzGmxzYLwySXciU9gi3jxA0vwdkKarYLMDLbspGe0udHctfzevKGYqp1ut
  1104. G"b5erKWciXKskG0ci2qdiGaciGaciGCsq9edlGiupYWciLr3yU4sdkKqqJrxAV5gi9aIjiz
  1105. G"toWadiGaciGaciGaciGaciGaciGaciGaciGaciGaciGCYCLrhiZvMC2L2yLbcDVbICLfgz
  1106. G"G8MBSLxdkuettvusgbctf5ekd9utnfKterskG0diXediuHurobciGaciGaciGaciGaciGa
  1107. G"ciGCYyOfMBNvgiZvMCPfgBnOqcejxA2vgi9asqtnekmvKrurckd9utnfKterclGetkPasl
  1108. G"GydnnOqcbngDP9MBG0diMGKn5atmGaciGaciGaciGaciGaciGaciGaciGaciGaciGaYjZv
  1109. G"gDGmxzYzxAJvgi09giYvwyK9YDYLgDL1GcjqvzTbNltvMCPfgBovxBG0diwfetOiIjijci
  1110. G"RaIujDesurckd9utnfKterclGGtkPaciNegzKbIjibcDVbIBLDxdkuettveiGaciGaciGa
  1111. G"ciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGCYCLjxAHXgiH5gzGm2BUzxz
  1112. G"Yrhi09giS9MBN1GcjaLuj5evGiYufjvsbXeiBrMCPzxz60fiBnxzYLwySHcE4HhE4HhE4L
  1113. G"sxIaciN42BViwyKbYyV1wBH5gzGWwAUvwdkKqroreiGaciGaciGaciGaciGaciGaciGaci
  1114. G"GaciGaciGaciGaciGaciGaciGCYCO92DG8gC0L2BUnxdkuKtebssg1GcnOGuLD2CUeewG0
  1115. G"dibngDP9MBGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaYjZvgDGmxzYzxAJvwd
  1116. G"kivzNnNlIHhi9acrYLMDLbciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGCIjGq
  1117. G"MCPzxznOGuLD2CUq0uG0diwfKutv0rOqvzTbxknOGuLD2CUqewG0diwfKuqrLuOqvzTbxk
  1118. G"nOWqbXetGKKB0vMCYvhC0HfkMGKmXWcisv2zZXcisv2zZLciGaciGaciGaciGaciGaYjJf
  1119.  
  1120. G"gBSbsA01GcnOWuLjxAHXMtIjhjG0diivewKGcvL1gCUmvzYLwyS5uDTLciGaciGaciGaci
  1121. G"GaciGaYjJ9MB2vMC0bcDVbcALHxdk0GcqjvsorfiImvzYLwySbIt11MyLjNoGiYoGWurgr
  1122. G"fjOmvzYLwyS5KyYrclGqtk7aIiTiYoGivshHevKGYuLjxAHXMtIjhjSacnP0Gcf5ernOqd
  1123. G"ka"
  1124. N=2416:K=255:IF LEN(C$)<>3222 THEN ?"Incomplete script file!":BEEP:END
  1125. FOR A=1 TO N:LOCATE 1:?STRING$(50*(A/N),177):IF L=0 THEN GOSUB G:L=6
  1126. W=T\P(6-L):GOSUB G:W=W OR T*P(L):L=L-2:B$=CHR$(W AND K):PUT 1,,B$:NEXT
  1127. ?:IF C<>41 THEN ?"Bad checksum!":BEEP:END ELSE ?"Success!":END
  1128. G:I=I+1:T=INSTR(T$,MID$(C$,I,1))-1:C=(C+T)*2:C=C\256+(C AND 255):RETURN
  1129. SUB G(A$):SHARED C$:C$=C$+LEFT$(A$,70):END SUB
  1130. ---
  1131.  ■ SLMR 2.1a ■ Backup not found: (A)bort (R)etry (P)anic
  1132.  
  1133. --- TMail v1.31.3
  1134.  * Origin: Cornucopia TBBS - Winter Park, FL - 407/645-4929 (1:363/18)
  1135.  
  1136.  
  1137.