Pasta/80 is a simple Pascal cross compiler targeting the Z80 microprocessor

https://news.ycombinator.com/rss Hits: 10
Summary

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. and including value and parameters and nesting. The standard procedures for screen input and output (i.e. ReadLn , WriteLn etc.). , etc.). All conversion and utility procedures and functions that Turbo Pascal 3.0 had. The three kinds of disk files, that is untyped ( file ), typed ( file of ) and Text . ), typed ( ) and . A dynamic heap of up to 32767 bytes with GetMem , FreeMem , New and Dispose . , , and . Inline assembly (via opcodes, not via mnemonics, so this page might be handy). Overlays (in memory, Spectrum 128K and Next only, see below). Some compiler directives: $i <file> for including Pascal source files (including nesting and cycle detection) $l <file> for inc...

First seen: 2025-10-21 09:08

Last seen: 2025-10-21 18:11