Source code: cat.pal

From PROSE Programming Language - Wiki
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.sys.io]
attr/load	P1, [psStreamIn], P2, [psStreamOut]

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

.trap
error/clr
func/rtn