ACKERMANN:
    set I1, 3
    set I2, P0[1]
    bsr ACK
    print "Ack("
    print I1
    print ","
    print I2
    print "): "
    print I0
    print "\n"
    end

ACK:
    save I1
    save I2
    unless I1, ACK_M0
    unless I2, ACK_N0

    dec I2
    bsr ACK
    set I2, I0
    dec I1
    bsr ACK
    branch ACK_END

ACK_M0:
    set I0, I2
    inc I0
    branch ACK_END

ACK_N0:
    dec I1
    set I2, 1
    bsr ACK

ACK_END:    
    restore I2
    restore I1            
    ret