PASTA/80 is a simple Pascal cross compiler targeting the Z80 microprocessor. It generates code for these classic and modern machines:
The compiler follows the single-pass recursive-descent approach championed by Niklaus Wirth, inventor of Pascal, in his books and lectures. It doesn't have an explicit syntax tree, but instead generates code on the fly during parsing. As a result, the compiler might not always generate the most efficient code possible (it definitely cannot compete with LLVM and doesn't try to), but it's very fast.
Supported language elements
The supported Pascal dialect is an almost exact clone of the original Turbo Pascal 3.0 for CP/M (see this manual for details). So you have at your disposal the following language elements:
All the basic data types ( Boolean , Byte , Char , Integer , Pointer , Real and String ).
, , , , , and ). array of , record , set of , enumerations, subranges and pointers as a way of building new data types.
, , , enumerations, subranges and pointers as a way of building new data types. The decision-making elements if..then..else and case..of .
and . The loop elements for..do , while..do and repeat..until .
, and . The with..do notation for "opening" records.
notation for "opening" records. procedure and function including value and var parameters and nesting.
... continue reading