Hello kittens!
Have your heard of the Pasta assembler (https://github.com/crtc-demos/pasta)?
I just found it while browsing the CRTC GitHub projects.
Its syntax is inspired by xa65's (which most people here are familiar with I recon) and adds a very nice automatic zero page register allocation feature.
The Readme.md file on the link above has more details but this spares the programmer from having to manually hardcode the zero page memory locations they want to use in their routine: each routine can declare the names of the pseudo zero-page registers it wants to use and they will be automatically allocated in the zero-page, even apparently taking into account potential overlap by routines which call one another. When the registers are not needed anymore upon returning from a routine, it is capable of allowing other routines to use them.
I guess this can be very handy when tuning assembly sources since keeping tracks of which zero-page addresses are available at a given point of a program can be tricky when multiple functions use them.
Edit: Oops, I initially mistakenly attributed it to BitShifters (the group which recently ported Stunt Car Racer to the BBC.
CRTC Pasta assembler
- NekoNoNiaow
- Flight Lieutenant
- Posts: 272
- Joined: Sun Jan 15, 2006 10:08 pm
- Location: Montreal, Canadia
Re: CRTC Pasta assembler
It is not, by far.NekoNoNiaow wrote: ↑Tue Apr 09, 2019 3:18 am Its syntax is inspired by xa65's (which most people here are familiar with I recon)
The only common thing is that it uses the 6502 conventions that most assemblers have agreed on regarding immediate, addresses, hexa, etc...
What is different from XA:
- .org instead of *
- .scope instead of .( and .)
- .byte instead of .byt
- .macro instead of #define
using that instead of XA would mean a massive rewrite of basically every single program you want to rebuild with it.
That's actually not a bad idea, basically an auto allocation of memory addresses specified in a range at scope level.and adds a very nice automatic zero page register allocation feature.
That's an unusual choice of language to say the leastPasta is supplied as source code. Compile by typing 'make'. Prerequisites for building include:
- OCaml (I'm using 3.11.2, other versions may work too).
- ocamldsort
- Menhir
- GNU Make
Re: CRTC Pasta assembler
The .( and .) for scoping is probably the best feature of XA! at least for me! I use it nearly all the time as a way to delimit my functions (such as braces in C), even when I am not using local labels. Being able to use "loop" in all my loops is priceless
That and the C preprocessor compatibility, of course (#include, #ifdef, #define,...)
- NekoNoNiaow
- Flight Lieutenant
- Posts: 272
- Joined: Sun Jan 15, 2006 10:08 pm
- Location: Montreal, Canadia
Re: CRTC Pasta assembler
I do not know XA's syntax too well but I guess that is why the author said "inspired by" rather than "identical to".
Actually, it does also support .( and .) for scoping.
I initially thought the other three points could be remedied with aliases but their syntax must be of the form ".alias <label> <label-or-num>".
I guess a preprocessing pass would be needed to convert XA syntax into pasta's.
Yup, a very fluffy feature.
I like it! When I started looking into replacing opt65 some time ago I thought of using Haskell to write my own.
Re: CRTC Pasta assembler
Sure, but I will not accept any non C or C++ programs in the OSDK.NekoNoNiaow wrote: ↑Wed Apr 10, 2019 2:38 am I like it! When I started looking into replacing opt65 some time ago I thought of using Haskell to write my own.
Despite all its quality, Waskol's program was in Delphi, and that was annoying to integrate in the system, could not get Coverity to validate it, could not compile it myself, could not debug it.