mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-12-27 10:29:40 +00:00
Clean up test case a little
This commit is contained in:
parent
5ad39d6897
commit
b41e759bc3
@ -1,5 +1,5 @@
|
||||
;
|
||||
; Declare all imported modules and their data/functions.
|
||||
; Include all imported modules and their data/functions.
|
||||
;
|
||||
|
||||
include(stdlib.plh)
|
||||
@ -22,7 +22,7 @@ def tens(start)
|
||||
i = start
|
||||
repeat
|
||||
print:hex(i)
|
||||
puts(@spaces)
|
||||
print:str(@spaces)
|
||||
print:dec(i)
|
||||
print:newln()
|
||||
i = i / 10
|
||||
|
@ -1,14 +1,22 @@
|
||||
;
|
||||
; Declare all imported modules and their data/functions.
|
||||
; Include all imported modules and their data/functions.
|
||||
;
|
||||
|
||||
include(stdlib.plh)
|
||||
|
||||
;
|
||||
; Module data.
|
||||
;
|
||||
|
||||
predef puti, puth, putln
|
||||
export word print[] = @puti, @puth, @putln
|
||||
export word print[] = @puti, @puth, @putln, @puts, @putc
|
||||
byte valstr[] = '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
|
||||
byte loadstr[] = "testlib loaded!"
|
||||
|
||||
;
|
||||
; Define functions.
|
||||
;
|
||||
|
||||
def puth(h)
|
||||
putc('$')
|
||||
putc(valstr[(h >> 12) & $0F])
|
||||
@ -16,6 +24,7 @@ def puth(h)
|
||||
putc(valstr[(h >> 4) & $0F])
|
||||
putc(valstr[ h & $0F])
|
||||
end
|
||||
|
||||
export def puti(i)
|
||||
if i < 0
|
||||
putc('-')
|
||||
@ -28,6 +37,7 @@ export def puti(i)
|
||||
putc(i % 10 + '0')
|
||||
fin
|
||||
end
|
||||
|
||||
export def putln
|
||||
putc($0D)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user