ZBasic v4.20 for the Apple II - Update Information This file contains some information that didn't make it into the manual, such as new changes to the system, new commands or other enhancements, etc. 1 May 1987 - Added single keystroke commands in the Line Editor There have been two single key commands added to the command environment editor. They operate in the same way as the other single key commands, such as the arrow keys, ';', etc., which means they must be the first key typed on the command line. The first is the ESC key, and the second is the '+' key. Pressing the ESC key will take you into the full screen editor with line-numbered lines. This is the inverse of pressing the ESC key while in the full-screen editor (which returns you to the line editor). The '+' key will take you into the full screen editor with line numbers stripped from your program lines. 1 May 1987 - Use of auxiliary slot ram cards Since ZBasic automatically uses a /RAM volume to speed up program development time, it would be nice to have some way of setting up such a volume during boot-up. For those of you with Applied Engineering's Ramworks card and the accompanying Prodrive software, I have some bad news. Since the Prodrive program is released as a BIN type file, the only way to execute it is from within the Applesoft environment, or from within ZBasic by first using the BLOAD function to get it into memory, and then executing it. You also might want to contact A.E. and see if they have a .SYSTEM version of the program available. I will be working on modifying the existing Prodrive program to make it act more like what Checkmate Technology supplies with their ram card. Read more about it in the following paragraph, and look for the modification instructions in the Z newsletter. For those of you with Checkmate Technology's Multi-Ram card, better news. The MRAM.SYSTEM program supplied with the card is just what the doctor ordered. If this is the first .SYSTEM file in the disk directory then it will be automatically run during boot up. It will set up the ram card as a ProDOS volume, and then automatically load and execute the next SYS type file in the directory. There has to be a couple of modifications done first, though, to make the /RAM volume a little more compatible with ZBasic. First, get into Applesoft BASIC, then type: BLOAD MRAM.SYSTEM,TSYS,A$2000 CALL -151 2005:52 41 4D 33 298B:52 41 4D 33 (that's the return key) 2547:D2 C1 CD B3 CREATE RAM3.SYSTEM,TSYS BSAVE RAM3.SYSTEM,TSYS,A$2000,L3226 This changes the name given to the /RAM volume from /MRAM to /RAM3. This way, ZBasic will recognize the /RAM3 volume as a ram disk. 7 May 1987 - Added options for the LOCATE statement The locate command has been changed slightly so that either the X coordinate, the Y coordinate, or both, may be omitted from the statement. If either coordinate is absent, the compiler will generate the necessary code to use the current value(s) for the missing coordinate. e.g.: LOCATE ,,0 will allow the cursor to remain in it's present position, but will turn it off. Another example: LOCATE 0,10 PRINT 'HELLO THERE!'; LOCATE ,11 PRINT 'HELLO THERE AGAIN!' will first position the cursor to line 10, column 0, and print 'HELLO THERE!' Since there is a semicolon at the end of the print statement, no carriage return is generated. The next LOCATE statement moves the cursor to line 12, but leaves the column position alone (it was left at position 12 by the PRINT statement), so the next string printed will be printed away from the left margin. 7 May 1987 - OPEN 'C' expanded parameters Options have been added for the various parameters that can be specified with the OPEN 'C' statement. (see the reference manual for the syntax) The slot # must be the slot that contains the Super Serial Card or equivalent. (not just -1 or -2 as stated in the manual) The baud rate can be any baud rate supported by the Super Serial Card: 50, 75, 110, 135, 150, 300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600, and 19200. Of course, this is no guarantee that your computer has a fast enough clock speed to support the higher baud rates. The parity can be one of the following: 0 none 1 odd (odd total number of ones) 2 even (even total number of ones) 3 mark (parity bit always 1) 4 space (parity bit always 0) 24 December 1987 - ProDOS now included ProDOS is now included on the distribution disk. All you have to do now is use any disk copy utility to make a working copy of your ZBasic disk, and then use that disk to boot directly into ZBasic. If you are using the 64K version of the system from a 5.25 inch disk, you'll still have to put a copy of ProDOS on that side of the disk. We only had room to put it on the 128K side of the 5.25 inch disk. If you're using a 3.5 inch disk, you obviously don't have to worry about which side is which. The two different versions can be found in two subdirectories on the disk. We have also added a program on the disk which is run automatically when you boot the disk. This program will allow you to select which version to run at boot time. 22 January 1988 - enhanced POINT function The point function has been enhanced to allow you to read characters from the text screens. The syntax is exactly the same as specified in the manual, except that the value returned is the ASCII code for the character at the position specified. The coordinates are normally specified using the ZBasic Independent Coordinate System, but you can use a POKE &85,0 to allow a program to specify a position using row/column coordinates (like in the LOCATE statement). As mentioned previously, the value returned is the ASCII code for the character at the position specified. No distinction is made between normal or inverse text, or normal or Mousetext. The sample program MOUSECLICK.BAS demonstrates this function by allowing you to move the mouse pointer on the screen and click on a letter. The program will pick up the letter from the screen and display it for you. One application for this function would be a program using overlapping windows and/or pull-down menus. The POINT function could be used to save the characters on the portion of the screen that will be overwritten by the new window, so that the screen can be restored after the new window is closed again. 9 February 1988 - enhanced CALL statement The CALL statement will now accept a numeric expression as an argument specifying the address to call. Previously, the statement would only accept a constant. What this means is that you can now use an integer variable to hold an address of a subroutine, and then access this subroutine by CALLing the variable. For example: Monitor% = &FF69 : REM Address on monitor entry point . . . CALL Monitor% : REM Enters the Apple Monitor, CTRL-Y to exit This is most useful when you DIMension an array to reserve memory, and then use this memory to BLOAD a machine language subroutine. You can then use the VARPTR function to retrieve the address of the array, and then use this address in the CALL statement. In the 64K version, both CALL constant and CALL expression perform a CALL within the main 64K bank of memory (since the 64K version only supports the main 64K bank.) The 128K version handles the two different types of CALLs differently. If you CALL constant, ZBasic will assume that you wish to call a subroutine in the currently executing program, which resides in the auxilliary bank of memory. CALL expression will call a subroutine that resides in the main bank of memory (which is where ZBasic's variables are stored). This allows the technique of BLOADing a subroutine described above. You can also POKE a subroutine into memory and CALL it this way, since POKE also operates on the main bank of memory. 11 March 1988 - Enhanced INKEY$ function The INKEY$ function has been enhanced so that in addition to returning a keypress from the keyboard, it will also return information on whether one of the Apple keys was pressed at the same time. Normally, the INKEY$ functions returns a string with a length of 1 if the user pressed a key, or a length of 0 if no keypress was available. With the new INKEY$ function, the string will have a length of 2 if the Open-Apple and/or Solid-Apple keys were pressed at the same time as the normal keypress. The string returned in this instance will contain two characters. The first character will have one of three ASCII values. If the Open- Apple key was pressed, the character will have an ASCII value of 1. If the Solid-Apple key was pressed, the character will have an ASCII value of 2. If both Apple keys were pressed, the character will be an ASCII 3. The second character of the string will be the value of the standard keypress. If ONLY one of the Apple keys was pressed (without a normal keypress), INKEY$ will still return a NULL string There is a sample program included on your ZBasic master disk that demonstrates a method of recognizing an Open-Apple and/or Solid- Apple keypress event. The program is named INPUT.APPLE and can be found in the SAMPLE.PROGRAMS subdirectory on the 128K side of the diskette. 15 Mar 1988 - Cross-reference utility added Version 4.2 of ZBasic includes a cross-reference utility (written in ZBasic, of course) that you can use to get information on your ZBasic programs. The program source code and a short documentation file can be found in the XREF subdirectory on the 128K side of your ZBasic master diskette.