summaryrefslogtreecommitdiff
path: root/programs/queue.pal
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-11-05 11:32:21 -0700
committerJulian Blake Kongslie2022-11-05 11:32:21 -0700
commit36e7c28531ee7bade9506144f48afed4c7ccd874 (patch)
tree2713b89afed0c225516057721b3e95763f062adf /programs/queue.pal
parentAvoid rereading the FLAGS register; use FLAGS_SAVED for GTF. (diff)
downloadbiggolf-36e7c28531ee7bade9506144f48afed4c7ccd874.tar.xz
Rename/remove some of the example programs
Diffstat (limited to 'programs/queue.pal')
-rw-r--r--programs/queue.pal67
1 files changed, 67 insertions, 0 deletions
diff --git a/programs/queue.pal b/programs/queue.pal
new file mode 100644
index 0000000..89a1fea
--- /dev/null
+++ b/programs/queue.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
16
17*200
18
19 CLA IAC
20 KIE
21 ION
22LOOP, CLA
23 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
44GOTINT, DCA SAVEA
45 GTF
46 AND (7577)
47 DCA SAVEF
48 TSF
49 JMP KBIN
50 DCA TTBUSY
51 TCF
52KBIN, KSF
53 JMP RETINT
54 KRB
55 CDF 0010
56 DCA I HEAD
57 CDF 0000
58RETINT, CLA
59 TAD SAVEF
60 RTF
61 CLA
62 TAD SAVEA
63 ION
64 JMP I INTRET
65
66SAVEA, 0
67SAVEF, 0