You are browsing as a guest. Sign up (or log in) to start making projects!

4h 14m 59s logged

Aglang devlog #2

the interpreter is done faster than i expected and after some issues i settled on the syntax. ive added comments (kinda hated working on them), changed the input structure a little bit (now the input gets directly stored on the stack).
the next step is building a compiler to x86-64 assembly, i dont think i’ll make it for other architectures. i guess it shouldnt be that hard since the language’s features are pretty similar to how assembly works (obvious foreshadowing)

this example outputs every uppercase letter in the alphabet:

01000001>''; $ move 65 (A char in ascii) to reg2 $
11010>:; $ push alphabet counter (from A to Z) into stack $
[ $ loop (ends when first value in stack is 0) $
    ''>\; $ output the letter $
    1010>\; $ newline $
    ''+1; $ add 1 to the ascii value to go to the next letter $
    :>'; $ move counter to reg1 $
    :!; $ pop old counter $
    '-1; $ remove 1 from the counter $
    '>:; $ push the updated counter to the stack $
]

(the text between the $ are comments)

0
3

Comments 0

No comments yet. Be the first!