Public memoria[255] As Integer

Public Sub Main() 
  
  Dim contador As Integer = 0 
  Dim codigo As String, caracter As String
  
  Print "SUBLEQ> ";
  Input codigo
  
  While InStr(codigo, " ") 
    memoria[contador] = Val(Left(codigo, InStr(codigo, " ") - 1))
    codigo = Mid(codigo, InStr(codigo, " ") + 1) 
    contador += 1 
  Wend 
  
  memoria[contador] = Val(codigo) 
  contador = 0 
  Do 
    Dim a As Integer = memoria[contador]
    Dim b As Integer = memoria[contador + 1] 
    Dim c As Integer = memoria[contador + 2] 
    contador += 3 
    If a = -1 Then 
      Print "SUBLEQ> ";
      Input caracter 
      memoria[b] = Asc(caracter) 
    Else 
      If b = -1 Then 
        Print Chr(memoria[a]); 
      Else 
        memoria[b] -= memoria[a] 
        If memoria[b] <= 0 Then contador = c 
      End If 
    End If 
  Loop Until contador < 0  

End