Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 646 Bytes

README.md

File metadata and controls

67 lines (52 loc) · 646 Bytes

PIATTI A STACK BASED PROGRAMMING LANGUAGE

stack reference

compilation:

meson setup builddir
meson compile -C builddir

cross-compile

meson setup builddir --cross-file windows-cross.ini
meson compile -C builddir

examples:

fibonacci

PUSH 1
PUSH 2

REPEAT 20 DO
    COPY
    ROT
    SUM
END

PUT
PUTNL

upper

PUSH 97

REPEAT SIZE DO
    PUSH 32
    SWAP
    SUB
    PUTC
    PUTNL
END

truth machine

PUSH 1 #or 0

IF TOP == 0 DO
    PUSH 0
    PUT
    PUTNL
END
ELSE DO
    LOOP DO
        PUSH 1
        PUT
        PUTNL
    END
END