home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / qbupdate / update.doc
Encoding:
Text File  |  1988-04-14  |  15.3 KB  |  383 lines

  1.                  UPDATE.DOC
  2.         Release Notes for Microsoft(R) QuickBASIC Version 4.00b
  3.          for IBM(R) Personal Computers and Compatibles
  4.  
  5.         (C) Copyright Microsoft Corporation, 1987, 1988
  6.  
  7. This document is divided into three parts. Part 1 describes features that have
  8. been added since Microsoft(R) QuickBASIC 4.0 was released. Part 2 lists
  9. corrections made to the software. Part 3 describes how to install a patch for
  10. MS-DOS(R) 3.20 for systems that meet certain requirements.
  11.  
  12. ===< Part 1: New Features >===
  13.  
  14. ---< Enhanced Error Handling >---
  15.  
  16. Microsoft QuickBASIC Version 4.00b includes an important new error-handling
  17. feature for multiple-module programs. See Chapter 6 of Programming in BASIC:
  18. Selected Topics for a thorough discussion of error handling and event handling.
  19.  
  20. In previous versions of QuickBASIC, an error in a module that did not contain
  21. an error handler caused the program to terminate immediately, even if an error
  22. handler was present in a different module. QuickBASIC 4.00b first looks for an
  23. active error handler in the module where the error occurred, then in the module
  24. that invoked that module, and so on. QuickBASIC follows the chain of procedure
  25. invocations back until it finds an active error handler or reaches the
  26. program's main module. If QuickBASIC cannot find an error handler by this
  27. process, the program terminates with an error message.
  28.  
  29. Note that if the error occurs in an event-handling routine, however, QuickBASIC
  30. does not search for an error handler beyond the module that invoked the event
  31. handler.
  32.  
  33. This feature affects the behavior of the RESUME statement. In previous versions
  34. of QuickBASIC, RESUME caused the program to resume execution at the "current
  35. statement," meaning the statement that caused the error. In a QuickBASIC 4.00b
  36. multiple-module program, however, the "current statement" is the last executed
  37. statement in the module containing the active error handler.
  38.  
  39. The new error-handling feature has a similar effect on the ERL function.
  40. In QuickBASIC 4.00b, the program line that the ERL function identifies as the
  41. source of an error is the line that contains the last executed statement in the
  42. module where the active error handler is located.
  43.  
  44. ---< New Screen Mode >---
  45.  
  46. The new screen mode, mode 4, is supported on the following machines:
  47.  
  48.   Olivetti(R) Personal Computers, models M24, M28, M240, M280, M380
  49.   AT&T(R) 6300 Personal Computer series
  50.  
  51. Mode 4 is a 640x400 graphics mode that allows you to specify 1 of 16 colors
  52. (0-15) as the foreground color. Use the SCREEN statement to select the mode, 
  53. and use the COLOR statement to select the foreground color. The example below
  54. shows how to specify this mode with a blue foreground color.
  55.  
  56. SCREEN 4
  57. COLOR 1
  58.  
  59. See the Basic Language Reference for more information on these statements.
  60.  
  61. ---< New Statement: ON UEVENT >---
  62.  
  63. Action:
  64.   Defines an event trap for a user-defined event
  65.  
  66. Syntax:
  67.   ON UEVENT GOSUB {<linenumber>|<linelabel>}
  68.  
  69. Remarks:
  70.   In this syntax <linenumber> or <linelabel> specifies the number or label of
  71.   the first line in the event-trapping subroutine.
  72.  
  73.   The ON UEVENT statement allows your program to branch to an event-trapping
  74.   subroutine when a user-defined event occurs. ON UEVENT is unlike other event-
  75.   trapping statements in that it allows your program, not an external agent, to
  76.   trigger the event that you expect to trap.
  77.  
  78.   For example, assume that your system contains a data acquisition device that
  79.   generates an interrupt when data arrives. Most of your application is written
  80.   in QuickBASIC. The main module contains an event-trapping subroutine that
  81.   responds to a user-defined event (in this case, the arrival of data from the
  82.   acquisition device). The following three assembly-language procedures are
  83.   also linked into the program:
  84.  
  85.   1. An interrupt handler that responds to the interrupt generated by the
  86.      acquisition device
  87.  
  88.   2. A routine that installs the interrupt handler in the chain of interrupts
  89.  
  90.   3. A routine that removes the interrupt handler from the chain of interrupts
  91.  
  92.   When the program begins, it calls the assembly-language routine that installs
  93.   the interrupt handler. Then it executes an ON UEVENT statement to identify
  94.   the QuickBASIC subroutine that will be executed when a user-defined event
  95.   occurs. The final step in setting up the user-defined event trap is to
  96.   execute a UEVENT ON statement. Once this is done, the BASIC program enters
  97.   its main execution loop.
  98.  
  99.   When data arrives, the acquisition device generates an interrupt. The
  100.   assembly-language interrupt handler, in turn, calls the routine SetUEvent.
  101.   SetUEvent is a BASIC run-time-library routine that causes a user-defined
  102.   event to occur in BASIC. This special routine can be called from any
  103.   Microsoft language. References to SetUEvent are resolved when your program
  104.   is linked with the run-time library.
  105.  
  106.   The user-defined event causes the program to branch to the QuickBASIC
  107.   subroutine identified by the previous ON UEVENT statement. At this point,
  108.   the event-trapping subroutine performs whatever processing is desired.
  109.  
  110.   Just before the application terminates, it calls the assembly-language
  111.   routine that removes the interrupt handler from the chain of interrupts.
  112.  
  113. ---< New Statements: UEVENT ON, OFF, STOP >---
  114.  
  115. Action:
  116.   Enable, disable, or suspend event trapping for a user-defined event
  117.  
  118. Syntax:
  119.   UEVENT ON
  120.   UEVENT OFF
  121.   UEVENT STOP
  122.  
  123. Remarks:
  124.   The effect of UEVENT parallels that of other event-trapping statements. For
  125.   example, UEVENT ON enables a user-defined event trap that you previously set
  126.   up with an ON UEVENT GOSUB statement.
  127.  
  128. ---< New Statement: SLEEP >---
  129.  
  130. Action:
  131.   Suspends the execution of a BASIC program
  132.  
  133. Syntax:
  134.   SLEEP <seconds>
  135.  
  136. Remarks:
  137.   In this syntax the optional parameter <seconds> determines how many seconds
  138.   to suspend the program.
  139.  
  140.   SLEEP suspends a QuickBASIC program until one of the following three events
  141.   occurs:
  142.  
  143.   1. The time period specified in the SLEEP statement has elapsed.
  144.  
  145.   2. A key is pressed.
  146.  
  147.   3. An enabled QuickBASIC event occurs.
  148.  
  149.   A QuickBASIC event is one that you can trap with an ON <event> statement such
  150.   as ON COM or ON KEY. Note that a QuickBASIC event does not interrupt the
  151.   suspension caused by SLEEP unless its trap is active when the event occurs.
  152.   That is, the trap must have been set up with an ON <event> statement, turned
  153.   on with an <event> ON statement, and not disabled with <event> OFF or <event>
  154.   STOP. Note, too, that SLEEP responds only to actual keystrokes that occur
  155.   after the SLEEP statement executes; SLEEP ignores characters that were stored
  156.   in the keyboard buffer before the SLEEP statement executes.
  157.  
  158.   If you execute SLEEP with a time period of zero, or without specifying any
  159.   time period, the program is suspended for an indefinite period. In this case
  160.   only a keystroke or QuickBASIC event can interrupt the suspension.
  161.  
  162. Example:
  163.   The following program suspends its execution for twenty seconds. Because the
  164.   example program has no ON EVENT statement, the only way to interrupt its
  165.   suspension prior to the end of the twenty-second delay is by pressing a key.
  166.  
  167.     PRINT "Taking a twenty-second timeout..."
  168.     SLEEP 20
  169.     PRINT "Play ball!"
  170.  
  171. ===< Part 2: Software Corrections >===
  172.  
  173. The following is a list of the corrections or changes made to the software:
  174.  
  175. The run-time library files have been updated. All references in the 
  176. documentation to BRUN40.EXE, BCOM40.LIB, BRUN40.LIB, and BQLB40.LIB should
  177. now refer to BRUN41.EXE, BCOM41.LIB, BRUN41.LIB, and BQLB41.LIB respectively. 
  178. If you are upgrading from version 4.0, you must re-install all executable and
  179. library files; the new run-time library files will not work with the previous
  180. version and vice versa. However, do not delete BRUN40.EXE or previously
  181. compiled programs will not be able to execute unless recompiled with version
  182. 4.00b.
  183.  
  184. Chaining to a larger program from within the QuickBASIC environment works
  185. correctly, even when memory is tight.
  186.  
  187. Odd-length fixed-length strings used in COMMON statements do not produce
  188. "string space corrupt" error messages.
  189.  
  190. SADD(Function$) is allowed inside the function.
  191.  
  192. The interpreter allows the use of fixed-length strings with the LINE INPUT
  193. statement.
  194.  
  195. Variables containing periods are allowed in SELECT CASE statement.
  196.  
  197. The graphics palette is not reset when changing active pages.
  198.  
  199. Extended ASCII characters are now allowed in file names.
  200.  
  201. The CIRCLE statement's arguments for starting and ending angles plot in the
  202. same manner as they did in previous versions of QuickBASIC.
  203.  
  204. The default aspect ratio for some graphics modes has been corrected.
  205.  
  206. The QLBDUMP program now works correctly with files of any size.
  207.  
  208. The same key can be trapped more than once inside QuickBASIC.
  209.  
  210. Frame-variable offset is now correct in INTRPT.ASM (-1Eh instead of -0Eh).
  211.  
  212. The DOS screen is correctly reset after using PALETTE statements in QuickBASIC.
  213.  
  214. FOR/NEXT loops correctly decrement the loop counter with long integers.
  215.  
  216. Errors occurring after an ON ERROR GOTO 0 statement now result in expected
  217. run-time errors.
  218.  
  219. A "string space corrupt" error message is no longer given when using a
  220. Quick library containing a COMMON statement when the main program has no
  221. COMMON statement.
  222.  
  223. The PLAY statement correctly handles strings longer than 256 characters.
  224.  
  225. Run-time programs chain in DOS 2.1
  226.  
  227. The BLOAD and BSAVE statements do not give error 67 with DOS 2.1
  228.  
  229. An executable file can be created within the QuickBASIC environment with
  230. DOS 2.1.
  231.  
  232. QuickBASIC works with Mouse Systems' PC Mouse.
  233.  
  234. Graphics programs work on AT&T PC 6300 with current ROM chips.
  235.  
  236. The /MBF option is passed when creating an executable file in QuickBASIC.
  237.  
  238. Undimensioned arrays can be compiled from within the environment.
  239.  
  240. The error message "Device timeout" is no longer given when using the COM
  241. port and using the Make EXE File or DOS Shell commands in QuickBASIC.
  242.  
  243. COM support is improved in several ways. When using an OPEN COM statement, the
  244. DTR line remains active, whereas the RTS line is reset briefly before being
  245. made active. Both the RTS and DTR lines are reset when a COM file is closed, or
  246. when an error or CTRL-BREAK causes the OPEN COM statement to abort.  A SHELL or
  247. CHAIN operation leaves DTR active and resets RTS during the operation.    RTS is
  248. restored to its original status once the SHELL or CHAIN operation is complete.
  249. Pressing CTRL-BREAK while executing an OPEN COM statement now resets the COM
  250. port hardware correctly.
  251.  
  252. The RUN statement does not generate a line feed in compiled programs.
  253.  
  254. The screen-swapping problem in Hercules graphics mode (SCREEN 3) that existed
  255. on some machines has been corrected.
  256.  
  257. The Hercules(R) driver, QBHERC.COM, now has a /H (/HALF) option that should be
  258. used if you have both a color video card and a Hercules monochrome card. The
  259. /H option causes the driver to use only one graphics page instead of two. This
  260. prevents the two video cards from trying to use the same memory address space.
  261.  
  262. MOUSE.COM, LINK.EXE, and LIB.EXE have been updated.
  263.  
  264. ASCII listings from BC.EXE print extended ASCII characters.
  265.  
  266. Event trapping works correctly in Quick-library routines called by main
  267. modules that do not use events.
  268.  
  269. The CLEAR statement no longer affects function-key values in executable files.
  270.  
  271. Procedure calls can compile if the calls have scalar variables with periods
  272. and records.
  273.  
  274. Using the CONST statement with string expressions gives the correct length
  275. when compiled.
  276.  
  277. Scalars can contain periods in COMMON statements.
  278.  
  279. Creating an executable file from within QuickBASIC works with
  280. DPATH (a public domain utility).
  281.  
  282. Setting breakpoints on CASE or CASE ELSE statements may cause unpredictable
  283. results.
  284.  
  285. Note: The GET and PUT statements used for file I/O work differently than in
  286.       previous versions when the following two conditions are true:
  287.        
  288.       1) A disk file or COM device is opened for random access.
  289.        
  290.       2) The GET and PUT statement's optional third parameter (variable) is
  291.      a variable-length string.
  292.       
  293.       The PUT statement encodes the length of the string and stores it as
  294.       the first two bytes of the string. The GET statement uses this encoded
  295.       value to determine how many characters to read.
  296.  
  297. ===< Part 3: MS-DOS(R) 3.20 Patch >===
  298.  
  299. This information is relevant only if your system has ALL of the following
  300. characteristics:
  301.      
  302.      1. Uses MS-DOS Version 3.20
  303.  
  304.      2. Boots from a hard disk drive
  305.  
  306.      3. Has a math coprocessor (for instance, an 8087 chip)
  307.      
  308.      4. Runs programs that use floating-point math
  309.  
  310. For systems that satisfy all of the preceding conditions, you may be able to
  311. eliminate floating-point math problems by installing a small patch in DOS. If
  312. you are not sure whether you need the patch, perform the following steps:
  313.  
  314.      1.    Copy the program PATCH87.EXE (included on disk 3 of this release) to
  315.     the root directory of your hard drive.
  316.  
  317.      2. Reboot your system from the hard disk, and DO NOT PERFORM ANY FLOPPY-
  318.     DISK OPERATIONS after rebooting. It is very important that you avoid
  319.     floppy-disk I/O after rebooting, since this will affect the reliability
  320.     of the diagnostic test that you are about to perform.
  321.  
  322.      3. Use the CD command to move to the root directory of your
  323.     hard-disk drive, if necessary.
  324.  
  325.      4.    Run the PATCH87.EXE program by entering this command at the DOS prompt:
  326.  
  327.     PATCH87
  328.  
  329.     The program performs a diagnostic test on your system to determine
  330.     whether it needs the DOS patch, and if the patch is needed, whether the
  331.     patch can be installed successfully. Follow the procedure described in
  332.     the next section if the program tells you that you need to install the
  333.     DOS patch, and that it can be done.
  334.  
  335. NOTE: The floating-point problem has been eliminated in versions of
  336. MS-DOS higher than 3.20. This includes MS-DOS versions 3.21 and 3.30.
  337.  
  338. If you performed the preceding test and determined that you should install the
  339. DOS patch on your system, perform the following steps:
  340.  
  341.      1.    Format a blank floppy disk. (Do NOT use the /s formatting option to
  342.     transfer system files to the disk.)
  343.  
  344.      2. Use the SYS command to copy IO.SYS and MSDOS.SYS from the root
  345.     directory of your hard disk to the new floppy disk. For instance, if
  346.     you boot from drive C:, you would enter the following commands:
  347.  
  348.     C:
  349.     SYS A:
  350.  
  351.      3.    Use the COPY command to copy COMMAND.COM and SYS.COM to the same floppy
  352.     disk.
  353.  
  354.      4.    Use the COPY command to copy the program PATCH87.EXE (included in this
  355.     release) to the same floppy disk.
  356.  
  357.      5.    Change the current drive and directory to the floppy disk, by entering
  358.     the following command:
  359.  
  360.     A:
  361.  
  362.      6. Patch the version of MS-DOS on the floppy disk by entering the
  363.     following command:
  364.  
  365.     PATCH87 /F
  366.  
  367.      WARNING: If you experience any disk errors during steps 2 through 6, do
  368.      NOT proceed with step 7. Reboot from your hard disk and repeat the entire
  369.      process.
  370.  
  371.      7. If you have not experienced any errors, use the SYS command to transfer
  372.     the files IO.SYS and MSDOS.SYS from the floppy disk back to your hard
  373.     disk. For instance, if the boot directory of your system is the root
  374.     directory of drive C:, you would enter the following commands at the
  375.     DOS prompt:
  376.  
  377.     A:
  378.     SYS C:
  379.     
  380.     The DOS patch is now installed on your hard disk.
  381.  
  382.      8. Reboot the system.
  383.