From 61a2993d8ee8cb9fa2eb086cd8cd81e5050a5805 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Tue, 24 Oct 2017 23:49:27 +0000 Subject: Update mix/1.3.1/26.cl.mixal. --- mix/1.3.1/26.cl.mixal | 65 +++++++++++++++++---------------------------------- 1 file changed, 21 insertions(+), 44 deletions(-) diff --git a/mix/1.3.1/26.cl.mixal b/mix/1.3.1/26.cl.mixal index bbe04b5..922e88d 100644 --- a/mix/1.3.1/26.cl.mixal +++ b/mix/1.3.1/26.cl.mixal @@ -1,49 +1,26 @@ -TERM ORIG 0 Card Loading Routine. Rough ugly first version. -START IN 80(16) Read from card reader. -TCHCK LDA 80 First check if it's a transfer card. - SUB TRNS - JANZ LC Transfer card if A is zero. - LDX 81(2:5) If here, it's a transfer card. - NUM 0 - STA 81(2:5) - LD1 81(4:5) - JMP 0,1 # Jump to address specified in transfer card. -LC LDX 81(0:1) If here, it's an information card. - LDA ZERO Reset A - NUM 0 - STA 81(0:1) Store no. of instructions. - LDA ZERO Reset A - LDX 81(2:5) Load dest. address of first instruction in character form. - NUM 0 Convert it to numeric form. - STA 81(2:5) Store dest. address of first instruction in numeric form. -J LD2 81(4:5) Load dest. address of current instruction to I2. - LD3 SADD(4:5) Load address of current instruction in charater form. - LDA 0,3 Load first part of current instruction in character form. - LDX 1,3 Load second part of current instruction in character form. - NUM 0 +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. - LDA ZERO Reset A - ADD SADD Load address of current instruction in character form. - ADD TWO Increment it by 2. - STA SADD Store address of next instruction in charactor form. - LDA 81(4:5) Load dest. address of current instruction. - ADD ONE Increment by 1. - STA 81(4:5) Store dest. address of next instruction. - LDA 81(0:1) Load value 'no. of instructions'. - SUB ONE Decrement by 1. - STA 81(0:1) Store value 'no. of instructions' to go. + 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. - LDA ET - STA SADD Reset SADD to 82. - LDA ZERO - LDX ZERO + LD1 0(0:0) Reset I1. JMP START Read another card. STOP HLT -SADD CON 82 -ET CON 82 -ZERO CON 0 -ONE CON 1 -TWO CON 2 -TRNS ALF TRANS END START - -- cgit v1.2.3