home.social

#0a6f — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #0a6f, aggregated by home.social.

  1. CW: uxn code

    Here’s a really weird #uxn “Hello World” program:

        ( hello.tal )
        ( devices )
        |10 @Console [ &vector $2 &read $1 &pad $5 &write $1 &error $1 ]
        
        ( macros )
        ( print a character to standard output )
        %EMIT { .Console/write DEO } ( character -- )
        %EMITK { .Console/write DEOk } ( character -- character Consolewrite )
        ( print a newline )
        %NL { #0a EMIT } ( -- )
        
        ( main program )
        |0100 #0a6f
              #6c
              #6568 
              EMITK NIP DEOk NIP DEOk DEOk NIP DEOk NIP DEO
              ,wo LDRk ( wo w -- )
              STH #0d SUB STHr
        @looper #00 POP ( wo w -- )
              EMIT ( wo -- )
              INC ( wo+1 -- )
              LDRk ( wo+1 o -- )
              DUP #00 NEQ ,looper ( wo+1 o 1 looper -- ) 
              JCN ( wo+1 o -- )
              BRK
        @wo   
              'w 'o 'r 'l 'd 21