Sample library

This commit is contained in:
David Schmenk 2014-04-29 17:10:15 -07:00
parent 63d34c52bb
commit 8807fbcbc2

23
PLASMA/src/testlib.pla Executable file
View File

@ -0,0 +1,23 @@
;
; Declare all imported modules and their data/functions.
;
import stdlib
predef cls, gotoxy, puts, putc
end
;
; Define functions.
;
export def puti(i)
if i < 0
putc('-')
i = -i
fin
if i < 10
putc(i + '0')
else
puti(i / 10)
putc(i % 10 + '0')
fin
end
done