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

  1. ════════════════════════════════════════════════════════════════════════════════
  2.  Area:    QuickBasic
  3.   Msg:    #7106
  4.  Date:    03-20-93 00:52 (Public)
  5.  From:    STEVE DEMO
  6.  To:      ALL
  7.  Subject: Mview Code 1 Of 5
  8. ────────────────────────────────────────────────────────────────────────────────
  9. Here is a little program I wrote I know it's not as great as some of the
  10. other code around here but I thought someone might be able to use it.
  11.  
  12. '________O_/________________________| SNIP |______________________\_O_______
  13. '        O \                        | HERE |                      / O
  14. 'This file created by PostIt! v5.1.
  15. '>>> Start of page 1.
  16.  
  17. ' MVIEW.BAS ----- Mouse Driven File Viewer
  18. ' Written By:     Steve Demo
  19. '
  20. ' This program requires:
  21. ' a Mickey
  22. ' At least EGA You need 256k video mem. Because of 43 line mode + Pcopy
  23. ' Credit given to:
  24. '
  25. ' Chirs Wagner for Mickey routines
  26. ' Orginal VIEW.BAS written by Matt Hart
  27. '
  28. ' Do with this what you will but don't forget those who
  29. ' contributed to it's out come.
  30. ' It should be Bug Free <g> If not V 1.03
  31. '
  32. ' LOAD QB as follows:     QB /L QB /AH MVIEW    or it WON'T WORK
  33. '
  34. DEFINT A-Z
  35. '$INCLUDE: 'QB.BI'
  36. DECLARE SUB mouseon ()
  37. DECLARE SUB mouseoff ()
  38. DECLARE SUB ViewHdcat (File$)
  39. DECLARE FUNCTION MouseInstalled% ()
  40. DECLARE SUB MouseSetHor (Min%, Max%)
  41. DECLARE SUB MouseSetVert (Min%, Max%)
  42. DECLARE SUB MouseLocate (Xpos%, Ypos%)
  43. DECLARE SUB MouseStatus (vert%, hor%, Mbuttons$)
  44.  
  45. DIM SHARED RegX AS RegTypeX
  46. ON ERROR GOTO noega
  47.  
  48.     IF MouseInstalled% THEN
  49.       COLOR 15, 0
  50.       PRINT "MView V 1.02"
  51.       PRINT "One Mickey Escapes Mr.Cat : Using Mouse"
  52.       PLAY "msL20<defgab.>"
  53.       SOUND 9000, 2
  54.     ELSE
  55.       PRINT "MView V 1.02"
  56.       PRINT "Oh NO Mickey not found Bad Cat. Sorry"
  57.       PLAY "msL20<dBAGFED.>"
  58.       SOUND 9000, 2
  59.       SLEEP 2
  60.       GOTO ending
  61.     END IF
  62.  
  63.  
  64.     File$ = COMMAND$
  65.     IF File$ = "" THEN
  66.        LINE INPUT "FILE ? ", File$
  67.     END IF
  68.     IF File$ = "" THEN
  69.        PRINT "You didn't enter a file"
  70.        PRINT "One last try"
  71.        PLAY "msL20<dBAGFED.>"
  72.        SHELL "dir /w/p"
  73.        SOUND 9000, 2
  74.        LINE INPUT "FILE ? ", File$
  75.      END IF
  76.      IF File$ = "" THEN GOTO ending            ' Sore head
  77.      ViewHdcat UCASE$(File$)
  78.  
  79. ending:
  80.      WIDTH 80, 25                              ' Restore Screen to 80 x 25
  81.      COLOR 15, 0                               ' reset color white on black
  82.      CLS
  83.      PRINT : PRINT
  84.      PRINT "Have you hugged your Computer today ?"
  85.      PRINT "MView V 1.02 -----------> SRD Software"
  86.      END
  87. noega:
  88.     SELECT CASE ERR
  89.      CASE 9                                      ' We can't have this
  90.       RESUME NEXT        ' <---------------------- Take that. Allows a Little
  91.      CASE ELSE                                   ' More Seek and Find.
  92.       WIDTH 80, 25: COLOR 15, 0: CLS : PRINT : PRINT
  93.       PRINT "Coffee and Keyboards don't mix  Did you spill some?  Error"+_
  94. " "; ERR
  95.       PRINT "MView V 1.02 -----------> SRD Software"
  96.       PRINT : PRINT
  97.       PRINT "Usage : MVIEW FILE.TXT  or  MVIEW and follow the prompts":_
  98.  PRINT
  99.       END
  100.       END SELECT
  101.  
  102. '>>> Continued on page 2.
  103.  
  104. ___ Blue Wave/QWK v2.11
  105.  
  106. --- Maximus 2.01wb
  107.  * Origin: Semper Fi BBS  Ft. Wayne, IN  (219) 424-4292 (1:236/21)
  108.  
  109.  
  110.  
  111. ════════════════════════════════════════════════════════════════════════════════
  112.  Area:    QuickBasic
  113.   Msg:    #7112
  114.  Date:    03-20-93 00:54 (Public)
  115.  From:    STEVE DEMO
  116.  To:      ALL
  117.  Subject: Mview Code 2 Of 5
  118. ────────────────────────────────────────────────────────────────────────────────
  119. '>>> Start of page 2.
  120.  
  121. FUNCTION MouseInstalled%
  122.     DEF SEG = 0
  123.     MouseSeg& = 256& * PEEK(207) + PEEK(206)
  124.     MouseOfs& = 256& * PEEK(205) + PEEK(204) + 2
  125.     DEF SEG = MouseSeg&
  126.     IF (MouseSeg& = 0 AND MouseOfs& = 0) OR PEEK(MouseOfs&) = 207 THEN
  127.        MouseInstalled% = 0
  128.        EXIT FUNCTION
  129.     ELSE
  130.        MouseInstalled% = -1
  131.     END IF
  132.     DEF SEG
  133.     RegX.ax = 0
  134.     CALL INTERRUPTX(&H33, RegX, RegX)
  135.     IF RegX.ax = -1 THEN
  136.        MouseInstalled% = -1
  137.     ELSE
  138.        MouseInstalled% = 0
  139.     END IF
  140. END FUNCTION
  141.  
  142. SUB MouseLocate (Xpos%, Ypos%)
  143.     RegX.dx = (Xpos% * 8) - 1
  144.     RegX.cx = (Ypos% * 8) - 1
  145.     RegX.ax = 4
  146.     CALL INTERRUPTX(&H33, RegX, RegX)
  147. END SUB
  148.  
  149. SUB mouseoff
  150.     RegX.ax = 2
  151.     CALL INTERRUPTX(&H33, RegX, RegX)
  152. END SUB
  153.  
  154. SUB mouseon
  155.     RegX.ax = 1
  156.     CALL INTERRUPTX(&H33, RegX, RegX)
  157. END SUB
  158.  
  159. SUB MouseSetHor (Min%, Max%)
  160.     RegX.cx = (Min% * 8) - 1
  161.     RegX.dx = (Max% * 8) - 1
  162.     RegX.ax = 7
  163.     CALL INTERRUPTX(&H33, RegX, RegX)
  164. END SUB
  165.  
  166. SUB MouseSetVert (Min%, Max%)
  167.     RegX.cx = (Min% * 8) - 1
  168.     RegX.dx = (Max% * 8) - 1
  169.     RegX.ax = 8
  170.     CALL INTERRUPTX(&H33, RegX, RegX)
  171. END SUB
  172.  
  173.  
  174. SUB MouseStatus (vert%, hor%, Mbuttons$)
  175.     RegX.ax = 3
  176.     CALL INTERRUPTX(&H33, RegX, RegX)
  177.     vert% = (RegX.dx / 8) + 1
  178.     hor% = (RegX.cx / 8) + 1
  179.     SELECT CASE RegX.bx
  180.     CASE 0
  181.         Mbuttons$ = ""
  182.     CASE 1
  183.         Mbuttons$ = "L"
  184.     CASE 2
  185.         Mbuttons$ = "R"
  186.     CASE 3
  187.         Mbuttons$ = "LR"
  188.     CASE 4
  189.         Mbuttons$ = "C"
  190.     END SELECT
  191. END SUB
  192.  
  193. SUB ViewHdcat (File$)
  194.     CONST False = 0
  195.     CONST True = NOT False
  196.                           ' Build Screen
  197.     WIDTH 80, 43                                  ' Switch to EGA 43
  198. ' line
  199.     COLOR 14, 0: CLS                              ' Mode
  200.     LOCATE 42, 1: COLOR 9, 7
  201.     PRINT STRING$(80, CHR$(219));
  202.     LOCATE 43, 1
  203.     PRINT STRING$(80, CHR$(219));
  204.     LOCATE 1, 1
  205.     PRINT STRING$(240, CHR$(219));
  206.     COLOR 15, 1
  207.     LOCATE 2, 1
  208.     PRINT STRING$(80, " ");
  209.     LOCATE 2, 15
  210.     PRINT "MView-EGA  ESC   Pgup   Pgdn  end  home  "; CHR$(24);
  211.     PRINT SPACE$(2); CHR$(25); SPACE$(2); CHR$(27); SPACE$(2); CHR$(26);
  212.     PRINT SPACE$(2); "Print";
  213.  
  214. '>>> Continued on page 3.
  215.  
  216. ___ Blue Wave/QWK v2.11
  217.  
  218. --- Maximus 2.01wb
  219.  * Origin: Semper Fi BBS  Ft. Wayne, IN  (219) 424-4292 (1:236/21)
  220.  
  221.  
  222.  
  223. ════════════════════════════════════════════════════════════════════════════════
  224.  Area:    QuickBasic
  225.   Msg:    #7113
  226.  Date:    03-20-93 00:55 (Public)
  227.  From:    STEVE DEMO
  228.  To:      ALL
  229.  Subject: Mview Code 3 Of 5
  230. ────────────────────────────────────────────────────────────────────────────────
  231. '>>> Start of page 3.
  232.  
  233.  
  234.     OPEN File$ FOR APPEND AS 1                          ' Test for file
  235. ' of
  236.     IF LOF(1) < 3 THEN                                  ' more than 1
  237. ' char
  238.        COLOR 31, 0                                       '|
  239.        LOCATE 20, 30                                     '|
  240.        PRINT "File NOT fouund"                           '+----->>+
  241.        PLAY "msL20<dBAGFED.>"                                    '|
  242.        SOUND 9000, 2                                             '|
  243.        CLOSE 1                                                   '|
  244.        KILL File$    '<-------------------------+          ' >----+---<
  245.        SLEEP 2                                 '|
  246.        EXIT SUB                                '+----->>  Kill that
  247. ' pesky
  248.     END IF                                               ' non-file
  249.     CLOSE 1
  250.     mouseon
  251.     COLOR 14, 0
  252.     LOCATE 19, 30
  253.     PRINT "Loading "; File$                             'Success
  254.     OPEN "I", 1, File$
  255.  
  256.     '$DYNAMIC
  257.     REDIM Seeks&(1 TO 29384)                 ' Max number of lines
  258. ' 29384
  259.     CurSeek& = 1                                '|
  260.     Numlines& = 0                               '|
  261.     DO UNTIL EOF(1)                             '|
  262.         LINE INPUT #1, Text$                    '|
  263.         Numlines& = Numlines& + 1              '/ \
  264.      IF Numlines& >= 32760 THEN          ' Stretch it just a hair with
  265.        COLOR 12                     ' The Error routine any more and
  266.        PRINT                        ' crash city. Allows atleast a
  267.                        ' 1 meg file
  268.        PRINT "File to large  Entire file NOT loaded"
  269.        COLOR 28
  270.        PRINT "press any key to continue"
  271.        PLAY "msL20<dBAGFED.>"
  272.        Press$ = INPUT$(1)
  273.        EXIT DO
  274.      END IF
  275.       LOCATE 22, 30
  276.       PRINT "Loading line:"; Numlines&
  277.       Seeks&(Numlines&) = CurSeek&         ' Save starting position
  278.       CurSeek& = CurSeek& + LEN(Text$) + 2 ' Next position - 2 is
  279.     LOOP                                     ' for C/R & LF
  280.     CurCol = 1                               ' Current Column
  281.     SeekEl = 1                               ' Current line
  282.     Escape = False
  283.  
  284.  
  285.     COLOR 0, 7                              'put final touch on screen
  286.     LOCATE 4, 1                             '+-------->>+
  287.     PRINT STRING$(80, " ");                            '|
  288.     LOCATE 41, 1                                       '|
  289.     PRINT STRING$(80, " ");                            '|
  290.     VIEW PRINT 5 TO 40                                 '|
  291.     mouseoff                                           '|
  292.     CLS 2                                        ' <----+---<
  293.     mouseon
  294.  
  295.     DO
  296.        GOSUB LoadAndDisplay
  297.        GOSUB KeyProcess
  298.     LOOP UNTIL Escape
  299.  
  300.     CLOSE 1
  301.     EXIT SUB                     ' were otta here
  302.  
  303. LoadAndDisplay:
  304.     SEEK #1, Seeks&(SeekEl)
  305.     FOR I = 5 TO 40
  306.     dummy$ = INKEY$                 'clear keyboard buffer
  307.     IF NOT EOF(1) THEN
  308.        LINE INPUT #1, Text$
  309.        Foundone = INSTR(Text$, CHR$(11))    'filter out ALL bad chars
  310.       IF Foundone THEN                      '+-------->>+
  311.            MID$(Text$, Foundone) = " "                 '|
  312.            Testit = LEN(Text$)                         '|
  313.            MID$(Text$, Foundone) = " "                 '|  No
  314.          FOR Dotest = 1 TO Testit                  '|
  315.             T$ = MID$(Text$, Dotest, 1)            '|     Runs
  316.                IF T$ = CHR$(11) THEN               '|
  317.                MID$(Text$, Dotest) = " "       '|   No
  318.                END IF                              '|
  319.          NEXT Dotest                               '|      Beeps
  320.           Foundone = 0                                 '|
  321.       END IF                                           '|   No
  322.     Foundone = INSTR(Text$, CHR$(7))                   '|
  323.       IF Foundone THEN                                 '|      Errors
  324.         Testit = LEN(Text$)                            '|
  325.  
  326. '>>> Continued on page 4.
  327.  
  328. ___ Blue Wave/QWK v2.11
  329.  
  330. --- Maximus 2.01wb
  331.  * Origin: Semper Fi BBS  Ft. Wayne, IN  (219) 424-4292 (1:236/21)
  332.  
  333.  
  334.  
  335. ════════════════════════════════════════════════════════════════════════════════
  336.  Area:    QuickBasic
  337.   Msg:    #7114
  338.  Date:    03-20-93 00:43 (Public)
  339.  From:    STEVE DEMO
  340.  To:      ALL
  341.  Subject: Mview Code 4 Of 5
  342. ────────────────────────────────────────────────────────────────────────────────
  343. '>>> Start of page 4.
  344.  
  345.         MID$(Text$, Foundone) = " "                    '|
  346.          FOR Dotest = 1 TO Testit                      '|  A little Slow
  347.           T$ = MID$(Text$, Dotest, 1)              '|  but I know No
  348.           IF T$ = CHR$(7) THEN                     '|  Better Way
  349.             MID$(Text$, Dotest) = " "              '|
  350.           END IF                                   '|
  351.           NEXT Dotest                                  '|       S
  352.       END IF                                           '|       U
  353.       Foundone = INSTR(Text$, CHR$(12))                '|       G
  354.       IF Foundone THEN                                 '|       G
  355.         MID$(Text$, Foundone) = " "                    '|       E
  356.         Testit = LEN(Text$)                            '|       S
  357.         MID$(Text$, Foundone) = " "                    '|       T
  358.          FOR Dotest = 1 TO Testit                      '|       I
  359.           T$ = MID$(Text$, Dotest, 1)              '|       O
  360.           IF T$ = CHR$(12) THEN                    '|       N
  361.             MID$(Text$, Dotest) = " "              '|       S
  362.           END IF                                   '|       ?
  363.           NEXT Dotest                                  '|END filter
  364.        Foundone = 0                                   ' +-------------<
  365.       END IF
  366.     ELSE
  367.     Text$ = ""
  368.     Text$ = SPACE$(80)
  369.     END IF
  370.       IF Text$ = "" THEN Text$ = SPACE$(80)
  371.      Strg$ = SPACE$(80)
  372.       IF LEN(Text$) < CurCol THEN Text$ = Text$ + SPACE$(CurCol -_
  373.  LEN(Text$))
  374.      LSET Strg$ = MID$(Text$, CurCol)
  375.      LOCATE I, 1
  376.      PRINT Strg$;
  377.     NEXT I
  378. RETURN
  379.  
  380. KeyProcess:
  381.  
  382.   Press$ = INKEY$
  383.    MouseStatus vert%, hor%, Mbuttons$
  384.     IF Mbuttons$ = "R" THEN
  385.       mouseoff
  386.       PCOPY 0, 3
  387.       COLOR 14, 4
  388.       LOCATE 17, 30
  389.       PRINT "+---------[ Info ]----------+";
  390.       LOCATE 18, 30
  391.       PRINT "| Only use Left Paw Please  |";
  392.       LOCATE 19, 30
  393.       PRINT "|                           |";
  394.       LOCATE 20, 30
  395.       PRINT "| Click Left button Please  |";
  396.  
  397.       LOCATE 21, 30
  398.       PRINT "+---------------------------+";
  399.        DO UNTIL Mbuttons$ = "L"
  400.           MouseStatus vert%, hor%, Mbuttons$
  401.        LOOP
  402.       COLOR 0, 7
  403.       PCOPY 3, 0
  404.       mouseon
  405.      END IF
  406.     IF Mbuttons$ = "L" THEN
  407.        IF vert% = 2 THEN
  408.           IF hor% >= 26 AND hor% <= 28 THEN Press$ = CHR$(27)   'esc
  409.           IF hor% >= 32 AND hor% <= 35 THEN Press$ = CHR$(0) + CHR$(73)_
  410.  'pgup
  411.           IF hor% >= 39 AND hor% <= 42 THEN Press$ = CHR$(0) + CHR$(81)_
  412.  'pgdn
  413.           IF hor% >= 45 AND hor% <= 47 THEN Press$ = CHR$(0) + CHR$(79)_
  414.  'end
  415.           IF hor% >= 50 AND hor% <= 53 THEN Press$ = CHR$(0) + CHR$(71)_
  416.  'home
  417.           IF hor% = 56 THEN Press$ = CHR$(0) + CHR$(72)     'up arrow
  418.           IF hor% = 59 THEN Press$ = CHR$(0) + CHR$(80)     'dn arrow
  419.           IF hor% = 62 THEN Press$ = CHR$(0) + CHR$(77)     'right arrow
  420.           IF hor% = 65 THEN Press$ = CHR$(0) + CHR$(75)     'left arrow
  421.           IF hor% >= 67 AND hor% < 72 THEN Press$ = "P"
  422.         ELSE
  423.           PLAY "msL64<dBAGFED.>"
  424.         END IF
  425.        END IF
  426.   IF Press$ = "" THEN GOTO KeyProcess
  427.     SELECT CASE UCASE$(Press$)
  428.     CASE CHR$(27)
  429.           GOTO Goodby    'Escape = true        ' ESC
  430.     CASE CHR$(0) + CHR$(72)             ' Up Arrow
  431.         SeekEl = SeekEl - 1
  432.          IF SeekEl < 1 THEN
  433.         SeekEl = 1
  434.         GOTO KeyProcess
  435.          END IF
  436.     CASE CHR$(0) + CHR$(80)             ' Dn Arrow
  437.  
  438. '>>> Continued on page 5.
  439.  
  440. ___ Blue Wave/QWK v2.11
  441.  
  442. --- Maximus 2.01wb
  443.  * Origin: Semper Fi BBS  Ft. Wayne, IN  (219) 424-4292 (1:236/21)
  444.  
  445.  
  446.  
  447. ════════════════════════════════════════════════════════════════════════════════
  448.  Area:    QuickBasic
  449.   Msg:    #7115
  450.  Date:    03-20-93 00:45 (Public)
  451.  From:    STEVE DEMO
  452.  To:      ALL
  453.  Subject: Mview Code 5 Of 5
  454. ────────────────────────────────────────────────────────────────────────────────
  455. '>>> Start of page 5.
  456.  
  457.         SeekEl = SeekEl + 1
  458.          IF SeekEl + 1 > Numlines& THEN
  459.            SeekEl = SeekEl - 1
  460.            GOTO KeyProcess
  461.          END IF
  462.      CASE CHR$(0) + CHR$(77)             ' Right Arrow
  463.         CurCol = CurCol + 1
  464.     CASE CHR$(0) + CHR$(75)             ' Left Arrow
  465.         CurCol = CurCol - 1
  466.          IF CurCol < 1 THEN
  467.            CurCol = 1
  468.            GOTO KeyProcess
  469.          END IF
  470.     CASE CHR$(0) + CHR$(73)             ' Page Up
  471.         SeekEl = SeekEl - 35
  472.          IF SeekEl < 1 THEN SeekEl = 1
  473.     CASE CHR$(0) + CHR$(81)             ' Page Dn
  474.         SeekEl = SeekEl + 35
  475.          IF SeekEl > Numlines& THEN
  476.         SeekEl = Numlines& - 34
  477.         GOTO KeyProcess
  478.          END IF
  479.     CASE CHR$(0) + CHR$(71)                       ' Home
  480.         SeekEl = 1
  481.     CASE CHR$(0) + CHR$(79)                       ' End
  482.         SeekEl = Numlines& - 34
  483.          IF SeekEl < 1 THEN
  484.            SeekEl = 1
  485.            GOTO KeyProcess
  486.          END IF
  487.     CASE "P"
  488.       ShellTemp$ = "type " + File$ + " >prn"   ' I know Basic can do
  489. ' this
  490.                            ' but NO need for error
  491.                            ' control with this way
  492.       PCOPY 0, 1                               ' Save Screen
  493.       CLS 2
  494.       LOCATE 20, 30
  495.       PRINT "Printing "; File$
  496.       LOCATE 22, 30
  497.       PRINT "Press Ctrl C to STOP printing"
  498.       PLAY "msL64<defgab.>"
  499.       SHELL ShellTemp$                          ' Print file
  500.       PLAY "msL64<dBAGFED.>"
  501.       PCOPY 1, 0                                ' Restore Screen
  502.     CASE ELSE
  503.         PLAY "msL64<dBAGFED.>"                  ' Wrong key Pressed
  504.         GOTO KeyProcess
  505.     END SELECT
  506. RETURN
  507.  
  508.  
  509. Goodby:
  510.     VIEW PRINT
  511.     ERASE Seeks&
  512.     CLOSE
  513.     EXIT SUB
  514. END SUB
  515.  
  516.  
  517. '________O_/________________________| SNIP |______________________\_O_______
  518. '        O \                        | HERE |                      / O
  519.  
  520.  
  521.  
  522. ... Do what you will with this tagline, just don't bother me about it!
  523. ___ Blue Wave/QWK v2.11
  524.  
  525. --- Maximus 2.01wb
  526.  * Origin: Semper Fi BBS  Ft. Wayne, IN  (219) 424-4292 (1:236/21)
  527.  
  528.  
  529.  
  530. ════════════════════════════════════════════════════════════════════════════════
  531.  Area:    QuickBasic
  532.   Msg:    #1532
  533.  Date:    03-22-93 10:52 (Public)
  534.  From:    JOE NEGRON
  535.  To:      CLAUDE SHERMAN
  536.  Subject: # of open files
  537. ────────────────────────────────────────────────────────────────────────────────
  538. CS> In my Qbasic manual it shows the limit for open files is
  539.   > 256, but when I try to open more than 15 files at the same
  540.   > time, I receive error 75 "file/path not valid". I have
  541.   > "files = 99" in my config.sys and "buffers = 17". Any idea
  542.   > why I get the error??? Any help would be appreciated.
  543.  
  544. This will fix it:
  545.  
  546. ============================== Begin code ==============================
  547. DEFINT A-Z
  548.  
  549. DECLARE FUNCTION SetMaxFiles% (NumFiles%)
  550.  
  551. '***********************************************************************
  552. '* FUNCTION SetMaxFiles%
  553. '*
  554. '* PURPOSE
  555. '*    Uses DOS ISR 21H, Function 67H (Set Maximum Handle Count) to set
  556. '*    the maximum number of handles.
  557. '*
  558. '* EXTERNAL ROUTINE(S)
  559. '*    QBX.LIB
  560. '*    -------
  561. '*    SUB Interrupt (IntNum%, IRegs AS RegType, ORegs AS RegType)
  562. '***********************************************************************
  563. FUNCTION SetMaxFiles% (NumFiles%) STATIC
  564.    IRegs.ax = &H6700
  565.    IRegs.bx = NumFiles%
  566.  
  567.    SetMaxFiles% = 0
  568.  
  569.    Interrupt &H21, IRegs, ORegs
  570.  
  571.    IF (ORegs.Flags AND 1) = 1 THEN
  572.       SetMaxFiles% = ORegs.ax                'Error number
  573.    END IF
  574. END FUNCTION
  575. =============================== End code ===============================
  576.  
  577. Unfortunately, I cannot get this to work with 4DOS, though it is a
  578. documented DOS interrupt.
  579.  
  580.           --Joe in Bay Ridge, Brooklyn, NY, Sun, 03-21-1993--
  581.  
  582. ... Man looks into the abyss, and sees himself.
  583. ___
  584.  X Blue Wave/QWK v2.12 X
  585.  
  586. --- Maximus 2.01wb
  587.  * Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709)
  588.  
  589.  
  590.  
  591. ════════════════════════════════════════════════════════════════════════════════
  592.  Area:    QuickBasic
  593.   Msg:    #1534
  594.  Date:    03-22-93 09:29 (Public)
  595.  From:    JOE NEGRON
  596.  To:      ALL
  597.  Subject: QB/PDS's future?
  598. ────────────────────────────────────────────────────────────────────────────────
  599. Hello all.
  600.  
  601. I am writing this in the hope of starting a "movement" to try and
  602. resurrect Microsoft's interest in continuing a DOS-based QB/PDS.  I've
  603. heard that Microsoft had originally intended to completely drop QB/PDS,
  604. but, based on pleas made by Ethan Winer of Crescent Software (and
  605. others), were convinced to continue to sell and support QB/PDS for a
  606. while.
  607.  
  608. While Microsoft has released VB/DOS Standard and VB/DOS Pro, many BASIC
  609. programmers are unhappy with these products.  First, they seem to be
  610. designed to urge programmers to move to Windows (many do not use
  611. Windows, and many who do, do not want to be "urged").  Second, VB/DOS
  612. does not address most of the features BASIC programmers have been
  613. requesting for years.
  614.  
  615. Well, I figure:
  616.  
  617.    1. Microsoft is a company that wants to make money.
  618.  
  619. and
  620.  
  621.    2. They just might be open to the idea of upgrading these products if
  622.       enough programmers let them know that it is what they want.
  623.  
  624. Pursuant to this goal, I would like to encourage all of you to send me a
  625. letter (addressed to Microsoft) in the following general form:
  626.  
  627. ============================== Begin text ==============================
  628.    [Your name]
  629.    [Your address]
  630.    [Your City, State  Zip-code]
  631.    [Your phone number]
  632.  
  633.    Microsoft Corporation
  634.    Attn: BASIC Language Division
  635.    1 Microsoft Way
  636.    Redmond, Washington  98073-9902
  637.  
  638.    [Date]
  639.  
  640.    Dear Sir/Madam:
  641.  
  642.    This purpose of this letter is to express my desire for the
  643.    continuation and upgrade of Microsoft QuickBASIC 4.5 and Microsoft
  644.    Professional Development System 7.1.
  645.  
  646.    The features I would like to see in QB 5.0/PDS 8.0:
  647.  
  648.       . [list the features you would like to see...follows are some of
  649.         mine]
  650.       . Byte data type
  651.       . 386 code generation
  652.  
  653.       . "Smart" linking
  654.       . ISAM network compatibility
  655.       . OS/2 code generation
  656.       . Unions
  657.       . Pointers
  658.       . Better array operations, such as inserting, deleting, sorting
  659.         array elements.
  660.       . Bit operations - shift, rotate, test, set, reset, toggle.
  661.       . The ability for PEEK/POKE to read more than one byte at a
  662.         time as well as the ability to specify the segment as well as
  663.         the offset.  For example:
  664.  
  665.            X$ = PEEK(0000,1234,1)        'read 1 byte
  666.         or
  667.            X$ = PEEK(0000,1234,10)       'read 10 bytes
  668.       . Inline ASM
  669.  
  670.                                 Sincerely,
  671.  
  672.                                 _______________________
  673.                                 [Your name]
  674. =============================== End text ===============================
  675.  
  676. Of course, you may say whatever you like, but I offer the above as a
  677. "template" to make it easier for those who don't wish to take the time
  678. to compose their own letters.
  679.  
  680. Also, please make sure you sign your letters.  I feel this adds some
  681. credibility to this campaign.
  682.  
  683. Any interested parties, please send me your letters at the following
  684. address:
  685.  
  686.    Joe Negron
  687.    48 Gatling Place
  688.    Brooklyn, NY  11209-6006
  689.  
  690. Once I have received a sufficient number of letters, I will forward them
  691. to Microsoft (delivered directly to the head of the BASIC language
  692. division via FedEx) along with a cover letter listing the names of all
  693. who sent letters.
  694.  
  695. Please, send me your letters!
  696.  
  697.           --Joe in Bay Ridge, Brooklyn, NY, Mon, 03-22-1993--
  698.  
  699. ... There are myriad ways to remove the epidermis of felines.
  700. ___
  701.  X Blue Wave/QWK v2.12 X
  702.  
  703. --- Maximus 2.01wb
  704.  * Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709)
  705.  
  706.  
  707.  
  708. ════════════════════════════════════════════════════════════════════════════════
  709.  Area:    QuickBasic
  710.   Msg:    #1933
  711.  Date:    03-23-93 00:00 (Public)
  712.  From:    STAN FOY
  713.  To:      STEVE PERRY
  714.  Subject: MAXIMUS BBS
  715. ────────────────────────────────────────────────────────────────────────────────
  716.  -=> Quoting Steve Perry to All <=-
  717.  
  718.  SP> Has anyone out there done any Quickbasic programming with Maximus
  719.  SP> BBS? Specifically, I need to know the record structure for the user.bbs
  720.  SP> and lastuser.bbs files. Any other info about Maximus would be
  721.  SP> appreciatred also!
  722.  
  723. Steve
  724.   Here's what I have used previously for the USER.BBS file.  Hope it helps.
  725.  
  726. ============================= Cut Here ================================
  727. TYPE UserRec                    '   Bytes:
  728.    Name        AS STRING * 36   '   1 -  36
  729.    City        AS STRING * 36   '  37 -  72
  730.    Alias       AS STRING * 21   '  73 -  93
  731.    Phone       AS STRING * 15   '  94 - 108
  732.    LastRead    AS INTEGER       ' 109 - 110
  733.    TimeRemain  AS INTEGER       ' 111 - 112
  734.    Password    AS STRING * 16   ' 113 - 128
  735.    TimesCalled AS INTEGER       ' 129 - 130
  736.    Help        AS STRING * 1    ' 131 - 131
  737.    Rsvd1       AS STRING * 2    ' 132 - 133
  738.    Video       AS STRING * 1    ' 134 - 134
  739.    Nulls       AS STRING * 1    ' 135 - 135
  740.    Bits1       AS STRING * 1    ' 136 - 136
  741.    Rsvd2       AS STRING * 2    ' 137 - 138
  742.    Bits2       AS INTEGER       ' 139 - 140
  743.    Priv        AS STRING * 1    ' 141 - 141
  744.    Rsvd3       AS STRING * 19   ' 142 - 160
  745.    StructLen   AS STRING * 2    ' 161 - 162
  746.    OnLineTime  AS INTEGER       ' 163 - 164
  747.    DelFlag     AS INTEGER       ' 165 - 166
  748.    Rsvd4       AS STRING * 8    ' 167 - 174
  749.    ScrWidth    AS STRING * 1    ' 175 - 175
  750.    ScrLength   AS STRING * 1    ' 176 - 176
  751.    Credit      AS INTEGER       ' 177 - 178
  752.    Debit       AS INTEGER       ' 179 - 180
  753.    XPriv       AS STRING * 2    ' 181 - 182
  754.    XPDate      AS INTEGER       ' 183 - 184
  755.    XPTime      AS INTEGER       ' 185 - 186
  756.    XMins       AS LONG          ' 187 - 190
  757.    XFlags      AS STRING * 1    ' 191 - 191
  758.    XReserved   AS STRING * 1    ' 192 - 192
  759.    LUDate      AS INTEGER       ' 193 - 194
  760.    LuTime      AS INTEGER       ' 195 - 196
  761.    UserKeys    AS STRING * 4    ' 197 - 200
  762.    Language    AS STRING * 1    ' 201 - 201
  763.    Protocol    AS STRING * 1    ' 202 - 202
  764.    KUpload     AS LONG          ' 203 - 206
  765.    KDnload     AS LONG          ' 207 - 210
  766.    KDnloadTdy  AS LONG          ' 211 - 214
  767.    LMsgArea    AS STRING * 10   ' 215 - 224
  768.    LFilArea    AS STRING * 10   ' 225 - 234
  769.  
  770.    Compress    AS STRING * 1    ' 235 - 235
  771.    Rsvd5       AS STRING * 1    ' 236 - 236
  772.    Extra       AS STRING * 4    ' 237 - 240
  773. END TYPE
  774.  
  775. DIM User AS UserRec
  776. ============================= Cut Here ================================
  777. Stan
  778. ___ Blue Wave/QWK v2.12
  779.  
  780. --- Maximus 2.01wb
  781.  * Origin: CPU Etc. BBS--Colorado Springs, CO  (719)597-3723 (1:128/128)
  782.  
  783.  
  784.  
  785. ════════════════════════════════════════════════════════════════════════════════
  786.  Area:    QuickBasic
  787.   Msg:    #2620
  788.  Date:    03-24-93 13:31 (Public)
  789.  From:    EARL MONTGOMERY
  790.  To:      ALL
  791.  Subject: Interrupts
  792. ────────────────────────────────────────────────────────────────────────────────
  793. rem The following is an interactive program to help
  794. rem programmers understand how interrupts work within
  795. rem Quick Basic. It is intended for those new to
  796. rem interrupts but may help even the more experienced.
  797. rem Part 1 of 3 parts
  798.  
  799. '$INCLUDE: 'qb.bi'
  800. DIM inregs AS regtypex, outregs AS regtypex
  801. CLS
  802. LOCATE 1, 1: PRINT "For those of you that have mastered the use ";
  803. PRINT "of interrupts, read no further!";
  804. LOCATE 2, 1: PRINT "However if you are like me and still";
  805. PRINT " struggling you might find this interesting.";
  806. LOCATE 3, 1: PRINT "First off whenever you use an interrupt with";
  807. PRINT " QB you need to load QB/L.";
  808. LOCATE 4, 1: PRINT "This loads the QB.QLB library which contains";
  809. PRINT " the code needed to use interrupts.";
  810. LOCATE 5, 1: PRINT "Now you are ready to program! Your first";
  811. PRINT " entry should be '$INCLUDE: 'QB.BI'";
  812. LOCATE 6, 1: PRINT "This file contains the TYPE and Data";
  813. PRINT " structure to be used.";
  814. LOCATE 7, 1: PRINT "List QB.BI from DOS and you will see there ";
  815. PRINT "are two types defined.";
  816. LOCATE 8, 1: PRINT "RegType and RegTypeX. Notice that both are ";
  817. PRINT "identical except that";
  818. LOCATE 9, 1: PRINT "RegTypeX allows the use of the ES and DS ";
  819. PRINT "segment registers.";
  820. LOCATE 10, 1: PRINT "Your next entry should be: DIM inregs as ";
  821. PRINT "regtypex,outregs as regtypex";
  822. LOCATE 11, 1: PRINT "Now we need to call an interrupt. If you ";
  823. PRINT "have the DOS programmers manual";
  824. LOCATE 12, 1: PRINT "look at interrupt &h21 function &h19. This ";
  825. PRINT "interrupt gets the Default";
  826. LOCATE 13, 1: PRINT "Drive and returns the info in AL of register";
  827. PRINT " AX. If AL returns a 0 this";
  828. LOCATE 14, 1: PRINT "represents Drive A. If AL returns a 1 then ";
  829. PRINT "this represents drive B. If AL";
  830. LOCATE 15, 1: PRINT "returns a 2 this represents Drive C and so on."
  831. LOCATE 16, 1: PRINT "Now we need to put something in register AX";
  832. PRINT " and that is the function &H19.";
  833. LOCATE 17, 1: PRINT "INREGS.AX=&H1900"
  834. LOCATE 18, 1: PRINT "Now we call the interrupt."
  835. LOCATE 19, 1: PRINT "CALL INTERRUPTX(&h21,INREGS,OUTREGS)"
  836. LOCATE 23, 28: PRINT "Press any key to continue."
  837. WAIT1:
  838. I$ = INKEY$: IF I$ = "" THEN GOTO WAIT1
  839. CLS
  840. LOCATE 1, 1: PRINT "OK the DOS programmers manual said that the ";
  841. PRINT "info would be returned in AL.";
  842. LOCATE 2, 1: PRINT "How do we read AL from register AX? Use this";
  843. PRINT " formula:";
  844. LOCATE 3, 1: PRINT "AL=AX AND &HFF (More on these formulas later.)"
  845. LOCATE 4, 1: PRINT "PRINT AL"
  846.  
  847. LOCATE 5, 1: PRINT : PRINT "Let's put everything together and ";
  848. PRINT "see what we have.";
  849. LOCATE 7, 1: PRINT "'$include: 'Qb.BI'"
  850. LOCATE 8, 1: PRINT "DIM inregs AS RegTypeX,outregs AS RegTypeX"
  851.  
  852. rem end of part one
  853.  
  854. --- Maximus 2.01wb
  855.  * Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
  856.  
  857.  
  858.  
  859. ════════════════════════════════════════════════════════════════════════════════
  860.  Area:    QuickBasic
  861.   Msg:    #2621
  862.  Date:    03-24-93 13:34 (Public)
  863.  From:    EARL MONTGOMERY
  864.  To:      ALL
  865.  Subject: Interrupts
  866. ────────────────────────────────────────────────────────────────────────────────
  867. REM Part 2 of 3 parts
  868.  
  869. LOCATE 9, 1: PRINT "inregs.ax=&h1900"
  870. LOCATE 10, 1: PRINT "CALL INTERRUPTX(&h21,INREGS,OUTREGS)"
  871. LOCATE 11, 1: PRINT "AX = (outregs.ax)"
  872. LOCATE 12, 1: PRINT "AL=AX AND &Hff"
  873. LOCATE 13, 1: PRINT "PRINT AL"
  874. LOCATE 14, 1: PRINT "Now let's actually run this program. Ready?";
  875. PRINT " Here goes!";
  876. inregs.AX = &H1900
  877. CALL interruptx(&H21, inregs, outregs)
  878. loop1:
  879. LOCATE 15, 28: PRINT "Press any key to continue."
  880. I$ = INKEY$: IF I$ = "" THEN GOTO loop1
  881. REM Formula to find AL.
  882. AX = (outregs.AX)
  883. AL = AX AND &HFF
  884. REM Looking for a 2 in AL (My default drive is C)
  885. PRINT AL
  886. LOCATE 19, 1: PRINT "Well I got a 2 because my default drive is ";
  887. PRINT "C. How about you?";
  888. LOCATE 23, 28: PRINT "Press any key to continue."
  889. wait2:
  890. I$ = INKEY$: IF I$ = "" THEN GOTO wait2
  891. CLS
  892. LOCATE 1, 28: PRINT "Formulas to read AH and AX."
  893. LOCATE 2, 1: PRINT "Now let's see how we can read AH."
  894. LOCATE 3, 1: PRINT "To find AH the formula is ";
  895. PRINT "AH=(AX AND &HFF00)/256";
  896. LOCATE 4, 1: PRINT "Let's run it and see what we get."
  897. LOCATE 5, 28: PRINT "Press any key to continue."
  898. loop3:
  899. I$ = INKEY$: IF I$ = "" THEN GOTO loop3
  900. AH = (AX AND &HFF00) / 256
  901. PRINT AH
  902. LOCATE 7, 1: PRINT "I got 25. How about you?"
  903. PRINT
  904. LOCATE 10, 1: PRINT "Well we know the value of AL and AH. With ";
  905. PRINT "these two values";
  906. LOCATE 11, 1: PRINT "we can find out what is in AX. The formula ";
  907. PRINT "is AX=(256*ah)+AL";
  908. LOCATE 12, 1: PRINT "In my case AL was 2 and AH was 25. So 256 *";
  909. PRINT " 25 <val in AH> + 2 <val> in AL=6402";
  910. LOCATE 13, 1: PRINT "Let's run it and see what we get."
  911. AX = (256 * AH) + AL
  912. LOCATE 14, 28: PRINT "Press any key to continue."
  913. loop4:
  914. I$ = INKEY$: IF I$ = "" THEN GOTO loop4
  915. PRINT AX
  916. LOCATE 17, 1: PRINT "My values matched how about yours?"
  917. LOCATE 23, 28: PRINT "Press any key to continue."
  918. loop5:
  919. I$ = INKEY$: IF I$ = "" THEN GOTO loop5
  920.  
  921. CLS
  922. LOCATE 1, 1: PRINT "But someone is saying <But we put &h19> in ";
  923. PRINT "AX how can it contain 6402!";
  924. LOCATE 2, 1: PRINT "Did I mention the AX,BX,CX and DX registers ";
  925. PRINT "are 16 bit registers?";
  926.  
  927. rem End of part 2 of 3 parts
  928.  
  929. --- Maximus 2.01wb
  930.  * Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
  931.  
  932.  
  933.  
  934. ════════════════════════════════════════════════════════════════════════════════
  935.  Area:    QuickBasic
  936.   Msg:    #2622
  937.  Date:    03-24-93 13:35 (Public)
  938.  From:    EARL MONTGOMERY
  939.  To:      ALL
  940.  Subject: Interrupts
  941. ────────────────────────────────────────────────────────────────────────────────
  942. Part 3 of 3 parts
  943.  
  944. LOCATE 3, 1: PRINT "This means AX is composed of two 8 bit ";
  945. PRINT "registers AL & AH";
  946. LOCATE 4, 1: PRINT "Remember we put &H19 in AH and AL returned a";
  947. PRINT " &h2. Therefore AX contains";
  948. LOCATE 5, 1: PRINT "&H1902. And if you do a PRINT &H1902 you get ";
  949. PRINT "6402. I am printing all";
  950. LOCATE 6, 1: PRINT "values in decimal. Anyway, let's print it now."
  951. LOCATE 8, 28: PRINT "Press any key to continue"
  952. loop6:
  953. I$ = INKEY$: IF I$ = "" THEN GOTO loop6
  954. PRINT &H1902
  955. PRINT "Your value may differ depending on your default drive."
  956. LOCATE 23, 28: PRINT "Press any key to continue."
  957. loop7:
  958. I$ = INKEY$: IF I$ = "" THEN GOTO loop7
  959. CLS
  960. LOCATE 1, 1: PRINT "I hear someone saying <My books show AL on ";
  961. PRINT "the left and AH on the right.>";
  962. LOCATE 2, 1: PRINT "Then why doesn't AX contain &h0219 instead ";
  963. PRINT " of &h1902?";
  964. LOCATE 3, 1: PRINT "My reference books show the same thing and ";
  965. PRINT "that is confusing to me too.";
  966. LOCATE 4, 1: PRINT "But trust me for now AH is on the left and AL";
  967. PRINT " is on the right. Maybe someone";
  968. LOCATE 5, 1: PRINT "can shed some light on why the progrmming ";
  969. PRINT "books show examples with AL on the";
  970. LOCATE 6, 1: PRINT "left and AH on the right."
  971. LOCATE 8, 1: PRINT "How would you like to see how the bit wise ";
  972. PRINT "AND operation with";
  973. LOCATE 9, 1: PRINT "&Hff allows us to read the value in AL? Hey!";
  974. PRINT " Where is everyone going!?";
  975. LOCATE 10, 1: PRINT "Class hasn't been dismissed! Hey come back!";
  976. PRINT " Well for those of you who";
  977. LOCATE 11, 1: PRINT "stayed it is very very simple: The AND &Hff";
  978. PRINT " (255) or binary 11111111 "
  979. LOCATE 12, 1: PRINT "sets all the bits in AH to 0. Therefore all ";
  980. PRINT "we have left is what is in AL."
  981. PRINT "Neat huh?"
  982. LOCATE 14, 1: PRINT "Class is now dismissed."
  983. locate 15,1:print"Your instructor was Earl Montgomery"
  984. LOCATE 23, 28: PRINT "Press any key to continue."
  985. loop8:
  986. I$ = INKEY$: IF I$ = "" THEN GOTO loop8
  987. END
  988. rem final part of 3 parts
  989.  
  990. --- Maximus 2.01wb
  991.  * Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
  992.  
  993.  
  994.  
  995. ════════════════════════════════════════════════════════════════════════════════
  996.  Area:    QuickBasic
  997.   Msg:    #1834
  998.  Date:    03-23-93 12:09 (Public)
  999.  From:    RICK PEDLEY
  1000.  To:      GILBERT VELEZ
  1001.  Subject: Flickering images
  1002. ────────────────────────────────────────────────────────────────────────────────
  1003.  On 03-19-93 Gilbert Velez wrote to All...
  1004.  
  1005.  GV>     I need some help. I cant seem to get and put Images
  1006.  GV> without the Flickering affect. So HELP! I Need some body,
  1007.  GV> HELP! I Need any Body. H E L P!!!!!!!!!
  1008.  
  1009. Try inserting this line just before you draw the new image:
  1010.  
  1011. 'Wait for vertical retrace to reduce flicker
  1012. WAIT &H3DA, 8
  1013.  
  1014. ..courtesy of Rich Geldreich.
  1015.  
  1016.  
  1017. ... OFFLINE 1.50
  1018.  
  1019. --- Maximus 2.01wb
  1020.  * Origin: BULLpen BBS * USR DS 16.8/FAX & ASL (613)549-5168 (1:249/140)
  1021.  
  1022.  
  1023.  
  1024. ════════════════════════════════════════════════════════════════════════════════
  1025.  Area:    QuickBasic
  1026.   Msg:    #1839
  1027.  Date:    03-25-93 11:32 (Public)
  1028.  From:    DIK COATES
  1029.  To:      ROBERT CHURCH
  1030.  Subject: Disk not ready, and gene
  1031. ────────────────────────────────────────────────────────────────────────────────
  1032. >>>> QUOTING Robert Church to All <<<<
  1033.  
  1034.  RC> isn't there the system locks up!  I don't wan't to use error trapping
  1035.  
  1036. I don't know how you can do it in BASIC... but the routine I use with my
  1037. asm based basic library does the following...
  1038.  
  1039. .Code
  1040.  
  1041. oldint      dw    ?                        ;variable stashed in CS
  1042. buff80      db    80 dup(?)                ;80 byte buffer for strings
  1043.  
  1044.  
  1045.  
  1046. DisableInt  MACRO
  1047.             mov   ax, 3524h                ;DOS get int 24h vector
  1048.             int   21h
  1049.             mov   ax, es:[bx]
  1050.             mov   cs:oldint, ax
  1051.             mov   byte ptr es:[bx], 00CFh  ;replace it with IRET call
  1052.             endm
  1053.  
  1054.  
  1055.  
  1056. EnableInt   MACRO
  1057.             push  ax
  1058.             push  bx
  1059.             push  es
  1060.             mov   ax, 3524h                ;DOS get int 24h vector
  1061.             int   21h
  1062.             mov   ax, cs:oldint
  1063.             mov   es:[bx], ax              ;restore old value
  1064.             pop   es
  1065.             pop   bx
  1066.             pop   ax
  1067.             endm
  1068.  
  1069.  
  1070.              . . .
  1071.  
  1072.  
  1073. The macros work basically as follows... Int 24h is the critical error handler
  1074. address... and calling Int 35h gets the interrupt vector... The old value for
  1075. the interrupt vector is saved to 'oldint' and a new value is put in place...
  1076. 00CFh... this is the machine code for and Interrupt Return.  When a critical
  1077. hardware error is encountered the call goes out to int24 and is immediately
  1078. returned to the program that had the error... in addition, and software
  1079. critical error code is generally returned as part of the failed call... The
  1080. code I use between DisableInt and EnableInt is ASM stuff... and I'm not sure
  1081. if the above macros can be converted to calls in a library... (I don't see why
  1082. they can't) For as long as the interrupt is redirected, there is no critical
  1083. hardware error capability... and it should be enabled ASAP...
  1084.  
  1085.  
  1086. Hope this helps, and doesn't really confuse you... Maybe Casey can add a
  1087. couple of comments...
  1088.  
  1089. Regards Dik
  1090.  
  1091. ... Replied Cleopatra unto Caesar:  Vidi. Teenie Weenie Venit. -DM
  1092. ___ Blue Wave/QWK v2.10
  1093.  
  1094. --- Maximus 2.01wb
  1095.  * Origin: Durham Systems (ONLINE!) (1:229/110)
  1096.  
  1097.  
  1098.  
  1099. ════════════════════════════════════════════════════════════════════════════════
  1100.  Area:    QuickBasic
  1101.   Msg:    #1844
  1102.  Date:    03-25-93 14:29 (Public)
  1103.  From:    DIK COATES
  1104.  To:      ALL
  1105.  Subject: Sorting
  1106. ────────────────────────────────────────────────────────────────────────────────
  1107. - Area: Quik_Bas -------------------------------------------------------------
  1108.   Msg#: 290                                          Date: 03-23-93  18:43
  1109.   From: Leonard Erwine                               Read: Yes    Replied: No
  1110.     To: Daniel Stasinski                             Mark:
  1111.  
  1112.   Subj: Re: did i make it up?
  1113. ___---------------------------------------------------------------------------
  1114. Yeah, those recursive sorting algorythms can eat up alot of
  1115. stack space and also dynamic memory space.  I never did
  1116. like shell sorting algorythms anyway.
  1117.  
  1118. This shell sort is non-recursive...
  1119.  
  1120. '******************************************************* SUBPROGRAM ShellSort
  1121. '
  1122. '   Procedure uses the Shell-Metzger algorithm for sorting an array of string
  1123. '   variables.  Adapted from an article by Donald Shell and disassembled IBM
  1124. '   360 machine language.  This sorting algorithm is extremely efficient for
  1125. '   sorting small and medium sized arrays.
  1126. '
  1127. '   PARAMETERS: col0% = number of elements in the string array array$()
  1128. '               array$() = string variable array to be sorted.
  1129. '   RETURNS:    array$() = sorted string variable array
  1130. '
  1131. '   Released to Public Domain, 1993, by R.A. Coates
  1132. '
  1133. SUB ShellSort (col0%, array$())
  1134.     col1% = col0%
  1135.  
  1136.     WHILE col1%
  1137.       col1% = col1% \ 2
  1138.       col2% = col0% - col1%
  1139.  
  1140.       FOR count% = 1 TO col2%
  1141.         col3% = count%
  1142. sort1:
  1143.         col4% = col3% + col1%
  1144.         IF array$(col3%) <= array$(col4%) THEN
  1145.           GOTO sort2
  1146.         ELSE
  1147.           SWAP array$(col3%), array$(col4%)
  1148.           col3% = col3% - col1%
  1149.         END IF
  1150.  
  1151.         IF col3% > 0 THEN
  1152.           GOTO sort1
  1153.         END IF
  1154. sort2:
  1155.       NEXT count%
  1156.     WEND
  1157. END SUB
  1158.  
  1159. It was done many years back... and if you ignore the goto's (actually,
  1160.  
  1161. they're the fastest way to get somewhere!) you'll find it really quite
  1162. fast...
  1163.  
  1164. Regards Dik, Oshawa, Canada
  1165.  
  1166. ... "Hey!  Who took the cork off my lunch??!"
  1167. ___ Blue Wave/QWK v2.10
  1168.  
  1169. --- Maximus 2.01wb
  1170.  * Origin: Durham Systems (ONLINE!) (1:229/110)
  1171.  
  1172.  
  1173.  
  1174. ════════════════════════════════════════════════════════════════════════════════
  1175.  Area:    QuickBasic
  1176.   Msg:    #2183
  1177.  Date:    03-25-93 11:39 (Public)
  1178.  From:    RICH GELDREICH
  1179.  To:      CALVIN FRENCH
  1180.  Subject: Pallete shifting, gif
  1181. ────────────────────────────────────────────────────────────────────────────────
  1182. > Hi everybody! TD2.0 is just about done with the exception of
  1183. > palette support and GIF cropping. Sooo... i need to know if
  1184. > anyone out there knows just how to read the palette values (red,
  1185. > green, blue) from memory (o yeah, I'm using screen 13).
  1186.  
  1187.     To read the palette values, you can either call BIOS or do some
  1188. IN's. BIOS is easy, but I don't like it. The following code will read
  1189. the RGB values for palettes 16-256:
  1190.  
  1191.     DIM R(255),G(255),B(255)
  1192.  
  1193.     OUT &H3C7,16 ' Tell VGA we want to start reading from col. 16
  1194.     FOR A=16 TO 256
  1195.          R(A)=INP(&H3C9)
  1196.          G(A)=INP(&H3C9)
  1197.          B(A)=INP(&H3C9)
  1198.     NEXT
  1199.  
  1200.     That's off the top of my head, but it should work. Just OUT the
  1201. first index to &H3C7, and read the RGB values from &H3C9. You don't have
  1202. to constantly OUT to &H3C7 because the VGA can pass them to you in
  1203. order.
  1204.  
  1205. > Secondly, if anyone out there has some good code for reading
  1206. > GIFs, could you give it to me?? (smile) I had a look at Rich's
  1207. > (hail Rich, master Guru of Graphics (3d esp), hail Rich! Long
  1208. > live king Richard! (that is, Geldrich). Long live the master of
  1209. > QB!) code but, unfortunatly, I have been unable to convert it
  1210. > into a SUB, which is basically what I need. So, Rich, in regards
  1211.  
  1212.     If you give me a call I'm sure I could fix you up with something
  1213. that you would find most useful...
  1214.  
  1215.     I've written some GIF subs in the past, but I've sinced looked at
  1216. the GIF89a spec and noticed that my subs didn't follow the standard as
  1217. closely as they should. I'll fix that up sooner or later. I *do* have a
  1218. GIF89a GIF decoder in QB, which is pretty fast, but it's not in a
  1219. callable sub.
  1220.  
  1221.     Rich
  1222.  
  1223. --- MsgToss 2.0b
  1224.  * Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)
  1225.  
  1226.  
  1227.