summaryrefslogtreecommitdiffhomepage
path: root/samples/m.mixal
blob: ae69b42da80e56b16e154c9e4e8a833139b5c855 (plain)
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
X               EQU     1000
                ORIG    3000
MAXIMUM         STJ     EXIT
INIT            ENT3    0,1
                JMP     CHANGEM
LOOP            CMPA    X,3
                JGE     *+3
CHANGEM         ENT2    0,3
                LDA     X,3
                DEC3    1
                J3P     LOOP
EXIT            JMP     *
START           IN     X+1(0)
                JBUS    *(0)
                ENT1    100
1H              JMP     MAXIMUM
                LDX     X,1
                STA     X,1
                STX     X,2
                DEC1    1
                J1P     1B
                OUT     X+1(1)
                HLT
                END     START