init one line project
This commit is contained in:
parent
085f014e95
commit
1f4b6008d7
4 changed files with 44 additions and 17 deletions
31
hello.tal
31
hello.tal
|
@ -1,18 +1,17 @@
|
|||
@Log #18
|
||||
( hello.tal )
|
||||
( devices )
|
||||
|10 @Console &vector $2 &read $1 &pad $5 &write $1 &error $1
|
||||
|
||||
|0100 LIT "h ;Log DEO ( h )
|
||||
LIT "e #18 DEO ( e )
|
||||
LIT "l #18 DEO ( l )
|
||||
#6c #18 DEO ( l )
|
||||
#6f #18 DEO ( o )
|
||||
#0a #18 DEO ( newline )
|
||||
#18s
|
||||
( macros )
|
||||
( print a character to standard output )
|
||||
%EMIT { .Console/write DEO } ( character -- )
|
||||
( print a newline )
|
||||
%NL { #0a EMIT } ( -- )
|
||||
|
||||
#19 DUP ( 25 25 )
|
||||
#0a DIV ( 25 02 )
|
||||
SWP DUP ( 02 25 25 )
|
||||
#0a DIV ( 02 25 02 )
|
||||
#0a MUL ( 02 25 20 )
|
||||
SUB ( 02 05 )
|
||||
#30 ADD SWP #30 ADD
|
||||
#18 DEO #18 DEO
|
||||
( main program )
|
||||
|0100 LIT "h EMIT
|
||||
LIT "e EMIT
|
||||
LIT "l EMIT
|
||||
LIT "l EMIT
|
||||
LIT "o EMIT
|
||||
NL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue