blob: b9e4ba661c3321ea40a99c00a42c410e339919d5 (
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
|
BUFF EQU 80
TERM ORIG 0 Card Loading Routine. Rough ugly third version.
START IN BUFF(16) Read from card reader.
LDX BUFF+1(2:5)
N30 NUM 30
N24 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+3,1(5:5)
SUB N24(5:5)
STA 0,2(0:0) Store sign.
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(1:5) 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
|