80 lines
1.1 KiB
Plaintext
Executable File
80 lines
1.1 KiB
Plaintext
Executable File
function Sys.init 0
|
|
call Memory.init 0
|
|
pop temp 0
|
|
call Math.init 0
|
|
pop temp 0
|
|
call Output.init 0
|
|
pop temp 0
|
|
call Screen.init 0
|
|
pop temp 0
|
|
call Keyboard.init 0
|
|
pop temp 0
|
|
call Main.main 0
|
|
pop temp 0
|
|
call Sys.halt 0
|
|
pop temp 0
|
|
push constant 0
|
|
return
|
|
function Sys.halt 0
|
|
label L0
|
|
push constant 1
|
|
neg
|
|
not
|
|
if-goto L1
|
|
goto L0
|
|
label L1
|
|
push constant 0
|
|
return
|
|
function Sys.wait 1
|
|
label L2
|
|
push argument 0
|
|
push constant 0
|
|
gt
|
|
not
|
|
if-goto L3
|
|
push constant 100
|
|
pop local 0
|
|
label L4
|
|
push local 0
|
|
push constant 0
|
|
gt
|
|
not
|
|
if-goto L5
|
|
push local 0
|
|
push constant 1
|
|
sub
|
|
pop local 0
|
|
goto L4
|
|
label L5
|
|
push argument 0
|
|
push constant 1
|
|
sub
|
|
pop argument 0
|
|
goto L2
|
|
label L3
|
|
push constant 0
|
|
return
|
|
function Sys.error 1
|
|
push constant 3
|
|
call String.new 1
|
|
pop local 0
|
|
push local 0
|
|
push argument 0
|
|
call String.setInt 2
|
|
pop temp 0
|
|
push constant 3
|
|
call String.new 1
|
|
push constant 69
|
|
call String.appendChar 2
|
|
push constant 82
|
|
call String.appendChar 2
|
|
push constant 82
|
|
call String.appendChar 2
|
|
call Output.printString 1
|
|
pop temp 0
|
|
push local 0
|
|
call Output.printString 1
|
|
pop temp 0
|
|
push constant 0
|
|
return
|