# Path: msp430/asm/rpn.py
# class Word(unicode):
# class RPNError(Exception):
# class RPNBase(list):
# class RPNStackOps(object):
# class RPNSimpleMathOps(object):
# class RPNMoreMathOps(object):
# class RPNBitOps(object):
# class RPNLogicOps(object):
# class RPNCompareOps(object):
# class RPN(RPNBase, RPNStackOps, RPNSimpleMathOps, RPNMoreMathOps,
#           RPNBitOps, RPNLogicOps, RPNCompareOps):
#     def __new__(cls, word, filename, lineno, text):
#     def lower(self):
# def annotated_words(sequence, filename=None, lineno=None, offset=None, text=None):
# def words_in_string(data, name='<string>', include_newline=False):
# def words_in_file(filename, fileobj=None, include_newline=False):
#     def __init__(self, message, filename=None, lineno=None, column=None, offset=None, text=None):
#     def __str__(self):
# def rpn_function(code):
#     def wrapper(stack):
# def word(name):
#     def decorate_word(function):
#     def __init__(self, namespace=None):
#     def interpret_sequence(self, sequence, filename=None):
#     def interpret(self, iterator):
#     def look_up(self, word):
#     def next_word(self):
#     def interpret_word(self, word):
#     def push(self, obj):
#     def pop(self):
#     def pop2(self):
#     def prettyprint(self, stack):
#     def __str__(self):
#     def printer(self, obj):
#     def clear(self, stack=None):
#     def dup(self, stack):
#     def drop(self, stack):
#     def swap(self, stack):
#     def over(self, stack):
#     def pick(self, stack):
#     def add(self, stack):
#     def sub(self, stack):
#     def mul(self, stack):
#     def div(self, stack):
#     def minimum(self, stack):
#     def maximum(self, stack):
#     def word_INT(self, stack):
#     def word_FLOAT(self, stack):
#     def negate(self, stack):
#     def bitor(self, stack):
#     def bitand(self, stack):
#     def bitxor(self, stack):
#     def bit_shift_left(self, stack):
#     def bit_shift_right(self, stack):
#     def bitnot(self, stack):
#     def word_NOT(self, stack):
#     def word_AND(self, stack):
#     def word_OR(self, stack):
#     def word_IFTE(self, stack):
#     def word_LIST(self, stack):
#     def smaller(self, stack):
#     def smaller_equal(self, stack):
#     def larger(self, stack):
#     def larger_equal(self, stack):
#     def equal(self, stack):
#     def not_equal(self, stack):
# def eval(words, stack=[], namespace={}):
# def python_function(code, namespace={}):
#     def wrapper(*args):
# def interpreter_loop(namespace={}, debug=False, rpn_class=RPN, rpn_instance=None):
#             N = min(4, len(self))


import sys
import os
import codecs
import pkgutil
import logging
from msp430.asm import rpn
    from optparse import OptionParser
    Function decorator used to tag Forth methods that will be executed
    immediately even when in compile mode.
    """
    function.forth_immediate = True
    return function



def immediate(function):
    """\
    Function decorator used to tag Forth methods that will be executed
    immediately even when in compile mode.
    """
    function.forth_immediate = True
    return function


class ForthBitOps(object):
    """Forth specific words for bit operations"""

    @rpn.word("OR")
    def bitor(self, stack):
        x, y = self.pop2()
        self.push(y | x)

    @rpn.word("AND")
    def bitand(self, stack):
        x, y = self.pop2()
        self.push(y & x)


# Path: msp430/asm/rpn.py
# class Word(unicode):
# class RPNError(Exception):
# class RPNBase(list):
# class RPNStackOps(object):
# class RPNSimpleMathOps(object):
# class RPNMoreMathOps(object):
# class RPNBitOps(object):
# class RPNLogicOps(object):
# class RPNCompareOps(object):
# class RPN(RPNBase, RPNStackOps, RPNSimpleMathOps, RPNMoreMathOps,
#           RPNBitOps, RPNLogicOps, RPNCompareOps):
#     def __new__(cls, word, filename, lineno, text):
#     def lower(self):
# def annotated_words(sequence, filename=None, lineno=None, offset=None, text=None):
# def words_in_string(data, name='<string>', include_newline=False):
# def words_in_file(filename, fileobj=None, include_newline=False):
#     def __init__(self, message, filename=None, lineno=None, column=None, offset=None, text=None):
#     def __str__(self):
# def rpn_function(code):
#     def wrapper(stack):
# def word(name):
#     def decorate_word(function):
#     def __init__(self, namespace=None):
#     def interpret_sequence(self, sequence, filename=None):
#     def interpret(self, iterator):
#     def look_up(self, word):
#     def next_word(self):
#     def interpret_word(self, word):
#     def push(self, obj):
#     def pop(self):
#     def pop2(self):
#     def prettyprint(self, stack):
#     def __str__(self):
#     def printer(self, obj):
#     def clear(self, stack=None):
#     def dup(self, stack):
#     def drop(self, stack):
#     def swap(self, stack):
#     def over(self, stack):
#     def pick(self, stack):
#     def add(self, stack):
#     def sub(self, stack):
#     def mul(self, stack):
#     def div(self, stack):
#     def minimum(self, stack):
#     def maximum(self, stack):
#     def word_INT(self, stack):
#     def word_FLOAT(self, stack):
#     def negate(self, stack):
#     def bitor(self, stack):
#     def bitand(self, stack):
#     def bitxor(self, stack):
#     def bit_shift_left(self, stack):
#     def bit_shift_right(self, stack):
#     def bitnot(self, stack):
#     def word_NOT(self, stack):
#     def word_AND(self, stack):
#     def word_OR(self, stack):
#     def word_IFTE(self, stack):
#     def word_LIST(self, stack):
#     def smaller(self, stack):
#     def smaller_equal(self, stack):
#     def larger(self, stack):
#     def larger_equal(self, stack):
#     def equal(self, stack):
#     def not_equal(self, stack):
# def eval(words, stack=[], namespace={}):
# def python_function(code, namespace={}):
#     def wrapper(*args):
# def interpreter_loop(namespace={}, debug=False, rpn_class=RPN, rpn_instance=None):
#             N = min(4, len(self))


# Path: msp430/asm/forth.py
import sys
import os
import codecs
import pkgutil
import logging
from msp430.asm import rpn
    from optparse import OptionParser

    Function decorator used to tag Forth methods that will be executed
    immediately even when in compile mode.
    """
    function.forth_immediate = True
    return function



def immediate(function):
    """\
    Function decorator used to tag Forth methods that will be executed
    immediately even when in compile mode.
    """
    function.forth_immediate = True
    return function


class ForthBitOps(object):
    """Forth specific words for bit operations"""

    @rpn.word("OR")
    def bitor(self, stack):
        x, y = self.pop2()
        self.push(y | x)

    @rpn.word("AND")
    def bitand(self, stack):
        x, y = self.pop2()
        self.push(y & x)


    @rpn.word("XOR")