(uxncore) Init

This commit is contained in:
Devine Lu Linvega 2024-06-29 09:11:47 -08:00
parent 899a579257
commit bb08e1f94c
2 changed files with 59 additions and 0 deletions

25
cli/uxncore/makefile Normal file
View File

@ -0,0 +1,25 @@
ID=uxncore
DIR=~/roms
ASM=uxncli ${DIR}/drifblim.rom
LIN=uxncli ${DIR}/uxnlin.rom
EMU=uxncli
ROM=bin/${ID}.rom
all: ${ROM}
lint:
@ ${LIN} src/${ID}.tal
run: all
@ ${EMU} ${ROM}
clean:
@ rm -f ${ROM} ${ROM}.sym
install: ${ROM}
@ cp ${ROM} ${DIR}
uninstall:
@ rm -f ${DIR}/${ID}.rom
.PHONY: all clean lint run install uninstall
${ROM}: src/*
@ mkdir -p bin
@ ${ASM} src/${ID}.tal ${ROM}

View File

@ -0,0 +1,34 @@
|100
@on-reset ( -> )
( | generate )
;dict/int <pstr-ln>
;dict/fn-name <pstr-ln>
[ LIT2 "{ 18 ] DEO
#0a18 DEO
#0918 DEO
;dict/ram-var <pstr-ln>
[ LIT2 "} 18 ] DEO
#0a18 DEO
BRK
(
@|utils )
@<pstr> ( str* -- )
LDAk #18 DEO
INC2 LDAk ?<pstr>
POP2 JMP2r
@<pstr-ln> ( str* -- )
<pstr>
#0a18 DEO
JMP2r
(
@|assets )
@dict &int "int $1
&fn-name "uxn_eval(Uxn 20 "*u, 20 "Uint16 20 "pc) $1
&ram-var "Uint8 20 "*ram 20 "= 20 "u->ram; $1