summaryrefslogtreecommitdiff
path: root/programs/echo_optimal.pal
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-10-29 18:18:26 -0700
committerJulian Blake Kongslie2022-10-29 18:18:26 -0700
commit9f4aa97822adc791f700670ef0fc7636849563b7 (patch)
tree0b9d6c1bb1d7d596501df3b77ab3d7b9f191aa4f /programs/echo_optimal.pal
parentControl register values should not be "unsigned int" (diff)
downloadbiggolf-9f4aa97822adc791f700670ef0fc7636849563b7.tar.xz
Understanding interrupt handling within SIMH (see echo_int.pal)
Add list of Bugs Add event log file parser More changes associated with widening the ctlregs (FIXME add a typedef) Add some keyboard instructions
Diffstat (limited to 'programs/echo_optimal.pal')
-rw-r--r--programs/echo_optimal.pal67
1 files changed, 67 insertions, 0 deletions
diff --git a/programs/echo_optimal.pal b/programs/echo_optimal.pal
new file mode 100644
index 0000000..1281309
--- /dev/null
+++ b/programs/echo_optimal.pal
@@ -0,0 +1,67 @@
1/ vim: set sw=8 noexpandtab :
2
3*000
4
5INTRET, 0
6 JMP GOTINT
7
8*010
9
10HEAD, 7777 / because preincrement
11TAIL, 7777
12
13*100
14
15TTBUSY, 0 / FIXME: sometimes we get wedged with TTBUSY=1, but TT flag is clear (no TT interrupt occurs)
16
17*200
18
19 CLA IAC
20 KIE
21 ION
22 CLA
23LOOP, TAD TTBUSY
24 SZA
25 JMP LOOP
26 TAD TAIL
27 CMA IAC
28 TAD HEAD
29 SNA
30 JMP LOOP
31 CLA
32 CDF 0010
33 TAD I TAIL
34 CDF 0000
35 IOF / critical section
36 TPC
37 CLA IAC
38 ION
39 DCA TTBUSY / end critical section
40 JMP LOOP
41
42*400
43
44SAVEA, 0
45SAVEF, 0
46
47GOTINT, DCA SAVEA
48 GTF
49 AND (7577)
50 DCA SAVEF
51 TSF
52 JMP KBIN
53 DCA TTBUSY
54 TCF
55KBIN, KSF
56 JMP RETINT
57 KRB
58 CDF 0010
59 DCA I HEAD
60 CDF 0000
61RETINT, CLA
62 TAD SAVEF
63 RTF
64 CLA
65 TAD SAVEA
66 ION
67 JMP I INTRET