summaryrefslogtreecommitdiffstats
path: root/mix/1.3.1/26.cl.mixal
blob: 922e88dbb3bd817cb5e9c285a3439d5f5035aee8 (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
BUFF    EQU 80
TERM    ORIG    0 Card Loading Routine. Rough ugly second version.
START   IN  BUFF(16) Read from card reader.
        LDX BUFF+1(2:5)
N30     NUM 30
        STA BUFF
TCHCK   LDA BUFF+1(0:1) Transfer card check.
        SUB N30(0:2)
J       LD2 BUFF Load dest. address of current instruction to I2.
        JAZ 0,2 Jump if transfer card.
        STA BUFF+1(0:1) Store no. of instructions.
        LDA BUFF+2,1 Load first part of current instruction in character form.
        LDX BUFF+3,1 Load second part of current instruction in character form.
N01     NUM 1
        STA 0,2 Store current instruction in numeric form to dest. address.
        MOVE 0,1(2) I1 <- I1 + 2
        LDA BUFF Load dest. address of current instruction.
        ADD N01(0:2) Increment by 1.
        STA BUFF Store dest. address of next instruction.
        LDA BUFF+1(0:1) Load value 'no. of instructions'.
        SUB N01(0:2) Decrement by 1.
        JANZ J If 'no. of instructions' not zero jump to J.
        LD1 0(0:0) Reset I1.
        JMP START Read another card.
STOP    HLT
        END     START