YESSSS C COMPILER YEEEEEEEEEEES
edit:
also i have a problem. i'm trying to write a program that takes a value from a breakout box at address 0xA000 and print it in hexadecimal, but dw doesn't work; it says expected label declaration, instruction or hook invocation; [tptasm] instruction resolution stage failed, bailing; [tptasm] done; as for the program (with definitions taken from demo.asm on the R3 github):
%define term_base 0x9F80
%eval term_input term_base 0x00 +
%eval term_raw term_base 0x04 +
%eval term_single term_base 0x05 +
%eval term_term term_base 0x35 +
%eval term_hrange term_base 0x42 +
%eval term_vrange term_base 0x43 +
%eval term_cursor term_base 0x44 +
%eval term_nlchar term_base 0x45 +
%eval term_colour term_base 0x46 +
%define term_width 14
%define term_height 12
%define nlchar 10
%define breakoutBox 0xA000
start:
mov r5, nlchar
st r5, term_nlchar
mov r6, 0x0A
st r6, term_colour
loop:
ld r1, breakoutBox
and r2, r1, 255
shr r3, r1, 8
and r3, r3, 255
exh r4, r1, r1
and r4, r4, 255
ld r1, r1, hexTable
ld r2, r2, hexTable
ld r3, r3, hexTable
ld r4, r4, hexTable
st r2, term_term
st r3, term_term
st r4, term_term
st r5, term_term
jmp loop
hexTable:
dw "0123456789ABCDEF"
i have changed the name of one of the definitions to prevent spoiling my next R3 save. the error is on dw "0123456789ABCDEF"
on another note, aliases don't work for me. for example, nop errors out for me unless i add a macro called nop. similar with cmp. i'm pretty sure i'm on the latest version of tptasm. i'm running windows 11 if that's helpful, and on tpt version 99.3
update:
nevermind, i found out i need %include "common" it's fixed