OPIA - A full OOP language for z80

Got a calculator project that you're working on, tell everyone about it
  • Author
  • Message


Topic Starter

OPIA - A full OOP language for z80

Post30 March 2012, 04:49

I have been working on OPIA since 2009. OPIA is the successor (and complete do-over) for Antidisassemblage (which I worked on from 2004 to 2005, and a bit in 2007). This has been on ongoing topic at Cemetech and Omnimaga, so I figured that other sites deserve a topic too :)

OPIA is a C-like language (functions, variables, expressions, constructs, etc.) which brings all the power of polymorphism seen in OOP languages like Java/C# to the z80 -- but in simpler terms which expose function-pointers and method-pointers more directly, but cleanly (structs implement interfaces automatically just by having the correct methods -- thus new polymorphic behavior can be added to something without any changes to the base code or to its underlying structure!).

OPIA is very focused on low-level representation: Variables, arrays, structs, and functions are designed to match raw/native representations so that they can be tied DIRECTLY into any underlying system (e.g. use OS values as variables or call system routines as functions without extra overhead -- it's 1-to-1). Everything is designed to be stored/coded "as it would be" in assembly. OPIA has the capability to be for z80 what C is for larger systems.

OPIA will use Data-flow analysis and Liveness-Analysis, etc., to trace values through the code and precompute/optimize it as much as possible -- So go ahead and use a loop to initialize that array, and the compiler will convert it an embedded value. In addition, you can use the $ operator to REQUIRE this (and cause the compiler to take more liberties) and, for example, tell the compiler to interpret a function and embed the result as a value.

The compiler will be in Java (already started) as a command-line interface. However, it will also be modularized as a java API so that other tools can be made for the language which use the compiler to build/analyze code (Tokens, Abstract syntax trees, Optimization, Compilation, etc.) -- This means things like Notepad++, or new tools like a visual (rather than textual) code editor.

Rather than providing "everything you need" in one package, OPIA only provides core features and must be compiled on your computer. However, unlike those all-in-one packages (which are amazing, btw), OPIA can be expanded and integrated for anything and everything z80. I will be writing the core compiler (which is viewable at google code), but everyone else will have the chance to expand the language via includes/libraries/etc.

There's been a ton of discussion already, but if anything picks up here, I will try to post some summaries of past discussion -- the language design is being made concrete before I get too deep into making the compiler. Discussion will continue in forums, but official documentation of what the language "IS" so far can always be found at:


Return to Announce your Projects

Who is online

Users browsing this forum: No registered users and 1 guest