Search
Items tagged with: uxntal
So, @d6 made something neat. A #uxntal manual page, that contains the full opcode reference with all that's needed to program with it. It saves opening the browser to check the docs, it installs with uxn11.
usage: man uxntal
https://git.sr.ht/~rabbits/uxn11/commit/5a41189405de0865daa087aceced43b04258c1d6
https://git.sr.ht/~rabbits/uxn/tree/main/item/projects/examples/gui/timer.tal
Still working my way through day 3 of the compudanzas #uxntal tutorial: now drawing on the screen via keyboard input, which is really satisfying.
I kind of took a detour to improve my tools (ebook reading experience in emacs), but now I'm back to hacking. I think I might have enough knowledge to try to build a tiny text editor of some kind?
I did another uxn-related article: a shallow embedding of Uxntal in Raku.
https://wimvanderbauwhede.codeberg.page/articles/stack-based-programming-in-raku/
Embedding a stack-based programming language
It takes just one custom operator to allow Uxntal-style programming in Raku.Wim Vanderbauwhede
Hi Uxn folks,
I created a simple memory management unit for the Uxn VM.
It provides support for dynamic memory allocation (malloc/free style), and it's done using a virtual memory approach so to access the allocated memory LDA/STA works.
If anyone's interested, I will explain more. There's a README and a rough draft of a DESIGN doc (linked from the README).
https://codeberg.org/wimvanderbauwhede/uxn-mmu
uxn-mmu
A simple memory management unit for Uxn, to support allocate/deallocate paged virtual memory.Codeberg.org
Hi Uxn folks,
I created a concurrent version of the Uxn VM. It breaks up long-running tasks in chunks, the purpose is to improve responsiveness, in particular of audio. You need to add some code to your .tal to make use of it.
If anyone's interested, I will explain more.
Haven't had time to write up how it works, the current README is just the default Uxn one.
https://codeberg.org/wimvanderbauwhede/concurrent-uxn
concurrent-uxn
The aim is to add a very simple round-robin scheduler for device vectors to uxn.Codeberg.org
Action at a distance is an anti-pattern in computer science in which behavior in one part of a program modifies operations in another part of the program. I will try to demonstrate how it can be a powerful ally when writing #uxntal if wielded safely.
https://wiki.xxiivv.com/site/uxntal_state.html
The #uxntal type-checker can now be used inline, along with any other gizmos you're already using for development, like a linter.
source: https://git.sr.ht/~rabbits/uxnbal
download(2600 bytes): https://rabbits.srht.site/uxnbal/uxnbal.rom
docs: http://wiki.xxiivv.com/site/uxntal_types.html
Use the return-stack to juggle the items needed inside the loop, and if you know how many times the loop needs to run, flatten your boundaries to a single byte(so 0..0x10, becomes 0xf0).
aaah, then yes, nothing to worry about there then.
I'm not sure if you've seen @bellinitte's padding mod to #uxntal (https://merveilles.town/@bellinitte/110141437531968122) but you miiight be able to make use of this somehow.
https://git.sr.ht/~rabbits/bicycle#run
https://llllllll.co/t/uxn-virtual-computer/46103/398
Uxn - Virtual Computer
I haven’t done much with uxn, but I would guess that it is how the command interprets the labels. The labels are just numbers with nice names, so how a command interprets the numbers is up to it.lines
http://wiki.xxiivv.com/site/uxntal_immediate.html
The whole assembler is now 1752 bytes, or 433 lines of #uxntal.
https://git.sr.ht/~rabbits/drifblim/tree/main/item/src/drifblim.tal
Instead of the typical PUSH->POP->JSR sequence each time you want to run a routine, these tokens are not pushing to the stack - they'll run immediately.
They'll be impractical for doing pointer arithmetic, but save 1 byte for every subroutine call, and will save millions of cycles in a project of the size of a text editor or drawing software.
They don't break compatibility with old roms, and make source files a bit more readable.
https://wimvanderbauwhede.codeberg.page/articles/immutable-datastructures-reduction/
Immutable data structures and reduction in Raku
What does it take to bring functional programming to a stack-based assembly language?Wim Vanderbauwhede
I implemented a stack-effect checker last week and I think I might be able to detects linear routines too. Jumping around, self-modification, load/store opcodes will need to stash the entropy loss in a 3rd stack which will allow reversion of non-linear operations.
https://web.archive.org/web/20171104231932/http://home.pipeline.com/~hbaker1/ForthStack.html
@neauoire keeps coming up with these love letters to 1980s computers, and us GenXers keep swooning over them. ^___^
#uxn #uxntal #varvar #OhLookItsAPotato #WaitingForPotatoIIfx ;)
https://c-faq.com/misc/zeller.html
https://paste.sr.ht/~rabbits/94bec9b4eb01425a6b432a767c8c3c98b63962e3
Before I go deep down the rabbit hole, I'd value your views on this.
https://codeberg.org/wimvanderbauwhede/funktal/src/branch/main/SPEC.md
funktal
Hopefully, eventually, a small compiler implemented in Uxntal for a statically typed functional language running on Uxn.Codeberg.org
I've added it to this collection of routines: https://wiki.xxiivv.com/site/uxntal_library.html#strings
Here's the little example I will be using in the upcoming docs 😀