home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / qbnewsl / qbnws105 / qbnws105.nws
Text File  |  1990-12-01  |  97KB  |  2,317 lines

  1.      Volume  1, Number  5                                 December  1, 1990
  2.  
  3.      
  4.      
  5.      
  6.      
  7.      
  8.      
  9.      
  10.      
  11.      
  12.      
  13.      
  14.      
  15.                    **************************************************
  16.                    *                                                *
  17.                    *                    QBNews                      *
  18.                    *                                                *
  19.                    *      International QuickBASIC Electronic       *
  20.                    *                  Newsleter                     *
  21.                    *                                                *
  22.                    *    Dedicated to promoting QuickBASIC around    *
  23.                    *                  the world                     *
  24.                    *                                                *
  25.                    **************************************************
  26.      
  27.      
  28.      
  29.      
  30.      
  31.      
  32.      
  33.      
  34.      
  35.      
  36.      
  37.      
  38.      
  39.      
  40.      
  41.      
  42.         The  QBNews  is  an electronic newsletter  published  by  Clearware
  43.      Computing. It can be freely distributed providing NO CHARGE is charged
  44.      for  distribution.  The  QBNews is copyrighted in  full  by  Clearware
  45.      Computing.  The  authors  hold  the  copyright  to  their   individual
  46.      articles.  All program code appearing in QBNews is released  into  the
  47.      public  domain.   You  may  do what you  wish  with  the  code  except
  48.      copyright  it.  QBNews  must  be  distributed  whole  and  unmodified.
  49.      
  50.      You can write The QBNews at:
  51.      
  52.           The QBNews
  53.           P.O. Box 507
  54.           Sandy Hook, CT 06482
  55.      
  56.      Copyright (c) 1990 by Clearware Computing.
  57.      
  58.      The QBNews                                                   Page    i
  59.      Volume  1, Number  5                                 December  1, 1990
  60.  
  61.      
  62.  
  63.      ----------------------------------------------------------------------
  64.  
  65.                         T A B L E   O F   C O N T E N T S
  66.  
  67.      
  68.      1.  From the Editor's Desk
  69.           And the winner is . . . ......................................  1
  70.  
  71.      2.  Beginners Corner
  72.           Common Questions about QuickBASIC by Tom Hanlin ..............  2
  73.           How to use Libraries in QuickBASIC by Tom Hanlin .............  4
  74.  
  75.      3.  Advertisement
  76.           Crescent Software, 32 Seventy Acres, West Redding, CT  06896 .  6
  77.  
  78.      4.  Swap Shop
  79.           Graphics and text screen dumps by Alan J. Fridlund, Ph.D. ....  7
  80.           Saving and loading .PCX files for EGA screen 9 by Greg Harder   9
  81.           Getting the .PCX palette info by Dwain Goforth ............... 11
  82.           DBase III file viewer by David Perry ......................... 11
  83.           A Quick Basic archive file viewer by Dick Dennison ........... 12
  84.  
  85.      5.  Who ya gonna call? CALL INTERRUPT
  86.           Format Floppy Disks with QB  by Cornel Huth .................. 12
  87.  
  88.      6.  Power Programming
  89.           Scenic Views by way of the Video Map by Larry Stone .......... 14
  90.           Self-Cloning Exe's Revisted by Ronny Ong ..................... 18
  91.  
  92.      7.  Engineers Corner
  93.           GPIB Instrument control from IOTech by Dave Cleary ........... 20
  94.  
  95.      8.  New and Noteworthy
  96.           GEOGRAF Level One from GEOCOMP Corporation ................... 24
  97.  
  98.      9.  And I Heard it Through the Grapevine
  99.           Exerpts from the QUIK_BAS echo ............................... 25
  100.  
  101.      10.  EOF
  102.           Receiving The QBNews ......................................... 36
  103.           Advertising in The QBNews .................................... 37
  104.           Submitting Articles to The QBNews ............................ 37
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.      The QBNews                                                   Page   ii
  118.      Volume  1, Number  5                                 December  1, 1990
  119.  
  120.  
  121.  
  122.      ----------------------------------------------------------------------
  123.                    F r o m   t h e   E d i t o r ' s   D e s k
  124.      ----------------------------------------------------------------------
  125.  
  126.      And the winner is . . .
  127.      
  128.           The  winner  of the QBNews Reader Contest was  Bruce  Guthrie  of
  129.      Silver  Spring,  MD. I'd like to say congratulations to  Bruce  and  I
  130.      would like to thank all those who entered. I was disappointed with the
  131.      quantity of entries, but not with the quality. I received entries from
  132.      all over the U.S. and Canada plus three other continents. It makes  me
  133.      happy  to  see  that  all the hard work the  authors  put  into  their
  134.      articles is appreciated.
  135.      
  136.           This marks the last issue of volume one. I have decided to commit
  137.      to  one  more  year of putting out the QBNews, so I  am  going  to  be
  138.      offering  subscriptions  for  volume two. I don't  have  the  time  to
  139.      process  disk  orders  as they come in, so volume  two  will  only  be
  140.      available on disk by buying a whole subscription. Details of this  can
  141.      be  found  in the back of the newsletter. Of course, the  QBNews  will
  142.      still be distributed free through BBS's.
  143.      
  144.           As  always,  the QBNews is looking for new authors. I  find  that
  145.      most  of the submissions I receive are a result of direct requests  to
  146.      the author from me. I am running out of people I can coerce (er ...  I
  147.      mean ask) to write articles. Please support the QBNews by contributing
  148.      your  time  and effort into writing articles.  Details  on  submitting
  149.      articles can be found in the back of the newsletter.
  150.      
  151.                     Dave Cleary
  152.      
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.      The QBNews                                                     Page  1
  177.      Volume  1, Number  5                                 December  1, 1990
  178.  
  179.  
  180.  
  181.      ----------------------------------------------------------------------
  182.                          B e g i n n e r s   C o r n e r
  183.      ----------------------------------------------------------------------
  184.  
  185.      Common Questions about QuickBASIC by Tom Hanlin
  186.      
  187.      After  spending much time on CompuServe, BIX, the  FidoNet  QuickBASIC
  188.      echo and other national BASIC forums, I've noticed that there is a lot
  189.      of  repetition. People ask the same questions, time after time.   They
  190.      must  be  good questions! Here is a compilation of a few of  the  more
  191.      common questions.
  192.      
  193.      Question: How can I disable Control-Break?
  194.      
  195.      Answer: Programs compiled with QuickBASIC or BASCOM usually don't have
  196.      to  worry  about this.  Control-Break is disabled unless  you  compile
  197.      with the /D (debug) option.  In the event that you are doing something
  198.      that  QuickBASIC  doesn't  completely control, like  printing  to  the
  199.      screen  via DOS functions, this protection no longer holds.   In  that
  200.      case, you may be able to disable Break by getting DOS to check for  it
  201.      less  frequently.   Use the command BREAK OFF from a  batch  file,  or
  202.      execute it from BASIC like so: SHELL "COMMAND BREAK OFF"
  203.      
  204.      Question:  How can I get the error level from a SHELLed program?   How
  205.      can I get my program to return an error level?
  206.      
  207.      Answer: You can't.  More accurately, you can only do it with  assembly
  208.      language routines.
  209.      
  210.      Question: How can I get a directory listing into an array?
  211.      
  212.      Answer:  Most BASIC libraries can do this for you.  Another way to  do
  213.      this is to put the directory listing into a file by SHELL "COMMAND DIR
  214.      *.*  >DIRLIST.TXT" and then read the file into an array.  Yet  another
  215.      alternative  is to use the FILES statement on a  non-displayed  screen
  216.      page  (if  you have a CGA, EGA or VGA) or in  invisible  colors  (say,
  217.      black  on black), then get the results off the screen with the  SCREEN
  218.      function.
  219.      
  220.      
  221.      Question: How can I see if a file exists?
  222.      
  223.      Answer: Most BASIC libraries can do this for you.  Or, you can use the
  224.      directory approach given above.  Yet another way to do it is to try to
  225.      open the file for input:
  226.      
  227.           ON ERROR GOTO NotFound
  228.           OPEN File$ FOR INPUT AS #1
  229.           CLOSE #1
  230.           Found = -1
  231.      
  232.      Done:
  233.           RETURN
  234.      
  235.      
  236.      The QBNews                                                     Page  2
  237.      Volume  1, Number  5                                 December  1, 1990
  238.  
  239.      NotFound:
  240.           Found = 0
  241.           RESUME Done
  242.      
  243.      Question: I'm running out of string space.  What can I do?
  244.      
  245.      Answer:  If  you have arrays, try moving them outside  of  the  string
  246.      space area. Either use REDIM to dimension 'em or use the REM  $DYNAMIC
  247.      metacommand.   If this doesn't help enough, use fixed-length  strings,
  248.      which  are stored outside the regular string area.  Still  not  enough
  249.      room?   Well,  you  can  buy  Microsoft's  BASCOM  7.0   "Professional
  250.      Development System", which will set you back about $300.
  251.      
  252.      Question: I'd like to constantly display the time.  What do I do?
  253.      
  254.      Answer:  That's  also available in libraries  (gee,  aren't  libraries
  255.      great?!).  You can do it yourself using an approach like this:
  256.      
  257.      ON TIMER(1) GOSUB DisplayTime
  258.      TIMER ON
  259.      
  260.      ' your program goes here
  261.      
  262.      DisplayTime:
  263.           OldRow = CSRLIN
  264.           OldCol = POS(0)
  265.           LOCATE 25, 70
  266.           PRINT TIME$;
  267.           LOCATE OldRow, OldCol
  268.      RETURN
  269.      
  270.      
  271.      Question: I need to know how many days lie in between two dates.   How
  272.      do I do it?
  273.      
  274.      Answer:  As usual... this is something you can get in a  library  from
  275.      your  local BBS.  Try QB4BAS.  It's quite possible to do it in  BASIC,
  276.      but  I can never remember the proper formulae... you need  to  account
  277.      for  leap years and leap centuries, so it isn't as straightforward  as
  278.      you might guess.
  279.      
  280.      
  281.      Question: How can I use ANSI display codes?
  282.      
  283.      Answer: You need to go through DOS display functions for that to work.
  284.      Use  this:  OPEN  "CON" FOR OUTPUT AS #1 This makes  the  DOS  display
  285.      functions available as file (device) number one.  You can print to  it
  286.      using  normal  file statements: PRINT #1, CHR$(27); "[2J";  The  above
  287.      statement  will clear the screen if an ANSI driver is  installed.  See
  288.      your DOS manual for information on the available ANSI codes.  You  can
  289.      also get this information from your friendly local BBS.
  290.      
  291.  
  292.  
  293.      The QBNews                                                     Page  3
  294.      Volume  1, Number  5                                 December  1, 1990
  295.  
  296.      How to use Libraries in QuickBASIC by Tom Hanlin
  297.      
  298.           So  you've never used a library before and you want to know  what
  299.      gives?
  300.      
  301.           A library is a collection of routines, whether written in  BASIC,
  302.      assembly  language, or some other language altogether.  It provides  a
  303.      convenient  way  to allow different programs to use the same  sets  of
  304.      standard  or  special-purpose routines (subprograms or  functions,  in
  305.      BASIC parlance).
  306.      
  307.           There  are two forms of libraries for QuickBASIC.  The form  with
  308.      the  extension ".LIB" is for use with LINK, for  creating  stand-alone
  309.      programs  which do not require the QuickBASIC environment.  This  sort
  310.      of  library can be made or manipulated using the LIB utility  provided
  311.      with QuickBASIC.  The form of library with the extension ".QLB" is for
  312.      use  in  the  QuickBASIC  environment. It is  created  with  LINK  and
  313.      (unfortunately) can't be manipulated at all.
  314.      
  315.           To use a QLB library, you specify the /L parameter when  starting
  316.      up QB:
  317.      
  318.           QB /L BASWIZ
  319.      
  320.           You can optionally include the name of your program before the /L
  321.      switch.
  322.      
  323.           To  use a LIB library, you specify the name of the  library  when
  324.      you LINK your program.  Either let LINK prompt you for the library  or
  325.      type something like this:
  326.      
  327.           BC program/O;                       (or whatever)
  328.           LINK program/EX,,NUL,BASWIZ
  329.      
  330.           If you are in the QuickBASIC environment and direct the  compiler
  331.      to  produce an .EXE file, it will automatically link the  library  for
  332.      you if you started up QB with the /L option.
  333.      
  334.           Suppose  you  have more than one library that you  wish  to  use?
  335.      Well, provided that you have both of the libraries in .LIB form,  this
  336.      presents  no problem. To create a combined .LIB library, use  the  LIB
  337.      utility to extract all of the .OBJ files from one .LIB and add them to
  338.      the other one.  You can convert the new combined library to .QLB  form
  339.      by using a special LINK syntax:
  340.      
  341.           LINK combined.LIB/Q,,NUL,BQLB45
  342.      
  343.           The  last  two digits of "BQLBxx" represent the  version  of  the
  344.      compiler  that  you  have.  It doesn't necessarily  match  the  formal
  345.      version number, though, so you might just want to use DIR and see what
  346.      the  name of the file really is. BQLBxx.LIB is one of the  files  that
  347.      comes with QuickBASIC.
  348.      
  349.           If  you experience a LINK error, make sure that you're using  the
  350.      
  351.      The QBNews                                                     Page  4
  352.      Volume  1, Number  5                                 December  1, 1990
  353.  
  354.      current version of LINK.  I've heard from many people who turn out  to
  355.      have  the wrong version of LINK in their PATH somewhere...  when  LINK
  356.      starts  up,  it will display its version number on  the  screen.   The
  357.      version should be around 3.69 as of QuickBASIC 4.5.  You must use  the
  358.      LINK  that came with QuickBASIC-- the one that comes with Quick  C  is
  359.      incompatible  and the one that came with BASCOM 6.0 (the one with  two
  360.      periods in the version number) has a few bugs.
  361.      
  362.           All   clear?   No?!   Check  your  QuickBASIC  manual  for   more
  363.      information!
  364.      
  365.      **********************************************************************
  366.           Tom  Hanlin  is  the author of the ADVBAS  and  BASWIZ  shareware
  367.      libraries,  among others. He can be reached through the QUIK_BAS  echo
  368.      on Fidonet or in care of this newsletter.
  369.      **********************************************************************
  370.      
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.      The QBNews                                                     Page  5
  409.      Volume  1, Number  5                                 December  1, 1990
  410.  
  411.  
  412.  
  413.      ----------------------------------------------------------------------
  414.                             A d v e r t i s e m e n t
  415.      ----------------------------------------------------------------------
  416.  
  417.                    STAR PROGRAMMERS REACH FOR THE MOON!
  418.      
  419.      Crescent Software publishes the highest quality support products
  420.      available for use with QuickBASIC and BASIC 7 PDS.  We offer twelve
  421.      different libraries, and all are extremely easy to use.  Our software
  422.      has received outstanding reviews in all of the major computer
  423.      publications, including PC Magazine, Byte, Dr. Dobb's Journal, PC
  424.      Resource, and too many others to mention here.  Our two most popular
  425.      products are described briefly below.  Please call or write for more
  426.      information.  We offer tools for screen design, graphics, scientific
  427.      applications, and more.  All Crescent Software products come with full
  428.      commented source code, and require no royalty payments when added to
  429.      your own programs.  Free technical support is included.
  430.      
  431.      QuickPak Professional ($169) is the most comprehensive collection of
  432.      QuickBASIC tools ever developed.  It features more than 450 routines
  433.      you can add to your own programs, a beautifully typeset manual in an
  434.      IBM-style D-ring binder, and 120 demonstration programs.  Included are
  435.      routines for searching and sorting any type of array, DOS services for
  436.      extremely fast file access, sophisticated pull-down and vertical menus
  437.      with integrated mouse support, and fast video routines that work in
  438.      the 25-, 43-, or 50-line EGA and VGA text modes.  Also included are a
  439.      real word processor you can add to your programs, a graphics-mode
  440.      screen print routine that supports all BASIC video modes, routines to
  441.      read and write Lotus 1-2-3 .WKS files, an assembly language tutorial,
  442.      and much more.  This is our most popular library, and it offers a
  443.      wealth of functionality and educational value.  Fully commented BASIC
  444.      and assembler source is included.  QuickPak Professional requires
  445.      QuickBASIC 4.0 or later, or BASIC 7 PDS (the PDS version costs $199).
  446.      
  447.      P.D.Q. ($129) is a replacement for the BCOM libraries that come with
  448.      QuickBASIC, and it lets you write programs in BASIC that are smaller
  449.      and more efficient than any other high-level language.  P.D.Q. also
  450.      lets you easily create TSR programs and interrupt handlers.  Minimum
  451.      tasks can be written in 1K.  P.D.Q. programs are much smaller than an
  452.      equivalent written in C, and are as little as one-tenth the size of a
  453.      QuickBASIC counterpart.  Of course, they are also very fast.  Numerous
  454.      sample BASIC applications are provided, including a TSR screen capture
  455.      program, a pop-up calculator, work-alike copies of several Norton
  456.      Utilities, and much more.  Because we also include the complete
  457.      library source code, examining P.D.Q. is an excellent way to learn
  458.      about BASIC's internal workings.  Please note that P.D.Q. is a subset
  459.      of Microsoft BASIC, and does not support floating point math.  A
  460.      communications toolbox is available separately for $79.  P.D.Q.
  461.      requires QuickBASIC 4.0 or later, or BASIC 7.x PDS.
  462.      
  463.          Please add $6 per order for 2nd day UPS shipping in the US.
  464.          Crescent Software, 32 Seventy Acres, West Redding, CT  06896
  465.          Phone: 203-438-5300, FAX: 203-431-4626, CompuServe 72657,3070
  466.      
  467.      The QBNews                                                     Page  6
  468.  
  469.  
  470.      ----------------------------------------------------------------------
  471.                                 S w a p   S h o p
  472.      ----------------------------------------------------------------------
  473.  
  474.      'Graphics and text screen dumps by Alan J. Fridlund, Ph.D.
  475.      
  476.      DEFINT A-Z
  477.      SUB DumpScr (DisplayType, PrinterType$) STATIC
  478.      
  479.      'Subroutine DumpScr.
  480.      
  481.      'Alan J. Fridlund, Ph.D., April-August, 1988.
  482.      'Adapted from routine by Charles Petzold in PC Magazine,
  483.      'Vol 6, No 2, Jan 27, 1987.
  484.      'QuickBasic 4.0 Graphics or Text Screen Dumps to:
  485.      '     Epson (EPS), IBM Proprinter (IBM), or HP LaserJet (HP) printers.
  486.      'Dumps graphics screens in landscape (sideways) mode.
  487.      
  488.      'DisplayType:
  489.      '  0 = CGA 200x640 pixel mode (SCREEN 2).
  490.      '  1 = EGA 200x640 pixel mode (SCREEN 8).
  491.      '  2 = EGA 350x640 pixel mode (SCREEN 9).
  492.      '  3 = VGA 480x640 pixel mode (SCREEN 11 or 12).
  493.      '  4 = Text screens for all display types.
  494.      
  495.      'PrinterType$:
  496.      '  "EPS" = Epson-compatible dot matrix printer.
  497.      '  "IBM" = IBM Proprinter-compatible printer.
  498.      '  "HPL" = Hewlett-Packard LaserJet printer w/ 75 dpi graphics.
  499.      
  500.      IF DisplayType = 0 OR DisplayType = 1 THEN BottomPixel = 199: NTAB = 8
  501.      IF DisplayType = 2 THEN BottomPixel = 349:  NTAB = 12
  502.      IF DisplayType = 3 THEN BottomPixel = 479:  NTAB = 0
  503.      
  504.      Esc$ = CHR$(27)
  505.      
  506.      IF DisplayType = 4 THEN
  507.      WIDTH LPRINT 80
  508.      LPRINT STRING$(9, 13)                     'Center dump on page.
  509.      FOR ROW = 1 TO 25
  510.         FOR COL = 1 TO 80
  511.            KIN$ = INKEY$: IF KIN$ = Esc$ THEN GOTO GraphEnd'Esc terminates.
  512.            CHARACTER = SCREEN(ROW, COL)
  513.            CHAR$ = "-"                  'Substitute for unprintable chars.
  514.            IF CHARACTER > 31 AND CHARACTER < 126 THEN
  515.               CHAR$ = CHR$(CHARACTER)
  516.            END IF
  517.            LPRINT CHAR$;
  518.         NEXT
  519.      NEXT
  520.      END IF
  521.      
  522.      IF DisplayType < 4 AND (PrinterType$ = "EPS" OR PrinterType$ = "IBM")_
  523.      THEN
  524.      
  525.      The QBNews                                                     Page  7
  526.      Volume  1, Number  5                                 December  1, 1990
  527.  
  528.      
  529.       WIDTH LPRINT 255
  530.       LPRINT Esc$ + "@": LPRINT STRING$(5, 13)'Reset printer, center graph.
  531.       PIXEL400$ = Esc$ + CHR$(75) + CHR$(144) + CHR$(1)'400 pixels perline.
  532.       PIXEL350$ = Esc$ + CHR$(75) + CHR$(94) + CHR$(1)'350 pixels per line.
  533.       PIXEL480$ = Esc$ + CHR$(75) + CHR$(224) + CHR$(1)'480 pixels perline.
  534.       IF DisplayType < 2 THEN NPIXEL$ = PIXEL400$'CGA pixels doubleprinted.
  535.       IF DisplayType = 2 THEN NPIXEL$ = PIXEL350$
  536.       IF DisplayType = 3 THEN NPIXEL$ = PIXEL480$
  537.       NormSp$ = Esc$ + CHR$(65) + CHR$(12)            'Normal line spacing.
  538.       NarrSp$ = Esc$ + CHR$(65) + CHR$(8)'Narrow line spacing for graphics.
  539.       IF PrinterType$ = "IBM" THEN
  540.          NormSp$ = NormSp$ + Esc$ + CHR$(50)
  541.          NarrSp$ = NarrSp$ + Esc$ + CHR$(50)
  542.        END IF
  543.        LPRINT NarrSp$
  544.        FOR COL = 0 TO 639 STEP 8
  545.          LPRINT TAB(NTAB);
  546.          LPRINT NPIXEL$;
  547.          FOR ROW = BottomPixel TO 0 STEP -1
  548.             KIN$ = INKEY$: IF KIN$ = Esc$ THEN GOTO GraphEnd
  549.             BYTE = 0
  550.             FOR PIXEL = 0 TO 7
  551.               IF POINT(COL + PIXEL, ROW) > 0 THEN
  552.                     BYTE = BYTE OR 2 ^ (7 - PIXEL)
  553.               END IF
  554.             NEXT
  555.             LPRINT CHR$(BYTE);
  556.             IF DisplayType < 2 THEN LPRINT CHR$(BYTE);
  557.          NEXT                                        'CGA/lowres EGA pixels
  558.          LPRINT                                      'are double-printed.
  559.        NEXT
  560.        LPRINT NormSp$;
  561.      END IF
  562.      
  563.      IF DisplayType < 4 AND PrinterType$ = "HPL" THEN
  564.        WIDTH LPRINT 255
  565.        IF DisplayType < 2 THEN NPIXEL$ = Esc$ + "*p400x300Y"'Center cursor.
  566.        IF DisplayType = 2 THEN NPIXEL$ = Esc$ + "*p510x300Y"
  567.        IF DisplayType = 3 THEN NPIXEL$ = Esc$ + "*p240x300Y"
  568.        NPIXEL$ = NPIXEL$ + Esc$ + "*t75R" + Esc$ + "*r1A"'Start 75 dpi mode
  569.        LPRINT NPIXEL$
  570.        IF DisplayType < 2 THEN NPIXEL$ = Esc$ + "*b50W" 'Expect xxW pixels.
  571.        IF DisplayType = 2 THEN NPIXEL$ = Esc$ + "*b44W"
  572.        IF DisplayType = 3 THEN NPIXEL$ = Esc$ + "*b60W"
  573.        FOR COL = 0 TO 639
  574.           KIN$ = INKEY$: IF KIN$ = Esc$ THEN GOTO GraphEnd
  575.           LPRINT NPIXEL$;
  576.           FOR ROW = BottomPixel TO 0 STEP -8
  577.              IF DisplayType < 2 THEN           'Separate point into 2 bytes
  578.                HIBYTE = 0: LOBYTE = 0          ' for CGA/low-res EGA modes.
  579.                FOR PIXEL = 0 TO 7
  580.                   IF POINT(COL, ROW - PIXEL) > 0 THEN
  581.                     IF PIXEL <= 3 THEN
  582.      
  583.      The QBNews                                                     Page  8
  584.      Volume  1, Number  5                                 December  1, 1990
  585.  
  586.                       LOBYTE = LOBYTE OR 2 ^ ((3 - PIXEL) * 2) OR _
  587.                       2 ^ ((4 - PIXEL) * 2 - 1)
  588.                     END IF
  589.                     IF PIXEL >= 4 THEN
  590.                       HIBYTE = HIBYTE OR 2 ^ ((7 - PIXEL) * 2) OR _
  591.                       2 ^ ((8 - PIXEL) * 2 - 1)
  592.                     END IF
  593.                   END IF
  594.                NEXT
  595.                BYT$ = CHR$(LOBYTE) + CHR$(HIBYTE)
  596.                LPRINT BYT$;
  597.              END IF
  598.              IF DisplayType >= 2 THEN
  599.                LOBYTE = 0
  600.                FOR PIXEL = 0 TO 7
  601.                   IF POINT(COL, ROW - PIXEL) > 0 THEN
  602.                     LOBYTE = LOBYTE OR 2 ^ (7 - PIXEL)
  603.                   END IF
  604.                NEXT
  605.                LPRINT CHR$(LOBYTE);
  606.              END IF
  607.           NEXT
  608.        NEXT
  609.      LPRINT Esc$; "*rB"; Esc$; "E"                  'Return to text mode.
  610.      END IF
  611.      
  612.      GraphEnd:
  613.      LPRINT CHR$(12);                                'Page eject.
  614.      SOUND 1000, 1                                   'Signal termination.
  615.      WIDTH LPRINT 80
  616.      
  617.      END SUB
  618.      ----------------------------------------------------------------------
  619.  
  620.      'PCX SAVE & PCX LOAD FOR EGA SCREEN 9 (640 x 350, 16 COLOR)                    
  621.      'BY G.C.HARDER, RE-ENGINEERED FROM C SOURCE IN
  622.      ' "FRACTAL PROGRAMMING IN C"
  623.      
  624.      DEFINT A-Z                                                                     
  625.      DECLARE SUB PCXSAVE (File$, Pal.Array%())                                      
  626.      DECLARE SUB PCXLOAD (File$, Pal.Array%())                                      
  627.      SCREEN 9, , 0                                                                  
  628.      DIM Pal.Array%(15)                                                             
  629.      FOR I% = 0 TO 15: READ Pal.Array%(I%): NEXT                                    
  630.      FOR A = 10 TO 360 STEP 10                                                      
  631.         X = 320 + 48 * 2 * COS(A * .017453)                                         
  632.         Y = 175 + 40 * 1.75 * SIN(A * .017453)                                      
  633.         CIRCLE (X, Y), 120, RND * 15 + 1                                            
  634.      NEXT                                                                           
  635.      PCXSAVE "DEMO.PCX", Pal.Array%()                                               
  636.      CLS                                                                            
  637.      PCXLOAD "DEMO.PCX", Pal.Array%()                                               
  638.      'default Palette Colors                                                       
  639.      DATA 0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63                                  
  640.                                                                                 
  641.      '----------------------------------------------------------------              
  642.      
  643.      The QBNews                                                     Page  9
  644.      Volume  1, Number  5                                 December  1, 1990
  645.  
  646.      SUB PCXLOAD (File$, Pal.Array%()) STATIC                                       
  647.         SCREEN 9, , 0: OPEN File$ FOR BINARY AS #1: SEEK #1, 17                     
  648.         DIM Byte AS STRING * 1                                                      
  649.         FOR I% = 0 TO 15                                                            
  650.            GET #1, , Byte: Red% = ASC(Byte) / 85                                    
  651.            GET #1, , Byte: Green% = ASC(Byte) / 85                                  
  652.            GET #1, , Byte: Blue% = ASC(Byte) / 85                                   
  653.            Red% = ((Red% AND 1) * 32) OR ((Red% AND 2) * 2)                         
  654.            Green% = ((Green% AND 1) * 16) OR (Green% AND 2)                         
  655.            Blue% = ((Blue% AND 1) * 8) OR ((Blue% AND 2) \ 2)                       
  656.            Hue% = Red% OR Green% OR Blue%: Pal.Array%(I%) = Hue%                    
  657.         NEXT                                                                        
  658.         PALETTE USING Pal.Array%(0): SEEK #1, 129: DEF SEG = &HA000                 
  659.         FOR K% = 0 TO 349                                                           
  660.            Addr% = 80 * K%: Line.end% = Addr% + 80: J% = 1                          
  661.            DO WHILE J% <= 4                                                         
  662.               B% = J%                                                               
  663.               IF J% = 3 THEN B% = 4                                                 
  664.               IF J% = 4 THEN B% = 8                                                 
  665.               OUT &H3C4, 2: OUT &H3C5, B%                                           
  666.               GET #1, , Byte: Byte.1% = ASC(Byte)                                   
  667.               IF (Byte.1% AND 192) <> 192 THEN                                      
  668.                  POKE Addr%, Byte.1%: Addr% = Addr% + 1                             
  669.                  IF Addr% >= Line.end% THEN Addr% = 80 * K%: J% = J% + 1            
  670.               ELSE                                                                  
  671.                  Byte.1% = Byte.1% AND 63
  672.                  GET #1, , Byte: Byte.2% = ASC(Byte)
  673.                  FOR M% = 1 TO Byte.1%                                              
  674.                     B% = J%                                                         
  675.                     IF J% = 3 THEN B% = 4                                           
  676.                     IF J% = 4 THEN B% = 8                                           
  677.                     OUT &H3C4, 2: OUT &H3C5, B%: POKE Addr%, Byte.2%                
  678.                     Addr% = Addr% + 1                                               
  679.                     IF Addr% >= Line.end% THEN Addr% = 80 * K%: J% = J% + 1
  680.                  NEXT
  681.               END IF
  682.            LOOP
  683.         NEXT
  684.         OUT &H3C4, 2: OUT &H3C5, &HF: DEF SEG : CLOSE #1
  685.      END SUB
  686.      
  687.      'PCX SAVE ROUTINE
  688.      '---------------------------------------------------------------------
  689.      SUB PCXSAVE (File$, Pal.Array%()) STATIC
  690.      OPEN File$ FOR BINARY AS #1
  691.      A$ = CHR$(10) + CHR$(5) + CHR$(1) + CHR$(1): PUT #1, , A$
  692.      A% = 0: PUT #1, , A%: PUT #1, , A%: A% = 639: PUT #1, , A%
  693.      A% = 349: PUT #1, , A%: A% = 640: PUT #1, , A%: A% = 350: PUT #1, , A%
  694.      FOR I% = 0 TO 15
  695.         Red% = (((Pal.Array%(I%) AND 32) \ 32) OR _
  696.           ((Pal.Array%(I%) AND 4) \ 2)) * 85
  697.         Green% = (((Pal.Array%(I%) AND 16) \ 16) OR _
  698.           (Pal.Array%(I%) AND 2)) * 85
  699.         Blue% = (((Pal.Array%(I%) AND 8) \ 8) OR _
  700.      
  701.      The QBNews                                                     Page 10
  702.      Volume  1, Number  5                                 December  1, 1990
  703.  
  704.           ((Pal.Array%(I%) AND 1) * 2)) * 85
  705.         A$ = CHR$(Red%) + CHR$(Green%) + CHR$(Blue%): PUT #1, , A$
  706.      NEXT
  707.      A$ = CHR$(0) + CHR$(4): PUT #1, , A$: A% = 80: PUT #1, , A%
  708.      A% = 0: PUT #1, , A%: A% = 0
  709.      FOR I% = 70 TO 127 STEP 2
  710.        PUT #1, , A%
  711.      NEXT I%
  712.      DEF SEG = &HA000
  713.      FOR K% = 0 TO 349
  714.         SCREEN 9, , 0: Add1% = 80 * K%: Number% = 1: J% = 0
  715.         OUT &H3CE, 4: OUT &H3CF, 0: OUT &H3CE, 5: OUT &H3CF, 0
  716.         Old% = PEEK(Add1%): Add2% = 1
  717.         FOR I% = 1 TO 320
  718.            IF I% = 320 THEN
  719.               IF Old% <> 1 THEN New% = 1 ELSE New% = 0
  720.            ELSE
  721.               IF Add2% = 80 THEN J% = J% + 1: Add2% = 0
  722.               OUT &H3CE, 4: OUT &H3CF, J%: OUT &H3CE, 5: OUT &H3CF, 0
  723.               New% = PEEK(Add1% + Add2%)
  724.            END IF
  725.            IF New% = Old% AND Number% < 63 THEN
  726.               Number% = Number% + 1
  727.            ELSE
  728.               Num.Out% = (Number% OR 192)
  729.               IF (Number% <> 1) OR ((Old% AND 192) = 192) THEN
  730.                  A$ = CHR$(Num.Out%): PUT #1, , A$
  731.               END IF
  732.               A$ = CHR$(Old%): PUT #1, , A$: Old% = New%: Number% = 1
  733.            END IF
  734.            Add2% = Add2% + 1
  735.         NEXT
  736.         PSET (0, K%), 13: PSET (639, K%), 13
  737.      NEXT
  738.      OUT &H3CE, 4: OUT &H3CF, 0: DEF SEG : CLOSE #1
  739.      END SUB
  740.      ----------------------------------------------------------------------
  741.  
  742.      'Getting the .PCX palette info by Dwain Goforth
  743.      
  744.      DIM ByteStr AS STRING * 1   'color data is in bytes
  745.      
  746.      OPEN filename$ FOR BINARY AS #1    ' open the PCX file
  747.      
  748.      SEEK #1, 17        'position to start of palette info
  749.      
  750.      FOR k = 0 TO 15
  751.         GET #1, , ByteStr                 'get the red byte for color k
  752.         red = ASC(ByteStr) * 64 \ 256
  753.         GET #1, , ByteStr                 'get the green byte for color k
  754.         green = ASC(ByteStr) * 64 \ 256
  755.         GET #1, , ByteStr
  756.         blue = ASC(ByteStr) * 64 \ 256    'get the blue byte for color k
  757.         PALETTE k, 65536 * blue + 256 * green + red   'now set palette k
  758.      NEXT k
  759.      ----------------------------------------------------------------------
  760.  
  761.      
  762.      
  763.      The QBNews                                                     Page 11
  764.      Volume  1, Number  5                                 December  1, 1990
  765.  
  766.      
  767.      
  768.      
  769.      
  770.      '+==============================================+
  771.      '|   DB.BAS     1/25/88                         |
  772.      '|   David Perry                                |
  773.      '|   QuickBASIC 4.0 Source                      |
  774.      '|   Compile:  BC DB /O/D                       |
  775.      '|   Link: LINK /EX DB;                         |
  776.      '|   Opens dBASE III .DBF and .DBT files        |
  777.      '|   Reads and displays structure .DBF file     |
  778.      '|   Then reads and displays data to include    |
  779.      '|   up to first 4000 bytes of memo fields      |
  780.      '|   This can be redirected to file or printer  |
  781.      '|   by typing DB FILENAME.DBF>FILEDAT or       |
  782.      '|   DB FILENAME.DBF>PRN                        |
  783.      '|   Respects flag for deleted records (may     |
  784.      '|   be modified--see source below)             |
  785.      '|   This is a simple basis for building QB     |
  786.      '|   programs which require reading .DBF files  |
  787.      '+==============================================+
  788.      
  789.      [EDITOR'S NOTE]
  790.           Because of the complexity of this program, it can be found in
  791.      the file DB.BAS.     
  792.      ----------------------------------------------------------------------
  793.  
  794.       ZV.BAS  : A Quick Basic archive file viewer for MS-DOS machines
  795.       author  : Dick Dennison    [74270,3636]  914-374-3903 3/12/24 24 hrs
  796.       supports: ZIP, LZH, ARC, PAK, ZOO archive formats
  797.      
  798.      [EDITOR'S NOTE]
  799.      Due to the complexity of the code, the source code can be found in the
  800.      file ZV.ZIP.
  801.      Volume  1, Number  5                                 December  1, 1990
  802.  
  803.  
  804.  
  805.      ----------------------------------------------------------------------
  806.         W h o   y a   g o n n a   c a l l ?   C A L L   I N T E R R U P T
  807.      ----------------------------------------------------------------------
  808.  
  809.      Format Floppy Disks with QB  by Cornel Huth
  810.      
  811.           You just wrote a great new program that does everything you could
  812.      possibly want it to do but one thing - format a blank disk.  You could
  813.      have  QB  shell  to  DOS and run FORMAT,  but  what  if  FORMAT  isn't
  814.      available?   Even  if it is, maybe you'd rather not shell  because  it
  815.      looks  sloppy.  Other programs can format blank disks so you ought  to
  816.      be able to do it, too.  Right?  Well, now you can.  QBFORMAT.BAS is  a
  817.      plug-and-play  QB4 module that will format a DOS disk with one  simple
  818.      function call.
  819.      
  820.           You wil need QB4 or higher and a floppy disk.  The code  supports
  821.      360K drives for XTs and 360K and 1.2M drives for ATs.  720K and  1.44M
  822.      3.5- inch drives should format just fine on ATs but without the actual
  823.      hardware  I  can't  verify that it does.  I also  can't  find  XT-BIOS
  824.      support  documentation for the 3.5-in drives so you'll have to do  the
  825.      digging and add the code if you need to support those drives on an XT.
  826.      
  827.           To use the code, call the routine with the drive and media  type.
  828.      Floppy  drives start at 0, i.e., drive A: is 0, B: is 1 (no,  your  C:
  829.      hard  drive is not 2, it's 128, so don't worry).  The media types  are
  830.      described  in the source by CONST declarations.  By doing the same  in
  831.      the  calling program the call to format a disk would be as  simple  as
  832.      this:
  833.      
  834.           xerr%  =  QBFORMAT%(0, DS9)
  835.           IF xerr% THEN
  836.                errl% = xerr% \ 256
  837.                errc% = xerr% AND 255
  838.           END IF
  839.      
  840.           0  is  drive A:, DS9 is the media byte for a  360K  floppy.   The
  841.      function returns a multiplexed error code.  The high byte is the level
  842.      at  which the error occurred and the low byte is the BIOS error  code.
  843.      See the source for more along with descriptions of the level and error
  844.      codes.
  845.      
  846.           Somebody goofed when he assigned the media byte for 720K 3.5-inch
  847.      floppies.   He  used  the same media byte as  the  1.2M  5.25-inch  AT
  848.      floppy.   To differentiate the two, QBFORMAT expects 1.2M  media  byte
  849.      arguments  to  be positive &HF9 and 720K media byte  arguments  to  be
  850.      negative &HF9 (-&HF9).  See the source for more.
  851.      
  852.           The  source  is all QB except for the INTERRUPTX  routine.   This
  853.      routine is supplied by Microsoft in the QB.LIB/QLB file and the source
  854.      is  INTRPT.ASM.  QB 4.00's INTRPT.ASM has 2 bugs, one so bad  that  it
  855.      can  not be used with QBFORMAT.BAS.  QB 4.00b has one bug, not so  bad
  856.      that it can't be used with QBFORMAT but it does prevent the error code
  857.      from being returned properly if you call INT 25/26h (QBFORMAT calls on
  858.      BIOS  INT  13h).   Included  with the  QBFORMAT  code  should  be  the
  859.      
  860.      The QBNews                                                     Page 12
  861.      Volume  1, Number  5                                 December  1, 1990
  862.  
  863.      corrected version of INTRPT.OBJ.  Hopefully the ASM source can also be
  864.      included  (if space allows).  Replace your INTRPT.OBJ with  this  one,
  865.      especially if you are using QB 4.00 (initial release).
  866.      
  867.           The  code  speaks for itself (it does to me).  If  you're  having
  868.      trouble  understanding the code, drag out the old QB manual and  piece
  869.      through the code.  If the logic behind MS-DOS formatting is  difficult
  870.      to  follow, consult a PC BIOS book such as those by Peter Norton,  Ray
  871.      Duncan  (his Advanced MS-DOS), the Phoenix people or  Robert  Jourdain
  872.      (one alone probably won't do it).  PCDOS texts usually won't cover the
  873.      BIOS  to  the required detail so those won't be of much  help  in  the
  874.      format  process.   However, they may provide you with details  of  the
  875.      structure  of  the  boot  record, file  allocation  tables,  and  root
  876.      directory.
  877.      
  878.      **********************************************************************
  879.           Cornel  Huth  is the author of various shareware  and  commercial
  880.      tools  for  use  with  QuickBASIC. He  can  be  reached  through  this
  881.      newsletter.
  882.      **********************************************************************
  883.      
  884.      [EDITOR'S NOTE]
  885.      
  886.           All  code  and files for this article can be found  in  the  file
  887.      QBFORMAT.ZIP. I have tested this code and found it to work on all disk
  888.      types on MY 386. You should thoroughly test this code on any  machines
  889.      you  plan to use. If you find any problems, I am sure Cornel would  be
  890.      interested in hearing from you.
  891.      
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.      The QBNews                                                     Page 13
  918.      Volume  1, Number  5                                 December  1, 1990
  919.  
  920.  
  921.  
  922.      ----------------------------------------------------------------------
  923.                         P o w e r   P r o g r a m m i n g
  924.      ----------------------------------------------------------------------
  925.  
  926.      Scenic Views by way of the Video Map by Larry Stone
  927.      
  928.           Creating an attractive set of screens for your program is,  often
  929.      times, more important than WHAT your program actually does or  doesn't
  930.      do.  As Marshall McCluine would say, "the medium is the message".
  931.      
  932.           Packaging is everything when selling to the public.    After all,
  933.      how much research, development, and skill went into the  "growing"  of
  934.      America's favorite pet,  the  "pet rock"?   None.   However, plenty of
  935.      resources were involved in packaging and promoting it so that the con-
  936.      sumer would buy it.
  937.      
  938.           Computer software is packaged twice.  The first packaging is  the
  939.      box itself and is more important for selling games or Vapor-Ware.  The
  940.      next type of packaging is within the software itself.  It is the bells
  941.      and whistles, the pizzazz; the sizzle along with the steak. It is what
  942.      turns dull, boring, productive software into productive software  that
  943.      is exciting and fun to use.  Our bell and whistle stop will be,  where
  944.      else - the monitor.  To navigate the monitor, we will need a good map,
  945.      a video map.  Understanding and playing with the video map is the  key
  946.      to many a bell and a whistle.
  947.      
  948.           The video map holds text mode screens in a simple  and  redundant
  949.      fashion. It is this simplicity and redundancy that allows us to create
  950.      dazzling windows that implode, slide, push and pop into view.  The map
  951.      is an area of memory that can be considered a grid  holding  character
  952.      and color information inside of alternating cells.   If we designate a
  953.      capital "C" to represent "character" and "A" for "color Attribute", we
  954.      could depict the map as:
  955.      
  956.           012345...                                               ...159
  957.           CACACACACACACACACACACACACACACACACACACACACACACACACACACACACACA
  958.           CACACACACACACACACACACACACACACACACACACACACACACACACACACACACACA
  959.           CACACACACACACACACACACACACACACACACACACACACACACACACACACACACACA
  960.      
  961.           Each column contains either character data or color data but  not
  962.      both.  Each "CA" pair represents data for one column-row location on a
  963.      monitor.  This means that there are 80 pairs per row or, 160 pieces of
  964.      information per row.  Knowing this makes accessing the map easier.  If
  965.      we want to read or write to row 1, column 1 (PRINT 1, 1), we go to the
  966.      map and put our character into position "0" and our  color  into  "1".
  967.      PRINT 1, 80 would have a map address of 158 for the character and  159
  968.      for the color.  PRINT 2, 1 address would be 160 and 161. An 80x25 mode
  969.      screen is mapped from position 0 to 3999 (4000 positions).    A screen
  970.      in 80x50 starts at 0 and ends at 7999 (8000 positions).
  971.      
  972.           Knowing how the video map stores data makes it easy to  build  an
  973.      array for our windows.  The easiest array to build would be an integer
  974.      array that corresponds to every element in the map.   To create a  one
  975.      to one array would require an array DIMensioned for 4000 elements with
  976.      
  977.      The QBNews                                                     Page 14
  978.      Volume  1, Number  5                                 December  1, 1990
  979.  
  980.      an 80x25 text screen.  An array of 8000 elements would be required for
  981.      an 80x50 screen.  Although these arrays make our programming very easy
  982.      due to the one to one correlation, they are, never-the-less, very  in-
  983.      efficient.  This is because a simple integer is a two byte word.   The
  984.      video map uses one integer to hold information for each "CA" pair. The
  985.      high byte holds character information and the low byte holds the color
  986.      data.  When we make an integer array DIMmed to 4000 elements, there is
  987.      4000 bytes of wasted space (each integer is a two byte word  -  hence,
  988.      an array DIMmed to 4000 elements uses 8000 bytes.)  What we want is an
  989.      2000 elements array that houses 4000 bytes.
  990.      
  991.           Because we are going for memory efficiency, and because we access
  992.      into the video map by POKEing one byte at a time, we need a translator
  993.      to move data from our arrays to the  map  and  back.   In other words,
  994.      we will need to combine bytes into integers  and  extract  bytes  from
  995.      integers.  When we do so, we need a  convenient  method to keep  track
  996.      of where we are in both the map and the array.   I find that the easi-
  997.      est way to do this is to simply keep track of where we are in  the map
  998.      then divide that number by two to correlate it to our position  in the
  999.      array.
  1000.      
  1001.           Fancy screen writes are, generally, accomplished by  manipulating
  1002.      data from our array via one or more loops and STEPping  through  these
  1003.      loops in a manner that will write our screen in a dazzling manner. The
  1004.      accompanying code  (DAZZLING.BAS and DAZZDEMO.BAS) illustrates  eleven
  1005.      different, dazzling screen writes.   Because each of these methods are
  1006.      performed in  two  different ways  (top to bottom,  bottom to top and,
  1007.      right to left, left to right), the effect is  22 completely  different
  1008.      screen routines in only three subprograms.   In addition to the  fancy
  1009.      screen display routines, the code supplies five other useful routines.
  1010.      
  1011.           ReadBinFile reads a disk file that was formed by a simple  binary
  1012.      dump of the video map.   You could create your screens using  TheDraw,
  1013.      save your files using the "BIN" option and read them into your  screen
  1014.      array with ReadBinFile.  An 80x25 text screen will produce a 4000 byte
  1015.      BIN file.  This type of file is fast to read into arrays and they  are
  1016.      slightly smaller than a Bsave file (4007 bytes).   The two  BIN  files
  1017.      used by my sample code, CRESCENT.BIN and SHUTTLE.BIN  are re-creations
  1018.      of screens used by The Crescent Software Support BBS  and  a  modified
  1019.      shuttle used by TheDraw as one of their samples.  The ReadBinFile rou-
  1020.      tine also does something no others of its ilk do.   It  can  read  the
  1021.      screen to into a row position other than row number one.   This allows
  1022.      a screen that was saved in 80x25 mode to be re-positioned  for  higher
  1023.      resolutions (80x43 or 80x50).   The sample code, DAZZDEMO,  creates 10
  1024.      leading rows for high resolution.   It then uses the StuffMess routine
  1025.      to fill these leading (and trailing rows).  In this manner, one screen
  1026.      can be saved in a low resolution mode and expanded for high resolution
  1027.      systems.
  1028.      
  1029.           The StuffMess subprogram stuffs a message  into  a  screen  array
  1030.      BEFORE it is displayed on the monitor.   Pass it the  message  string,
  1031.      the array to stuff,  and the fore and background colors,  and the  row
  1032.      and column location. DAZZDEMO.BAS uses this routine to create a second
  1033.      story to the QBNews Software Library building and to expand the planet
  1034.      
  1035.      The QBNews                                                     Page 15
  1036.      Volume  1, Number  5                                 December  1, 1990
  1037.  
  1038.      earth when it runs on a video system that supports screen modes  80x43
  1039.      or 80x50. If you study the accompanying code,you will notice that when
  1040.      StuffMess adds a second story to the QBNews Library, it uses a  string
  1041.      that is 800 bytes long.  The call to StuffMess simply locates the Mess
  1042.      string at row 1, column 1.  StuffMess, in conjunction with the Curtain
  1043.      routine, produces the illusion of the shuttle doors opening.  This  is
  1044.      accomplished by filling the monitor with the bytes from the array with
  1045.      the shuttle picture.  Once the picture is displayed, StuffMess is used
  1046.      to "redraw" that portion of the array that contains the shuttle doors.
  1047.      The array is, again, sent to the monitor only,  this time,  it is dis-
  1048.      played over the original shuttle picture with a call  to  the  Curtain
  1049.      routine.  The Curtain routine redisplays the shuttle from  the  middle
  1050.      outward.  The effect is that the shuttle doors appear to  open  before
  1051.      your very eyes!
  1052.      
  1053.           TickPause is a simple delay that pauses in increments of 18 ticks
  1054.      per second.  Simply pass in the number of ticks to  pause.   TickPause
  1055.      does NOT use BASIC's TIMER and, as consequence, does not access any of
  1056.      the Floating point library.  This can translate as a huge  savings  in
  1057.      the compiled size of your exe files (DAZZLING, with it's 8 subprograms
  1058.      that perform 27 routines, compiles to only 7,100 bytes or so).
  1059.      
  1060.           GetMonitorSeg returns the starting address of the video map.   If
  1061.      it senses a color system, it returns &HB800.   Otherwise,  it  returns
  1062.      &HB000 as the starting address.
  1063.      
  1064.           Shake is a slight modification of a routine originally  published
  1065.      at the end of 1988 by HumbleWare  Custom  Programming.   It reprograms
  1066.      the 6845 CRT controllers viewport into video RAM.   The shaking screen
  1067.      produced is quite radical.  Don't watch it if you are prone to getting
  1068.      sea sick.
  1069.      
  1070.           Two other routines that are worth mentioning are not included  in
  1071.      DAZZLING.BAS but are part of the demo program, DAZZDEMO.  One uses the
  1072.      WIDTH statement to test and set your monitor for it's highest  resolu-
  1073.      tion. If your monitor is EGA or VGA, "WIDTH , 43" or "WIDTH , 50" will
  1074.      force 80x43 / 80x50 screen mode.   This technique uses error trapping.
  1075.      If someone knows how to test for a system's capability to use 80x43 or
  1076.      80x50 modes without error trapping, I sure would like to know how.
  1077.      
  1078.           The other routine creates a continuous noise by reprogramming the
  1079.      timer with a new clock rate and outputs this straight to  the speaker.
  1080.      This routine is one among several,  useful  sound  routines  published
  1081.      in "Inside Microsoft BASIC",  by  the Cobb Group,  July 1990.  If  you
  1082.      don't subscribe to this magazine, this little routine should wet  your
  1083.      whistle.
  1084.      
  1085.           If you compile DAZZLING.BAS as an object module, three  variables
  1086.      must be declared as COMMON SHARED within your  main  code:  Monitor AS
  1087.      INTEGER, ScrnEls AS INTEGER, and MaxLine AS INTEGER.  To simplify your
  1088.      coding and to assure that the COMMON SHARED blocks will be  the  same,
  1089.      the code includes DAZZLING.BI which contains the declarations for  the
  1090.      routines and COMMON SHARED blocks required.  If you  compile  DAZZLING
  1091.      for use with your other code, REM $INCLUDE: 'DAZZLING.BI'  immediately
  1092.      
  1093.      The QBNews                                                     Page 16
  1094.      Volume  1, Number  5                                 December  1, 1990
  1095.  
  1096.      after your last DECLARE and prior to your COMMON SHARED statement. Or,
  1097.      you could modify DAZZLING.BI and re-compile  as  your  needs  dictate.
  1098.      Follow the instructions at the top of  DAZZLING.BAS  and  DAZZDEMO.BAS
  1099.      for linking and compiling into a stand alone program.
  1100.      
  1101.           One final note.  The fancy screen routines used  by  DAZZLING.BAS
  1102.      use the POKE command.   On older CGA systems, using a POKE to the sys-
  1103.      tem's monitor may cause snow because  these  old  CGA  systems  cannot
  1104.      handle the direct screen activity during re-trace.
  1105.      
  1106.      **********************************************************************
  1107.           Larry  Stone is President of LSRGroup and is involved in  writing
  1108.      software for marine and aquatic research, as well as, data acquisition
  1109.      software systems. He has also authored various shareware programs such
  1110.      as "SERVICES", a file, directory, disk and  archive  manager  rated  a
  1111.      trophy by the "PUBLIC BRAND SOFTWARE" shareware catalog.  Larry can be
  1112.      reached at LSRGroup, P.O. Box 5715,  Charleston, OR 97420,  or in care
  1113.      of this newsletter or, contact him via The Empire Builder BBS  1:356/0
  1114.      1:356/1 1:356/4 (14400 Baud), (503) 888-4121.
  1115.      **********************************************************************
  1116.      
  1117.      [EDITOR'S NOTE]
  1118.           All code for this article can be found in the file DAZZLING.ZIP.
  1119.      
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.      The QBNews                                                     Page 17
  1151.      Volume  1, Number  5                                 December  1, 1990
  1152.  
  1153.      Self-Cloning Exe's Revisted by Ronny Ong
  1154.      
  1155.           In  Volume 1, Number 3 of QBNews, Larry Stone presented  "How  to
  1156.      Make  a  Self-Cloning  Exe in QuickBASIC."  In his  sample  code,  you
  1157.      needed  to  define a value for MyProg$, the filename of the  EXE  that
  1158.      would  be accessing itself.  Larry did not go into the  considerations
  1159.      involved in defining MyProg$.  This article will.
  1160.      
  1161.           You could simply hard-code a filename into the program, but  that
  1162.      would  prevent users from renaming it, an inconvenience.  The  program
  1163.      could  ask  users  for  its own  filename,  making  the  program  look
  1164.      unnecessarily  dumb.  You would also have the headache of getting  and
  1165.      validating  input, and handling all the possible errors  like  invalid
  1166.      filenames  and  valid filenames which are simply wrong, i.e.  not  the
  1167.      true name of the program.
  1168.      
  1169.           And  then there is the drive/path specification.   You  certainly
  1170.      cannot hard-code that.  You might get away with forcing users to  keep
  1171.      the program in a certain directory, but not on a certain drive.  There
  1172.      are  too many different hardware configurations in today's  PC  world.
  1173.      Think you can leave off the drive/path and let DOS look in the default
  1174.      drive/path?  Think again:
  1175.      
  1176.      (1)   What  if  the program is located in the DOS PATH?   It  can  get
  1177.      loaded  even  if  it is not in the default drive/path,  but  the  OPEN
  1178.      statement  will not find it (unless users just happen to use DPATH  or
  1179.      APPEND and just happen to specify the same drive/path as in PATH).
  1180.      
  1181.      (2)   What if the program gets executed through PC Magazine's  RUN.COM
  1182.      utility, which searches all directories on a drive regardless of PATH?
  1183.      
  1184.      (3)  What if users execute the program from a different drive/path  by
  1185.      specifying the drive/path of the program along with the filename?
  1186.      
  1187.      Fortunately, there is a way to avoid all these problems.
  1188.      
  1189.           The  sample  program contained in FILESPEC.BAS  demonstrates  how
  1190.      programs  written in QuickBASIC Version 4 or higher and  compiled  and
  1191.      linked to an EXE file can find out the complete drive, path, filename,
  1192.      and  .EXE  extension the program was loaded as.  This  information  is
  1193.      stored in memory when DOS loads a program through its "EXEC" function.
  1194.      The  underlying  approach can be applied to COM or EXE  files  in  any
  1195.      language.
  1196.      
  1197.           When   incorporating  this  technique  into   your   self-cloning
  1198.      programs,  you  should  get  to  the  OPEN  statement  immediately  if
  1199.      possible, in case users try to execute your program from diskette  and
  1200.      then  remove the diskette.  If you can put this code and your  I/O  to
  1201.      the EXE up front, the disk activity will look like it is part of DOS's
  1202.      loading of your program.
  1203.      
  1204.           Hard-coding  may look like an easy way out when compared  to  the
  1205.      code  above,  but if your program is good enough to  deserve  a  self-
  1206.      cloning feature, then it deserves the flexibility of this approach.
  1207.      
  1208.      The QBNews                                                     Page 18
  1209.      Volume  1, Number  5                                 December  1, 1990
  1210.  
  1211.      
  1212.      **********************************************************************
  1213.      Ronny Ong is a mainframe systems engineer.  He can be reached at
  1214.      P.O. Box 260796, Plano, TX  75026-0796.
  1215.      **********************************************************************
  1216.      
  1217.      [EDITOR'S NOTE]
  1218.           All  code  and files for this article can be found  in  the  file
  1219.      FILESPEC.ZIP.
  1220.      
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.      The QBNews                                                     Page 19
  1266.      Volume  1, Number  5                                 December  1, 1990
  1267.  
  1268.  
  1269.  
  1270.      ----------------------------------------------------------------------
  1271.                          E n g i n e e r s   C o r n e r
  1272.      ----------------------------------------------------------------------
  1273.  
  1274.      GPIB Instrument control from IOTech by Dave Cleary
  1275.      
  1276.           This  is the start of a new column that I hope gets some  support
  1277.      from all you readers. Engineer's Corner is a column that will cater to
  1278.      all the Scientists and Engineers out there that use QuickBASIC. I feel
  1279.      that  the  QuickBASIC environment makes the PC an invaluable  tool  to
  1280.      perform our everyday tasks that just can't be done with a package "off
  1281.      the  self". I started using QuickBASIC 2.0 to produce  some  automated
  1282.      testing stations. Although this can be done in other languages, BASIC,
  1283.      in general, is best suited for this purpose. I am going to discuss the
  1284.      software  I  use  that  allows me to  control  GPIB  instruments  from
  1285.      QuickBASIC programs.
  1286.      
  1287.           The  software is called DRVR488 and is sold by IOTech. I buy  the
  1288.      software bundled with IOTech's GP488B interface board, but you can buy
  1289.      the  software  separately. The DRVR488 software should  be  compatible
  1290.      with  interface boards based on the NEC uPD7210 GPIB controller  chip.
  1291.      The  software  is  a TSR you load before  you  start  your  QuickBASIC
  1292.      program. It takes less than 50k when resident. DRVR488 installs itself
  1293.      as  a device so DOS 3.0 or later is required. If you need  to  control
  1294.      more than one board, alternate drivers are provided that allow you  to
  1295.      have  four  boards  in your PC. I currently use version  2.4  of  this
  1296.      software, but there may be later versions available.
  1297.      
  1298.           To load the TSR, the typical command line may look like this:
  1299.      
  1300.      DRVR488 /I /D1 /A&H02E1 /B21 /F8 /TCRLFEOI /ECRLF /SC <\DEVCONF1.DAT
  1301.      
  1302.           The  install program handles most of the switches for you, but  I
  1303.      want  to tell you about one in particular. the /SC <[filename]  switch
  1304.      allows  you  to load a text file that contains information  about  the
  1305.      devices you are going to be using. Mine looks like this:
  1306.      
  1307.      CONFIG /TICRLFEOI /TOLF /NPTS500   01
  1308.      CONFIG /TCRLFEOI /NANZ3561  06
  1309.      CONFIG /TICRLFEOI /TOCRLFEOI /NDVM8840  02
  1310.      CONFIG /TCRLFEOI /NCNTR5334 03
  1311.      CONFIG /TCRLFEOI /NCNTR5335 10
  1312.      CONFIG /TCRLFEOI /NCNTR5370 04
  1313.      CONFIG /TCRLF /NDVM3600  05
  1314.      CONFIG /TEOI /NSCP2431 07
  1315.      
  1316.           This tells DRVR488 information about specific devices at specific
  1317.      addresses. For instance, I have a Fluke 8840 DVM located at address 2.
  1318.      The  DVM expects certain terminator characters on input and output  of
  1319.      GPIB commands. This is specified by the /TI and /TO switches. Best  of
  1320.      all,  the  /N  switch allows your to specify a name in  place  of  the
  1321.      address. Instead of issuing a command like this:
  1322.      
  1323.      PRINT #2, "REMOTE 02"
  1324.      
  1325.      The QBNews                                                     Page 20
  1326.      Volume  1, Number  5                                 December  1, 1990
  1327.  
  1328.      
  1329.      I can issue this:
  1330.      
  1331.      PRINT #2, "REMOTE DVM8840"
  1332.      
  1333.      Both commands do exactly the same thing.
  1334.      
  1335.           After the TSR is loaded, your QuickBASIC programs can now  access
  1336.      GPIB  devices. The first thing your QB program needs to do is to  open
  1337.      two files. One of these is for input while the other is for output. My
  1338.      GPIB initialization routine looks like this:
  1339.      
  1340.      '=====================================================================
  1341.      '                        IEEE BUS INITIALIZATION SUB
  1342.      '=====================================================================
  1343.      
  1344.      '*********************************************************************
  1345.      '  JUL 1989- VERSION 1.0:     Initial Release
  1346.      '
  1347.      '                             IeeebusInit(TimeOut)
  1348.      '                                Timeout= Bus Timeout
  1349.      '
  1350.      '*********************************************************************
  1351.      DEFINT A-Z
  1352.      
  1353.      ErrSub:
  1354.      
  1355.      IF ERR = 76 THEN
  1356.         CLS
  1357.         PRINT "DRVR488 SOFTWARE NOT INITIALIZED! Program Terminating."
  1358.         END
  1359.      ELSE
  1360.         CLS
  1361.         PRINT " Undefined Error # "; ERR; ". Program Terminating."
  1362.         END
  1363.      END IF
  1364.      
  1365.      SUB IeeebusInit (TimeOut)
  1366.      
  1367.         ON ERROR GOTO ErrSub
  1368.      
  1369.         OPEN "\DEV\IEEEOUT" FOR OUTPUT AS #2
  1370.         OPEN "\DEV\IEEEIN" FOR INPUT AS #3
  1371.      
  1372.      Rst:
  1373.         IOCTL #2, "BREAK"
  1374.         PRINT #2, "RESET"
  1375.         PRINT #2, "STATUS"
  1376.         INPUT #3, A$
  1377.         A$ = RIGHT$(A$, 2)
  1378.         IF A$ <> "OK" THEN GOTO Rst
  1379.         PRINT #2, "ERROR OFF"
  1380.         PRINT #2, "TIMEOUT"; STR$(TimeOut)
  1381.      
  1382.      
  1383.      The QBNews                                                     Page 21
  1384.      Volume  1, Number  5                                 December  1, 1990
  1385.  
  1386.         ON ERROR GOTO 0
  1387.      
  1388.      END SUB
  1389.      
  1390.           IEEEIN  and  IEEEOUT are devices that the TSR  installs  and  are
  1391.      accessed  through DOS 3.0's DEV. After I open the files, I  reset  the
  1392.      controller  board by issuing BREAK and RESET commands. I then issue  a
  1393.      STATUS  command  and input a response from the controller  board.  The
  1394.      board responds with a string that contains various info with the  last
  1395.      two characters OK. You are now ready to communicate with your devices.
  1396.      
  1397.           I  started using this software back in the days of QB2.  At  that
  1398.      time, I received a "pre-release" version that didn't have pretty  docs
  1399.      and was at version 1.0. This software was a big improvement over  what
  1400.      was  available for GPIB control back then. While it may seem  outdated
  1401.      compared  to the GUI software that is available now for GPIB  control,
  1402.      it offered a very easy way to control GPIB devices that was similar in
  1403.      syntax  to  dedicated HP controllers running HP BASIC. This  is  still
  1404.      true  today  and  it allows you to look at  examples  from  instrument
  1405.      manuals  and  easily translate them into  the  appropriate  QuickBASIC
  1406.      commands.
  1407.      
  1408.           For  instance,  the programming manual for the HP  5334A  counter
  1409.      gives   this  example  for  initializing  the  5334  using  an   HP-85
  1410.      controller:
  1411.      
  1412.      10   CLEAR                    'Clear controller
  1413.      20   CLEAR 703                'Clear device at address 3
  1414.      30   OUTPUT 703 ;"ID"         'Issue ID command to device at address 3
  1415.      40   ENTER 703 ;A$            'Read 5334 "ID" response into A$
  1416.      50   PRINT A$                 'Print A$
  1417.      60   OUTPUT 703 ;"IN"         'Set 5334 to initialized state
  1418.      70   END                      'All done
  1419.      
  1420.           To  do the same thing with QuickBASIC and DRVR488, you  would  do
  1421.      this:
  1422.      
  1423.      PRINT #2, "CLEAR"
  1424.      PRINT #2, "CLEAR CNTR5334"    'You could use 03, but I prefer this
  1425.      PRINT #2, "OUTPUT CNTR5334; ID"
  1426.      PRINT #2, "ENTER CNTR5334"    'This puts the counter into TALK mode
  1427.      INPUT #3, A$
  1428.      PRINT A$
  1429.      PRINT #2, "OUTPUT CNTR5334; IN"
  1430.      END
  1431.      
  1432.           As you can see, the syntax is very similar to the examples in the
  1433.      HP  manuals. This article is not meant to be a review of  the  DRVR488
  1434.      software, but is just my experiences using this decent product. Like I
  1435.      said  before, there are now a lot of alternatives available  for  GPIB
  1436.      instrumentation  control that weren't available when I  first  started
  1437.      using this product, but I am completely satisfied with it.
  1438.      
  1439.           For  information  about this and other IOTech products,  you  can
  1440.      
  1441.      The QBNews                                                     Page 22
  1442.      Volume  1, Number  5                                 December  1, 1990
  1443.  
  1444.      call or write IOTech at:
  1445.      
  1446.           IOTech, Inc.
  1447.           25971 Cannon Rd.
  1448.           Cleveland, OH 44146
  1449.           (216) 439-4091
  1450.      
  1451.      **********************************************************************
  1452.           Dave  Cleary is an electronics engineer for Vectron  Laboratories
  1453.      in  Norwalk, CT. Besides putting together the QBNews, he is  also  the
  1454.      author  of Crescent Software's PDQComm. He can be reached in  care  of
  1455.      this newsletter.
  1456.      **********************************************************************
  1457.      
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.      The QBNews                                                     Page 23
  1499.      Volume  1, Number  5                                 December  1, 1990
  1500.  
  1501.  
  1502.  
  1503.      ----------------------------------------------------------------------
  1504.                        N e w   a n d   N o t e w o r t h y
  1505.      ----------------------------------------------------------------------
  1506.  
  1507.      GEOGRAF Level One from GEOCOMP Corporation
  1508.      
  1509.      GEOCOMP announces the release of GEOGRAF Level One. GEOGRAF Level  One
  1510.      enables  programmers to add customized graphics to  their  application
  1511.      programs,  without having to develop complex graphics  device  drivers
  1512.      for  each  device  they wish to support. The  device  independence  of
  1513.      GEOGRAF  Level One allows users to output their graphics to  virtually
  1514.      any output device. GEOGRAF Level One is priced at $149.
  1515.      
  1516.      GEOCOMP   Corporation
  1517.      66 Commonwealth Ave.
  1518.      Concord, MA 01742
  1519.      (800)822-2669
  1520.      
  1521.      
  1522.      If  you  have  a  product  you would  like  to  announce  in  New  and
  1523.      Noteworthy, send a 5 or 6 line paragraph to:
  1524.      
  1525.           The QBNews
  1526.           P.O. Box 507
  1527.           Sandy Hook, CT 06482
  1528.      
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.      The QBNews                                                     Page 24
  1558.      Volume  1, Number  5                                 December  1, 1990
  1559.  
  1560.  
  1561.  
  1562.      ----------------------------------------------------------------------
  1563.      A n d   I   H e a r d   i t   T h r o u g h   t h e   G r a p e v i n e
  1564.      ----------------------------------------------------------------------
  1565.  
  1566.      Exerpts from the QUIK_BAS echo
  1567.      =====================================================================
  1568.                               Integers between 32K and 64K
  1569.      =====================================================================
  1570.      From:    Larry Stone
  1571.      To:      Mike Welch
  1572.      Subject: Boy, do I feel dumb
  1573.      
  1574.      MW> In the QBQUIRKS file by MicroHelp (a freely distributed text file
  1575.      MW> with tons of neato QB tidbits), there's the statement:
  1576.      MW>         "Converting large numbers to integers"
  1577.       
  1578.      MW>         "A common technique to stuff a large number (between 32767
  1579.      MW>         and 65536) into a BASIC integer is:
  1580.       
  1581.      MW>                 number! = 50000
  1582.      MW>                 number% = VAL("&H" + HEX$(number!))
  1583.       
  1584.      MW>         However, QB's VAL() function is quite sluggish.  The
  1585.      MW>         following technique produces the same result, and runs
  1586.      MW>         approximately 20-30% faster, depending upon the compiler:
  1587.       
  1588.      MW>         number! = 50000
  1589.      MW>         number% = CVI(CHR$(number! MOD 256) + CHR$(number! \ 256))
  1590.       
  1591.      MW> Hmmm.  Well, I want the book on these "common techniques."  I've
  1592.      MW> beat my head against the wall trying to find a way to speed up
  1593.      MW> long integer processing...when the range was just a few
  1594.      MW> thousand > 32767.  Gee.  I know hex numbers will be 'smaller,' but
  1595.      MW> why didn't I think...
  1596.      
  1597.      The above technique is slow because of the use of single precission
  1598.      number (forcing the use of the floating point library).   In the
  1599.      latest issue of the BUG Newsletter from MicroHelp, they suggest an
  1600.      alternative:
  1601.      
  1602.          BigNum& = 65000     'A big number between 0 and 65535
  1603.          Intg% = BigNum& + 65536 * (BigNum& > 32767)
  1604.      
  1605.      The above will allow your exe to shrink by 10K+ (assuming no other
  1606.      floating point is used) and executes 47 times faster than the code
  1607.      you listed.
  1608.      
  1609.      If you use either of the above posted techniques, you will discover
  1610.      that the resultant number is a signed, negative number for any number
  1611.      between 32767 and 65536.  With this in mind, I tried the following:
  1612.      
  1613.       number& = 65000
  1614.       IF number& > 32767 THEN intg% = number& - 65536 ELSE intg% = number&
  1615.      
  1616.      
  1617.      The QBNews                                                     Page 25
  1618.      Volume  1, Number  5                                 December  1, 1990
  1619.  
  1620.      Along the same vein, when an asm routine passes back a large integer,
  1621.      QB will see it as a negative.  To convert the negative to a number in
  1622.      the 32K - 64K range,
  1623.      
  1624.          IF intg% < 0 then number& = intg% + 65536 ELSE number& = intg%
  1625.      
  1626.      This code is somewhat faster again because there is no multiplication
  1627.      used.
  1628.       
  1629.      =====================================================================
  1630.      From:    Tom Hanlin 
  1631.      To:      Mike Welch
  1632.      Subject: Re: Boy, do I feel dumb
  1633.      
  1634.         You can use that unsigned integer trick in QuickBASIC-- it won't
  1635.      work for PRINTing the numbers, calculations, or anything, but it can
  1636.      be a neat way of saving memory during file storage or in arrays.  Just
  1637.      convert the number to a LONG integer when you want to use it:
  1638.        L& = CVL(MKI$(UnsignedInt%) + STRING$(2, 0))
  1639.        The same trick works the other way, too:
  1640.        IF L& < 65536 THEN UnsignedInt% = CVI(LEFT$(MKL$(L&), 2)) ELSE error
  1641.       
  1642.         I don't -think- this brings in the floating point libraries... it
  1643.      shouldn't, but the BASIC runtimes are so tangled,anything is possible!
  1644.         Actually, it would be a good idea to check that L& >= 0 too, on the
  1645.      long --> int conversion.  Either case would indicate an overflow.
  1646.      
  1647.      =====================================================================
  1648.      From:    Mike Welch
  1649.      To:      Tom Hanlin
  1650.      Subject: Re: Boy, do I feel dumb
  1651.      
  1652.      Long integers& themselves do not require floating point, but I'm not
  1653.      sure about the CVI function...think it does!
  1654.      
  1655.      =====================================================================
  1656.                                       Delay Loops
  1657.      =====================================================================
  1658.      From:    Doug Wilson @ 965/9
  1659.      To:      Tim Downey
  1660.      Subject: Re: PowerBASIC
  1661.      
  1662.      On August 14, Tim Downey writes to Mike Welch (but intends for Henry
  1663.      Piper -- go figure...):
  1664.      
  1665.      > Here's a little routine that does away with most of the overhead
  1666.      > (nearly 3k) of the SLEEP function:
  1667.      
  1668.      > SUB Delay (t%)
  1669.      
  1670.      >   StopTime& = (TIMER + t%) MOD 86400
  1671.      >   DO
  1672.      >     z$ = INKEY$
  1673.      >     IF INT(TIMER) >= StopTime& THEN EXIT DO
  1674.      
  1675.      The QBNews                                                     Page 26
  1676.      Volume  1, Number  5                                 December  1, 1990
  1677.  
  1678.      >   LOOP UNTIL z$ <> ""
  1679.      
  1680.      > END SUB
  1681.      
  1682.      > Note the MOD 86400.  That takes care of the midnight rollover
  1683.      > problem.  Works like a champ for me.
  1684.      
  1685.      You are on the right track, but if you specify a delay which
  1686.      takes you beyond midnight, the MOD 86400 sets StopTime& to a value
  1687.      less than the current value of TIMER and your IF-THEN statement kicks
  1688.      you out of the loop immediately.  (I verified this by resetting my
  1689.      system clock to a few seconds before midnight before running the
  1690.      routine.)
  1691.      
  1692.      I posted a solution to this quite a few months ago.  Darned if I
  1693.      remember how I did it then, but modifying your code:
  1694.      
  1695.      SUB Delay (t%)
  1696.      
  1697.         StopTime& = TIMER + t%
  1698.         DO
  1699.            IF LEN(INKEY$) THEN EXIT DO
  1700.         LOOP UNTIL (StopTime& - TIMER) MOD 86400 <= 0
  1701.      
  1702.      END SUB
  1703.      
  1704.      This way, StopTime& is always larger than TIMER while in your delay.
  1705.      If you cross over midnight and TIMER drops back to zero, the MOD 86400
  1706.      takes care of it.   Also, there is no need to convert TIMER to an
  1707.      integer.  Decimal fractions work just fine, and since the thrust
  1708.      was to get to smaller code than the SLEEP function, why throw in
  1709.      an extra function?  (This is also useful for folks using earlier
  1710.      QB versions since SLEEP was not introduced until QB4.5.)
  1711.      
  1712.      I tested this by resetting my system clock to a few seconds before
  1713.      midnight also and it "works like a champ".  (Where have I heard that
  1714.      before? <grin>)
  1715.      
  1716.      You'll also notice I reorganized slightly to make the main function
  1717.      a delay loop rather than a key test loop.  It seemed to make more
  1718.      sense to have the delay be the controlling factor in the loop, with
  1719.      the key press just being a way to exit the loop on an exception basis.
  1720.      This is strictly personal preference, either way would work.
  1721.      
  1722.      ======================================================================
  1723.      From:    Larry Westhaver
  1724.      To:      Tom Hanlin
  1725.      Subject: Re: REM $INCLUDE
  1726.      
  1727.        Tom, thanks for chiming in about the 'recurring timer
  1728.      question'.  I've seen so many wierd approaches to creating a
  1729.      timeout within a program that my head spins from the sheer
  1730.      numbers...  You beat me to the punch on this one.
  1731.      
  1732.      
  1733.      The QBNews                                                     Page 27
  1734.      Volume  1, Number  5                                 December  1, 1990
  1735.  
  1736.        For some odd reason most folks want to base their timeouts on
  1737.      some calculated time in the future (an offset of x minutes from
  1738.      the present time).  It really makes more sense to treat BASIC's
  1739.      TIME$ string or TIMER value as a 'metronome'.
  1740.      
  1741.        Who cares about the actual time when all you want to do is
  1742.      pause for some number of seconds or clock ticks?  I've used the
  1743.      method you alluded to many times.
  1744.      
  1745.        I usually approach the problem something like this:
  1746.      
  1747.              SecondsToPause% = 10
  1748.              DO
  1749.                  IF CurrentTIME$ <> TIME$ THEN
  1750.                      TickCount% = TickCount% + 1
  1751.                      CurrentTIME$ = TIME$
  1752.                  END IF
  1753.              LOOP UNTIL TickCount% > SecondsToPause%
  1754.      
  1755.        I can think of many variations on this theme, each having it's
  1756.      own advantages.  Sometimes I use the most active byte of the BIOS
  1757.      master clock count as a metronome when I need higher resolution
  1758.      than that offered by TIME$.
  1759.      
  1760.        Anyway, my point is this: Do I care if my TIME$ string has done
  1761.      a midnight rollover?  Not a bit...  I'm just tapping out the
  1762.      seconds to the rythm of TIME$.
  1763.      
  1764.      Larry Westhaver
  1765.      
  1766.      PS. I realize that this is like preaching to the converted but I just
  1767.      wanted to throw in my 2 cents :-)
  1768.      
  1769.      ======================================================================
  1770.      From:    Tom Hanlin
  1771.      To:      Tim Kilgore
  1772.      Subject: Re: REM $INCLUDE
  1773.      
  1774.          SUB Delay(xxx)
  1775.          xxy = xxx
  1776.          DO
  1777.             t = TIMER
  1778.             WHILE t = TIMER
  1779.             WEND
  1780.             xxy = xxy - 1
  1781.          LOOP WHILE xxy
  1782.          END SUB
  1783.      
  1784.         Sorry if it's sloppy, my online time is out!
  1785.      
  1786.      ======================================================================
  1787.                                     Binary Numbers
  1788.      ======================================================================
  1789.      From:    Richard Randles
  1790.      
  1791.      The QBNews                                                     Page 28
  1792.      Volume  1, Number  5                                 December  1, 1990
  1793.  
  1794.      To:      Brian Wasserman
  1795.      Subject: Re: Binary to Numbers
  1796.      
  1797.       * Reply on a message originally to All
  1798.      BW> I understand how to convert Binary to Integers, and Integers back
  1799.      BW> to Binary, but I am lost when it comes to negative numbers.  Can
  1800.      BW> you tell me how to convert a binary number to a negative integer?
  1801.      BW> How about a negative integer to a Binary number?
  1802.      
  1803.      To change a positive number into a negative number, you do a two's
  1804.      compliment, that is, invert all bits (change 0's to 1's and 1's to
  1805.      0's), then add 1.
  1806.      
  1807.      To convert 17 decimal to -17: 00000000 00010001
  1808.      Invert all bits:              11111111 11101110
  1809.      Add 1:                        11111111 11101111
  1810.      
  1811.      You follow the same procedure to convert negatives to positives.
  1812.      
  1813.      ======================================================================
  1814.      From:    Louis Siadous
  1815.      To:      Spencer Wood
  1816.      Subject: Binary To Decimal
  1817.      
  1818.      Sorry to correct you Spencer but binary to decimal is as follows:
  1819.      
  1820.        Bit   7   6   5   4   3   2   1   0
  1821.      Value  128  64  32  16  8   4   2   1
  1822.      
  1823.      Even is you can't remember those you can just do a 2^<bit> to get the
  1824.      decimal value of a particular bit.  In other words 2^0 = 1, 2^1 = 2.
  1825.      You are correct that for integers BASIC uses the leftmost bit 15 or
  1826.      31, integer or long integer, set on (1) to indicate a negative number.
  1827.      Hope this clears it up.
  1828.      
  1829.      Louis
  1830.      
  1831.      ======================================================================
  1832.      From:    Donn Bly
  1833.      To:      Brett Emery
  1834.      Subject: 16-bit Numbers
  1835.      
  1836.      on <Aug 30 09:03> Brett Emery (1:159/500) writes (to All):
  1837.      
  1838.       BE> I would like to know how to convert a 16-bit (2 byte) number into
  1839.       BE> binary 1's & 0's.  The number is the result from a call
  1840.       BE> interruptx but each bit stands for something else.  So I need to
  1841.       BE> know how to get each piece of info out of that number - 16-bit to
  1842.       BE> binary. Thanks to All that reply - Brett Emery.
  1843.      
  1844.      Lets see...
  1845.      L% = <Integer>
  1846.      X$ = ""
  1847.      FOR I% = 15 TO 0 STEP -1
  1848.      
  1849.      The QBNews                                                     Page 29
  1850.      Volume  1, Number  5                                 December  1, 1990
  1851.  
  1852.          IF L% AND (2 ^ I%) THEN X$ = X$ + "1" ELSE X$ = X$ + "0"
  1853.      NEXT
  1854.      PRINT X$
  1855.      
  1856.      This code should make X$ contain the binary representation of the
  1857.      integer L%.
  1858.      
  1859.      ======================================================================
  1860.      From:    Donn Bly
  1861.      To:      Larry Stone
  1862.      Subject: 16-bit Numbers
  1863.      
  1864.      on <Sep 01 17:48> Larry Stone (1:129/34) writes (to Donn Bly):
  1865.      
  1866.      LS> Nice code, Donn.  About the best I've ever seen for direct
  1867.      LS> conversions.
  1868.      LS> One question.  At 07:02am, I'm only good for fishing.  How did you
  1869.      LS> do it?  Lots of coffee?
  1870.      
  1871.      Thank you.  I gave up on coffee before work -- agrivates my ulcers.
  1872.      I got up early that morning, and firured that I would read a few
  1873.      messages before going to work.
  1874.      
  1875.       LS> is easily modified for 32 bit numbers.  Also, looking at it, I
  1876.       LS> see how almost
  1877.       LS> the same code could be employed to convert the string back to an
  1878.       LS> integer.
  1879.      
  1880.       LS> L% = 0
  1881.       LS> FOR I% = 0 TO 15
  1882.       LS>     IF (VAL(X$) AND (2 ^ I%)) = 2 ^ I% THEN L% = L% + (2 ^ I%)
  1883.       LS> NEXT
  1884.      
  1885.       LS> Is this what you do?
  1886.      
  1887.      No.
  1888.      
  1889.      X$ = "1001"
  1890.      Accum& = 0
  1891.      FOR I% = 1 TO LEN(X$)
  1892.          Accum& = Accum& * 2
  1893.          IF MID$(X$, I%, 1) = "1" THEN Accum& = Accum& + 1
  1894.      NEXT
  1895.      PRINT Accum&
  1896.      
  1897.      This code handles variable length "binary" strings.  It can also be
  1898.      easily modified to handle any base number.  BTW, your line of code:
  1899.      
  1900.       LS> IF (VAL(X$) AND (2 ^ I%)) = 2 ^ I% THEN L% = L% + (2 ^ I%)
  1901.      
  1902.      can be optimized:
  1903.      
  1904.           IF (VAL(X$) AND (2^I%)) THEN L% = L% + 2 ^ I%
  1905.      
  1906.      
  1907.      The QBNews                                                     Page 30
  1908.      Volume  1, Number  5                                 December  1, 1990
  1909.  
  1910.      No need to do those extra 16 calculations, and the comparisons should
  1911.      be a wee bit faster. ;-)  However, your code give you what I think are
  1912.      your desired results.  X$ should contain a series of ones and zeros,
  1913.      and I don't think that you really want to take the VAL() of it.
  1914.      
  1915.      ======================================================================
  1916.      From:    Cornel Huth
  1917.      To:      Louis Siadous
  1918.      Subject: DEC 2 BIN (simply)
  1919.      
  1920.      I've seen a couple of convert to binary routines
  1921.      lately but they seem to need the power function.
  1922.      Since I do a lot of work in assembly, and the
  1923.      power function per se is not at all needed for
  1924.      decimal to binary fformatting I decided to hop
  1925.      into QB and punch a routine that does the conversion
  1926.      without using the ^ operator in BASIC...let's UL it:
  1927.      
  1928.      DEFINT A-Z
  1929.      'routine to convert base 10 to base 2
  1930.      hibit = 7       'number of significant bits - 1
  1931.      test = 240      'decimal number to convert
  1932.      FOR i = 0 TO hibit
  1933.         q = test \ 2
  1934.         IF q THEN r = test MOD (q * 2) ELSE r = test
  1935.         IF r THEN b2$ = "1" + b2$ ELSE b2$ = "0" + b2$
  1936.         test = q
  1937.      NEXT
  1938.      PRINT b2$
  1939.      b2$ = ""
  1940.      
  1941.      That's it.  Binary to decimal conversion is left to the
  1942.      reader (don't you just hate that?).
  1943.      
  1944.      chh
  1945.      
  1946.      ======================================================================
  1947.      From:    Richard Randles
  1948.      To:      Donn Bly
  1949.      Subject: Re: 16-bit Numbers
  1950.      
  1951.      Here's a way that's a little faster.  I just compared the two on a
  1952.      386SX and got these results.  Times shown are for looping through each
  1953.      method 1000 times.
  1954.      
  1955.                      Using 2 ^ n             Using b + b
  1956.                      and x$ + x$             and Mid$(x$   
  1957.                      -----------             ------------
  1958.      Environment      59.48 sec                1.82 sec
  1959.      Compiled         57.45 sec                 .39 sec
  1960.      
  1961.           
  1962.      L% = <integer>
  1963.      x$ = "0000000000000000"
  1964.      
  1965.      The QBNews                                                     Page 31
  1966.      Volume  1, Number  5                                 December  1, 1990
  1967.  
  1968.      Byte& = 1
  1969.      FOR i% = 16 TO 1 STEP -1
  1970.         IF L% AND Byte& THEN MID$(x$, i%, 1) = "1"
  1971.         Byte& = Byte& + Byte&
  1972.      NEXT i%
  1973.      
  1974.      If more speed is needed, add
  1975.              Pointer& = SADD(x$) - 1
  1976.      before the FOR and change the IF line to
  1977.              IF L% AND Byte& then POKE Pointer& + i%, 49
  1978.      
  1979.      ======================================================================
  1980.      From:    Donn Bly
  1981.      To:      Richard Randles
  1982.      Subject: Re: 16-bit Numbers
  1983.      
  1984.      on <Sep 09 11:03> Richard Randles (1:157/98.1) writes (to Donn Bly):
  1985.      
  1986.       RR> Here's a way that's a little faster.  I just compared the two on
  1987.      
  1988.      I do something similiar at work.  I have a program that converts a
  1989.      two-dimentional array (32 x n) that contains flag bits into long
  1990.      integers for storage.  If I can remember it, I will bring in the code
  1991.      and post it tomorrow.
  1992.      
  1993.       RR>    Byte& = Byte& + Byte&
  1994.      
  1995.      Here is something that I haven't benchmarked to see which is faster,
  1996.      the above or B = B * 2.  The optimizer should turn them into the same
  1997.      code...
  1998.      
  1999.       RR>         Pointer& = SADD(x$) - 1
  2000.       RR> before the FOR and change the IF line to
  2001.       RR>         IF L% AND Byte& then POKE Pointer& + i%, 49
  2002.      
  2003.      I wouldn't.  I never trust SADD beyond a single line of code. 
  2004.      
  2005.      ======================================================================
  2006.                                        Colors
  2007.      ======================================================================
  2008.      From:    Larry Stone
  2009.      To:      Dan Davidson                             Msg #153, 29-Sep-90
  2010.      Subject: monochrome display toggles
  2011.      
  2012.      > I use QuickBASIC 4.5, with a monochrome monitor.  I can use bright,
  2013.      > underlined, flashing or reverse display in setting up my DOS prompt,
  2014.      > but haven't found out how to do those things with QuickBASIC.
  2015.      
  2016.      Monochrome COLOR commands:
  2017.      
  2018.          COLOR               Description
  2019.          *****               ***********
  2020.          7, 0                Normal white on black
  2021.          15, 0               Intense white on black
  2022.      
  2023.      The QBNews                                                     Page 32
  2024.      Volume  1, Number  5                                 December  1, 1990
  2025.  
  2026.          0, 7                Inverse video
  2027.          1, 0                Underlined white on black
  2028.          9, 0                Intense underlined white on black
  2029.          23, 0               Flashing white on black
  2030.          31, 0               Flashing intense white on black
  2031.          17, 0               Flashing underlined white on black
  2032.          25, 0               Flashing intense underlined white on black
  2033.      
  2034.      Not all monochrome display adapters will handle all of the above
  2035.      listed colors.
  2036.      
  2037.      BTW, monochrome attributes are either normal, intense, or underlined,
  2038.      or, a combination thereof.  Underlined is produced with the forground
  2039.      color attribute *blue*.  To calculate intense, add 8 to the attribute,
  2040.      ie, intense white is 7 + 8 = 15, intense underlined is intense blue or
  2041.      1 + 8 = 9.  To calculate flashing, add 16 to the forground color, ie,
  2042.      intense flashing white is 15 + 16 = 31.  Inverse video cannot be
  2043.      underlined nor intense.
  2044.      
  2045.      COLOR 7, 0: PRINT "This is normal"
  2046.      COLOR 1, 0: PRINT "Underlined"
  2047.      COLOR 9, 0: PRINT "Intense underline"
  2048.      COLOR 23, 0: PRINT "Flashing"
  2049.      COLOR 25, 0: PRINT "Intense flashing"
  2050.      
  2051.      ======================================================================
  2052.                                     BSAVE/BLOAD
  2053.      ======================================================================
  2054.      From:    Larry Westhaver
  2055.      To:      Tim Kilgore
  2056.      Subject: Binary files
  2057.      
  2058.      Tim, the 7 byte header that QuickBASIC tacks onto the front of any
  2059.      BSAVE contains some information that QuickBASIC needs to BLOAD
  2060.      the file *if* you choose to use the syntax: BLOAD "filename"
  2061.      without the offset parameter.  Have you ever wondered how BLOAD
  2062.      knows where in memory the image came from?
  2063.      
  2064.      Anyway, here's the skinny...
  2065.      
  2066.      Byte #1 - Always an ASCII 253 (identifies the file as BSAVE/BLOAD)
  2067.      Byte #2 - Low byte of segment where image originated
  2068.      Byte #3 - High byte of segment where image originated
  2069.      Byte #4 - Low byte of offset into segment where file originated
  2070.      Byte #5 - High byte of offset into segment where file originated
  2071.      Byte #6 - Low Byte of image length
  2072.      Byte #7 - High byte of image length
  2073.      
  2074.      So, to interpret the header...
  2075.      
  2076.      'define BSAVE file header
  2077.      TYPE HeaderStruc
  2078.          BSaveID AS STRING * 1    'ID always ASCII 253    (byte)
  2079.          SegByte AS INTEGER       'Segment of data origin (word)
  2080.      
  2081.      The QBNews                                                     Page 33
  2082.      Volume  1, Number  5                                 December  1, 1990
  2083.  
  2084.          OffByte AS INTEGER       'Offset of data origin  (word)
  2085.          LenByte AS INTEGER       'Length of data         (word)
  2086.      END TYPE
  2087.      
  2088.      'allocate memory for BSAVE file header structure
  2089.      DIM Header AS HeaderStruc
  2090.      
  2091.      'open a BSAVE file
  2092.      OPEN "E:\GDP\SCREENS\XMAS.80C" FOR BINARY AS #1 LEN = LEN(Header)
  2093.      GET #1, 1, Header
  2094.      CLOSE #1
  2095.      
  2096.      CLS
  2097.      
  2098.      'ID byte
  2099.      PRINT "  BSAVE file ID byte:"; ASC(Header.BSaveID)
  2100.      
  2101.      'segment of origin
  2102.      PRINT "BSAVE'd from Segment: "; HEX$(Header.SegByte)
  2103.      
  2104.      'offset of origin
  2105.      PRINT " BSAVE'd from Offset: "; HEX$(Header.OffByte)
  2106.      
  2107.      'length of data
  2108.      PRINT "Length of BSAVE data:"; Header.LenByte
  2109.      
  2110.      I hope this helps, I uncovered these facts in 1985 when I wrote
  2111.      GDPEdit (a screen design tool that I sell mail order through
  2112.      Komputerwerk Inc., one of the first QuickBASIC add-on library
  2113.      marketers)
  2114.      
  2115.      Larry
  2116.      
  2117.      ======================================================================
  2118.                                    Do It with Booleans
  2119.      ======================================================================
  2120.      From:    Tom Hanlin
  2121.      To:      All
  2122.      Subject: Booleans
  2123.      
  2124.      A little bit <!> on Booleans, since it appears they're not as well
  2125.      known as they might be...
  2126.      uickBASIC allows any conditional expression to be converted to a
  2127.      Boolean value.  In other words, you can say something like:
  2128.          A = (B <> 0)
  2129.      ...in which case, A will be zero if B is zero, or -1 if B is not zero. 
  2130.      The parentheses are important.
  2131.      
  2132.      As far as BASIC is concerned, "true" is any nonzero value.  Given a
  2133.      conditional of the type above, "true" will always evaluate to -1,
  2134.      however.  This is because QuickBASIC treats its Boolean operations
  2135.      like the equivalent arithmetic operations:  NOT -1 is 0, NOT 0 is -1;
  2136.      however, NOT 1 won't give you 0, but rather something like -2, which
  2137.      is also "true"... explanation?  The numbers are treated as a sequence
  2138.      
  2139.      The QBNews                                                     Page 34
  2140.      Volume  1, Number  5                                 December  1, 1990
  2141.  
  2142.      of bits: zero is 0000,0000, and negative one is 1111,1111.  Any
  2143.      Boolean-type operation is essentially equivalent to a math operation
  2144.      in QuickBASIC, operating on all of the bits in the numbers concerned.
  2145.      I'm not sure I'm making sense to y'all here, but so it goes...
  2146.      
  2147.      This equivalence is a bit dangerous but mostly useful.  It allows you
  2148.      to make an integer into a Boolean value, essentially.  You can do
  2149.      things like:
  2150.      
  2151.      IF PrinterSelected THEN LPRINT St$ ELE PRINT St$
  2152.      
  2153.      More on this later, I'm running out of time right now.  Booleans
  2154.      (named after George Boole, who invented such math... incidentally,
  2155.      he was delighted when he discovered 'em.  He was a pure theoretical
  2156.      mathematician and was pleased to come up with something that [he
  2157.      thought] would never have any practical application!  In truth, it's
  2158.      fundamental to computers, valuable in symbolic logic and philosophy,
  2159.      and very, very practical for many things!)
  2160.      
  2161.      [EDITOR'S NOTE]
  2162.           The purpose of this conference is to discuss Microsoft
  2163.      QuickBASIC and related applications and utilities. SysOps looking
  2164.      for a GroupMail or EchoMail link into QUIK_BAS should contact
  2165.      Fidonet node 107/323 or call 1-201-247-8252. People wishing to read
  2166.      QUIK_BAS can do so by calling The Crescent Software Support BBS at
  2167.      1-203-426-5958.
  2168.      
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.      The QBNews                                                     Page 35
  2197.  
  2198.  
  2199.      ----------------------------------------------------------------------
  2200.                                       E O F
  2201.      ----------------------------------------------------------------------
  2202.  
  2203.      Receiving The QBNews
  2204.      
  2205.           The  QBNews is distributed mainly through BBS systems around  the
  2206.      world.  Some  of  the networks it gets  distributed  through  are  SDS
  2207.      (Software   Distribution   System),  PDN   (Programmers   Distribution
  2208.      Network),  and SDN (Shareware Distribution Network). Ask the  sysop of
  2209.      your  local  board about these networks to see if there is a  node  in
  2210.      your area.
  2211.      
  2212.           The  QBNews  can  also  be found  on  CompuServe  in  the  MSLang
  2213.      (Microsoft  Language)  forum. It can be found in file area 1 or  2  of
  2214.      that  forum. Just search for the keyword QBNEWS. The QBNews will  also
  2215.      be available on PC-Link. I send them to Steve Craver, who is the BASIC
  2216.      Programming  Forum Host on PC-LINK and he will make them available.  I
  2217.      would appreciate anybody who could upload The QBNews to other services
  2218.      such as GENIE since I don't have access to these.
  2219.      
  2220.           I  have also set up a high speed distribution network for  people
  2221.      who  would  like to download The QBNews at 9600  baud.  The  following
  2222.      boards allow first time callers download privileges also. They are:
  2223.      
  2224.          Name           Sysop       Location       Number         Node #
  2225.      ---------------------------------------------------------------------
  2226.      
  2227.      Treasure Island  Don Dawson    Danbury, CT    203-791-8532   1:141/730
  2228.      
  2229.      Gulf Coast BBS   Jim Brewer New PortRichey,FL 813-856-7926   1:3619/20
  2230.      
  2231.      221B Baker St.   James Young   Panama City,FL 904-871-6536   1:3608/1
  2232.      
  2233.      EMC/80           Jim Harre     St. Louis, MO  314-843-0001   1:100/555
  2234.      
  2235.      Empire Builder   Bob Fetherson Charleston, OR 503-888-4121   1:356/4
  2236.      
  2237.      
  2238.           Finally, you can download The QBNews from these vendors BBS's:
  2239.      
  2240.      The Crescent Software Support BBS   203-426-5958
  2241.      
  2242.      The Microhelp BUG BBS               404-552-0567
  2243.                                          404-594-9625
  2244.      
  2245.      
  2246.      You do not have to be a customer of these vendors in order to download
  2247.      The  QBNews, but the Microhelp BBS only allows non-members 15  minutes
  2248.      of time per call.
  2249.      
  2250.           If  you  would  like  to receive The QBNews on  disk,  I  am  now
  2251.      offering a subscription for volume 2 next year. If you subscribe,  you
  2252.      will  receive a disk with all the issue from volume 1, plus  you  will
  2253.      
  2254.      The QBNews                                                     Page 36
  2255.      Volume  1, Number  5                                 December  1, 1990
  2256.  
  2257.      receive  4  disks next year as each of the 4 issues of volume  2  come
  2258.      out. I have decided against offering individual disks as I don't  have
  2259.      the time to administer that. The cost of a subscription is as follows:
  2260.      
  2261.      Base Price for Volume 2:                $15.00
  2262.      Additional charge for 3.5" disks:        $5.00
  2263.      Additional charge for international:     $5.00
  2264.      
  2265.           The  base price includes 5.25" 360k disks. Send a check or  money
  2266.      order in U.S. funds to:
  2267.      
  2268.           The QBNews
  2269.           P.O. Box 507
  2270.           Sandy Hook, CT 06482
  2271.      
  2272.           Please  be  sure  to specify what archive format  you  want.  The
  2273.      QBNews normally uses PKZip as it's archiver.
  2274.      ----------------------------------------------------------------------
  2275.  
  2276.      Advertising in The QBNews
  2277.      
  2278.           The  QBNews  now offers an outstanding opportunity  to  advertise
  2279.      your products to Microsoft QuickBASIC users. For about the same  price
  2280.      a "classified" ad goes for in Dr. Dobbs Journal or Computer  Language,
  2281.      you  receive  a  full page ad in The QBNews.  There  is  also  another
  2282.      important  difference.  While these magazines cater to  C  programmers
  2283.      because  they  feel "professionals" wouldn't use  anything  else,  The
  2284.      QBNews is especially for QuickBASIC programmers. To see an example  of
  2285.      the type of ad you will receive, see the Crescent Software ad  earlier
  2286.      in the newsletter.
  2287.      
  2288.           You get a 50 line by 70 column ad for $300. If you are interested
  2289.      in  placing an ad in a future QBNews, send a check along with  the  ad
  2290.      (Ascii text on disk preferred) to:
  2291.      
  2292.           The QBNews
  2293.           P.O. Box 507
  2294.           Sandy Hook, CT 06482
  2295.      ----------------------------------------------------------------------
  2296.  
  2297.      Submitting Articles to The QBNews
  2298.      
  2299.           The QBNews relies on it's readers to submit articles. If you  are
  2300.      interested in submitting an article, please send a disk of Ascii  text
  2301.      of no more than 70 characters per line to:
  2302.      
  2303.           The QBNews
  2304.           P.O. Box 507
  2305.           Sandy Hook, CT 06482
  2306.      
  2307.      Articles can also be submitted via E-Mail. Send them via Compuserve to
  2308.      76510,1725 or via FidoNet to 1:141/777. I can be reached at the  above
  2309.      addresses as well as on Prodigy as HSRW18A.
  2310.      
  2311.  
  2312.  
  2313.  
  2314.  
  2315.      The QBNews                                                     Page 37
  2316.  
  2317.