COMMON/common/page6.src

31 lines
337 B
Plaintext
Raw Normal View History

2018-08-07 02:14:36 +00:00
#include "rom.h"
#include "macros.h"
* = $600
HDR(DEMO)
CMN
2018-08-28 00:27:00 +00:00
SET(R0, 1048575.999)
2018-08-25 03:40:47 +00:00
SET(R1, 3 * 5 * 5)
MOD(R2, R0, R1)
2018-08-28 00:27:00 +00:00
SUB(R3, R0, R2)
2018-08-07 02:14:36 +00:00
ESC
BRK
BGN(FACTORIAL)
SET(R1, $10.4456)
SET(R2, 1)
HEX(R1)
MOD(R3, R1, R2)
SUB(R1, R1, R3)
_1 TST(R1)
BRZ(_2)
MUL(R2, R2, R1)
DEC(R1)
BRA(_1)
_2 EXT(S0)
RTN
END(FACTORIAL)
2018-08-14 01:23:05 +00:00
END(DEMO)