COMMON/common/page6.src
2018-09-01 10:40:57 -04:00

31 lines
340 B
Plaintext

#include "rom.h"
#include "macros.h"
* = $600
HDR(DEMO)
CMN
SET(R0, $b8 + 28)
SET(R2, -999999.999)
SET(R7, 1048575.999)
LDI(R1, R0)
SVI(R0, R2)
ESC
BRK
BGN(FACTORIAL)
SET(R1, 10.4456)
SET(R2, 1)
MOD(R3, R1, R2)
SUB(R1, R1, R3)
_1 TST(R1)
BRZ(_2)
MUL(R2, R2, R1)
DCR(R1)
BRA(_1)
_2 EXT(S0)
RTN
END(FACTORIAL)
END(DEMO)