summaryrefslogtreecommitdiffstats
path: root/mix/1.3.2/easter.mixal
blob: 8de5abcd8bfd8b6891254bcb9fca98ef5739d324 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
* Work in progress...
        ORIG 0
Y       CON  0 Y is stored here.
G       CON  0 G will get stored here.
C       CON  0 C will get stored here.
X       CON  0 X will get stored here.
Z       CON  0 Z will get stored here.
D       CON  0 D will get stored here.
        ORIG 1000
START   JMP DOE
* Date of Easter routine. Assumes Y is in address 0.
DOE     LDX  Y Step E1
        ENTA 0
        DIV  =19=
        INCX 1
        STX  G
        ENTA 0 Step E2
        LDX  Y
        DIV  =100=
        INCA 1
        STA  C
        ENTA 0 Step E3
        ENTA 3 Compute X
        MUL  C
        DIV  =4=
        DECA 12
        STA  X
        ENTA 8 Compute Z
        MUL  C
        INCX 5
        DIV  =25=
        DECA 5
        STA  Z
        ENTA 5 Compute D
        MUL  Y
        DIV  =4=
        SUB  X
        DECA 10
        STA  D
STOP    HLT
        END START