~rabbits/uxn

3 2

Re: Lambda syntax and other assembler features

Details
Message ID
<CAE2DaSSARk7-TPA_AAB_RiQY4AgAGOaFTheJx4vS2VT=DAJe7g@mail.gmail.com>
DKIM signature
missing
Download raw message
It seems I'm only playing catch up with your features! it's really
cool you've gotten to the point where you needed lambdas too. I
thought about backward lambdas, but I found it was messing up with
validation a bit, since I never explicitly want to declare stack
definitions to backward local labels, like the entry label in a loop.
But it might be worth adding at some point if someone finds a use for
it. I love using lambdas, it has totally changed the way I do controls
routing, it was very annoying to have to give names to these sorts of
disposable labels:
https://git.sr.ht/~rabbits/left/tree/main/item/src/left.tal#L313

For anyone reading and wanting to have a look at zzo38's assembler,
here's the code: https://github.com/zzo38/uxn38/blob/trunk/uxnasm.c

You've been ahead of the curve for most recent features, if you had to
think of one from uxnasm38 that you think will soon make it's way
upstream, what do you think it would be? :)

Dll

Re: Lambda syntax and other assembler features

Details
Message ID
<16939434990.810953@mail.networkname.de>
In-Reply-To
<CAE2DaSSARk7-TPA_AAB_RiQY4AgAGOaFTheJx4vS2VT=DAJe7g@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
> You've been ahead of the curve for most recent features, if you had to
> think of one from uxnasm38 that you think will soon make it's way
> upstream, what do you think it would be? :)

I've not looked at uxnasm38, but my personal wishlist is this:

- encoding raw 16 bit relative offsets
- an "align" directive


felix

Re: Lambda syntax and other assembler features

Details
Message ID
<CAE2DaSTWQUdNEbx4wYDgjW1fpfqfeSOe1s59fx1guUhDagbKsg@mail.gmail.com>
In-Reply-To
<16939434990.810953@mail.networkname.de> (view parent)
DKIM signature
missing
Download raw message
I'm on the 16-bit relative thing, i'll add soon :)

What would the align directive do?

On 9/5/23, felix.winkelmann@bevuta.com <felix.winkelmann@bevuta.com> wrote:
>> You've been ahead of the curve for most recent features, if you had to
>> think of one from uxnasm38 that you think will soon make it's way
>> upstream, what do you think it would be? :)
>
> I've not looked at uxnasm38, but my personal wishlist is this:
>
> - encoding raw 16 bit relative offsets
> - an "align" directive
>
>
> felix
>
>

Re: Lambda syntax and other assembler features

Details
Message ID
<16939515850.0910869@mail.networkname.de>
In-Reply-To
<CAE2DaSTWQUdNEbx4wYDgjW1fpfqfeSOe1s59fx1guUhDagbKsg@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
> I'm on the 16-bit relative thing, i'll add soon :)

Great!

> What would the align directive do?

It would align the current location to a 2-byte boundary
(or you could allow a parameter to align to other powers of two).
It's handy when you want to ensure to place data or code at
an aligned address. You could think of it as a conditional
padding operator, depending on the divisibility of the current
address/location. 


felix
Reply to thread Export thread (mbox)