updated the compound interest example
This commit is contained in:
@@ -416,14 +416,13 @@ calculator from the official mu808 examples will transform into:
|
|||||||
5000 DATA 0,0
|
5000 DATA 0,0
|
||||||
5001 DATA 50100,1
|
5001 DATA 50100,1
|
||||||
5002 DATA 40002,30000
|
5002 DATA 40002,30000
|
||||||
5003 DATA 90002,10004
|
5003 DATA 90002,10005
|
||||||
5004 DATA 50001,5
|
5004 DATA 70127,1270005
|
||||||
5005 DATA 70005,40005
|
5005 DATA 130001,50005
|
||||||
5006 DATA 130001,50005
|
5006 DATA 70000,30005
|
||||||
5007 DATA 70000,30005
|
5007 DATA 130000,50005
|
||||||
5008 DATA 130000,50005
|
5008 DATA 30005,50000
|
||||||
5009 DATA 30005,50000
|
5009 DATA -1,0
|
||||||
5010 DATA -1,0
|
|
||||||
```
|
```
|
||||||
To make the conversion easier, the official mu808 assembler, `mu808asm.py`, now
|
To make the conversion easier, the official mu808 assembler, `mu808asm.py`, now
|
||||||
supports the `t74` mode that accepts a plain MU8 machine code file and outputs
|
supports the `t74` mode that accepts a plain MU8 machine code file and outputs
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
1 5 100 0 1
|
1 5 100 0 1
|
||||||
2 4 2 3 0
|
2 4 2 3 0
|
||||||
3 9 2 1 4
|
3 9 2 1 5
|
||||||
4 5 1 0 5
|
4 7 127 127 5
|
||||||
5 7 5 4 5
|
5 13 1 5 5
|
||||||
6 13 1 5 5
|
6 7 0 3 5
|
||||||
7 7 0 3 5
|
7 13 0 5 5
|
||||||
8 13 0 5 5
|
8 3 5 5 0
|
||||||
9 3 5 5 0
|
|
||||||
|
|||||||
@@ -4,10 +4,9 @@
|
|||||||
|
|
||||||
set 100 0 1 ; store the constant 100 at loc 1
|
set 100 0 1 ; store the constant 100 at loc 1
|
||||||
inp 2 3 0 ; prompt for the percentage into loc 2 and the period into loc 3
|
inp 2 3 0 ; prompt for the percentage into loc 2 and the period into loc 3
|
||||||
div 2 1 4 ; divide the percentage value at loc 2 by the constant at loc 1 into loc 4
|
div 2 1 5 ; divide the percentage value at loc 2 by the constant at loc 1 into loc 5
|
||||||
set 1 0 5 ; set the loc 5 to 1
|
inc 5 ; increment loc 5
|
||||||
fma 5 4 5 ; add the constant at loc 5 to the value at loc 4 into loc 5
|
log 5 5 ; replace loc 5 with its ln
|
||||||
nel 1 5 5 ; replace loc 5 with its ln
|
mul 3 5 ; replace loc 5 with loc 3 * ln loc 5
|
||||||
fma 0 3 5 ; replace loc 5 with loc 3 * ln loc 5
|
exp 5 5 ; replace loc 5 with its nexp
|
||||||
nel 0 5 5 ; replace loc 4 with its nexp
|
|
||||||
out 5 5 0 ; output the resulting value
|
out 5 5 0 ; output the resulting value
|
||||||
|
|||||||
Reference in New Issue
Block a user