diff options
Diffstat (limited to 'fibonacci.py')
| -rw-r--r-- | fibonacci.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fibonacci.py b/fibonacci.py new file mode 100644 index 0000000..d01139d --- /dev/null +++ b/fibonacci.py @@ -0,0 +1,10 @@ +import inst + +## this programm computes the fibonacci sequence + +## load the start values 1 and 1 into the two registers +## add the content of the two registers and save it alternating into the two +## registers, an repeat +prog = [inst.INST_LDA | 0x1, inst.INST_LDB | 0x1, inst.INST_REG_A_OUT, + inst.INST_ADD_A, inst.INST_REG_A_OUT, inst.INST_ADD_B, + inst.INST_REG_B_OUT, inst.INST_PC_LOAD | 0x3] |
