global inpos inp$ .
func inp .
   if inpos = 0
      inp$ = input
      if error = 1
         return 255
      .
      inpos = 1
   .
   if inpos <= len inp$
      h = strcode substr inp$ inpos 1
      inpos += 1
      return h
   .
   inpos = 0
   return 10
.
proc subleq . mem[] .
   repeat
      a = mem[p]
      b = mem[p + 1]
      c = mem[p + 2]
      p += 3
      if a = -1
         mem[b] = inp
      elif b = -1
         write strchar mem[a]
      else
         mem[b] -= mem[a]
         if mem[b] <= 0
            p = c
         .
      .
      until p < 0
   .
.
prog[] = [ 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 ]
arrbase prog[] 0
# 
subleq prog[]
# 
input_data
dummy data
