Source code: cat.pal

From PROSE Programming Language - Wiki
Revision as of 14:03, 4 August 2010 by Cambridge (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
%
% Reads data from stdin and writes to stdout
%
._init
func/def	[main], &[.main]
local/rtn

.main
error/jmp	&[.trap], ![.prose.error.sys.AttributeEmpty]
reg/load	P0, ![.prose.io]
attr/load	P1, [psStreamIn], P2, [psStreamOut]

.loop
attr/direct	P0, P2, P0, P1
local/jmp	&[.loop]

.trap
error/clr
func/rtn