20 lines
602 B
Plaintext
20 lines
602 B
Plaintext
DataSection
|
|
StartData:
|
|
Data.i 15,17,-1,17,-1,-1,16,1,-1,16,3,-1,15,15,0,0,-1,72,101,108,108,111,44,32,119,111,114,108,100,33,10,0
|
|
StopData:
|
|
EndDataSection
|
|
|
|
If OpenConsole("Subleq")=0 : End 1 : EndIf
|
|
Dim code.i((?StopData-?StartData)/SizeOf(Integer)-1)
|
|
CopyMemory(?StartData,@code(0),?StopData-?StartData)
|
|
Define.i ip=0,a,b,c,nip
|
|
While 0<=ip
|
|
nip=ip+3 : a=code(ip) : b=code(ip+1) : c=code(ip+2)
|
|
If a=-1 : code(b)=Asc(Input())
|
|
ElseIf b=-1 : Print(Chr(code(a)))
|
|
Else : code(b)-code(a) : If code(b)<=0 : nip=c : EndIf
|
|
EndIf
|
|
ip=nip
|
|
Wend
|
|
Input()
|