// hanoi 

to print x = syscall {1 x}
to space = syscall {2 32}
to nl = syscall {2 10}
to printc x = syscall {2 x}

to mov n from t2 | other =
  if n == 1 
    num[from] = num[from] - 1
    num[t2] = num[t2] + 1
    print from printc 58 print t2 nl
  else  
    other = 6 - from - t2
    mov n-1 from other
    mov 1 from t2
    mov n-1 other t2

to main | disk =
  num = array 4
  disk = 3
  num[0] = 0
  num[1] = disk
  num[2] = 0
  num[3] = 0
  mov disk 1 3


