Skip to content

PASTA/80 Version 0.99

Pre-release
Pre-release

Choose a tag to compare

@pleumann pleumann released this 03 Jul 16:45
· 48 commits to master since this release

Lots of tiny enhancements and bugfixes.

Compiler

  • Option validation: Parameter combination validation is now identical between the command-line compiler and the mini IDE (issue #65).
  • Cleaner output: The intermediate .asm and .lst files are deleted unless assembly fails or --keepint is specified (issue #95).
  • IDE cleanup fix: A cleanup bug triggered on compile errors in the mini IDE (that would lead to subsequent compiles failing) has been fixed (issue #96).
  • Scanner fix: A rare edge case where the scanner would incorrectly process tokens within "inactive" {$ifdef} regions has been fixed.
  • Real constants: Fixed a bug that would result in some negative Real constants be encoded as positive ones (issue #111).

Language

  • Set expressions: Non-constant set expressions are now supported (issue #79).
  • Optional semicolons: Trailing semicolons at the end of record definitions and case statements are now optional (issue #78).
  • Symbolic string lengths: String[n] now accepts symbolic constants, not just literals (issue #99).
  • Discarding function results: Function return values can now be discarded without assigning them (issue #53).
  • Pointer dereferencing: Generic pointers can now be dereferenced, making them usable as arguments to FillChar and similar procedures (issues #84, #85).
  • Compiler switches: Multiple compiler switches can now be combined in a single comment, separated by commas (issue #80).
  • Error directive: A new compiler directive {$error ...} for raising errors from source code has been added.
  • Stack size directive: A new compiler directive {$m <bytes>} for setting a minimum stack size has been added (issue #107).

Runtime

  • Inverse video: Inverse video can now be enabled and disabled using InverseOn/InverseOff (all targets).
  • ExitCode: A new global variable ExitCode allows programs to set a process exit code. Halt(n) also sets this. On Agon, ExitCode will be used as the return code. On ZX machines it determines the value of the BC register pair when returning to BASIC (issue #98).
  • Cursor position: The current cursor position is now trackable for those platforms that can support the feature (Agon and ZX Spectrum). The two Turbo Pascal functions WhereX and WhereY have been added.
  • Preprocessor: SYS_ZX is now defined for all Sinclair platforms, offering an easy means of detecting "the Spectrum" in general, in addition to one of SYS_ZX48, SYS_ZX128, and SYS_ZXNEXT denoting the specific machine.
  • Agon-only:
    • Text files: Last records smaller than 128 bytes are now padded with EOF when read, as required by the Text file type (issue #101).
    • Terminal functions: InsLine, DelLine, ClrEol, ClrEos are now available.
    • Graphics support: You can now set the graphics color using SetColor.
    • Command line: A rare bug in the command-line parser has been fixed.
    • Performance: Console output performance has been improved.

Examples

  • Hilbert curve, Barnsley Fern, and Sierpinski triangle examples added.
  • Example demonstrating data exchange between ZX BASIC and Pascal added.
  • All examples will now raise a compile error early for incompatible platforms.