2018-08-07 02:14:36 +00:00
|
|
|
#include "rom.h"
|
|
|
|
#include "macros.h"
|
2018-09-08 15:00:19 +00:00
|
|
|
#include "globals.h"
|
2018-08-07 02:14:36 +00:00
|
|
|
|
|
|
|
* = $600
|
|
|
|
|
|
|
|
HDR(DEMO)
|
|
|
|
CMN
|
2018-09-08 15:00:19 +00:00
|
|
|
LDD(R0, PLS_1)
|
|
|
|
LDD(R1, MNS_1)
|
2018-09-11 23:26:08 +00:00
|
|
|
SVD(R1, SVD_T)
|
|
|
|
LDD(R2, SVD_T)
|
2018-08-07 02:14:36 +00:00
|
|
|
ESC
|
|
|
|
BRK
|
|
|
|
|
|
|
|
BGN(FACTORIAL)
|
2018-09-01 14:40:57 +00:00
|
|
|
SET(R1, 10.4456)
|
2018-08-07 02:14:36 +00:00
|
|
|
SET(R2, 1)
|
|
|
|
MOD(R3, R1, R2)
|
|
|
|
SUB(R1, R1, R3)
|
|
|
|
_1 TST(R1)
|
|
|
|
BRZ(_2)
|
|
|
|
MUL(R2, R2, R1)
|
2018-09-01 14:40:57 +00:00
|
|
|
DCR(R1)
|
2018-08-07 02:14:36 +00:00
|
|
|
BRA(_1)
|
|
|
|
_2 EXT(S0)
|
|
|
|
RTN
|
|
|
|
END(FACTORIAL)
|
|
|
|
|
2018-08-14 01:23:05 +00:00
|
|
|
END(DEMO)
|
2018-09-11 23:26:08 +00:00
|
|
|
|
|
|
|
SVD_T .BYTE 0, 0, 0, 0
|