MASM/Cat program

From Esolang
Jump to navigation Jump to search
Back to Minimal assembly language

globals.masm

nine ptr-size

main.masm

tmp
loop

lab loop
        cmt goto loop
        alc ptr-size
        set tmp
        adr loop
        drf vpt
        fre tmp
        set ipt

lab main
        cmt init nine (aka ptr-size)
        alc one
        get one
        rot one
        rot one
        rot one
        rot one
        rot one
        nnd vpt
        set tmp
        alc one
        get one
        nnd vpt
        nnd tmp
        fre tmp
        set nine

        cmt set out to in
        alc ptr-size
        set tmp
        adr in
        drf vpt
        fre tmp
        set out

        cmt goto loop
        alc ptr-size
        set tmp
        adr loop
        drf vpt
        fre tmp
        set ipt