Invoke the peforth interpreter.
    An statement: peforth.ok(prompt='OK ', loc=locals(), glo=globals(), cmd="") 
    is like a breakpoint. The prompt indicates which breakpoint it is if there are 
    many. Arguments loc (locals) and glo (globals) along with the prompt are the 
    debuggee's informations that is packed as a tuple (loc,glo,prompt) left on TOS 
    of the FORTH vm when the breakpoint is called. Replace the loc=locals() with
    loc=dict(locals()) to get a snapshot copy instead of a reference, as well as 
    the glo. 'exit' command to stop debugging.

def ok(prompt='OK ', loc={}, glo={}, cmd=""):
    '''
    Invoke the peforth interpreter.
    An statement: peforth.ok(prompt='OK ', loc=locals(), glo=globals(), cmd="") 
    is like a breakpoint. The prompt indicates which breakpoint it is if there are 
    many. Arguments loc (locals) and glo (globals) along with the prompt are the 
    debuggee's informations that is packed as a tuple (loc,glo,prompt) left on TOS 
    of the FORTH vm when the breakpoint is called. Replace the loc=locals() with
    loc=dict(locals()) to get a snapshot copy instead of a reference, as well as 
    the glo. 'exit' command to stop debugging.
    '''
    if loc or glo: vm.push((loc,glo,prompt))  # parent's data
    while True:
        if cmd == "":                                    #
            if vm.tick('accept') and not vm.multiple:    # Input can be single line (default) or
                vm.execute('accept')                     # multiple lines. Press Ctrl-D to toggle
                cmd = vm.pop().strip()                   # between the two modes. Place a Ctrl-D
            elif vm.tick('<accept>') and vm.multiple:    # before the last <Enter> key to end the
                vm.execute('<accept>')                   # input when in multiple-line mode.
                cmd = vm.pop().strip()                   #
            else:                                        #
                cmd = input("").strip()                  #

        # pass the command line to forth VM
        if cmd == "":
            print(prompt, end="")
            continue
        elif cmd == chr(4):
            vm.multiple = not vm.multiple
            if not vm.multiple: print(prompt, end="")
        else:
            vm.dictate(cmd)
            if vm.multiple: vm.multiple = False # switch back to the normal mode
            print(prompt, end="")
        cmd = ""
        # Master switch vm.exit is a flag of boolean. When it's True
        # then exit to the caller that usually is python interpreter.
        if vm.exit:
            vm.exit = False # Avoid exit immediately when called again
            break
    return(vm) # support function cascade