Skip to content

Commit 3de98cb

Browse files
committed
LINC: Diagnostics for classic LINC.
These are tests for the classic LINC, including the features new in 1965: 2048 words of memory, a Z register, an overflow flag, and an interrupt facility.
1 parent 314acb4 commit 3de98cb

4 files changed

Lines changed: 115 additions & 0 deletions

File tree

linc/tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
clobbered.linc

linc/tests/classic-test.do

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# The tests check writing to the tape, so use a copy.
2+
copy classic-test.linc clobbered.linc
3+
attach tape0 clobbered.linc
4+
5+
echo CONTRL
6+
load -e classic-test.linc block=0 start=0 length=400
7+
break 34
8+
9+
# Special treatment for this test, because it's supposed to halt.
10+
echo *** Test: 70 - HLTTST ***
11+
load -e classic-test.linc block=1 start=400 length=400
12+
assert 400==70
13+
go 401
14+
assert P==402
15+
continue
16+
assert P==34
17+
18+
deposit RSW 0300
19+
deposit LSW 0700
20+
deposit SSW 77
21+
deposit SAM[0] 177
22+
deposit XL[0] 1
23+
deposit XL[1] 1
24+
deposit XL[2] 1
25+
deposit XL[3] 1
26+
deposit XL[4] 1
27+
deposit XL[5] 1
28+
deposit XL[6] 1
29+
deposit XL[7] 1
30+
deposit XL[8] 1
31+
deposit XL[9] 1
32+
deposit XL[10] 1
33+
deposit XL[11] 1
34+
35+
call test 1 SAETST 002
36+
call test 2 BCLTST 003
37+
call test 3 BSETST 004
38+
call test 4 BCOTST 005
39+
call test 5 ROTL1 006
40+
call test 6 ROTL2 007
41+
call test 7 ROTL3 010
42+
call test 10 ROTL4 011
43+
call test 11 ROTL5 012
44+
call test 12 ROTR1 013
45+
call test 13 ROTR2 014
46+
call test 14 ROTR3 015
47+
call test 15 ROTR4 016
48+
call test 16 ROTR5 017
49+
call test 17 CLRTST 020
50+
call test 20 ADDONE 021
51+
call test 21 COMT1 022
52+
call test 22 SCRT1 023
53+
call test 23 SCRT2 024
54+
call test 24 SCRT3 025
55+
call test 25 SCRT4 027
56+
call test 26 ADDT1 031
57+
call test 27 FADRT1 032
58+
call test 30 FADRT2 033
59+
#Bad block.
60+
;call test 31 iBETA1 035
61+
call test 32 iBETA2 036
62+
call test 33 iBETA3 037
63+
call test 34 iBETA4 040
64+
#Block 51 same as 52. Test 35 missing?
65+
;call test 35 LDAT1 041
66+
call test 36 STAT1 042
67+
call test 37 ADMT1 043
68+
call test 40 LAMT1 044
69+
call test 41 MULT1 045
70+
call test 42 SROT1 046
71+
call test 43 SETT1 047
72+
call test 44 SETT2 050
73+
call test 45 XSKT1 051
74+
call test 46 XSKT2 052
75+
call test 47 AZET1 053
76+
call test 50 APOT1 054
77+
call test 51 LZET1 055
78+
call test 52 HWCT1 056
79+
call test 53 HWCT2 057
80+
call test 54 HWCT3 060
81+
call test 55 HWCT4 061
82+
call test 56 HWCT5 062
83+
call test 57 RANADD 063
84+
call test 60 ATRT1 064
85+
call test 61 IBZT1 065
86+
call test 62 JMPUP 066
87+
call test 63 JMPDWN 067
88+
call test 64 TAPETS 070
89+
call test 65 MTBTST 101
90+
call test 66 DISTST 102
91+
call test 67 DSCTST 103
92+
call test 700 OVFT1 104
93+
call test 701 ZTAT1 105
94+
call test 702 ZCLR1 106
95+
call test 703 ZCLRT2 107
96+
deposit INTREQ 1
97+
call test 704 ENIT1 110
98+
call test 71 MISCTS 111
99+
100+
echo DIAGNOSTICS PASSED
101+
quit
102+
103+
:test
104+
echo *** Test: %1 - %2 ***
105+
load -e classic-test.linc block=%3 start=400 length=400
106+
assert 400==%1
107+
deposit 21 1%3
108+
go 401
109+
assert P==34
110+
return

linc/tests/classic-test.linc

266 KB
Binary file not shown.

linc/tests/linc_test.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cd linc/tests
2+
set crt disabled
3+
reset
4+
do classic-test.do

0 commit comments

Comments
 (0)