Email or username:

Password:

Forgot your password?
Devine Lu Linvega

Uxn, but pocket version.

I've had a project in mind for a few days, I wanted to see how much of Uxn I could do away with and still manage to bootstrap the language.

Uxn emulator(150 lines, 16kb):
wiki.xxiivv.com/etc/uxncli.c.t
Uxntal self-hosted assembler(400 lines, 1.4kb):
wiki.xxiivv.com/etc/uxnasm.tal
Uxntal self-hosted assembler binary:
wiki.xxiivv.com/etc/uxnasm.rom

The emulator is capable of running the assembler and assembling most roms that do not use pre-processor runes.

wiki.xxiivv.com/site/uxn.html

11 comments
la ninpre

@neauoire hmm, on line 136 shouldn't c be of type int? if eof is defined as -1, the comparison below will be always false.

Devine Lu Linvega

@la_ninpre oh! yes you're right. Good catch :) I'll fix

tomas

@neauoire Took me a while to get how the keep bit works in uxncli, but that's pretty clever haha. Having fun following your work!

Devine Lu Linvega

@tomas It allows for a lot of fun stuff, like the ( normalize ) line origedit pointed out in this thread.

origedit

" ( normalize ) #20 GTHk [ JMP SWP POP ] "
"normalising" a character by reducing it to a space in case it's non-printable, and in such an inventive way?!

Devine Lu Linvega

@origedit 6 bytes to turn tabs and linebreaks into spaces, works really well! But, the null byte has to be caught a layer above ^__^

ThaCuber

@neauoire oh hell yeah, this would help me to understand how the emulator works :D

origedit

@neauoire the pages for uxnasm aren't there anymore

Go Up