langdon@lll-lcc.UUcp (Bruce Langdon) (03/21/86)
Below is info on Personal Pascal from the bbs of its publisher. (Neither me nor my employer are connected to OSS except I buy their stuff) Bruce Langdon L-472 langdon%lll-lcc@lll-crg.ARPA Physics Department "langdon#bruce%d"@lll-mfe.ARPA Lawrence Livermore National Laboratory Livermore, CA 94550 (415) 422-5444 UUCP: ..{gymble,ihnp4,seismo}!lll-crg!lll-lcc!langdon --------------------------------------------------------------------------- From OSS bbs 3/21/85 (408) 446-3451 Files to download: STRVAL.PAS 7K 03/03/86 10:29:18 Str and Val procedures for Pascal PASFIX1.PAS 3K 03/01/86 15:52:04 Patches to Personal Pascal-- fixes a few bugs SOUNDDEM.PAS 3K 03/01/86 18:06:39 Demo which uses XBIOS to access sound chip PASACC.DOC 11K 02/22/86 00:00:00 Desk accessories with Pascal AESVDI.DOC 12K 02/22/86 00:00:00 How to do more AES and VDI calls INTRO.DOC 2K 02/22/86 00:00:00 Introduction to BIOS, XBIOS, and GEMDOS calls CHAR.DOC 8K 02/22/86 00:00:00 Character-oriented BIOS, XBIOS, and GEMDOS calls FILE.DOC 10K 02/22/86 00:00:00 File-oriented GEMDOS calls PORT.DOC 5K 02/22/86 00:00:00 Configuring I/O ports (serial and parallel) TIME.DOC 4K 02/22/86 00:00:00 System date and time functions COPY.PAS 3K 02/22/86 00:00:00 Sample copy pgm (uses GEMDOS calls-- compile for TOS) DIRLIST.PAS 2K 02/22/86 00:00:00 Directory list program (compile for TOS) THEIGHT.PAS 4K 02/22/86 00:00:00 Set/get height of text drawn by the Draw_String routine. --------------------------- Messages: #4 - 246 chars 02/20/86 15:29:42 Re: More Pascal Documentation We have started putting up additional documentation for Personal Pascal. Please bear with us a we hurry to put more documentation up, but it does take some time since we have to send it from the ST to our 8-bit machine, which is running the BBS! #24 - 437 chars 02/23/86 17:23:49 Re: Personal Pascal Bugs Several bugs have been reported in the Personal Pascal system, most of which can be easily fixed. A patch program will be available soon on this system which fixes the following problems: - the routine "Bring_To_Front" not found - mysterious numbers in the ITEM SELECTOR dialog - "Delete_Dialog" sometimes crashing - a few more fairly obscure bugs In addition, read the following few messages for a few fixes you can apply now. --------------- #25 - 357 chars 02/23/86 17:29:42 Re: Rect_Intersect in GEMSUBS The definition of the Rect_Intersect procedure was left out of the early versions of the GEMSUBS.PAS file. If you file is missing this declaration, please insert the following: PROCEDURE Rect_Intersect( x, y, w, h : integer ; VAR newX, newY, newW, newH : integer ) : boolean ; EXTERNAL ; into your GEMSUBS.PAS file. --------------- #26 - 386 chars 02/23/86 17:31:12 Re: Bring_To_Front routine The Bring_To_Front routine in the PASGEM library also has a problem in early releases. Due to a typographical error, the name actually used in the PASGEM file is "Brint_To_Front". As mentioned in a previous message, a patch program will soon appear to fix this problem, but in the meantime, you will have to use this incorrect spelling, if you want to use the Bring_To_Front routine. --------------- #27 - 558 chars 02/23/86 17:35:03 Re: Cmd_Args and Filename One more problem exists in the Pascal libraries, this time in the PASLIB file. One of the modules in that file is in the wrong position, causing undefined symbols if you try to use the Cmd_Args or Filename functions. The actual symbol marked undefined is something like "strukteq". If you want to use either of these routines, you need to tell Personal Pascal to make two passes through the PASLIB file by putting the name PASLIB in the "Additional Link Files" box in the "Linker Options" dialog. Once you do this, both routines will be linked correctly. --------------- #28 - 168 chars 02/24/86 10:19:06 Re: Pascal FOR loop variable To- David Duberman Yes, we do intend to allow Long_Integer FOR loop counters. We also intend to allow variables to occupy more than 32K of space in a future release. --------------- #30 - 398 chars 02/24/86 10:27:44 Re: Pascal output to printer If you want to open a file to the printer using Personal Pascal, the following procedure call should work: rewrite( f, 'prn:' ) ; if f is of type "text". ('lst:' works too, as do the upper- case versions) You can also make the standard output go to the printer with: rewrite( output, 'prn:' ) ; DON'T use the "reset" call with the printer, since that call opens a file for INPUT, not OUTPUT. --------------- #31 - 414 chars 02/24/86 10:33:53 Re: Use of Get_DEdit Some people have expressed confusion about how to use the Get_DEdit call. In order to retrieve the final value of an edited string from a dialog, you should declare a variable to hold the result: VAR new_value : Str255 ; Then use Get_DEdit AFTER calling Do_Dialog: Get_DEdit( the_dialog, the_field, new_value ) ; The string "new_value" will then contain the final value of the editable field "the_field". --------------- #32 - 391 chars 02/24/86 10:37:12 Re: IO_Check and IO_Result We blew it! If you want to use the IO_Check and IO_Result routines from within a Pascal program, you must declare the routines to be EXTERNAL, in order to let the compiler know about them. This gem of knowledge was inadvertantly left out of the manual. Declare the routines like this: PROCEDURE IO_Check( on : Boolean ) ; EXTERNAL ; FUNCTION IO_Result : Integer ; EXTERNAL ; --------------- #33 - 617 chars 02/24/86 10:40:31 Re: Pascal with two drives Some people have had difficulty telling Pascal to put their source and object on drive B:, if they have a two-driver system. In order to edit, compiler, or link a file on drive B:, select the option so you get the ITEM SELECTOR dialog, then do the following: 1. Click the mouse on the upper text field (where the directory is shown) 2. Use the keyboard to change the leading "A:" to "B:" 3. Move the mouse down into the area where the file names are shown, and click the mouse once (this tells GEM that you have changed the directory). You should now see the list of files on the B drive. --------------- #35 - 795 chars 02/24/86 11:30:12 Re: STRING type w/ Pascal There are a couple of things to keep in mind when using the STRING type in Personal Pascal. Whenever you use the STRING type, with or without a length specified, you are declaring a "new-type" (see page 6-20 of your manual). A "new-type" is incompatible with all other new-types. So, if you declare a procedure like this: PROCEDURE p( VAR s : STRING[10] ) ; there is no way to pass another variable declared as STRING[10] to the procedure, since the two "STRING[10]" variables are different types! In order to pass a variable to the procedure, declare a type in the TYPE section like this: TYPE Str10 = STRING [ 10 ] ; and declare the procedure like this: PROCEDURE p( VAR s : Str10 ) ; Then, if you declare the string you want to pass as type Str10 as well, everything will work fine. --------------- #36 - 515 chars 02/24/86 11:33:45 Re: To: Gary Cacace We will soon have a file that demonstrates absolute memory access using PPascal. In the meantime, remember that you must be in supervisor mode if you want to access memory below $1000 or in the hardware. Also, in order to call assembly language routines, you declare them like this: PROCEDURE assem( -parameters- ) ; EXTERNAL ; In your assembly language file, "assem" must be all capitals (ASSEM) and be declared to be ".globl". Your routine should also pull all parameters off the stack before returning! --------------- #37 - 568 chars 02/24/86 11:37:10 Re: Libraries w/ Pascal Several people have asked how to put Personal Pascal routines into a library (like PASGEM and PASLIB). If you want to do this, you must have the library manager AR68, available from Atari, not us. Make sure you get the patched version, or instructions on patching it, since it won't work unchanged. Also, you need the program FIXO to make your object files an even number of long-words in length. Your Pascal modules should be compiled with the M+ and E+ options, and shouldn't reference any global variables, if you want any Pascal program to be able to use them --------------- #40 - 358 chars 03/03/86 09:52:04 Re: Pascal Wishes Several people have suggested that in a future update of Pascal we allow some of the Pascal program files to reside on a different disk (e.g., to put the compiler on a ramdisk). We have this on our wish-list for future versions. If any of you have other wishes for future Pascal versions, please leave a message here or write. Your thoughts are important. --------------- #41 - 351 chars 03/03/86 09:56:22 Re: Problems with CASE in Pascal Some people have had difficulty using the CASE statement with Pascal. So far, the problem has been that they tried to use a variable as a CASE constant. As the name implies the "tag-values" in a CASE statement MUST be constants! E.g., the following will generate an error: CASE i OF (* If x is a variable, error! *) x: do_something; END; --------------- #42 - 216 chars 03/03/86 10:01:57 Re: Reading the cursor pos. on ST Several people have asked how to read the cursor position from Personal Pascal (presumably in a TOS program). We will soon have a cursor movement support package available here which includes reading the cursor pos. --------------- #43 - 216 chars 03/03/86 10:12:51 Re: Buffers and "rwabs" If you want to pass the address of a Pascal array as a buffer parameter to the rwabs XBIOS call, pass the array as a VAR parameter, and declare the rwabs routine as taking a VAR param of the type you gave the array.