46 lines
899 B
Text
46 lines
899 B
Text
"#time.spl" import
|
|
native engage-compatibility-mode
|
|
func # { pop }
|
|
func puts { print }
|
|
func fcall { call }
|
|
func strconcat { concat }
|
|
func aget { swap :get }
|
|
func stoi { _mega }
|
|
func stol { _mega }
|
|
func _int { _mega }
|
|
func itos { _str }
|
|
def argv'pre-isbplmod &argv =argv'pre-isbplmod
|
|
func argv {
|
|
def args argv'pre-isbplmod call =args
|
|
def nargs args:len 2 - anew =nargs
|
|
args nargs 2 0 nargs:len acopy
|
|
nargs
|
|
}
|
|
func eputs {
|
|
print
|
|
}
|
|
func isbplmod'import-transform { with s ;
|
|
"spl: [compat] transforming import " s concat println
|
|
s:_char "#" :_char eq if {
|
|
"#nop.spl" =s
|
|
}
|
|
"spl: [compat] transformed to " s concat println
|
|
s
|
|
}
|
|
func inc {
|
|
"isbpl.spl: ISBPL code tried to call inc, an untranslatable function" println
|
|
pop
|
|
}
|
|
func dec {
|
|
"isbpl.spl: ISBPL code tried to call inc, an untranslatable function" println
|
|
pop
|
|
}
|
|
func getms {
|
|
0 time:unixms
|
|
}
|
|
func sleep {
|
|
time:sleep
|
|
}
|
|
|
|
func main { }
|