summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--samples/echo.mixal10
-rw-r--r--samples/permutations.cardrd2
-rw-r--r--samples/permutations.mixal89
-rw-r--r--samples/tests/bt.mixal6
-rw-r--r--samples/tests/cbp.mixal14
-rw-r--r--samples/tests/ldan.mixal5
-rw-r--r--samples/tests/lockonw.mixal3
-rw-r--r--samples/tests/negwrite.mixal4
-rw-r--r--samples/tests/stress0.mixal8
-rw-r--r--samples/tests/stress1.mixal9
-rw-r--r--samples/tests/stress2.mixal7
-rw-r--r--samples/tests/stress4.mixal7
-rw-r--r--samples/tests/stress5.mixal17
-rw-r--r--samples/tests/stress6.mixal9
14 files changed, 190 insertions, 0 deletions
diff --git a/samples/echo.mixal b/samples/echo.mixal
new file mode 100644
index 0000000..9b87adf
--- /dev/null
+++ b/samples/echo.mixal
@@ -0,0 +1,10 @@
+* read from the console
+TERM EQU 19
+MSG EQU 500
+PRINT EQU 20
+ ORIG 1000
+START IN MSG(TERM)
+* JBUS *(TERM)
+ OUT MSG(TERM)
+ HLT
+ END START
diff --git a/samples/permutations.cardrd b/samples/permutations.cardrd
new file mode 100644
index 0000000..f626e04
--- /dev/null
+++ b/samples/permutations.cardrd
@@ -0,0 +1,2 @@
+ ( A C F G ) ( B C D ) ( A E D )
+ ( F A D E ) ( B g F a E ) =
diff --git a/samples/permutations.mixal b/samples/permutations.mixal
new file mode 100644
index 0000000..24cc682
--- /dev/null
+++ b/samples/permutations.mixal
@@ -0,0 +1,89 @@
+* multiply permutations in cycle form (taopc p. 168)
+*
+MAXWDS EQU 1200
+PERM ORIG *+MAXWDS
+ANS ORIG *+MAXWDS
+OUTBUF ORIG *+24
+CARDS EQU 16
+PRINTER EQU 18
+BEGIN IN PERM(CARDS)
+ ENT2 0
+ LDA EQUALS
+1H JBUS *(CARDS)
+ CMPA PERM+15,2
+ JE *+2
+ IN PERM+16,2(CARDS)
+ ENT1 OUTBUF
+ JBUS *(PRINTER)
+ MOVE PERM,2(16)
+ OUT OUTBUF(PRINTER)
+ JE 1F
+ INC2 16
+ CMP2 =MAXWDS-16=,1(1:5)
+ JLE 1B
+ HLT 666
+1H INC2 15
+ ST2 SIZE
+ ENT3 0
+2H LDAN PERM,3
+ CMPA LPREN(1:5)
+ JNE 1F
+ STA PERM,3
+ INC3 1
+ LDXN PERM,3
+ JXZ *-2
+1H CMPA RPREN(1:5)
+ JNE *+2
+ STX PERM,3
+ INC3 1
+ CMP3 SIZE
+ JL 2B
+ LDA LPREN
+ ENT1 ANS
+OPEN ENT3 0
+1H LDXN PERM,3
+ JXN GO
+ INC3 1
+ CMP3 SIZE
+ JL 1B
+*
+DONE CMP1 =ANS=
+ JNE *+2
+ MOVE LPREN(2)
+ MOVE =0=
+ MOVE -1,1(22)
+ ENT3 0
+ OUT ANS,3(PRINTER)
+ INC3 24
+ LDX ANS,3
+ JXNZ *-3
+ HLT
+*
+LPREN ALF " ("
+RPREN ALF ") "
+EQUALS ALF " ="
+*
+GO MOVE LPREN
+ MOVE PERM,3
+ STX START
+SUCC STX PERM,3
+ INC3 1
+ LDXN PERM,3(1:5)
+ JXN 1F
+ JMP *-3
+5H STX 0,1
+ INC1 1
+ ENT3 0
+4H CMPX PERM,3(1:5)
+ JE SUCC
+1H INC3 1
+ CMP3 SIZE
+ JL 4B
+ CMPX START(1:5)
+ JNE 5B
+CLOSE MOVE RPREN
+ CMPA -3,1
+ JNE OPEN
+ INC1 -3
+ JMP OPEN
+ END BEGIN
diff --git a/samples/tests/bt.mixal b/samples/tests/bt.mixal
new file mode 100644
index 0000000..00306ae
--- /dev/null
+++ b/samples/tests/bt.mixal
@@ -0,0 +1,6 @@
+ ORIG 0
+BEG JMP *+1
+ JMP *+1
+FOO JMP BAR
+BAR HLT
+ END BEG
diff --git a/samples/tests/cbp.mixal b/samples/tests/cbp.mixal
new file mode 100644
index 0000000..8c7b394
--- /dev/null
+++ b/samples/tests/cbp.mixal
@@ -0,0 +1,14 @@
+* testing conditional breakpoints
+ ORIG 2000
+START ENTA 100
+ STA 1000
+ ENTX 200
+ STX 1001
+ CMPA 1001 * cmp flag changed
+ CMPX 1000 * cmp flag changed
+ DIV 1002 * over toggle
+ HLT
+ END START
+
+
+
diff --git a/samples/tests/ldan.mixal b/samples/tests/ldan.mixal
new file mode 100644
index 0000000..d15c6a3
--- /dev/null
+++ b/samples/tests/ldan.mixal
@@ -0,0 +1,5 @@
+VAR ORIG *+1
+BEGIN LDAN VAR(1:5)
+ LDXN VAR(1:5)
+ HLT
+ END BEGIN
diff --git a/samples/tests/lockonw.mixal b/samples/tests/lockonw.mixal
new file mode 100644
index 0000000..3ddad65
--- /dev/null
+++ b/samples/tests/lockonw.mixal
@@ -0,0 +1,3 @@
+* test for bug #5654
+START CMPA =0=(1:4)
+ END START
diff --git a/samples/tests/negwrite.mixal b/samples/tests/negwrite.mixal
new file mode 100644
index 0000000..dfed659
--- /dev/null
+++ b/samples/tests/negwrite.mixal
@@ -0,0 +1,4 @@
+* test for bug #5649: invalid address in OUT
+START OUT -1(18)
+ HLT
+ END START
diff --git a/samples/tests/stress0.mixal b/samples/tests/stress0.mixal
new file mode 100644
index 0000000..d87b743
--- /dev/null
+++ b/samples/tests/stress0.mixal
@@ -0,0 +1,8 @@
+ ORIG 1999
+ST NOP
+* SYM EQU SYM+1
+SYM2 CON SYM2+1
+SYM3 ORIG SYM3+2
+SYM4 ENTA SYM4+1
+ HLT
+SYM5 END SYM5+1
diff --git a/samples/tests/stress1.mixal b/samples/tests/stress1.mixal
new file mode 100644
index 0000000..f9bc8c9
--- /dev/null
+++ b/samples/tests/stress1.mixal
@@ -0,0 +1,9 @@
+ ORIG 1999
+ST NOP
+3H EQU 69
+3H ENTA 3B
+** According to pg 151, rA should be 69, not 2000
+** "An address of 2F or 2B never refers to its own line"
+ HLT
+ END ST
+
diff --git a/samples/tests/stress2.mixal b/samples/tests/stress2.mixal
new file mode 100644
index 0000000..0c4d7d6
--- /dev/null
+++ b/samples/tests/stress2.mixal
@@ -0,0 +1,7 @@
+ ORIG 1999
+ST NOP
+SYM EQU SYM+1
+SYM2 CON SYM2+1
+SYM3 ORIG SYM3+2
+ HLT
+SYM4 END SYM4+1
diff --git a/samples/tests/stress4.mixal b/samples/tests/stress4.mixal
new file mode 100644
index 0000000..7bcdd2a
--- /dev/null
+++ b/samples/tests/stress4.mixal
@@ -0,0 +1,7 @@
+ ORIG 2000
+ST NOP
+ ENTA FUT
+** Whoa, mdk tells me FUT is never defined...
+FUT EQU 69
+ HLT
+ END ST
diff --git a/samples/tests/stress5.mixal b/samples/tests/stress5.mixal
new file mode 100644
index 0000000..fce18cb
--- /dev/null
+++ b/samples/tests/stress5.mixal
@@ -0,0 +1,17 @@
+* checking output to binary device
+OUTDEV EQU 1 device for output
+FROM EQU 1000
+TO EQU 1099
+INITVAL EQU 1
+STEP EQU 10
+ ORIG 2000
+START ENTA INITVAL
+ ST1 0
+LOOP STA FROM,1
+ INC1 1
+ INCA STEP
+ CMP1 =TO-FROM+1=
+ JNE LOOP
+ OUT FROM(OUTDEV)
+ HLT
+ END START
diff --git a/samples/tests/stress6.mixal b/samples/tests/stress6.mixal
new file mode 100644
index 0000000..a80b7c9
--- /dev/null
+++ b/samples/tests/stress6.mixal
@@ -0,0 +1,9 @@
+* checking input from binary device
+INDEV EQU 1 device for input
+OUTDEV EQU 2 device for output
+MEM EQU 1000
+ ORIG 2000
+START IN MEM(INDEV)
+ OUT MEM(OUTDEV)
+ HLT
+ END START