13 lines
619 B
Plaintext
13 lines
619 B
Plaintext
; A simple compound interest calculator in N8A for n808 VM
|
|||
|
|
; Prompts for the percentage and then for the period, outputs the resulting multiplier
|
||
|
|
; Created by Luxferre in 2025, released into public domain
|
||
|
|
|
||
|
|
dca 100 1 ; store the constant 100 at loc 1
|
||
|
|
inp 2 3 ; prompt for the percentage into loc 2 and the period into loc 3
|
||
|
|
div 2 1 ; divide the percentage value at loc 2 by the constant at loc 1 into loc 1
|
||
|
|
inc 1 ; increment loc 1
|
||
|
|
log 1 1 ; replace loc 1 with its ln
|
||
|
|
mul 3 1 ; replace loc 1 with loc 3 * ln loc 1
|
||
|
|
exp 1 1 ; replace loc 1 with its nexp
|
||
|
|
out 1 1 ; output the resulting value
|