Artifact
b48697fb6300e2e7a1adecd3b31a5407615d2df8 :
File
examples/ac-mq-blinker.pal
— part of check-in
[f24edf21c1]
at
2017-03-30 12:39:15
on branch trunk
— Disabling PDP-8 CPU idling when ILS is enabled. This has always been
the default for some boot/*.script files, but we need to enforce it
when ILS is enabled because we need regular CPU instruction rates to
make this work. Closes [c9eb5ac0144]
Also added a new configure script flag, --no-idle, to allow NLS users to
disable CPU idling too, if they like.
The *.script files generated from *.pal are marked noidle, with no way to
change it at present. CPU idling doesn't make much sense for these two
(1.script and 5.script) anyway.
(user:
tangent
size: 2479)
[more...]
0000: 2f 20 61 63 2d 6d 71 2d 62 6c 69 6e 6b 65 72 2e / ac-mq-blinker.
0010: 70 61 6c 20 2d 20 52 61 70 69 64 6c 79 20 6d 6f pal - Rapidly mo
0020: 64 69 66 79 20 41 43 20 61 6e 64 20 4d 51 0a 2f dify AC and MQ./
0030: 0a 2f 20 54 68 69 73 20 70 72 6f 67 72 61 6d 20 ./ This program
0040: 74 77 69 64 64 6c 65 73 20 41 43 20 61 6e 64 20 twiddles AC and
0050: 4d 51 20 72 61 70 69 64 6c 79 2c 20 77 69 74 68 MQ rapidly, with
0060: 20 61 20 73 6d 61 6c 6c 20 61 6d 6f 75 6e 74 20 a small amount
0070: 6f 66 20 64 65 6c 61 79 0a 2f 20 62 65 74 77 65 of delay./ betwe
0080: 65 6e 20 65 61 63 68 20 75 70 64 61 74 65 20 73 en each update s
0090: 6f 20 74 68 65 20 6c 69 67 68 74 73 20 61 72 65 o the lights are
00a0: 6e 27 74 20 6a 75 73 74 20 61 20 73 6f 6c 69 64 n't just a solid
00b0: 20 62 6c 75 72 2e 0a 2f 0a 2f 20 57 68 69 6c 65 blur.././ While
00c0: 20 74 68 69 73 20 70 72 6f 67 72 61 6d 20 72 75 this program ru
00d0: 6e 73 20 61 74 20 66 75 6c 6c 20 73 70 65 65 64 ns at full speed
00e0: 2c 20 6f 6e 6c 79 20 41 43 20 61 6e 64 20 4d 51 , only AC and MQ
00f0: 20 61 70 70 65 61 72 20 74 6f 20 61 0a 2f 20 68 appear to a./ h
0100: 75 6d 61 6e 20 74 6f 20 72 65 61 6c 6c 79 20 63 uman to really c
0110: 68 61 6e 67 65 2e 20 20 50 43 20 61 6c 73 6f 20 hange. PC also
0120: 63 68 61 6e 67 65 73 2c 20 6f 66 20 63 6f 75 72 changes, of cour
0130: 73 65 2c 20 62 75 74 20 73 69 6e 63 65 20 74 68 se, but since th
0140: 65 0a 2f 20 70 72 6f 67 72 61 6d 20 73 70 65 6e e./ program spen
0150: 64 73 20 73 6f 20 6d 75 63 68 20 6f 66 20 69 74 ds so much of it
0160: 73 20 74 69 6d 65 20 69 6e 20 74 68 65 20 64 65 s time in the de
0170: 6c 61 79 20 6c 6f 6f 70 20 61 74 20 74 68 65 20 lay loop at the
0180: 74 6f 70 2c 20 69 74 0a 2f 20 61 70 70 65 61 72 top, it./ appear
0190: 73 20 74 6f 20 62 65 20 73 74 75 63 6b 20 61 74 s to be stuck at
01a0: 20 50 43 3d 31 2e 0a 2f 0a 2f 20 49 74 20 61 6c PC=1.././ It al
01b0: 73 6f 20 6d 6f 64 69 66 69 65 73 20 4d 42 20 72 so modifies MB r
01c0: 61 70 69 64 6c 79 2c 20 62 75 74 20 74 68 65 20 apidly, but the
01d0: 70 61 74 74 65 72 6e 20 77 65 20 75 73 65 20 6d pattern we use m
01e0: 65 61 6e 73 20 69 74 20 6c 6f 6f 6b 73 0a 2f 20 eans it looks./
01f0: 6c 69 6b 65 20 74 68 65 20 6c 61 6d 70 73 20 61 like the lamps a
0200: 72 65 6e 27 74 20 63 68 61 6e 67 69 6e 67 2c 20 ren't changing,
0210: 62 75 74 20 61 72 65 20 61 6c 6c 20 6f 6e 2c 20 but are all on,
0220: 64 69 6d 6d 65 64 20 62 79 20 76 61 72 79 69 6e dimmed by varyin
0230: 67 0a 2f 20 61 6d 6f 75 6e 74 73 2e 0a 2f 0a 2f g./ amounts.././
0240: 20 46 72 6f 6d 3a 20 68 74 74 70 3a 2f 2f 64 75 From: http://du
0250: 73 74 79 6f 6c 64 63 6f 6d 70 75 74 65 72 73 2e styoldcomputers.
0260: 63 6f 6d 2f 70 64 70 38 2f 70 64 70 38 69 2f 74 com/pdp8/pdp8i/t
0270: 65 73 74 70 72 6f 67 73 2f 61 63 6d 71 62 6c 69 estprogs/acmqbli
0280: 6e 6b 65 72 2e 68 74 6d 6c 0a 2f 0a 2f 20 53 49 nker.html././ SI
0290: 4d 48 3a 20 73 65 74 20 74 68 72 6f 74 74 6c 65 MH: set throttle
02a0: 20 33 30 6b 0a 2f 20 53 49 4d 48 3a 20 73 65 74 30k./ SIMH: set
02b0: 20 64 66 20 64 69 73 61 62 6c 65 64 0a 2f 20 53 df disabled./ S
02c0: 49 4d 48 3a 20 73 65 74 20 63 70 75 20 6e 6f 69 IMH: set cpu noi
02d0: 64 6c 65 0a 2f 0a 2f 20 43 6f 70 79 72 69 67 68 dle././ Copyrigh
02e0: 74 20 c2 a9 20 32 30 30 30 20 52 6f 62 65 72 74 t © 2000 Robert
02f0: 20 4b 72 74 65 6e 0a 2f 0a 2f 20 50 65 72 6d 69 Krten././ Permi
0300: 73 73 69 6f 6e 20 69 73 20 68 65 72 65 62 79 20 ssion is hereby
0310: 67 72 61 6e 74 65 64 2c 20 66 72 65 65 20 6f 66 granted, free of
0320: 20 63 68 61 72 67 65 2c 20 74 6f 20 61 6e 79 20 charge, to any
0330: 70 65 72 73 6f 6e 20 6f 62 74 61 69 6e 69 6e 67 person obtaining
0340: 20 61 0a 2f 20 63 6f 70 79 20 6f 66 20 74 68 69 a./ copy of thi
0350: 73 20 73 6f 66 74 77 61 72 65 20 61 6e 64 20 61 s software and a
0360: 73 73 6f 63 69 61 74 65 64 20 64 6f 63 75 6d 65 ssociated docume
0370: 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 20 28 74 ntation files (t
0380: 68 65 20 22 53 6f 66 74 77 61 72 65 22 29 2c 0a he "Software"),.
0390: 2f 20 74 6f 20 64 65 61 6c 20 69 6e 20 74 68 65 / to deal in the
03a0: 20 53 6f 66 74 77 61 72 65 20 77 69 74 68 6f 75 Software withou
03b0: 74 20 72 65 73 74 72 69 63 74 69 6f 6e 2c 20 69 t restriction, i
03c0: 6e 63 6c 75 64 69 6e 67 20 77 69 74 68 6f 75 74 ncluding without
03d0: 20 6c 69 6d 69 74 61 74 69 6f 6e 0a 2f 20 74 68 limitation./ th
03e0: 65 20 72 69 67 68 74 73 20 74 6f 20 75 73 65 2c e rights to use,
03f0: 20 63 6f 70 79 2c 20 6d 6f 64 69 66 79 2c 20 6d copy, modify, m
0400: 65 72 67 65 2c 20 70 75 62 6c 69 73 68 2c 20 64 erge, publish, d
0410: 69 73 74 72 69 62 75 74 65 2c 20 73 75 62 6c 69 istribute, subli
0420: 63 65 6e 73 65 2c 0a 2f 20 61 6e 64 2f 6f 72 20 cense,./ and/or
0430: 73 65 6c 6c 20 63 6f 70 69 65 73 20 6f 66 20 74 sell copies of t
0440: 68 65 20 53 6f 66 74 77 61 72 65 2c 20 61 6e 64 he Software, and
0450: 20 74 6f 20 70 65 72 6d 69 74 20 70 65 72 73 6f to permit perso
0460: 6e 73 20 74 6f 20 77 68 6f 6d 20 74 68 65 0a 2f ns to whom the./
0470: 20 53 6f 66 74 77 61 72 65 20 69 73 20 66 75 72 Software is fur
0480: 6e 69 73 68 65 64 20 74 6f 20 64 6f 20 73 6f 2c nished to do so,
0490: 20 73 75 62 6a 65 63 74 20 74 6f 20 74 68 65 20 subject to the
04a0: 66 6f 6c 6c 6f 77 69 6e 67 20 63 6f 6e 64 69 74 following condit
04b0: 69 6f 6e 73 3a 0a 2f 0a 2f 20 54 68 65 20 61 62 ions:././ The ab
04c0: 6f 76 65 20 63 6f 70 79 72 69 67 68 74 20 6e 6f ove copyright no
04d0: 74 69 63 65 20 61 6e 64 20 74 68 69 73 20 70 65 tice and this pe
04e0: 72 6d 69 73 73 69 6f 6e 20 6e 6f 74 69 63 65 20 rmission notice
04f0: 73 68 61 6c 6c 20 62 65 20 69 6e 63 6c 75 64 65 shall be include
0500: 64 20 69 6e 0a 2f 20 61 6c 6c 20 63 6f 70 69 65 d in./ all copie
0510: 73 20 6f 72 20 73 75 62 73 74 61 6e 74 69 61 6c s or substantial
0520: 20 70 6f 72 74 69 6f 6e 73 20 6f 66 20 74 68 65 portions of the
0530: 20 53 6f 66 74 77 61 72 65 2e 0a 2f 0a 2f 20 54 Software.././ T
0540: 48 45 20 53 4f 46 54 57 41 52 45 20 49 53 20 50 HE SOFTWARE IS P
0550: 52 4f 56 49 44 45 44 20 22 41 53 20 49 53 22 2c ROVIDED "AS IS",
0560: 20 57 49 54 48 4f 55 54 20 57 41 52 52 41 4e 54 WITHOUT WARRANT
0570: 59 20 4f 46 20 41 4e 59 20 4b 49 4e 44 2c 20 45 Y OF ANY KIND, E
0580: 58 50 52 45 53 53 20 4f 52 0a 2f 20 49 4d 50 4c XPRESS OR./ IMPL
0590: 49 45 44 2c 20 49 4e 43 4c 55 44 49 4e 47 20 42 IED, INCLUDING B
05a0: 55 54 20 4e 4f 54 20 4c 49 4d 49 54 45 44 20 54 UT NOT LIMITED T
05b0: 4f 20 54 48 45 20 57 41 52 52 41 4e 54 49 45 53 O THE WARRANTIES
05c0: 20 4f 46 20 4d 45 52 43 48 41 4e 54 41 42 49 4c OF MERCHANTABIL
05d0: 49 54 59 2c 0a 2f 20 46 49 54 4e 45 53 53 20 46 ITY,./ FITNESS F
05e0: 4f 52 20 41 20 50 41 52 54 49 43 55 4c 41 52 20 OR A PARTICULAR
05f0: 50 55 52 50 4f 53 45 20 41 4e 44 20 4e 4f 4e 49 PURPOSE AND NONI
0600: 4e 46 52 49 4e 47 45 4d 45 4e 54 2e 20 20 49 4e NFRINGEMENT. IN
0610: 20 4e 4f 20 45 56 45 4e 54 20 53 48 41 4c 4c 0a NO EVENT SHALL.
0620: 2f 20 54 48 45 20 41 55 54 48 4f 52 53 20 4c 49 / THE AUTHORS LI
0630: 53 54 45 44 20 41 42 4f 56 45 20 42 45 20 4c 49 STED ABOVE BE LI
0640: 41 42 4c 45 20 46 4f 52 20 41 4e 59 20 43 4c 41 ABLE FOR ANY CLA
0650: 49 4d 2c 20 44 41 4d 41 47 45 53 20 4f 52 20 4f IM, DAMAGES OR O
0660: 54 48 45 52 0a 2f 20 4c 49 41 42 49 4c 49 54 59 THER./ LIABILITY
0670: 2c 20 57 48 45 54 48 45 52 20 49 4e 20 41 4e 20 , WHETHER IN AN
0680: 41 43 54 49 4f 4e 20 4f 46 20 43 4f 4e 54 52 41 ACTION OF CONTRA
0690: 43 54 2c 20 54 4f 52 54 20 4f 52 20 4f 54 48 45 CT, TORT OR OTHE
06a0: 52 57 49 53 45 2c 20 41 52 49 53 49 4e 47 0a 2f RWISE, ARISING./
06b0: 20 46 52 4f 4d 2c 20 4f 55 54 20 4f 46 20 4f 52 FROM, OUT OF OR
06c0: 20 49 4e 20 43 4f 4e 4e 45 43 54 49 4f 4e 20 57 IN CONNECTION W
06d0: 49 54 48 20 54 48 45 20 53 4f 46 54 57 41 52 45 ITH THE SOFTWARE
06e0: 20 4f 52 20 54 48 45 20 55 53 45 20 4f 52 20 4f OR THE USE OR O
06f0: 54 48 45 52 0a 2f 20 44 45 41 4c 49 4e 47 53 20 THER./ DEALINGS
0700: 49 4e 20 54 48 45 20 53 4f 46 54 57 41 52 45 2e IN THE SOFTWARE.
0710: 0a 2f 0a 2f 20 45 78 63 65 70 74 20 61 73 20 63 ././ Except as c
0720: 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 69 73 ontained in this
0730: 20 6e 6f 74 69 63 65 2c 20 74 68 65 20 6e 61 6d notice, the nam
0740: 65 73 20 6f 66 20 74 68 65 20 61 75 74 68 6f 72 es of the author
0750: 73 20 61 62 6f 76 65 20 73 68 61 6c 6c 0a 2f 20 s above shall./
0760: 6e 6f 74 20 62 65 20 75 73 65 64 20 69 6e 20 61 not be used in a
0770: 64 76 65 72 74 69 73 69 6e 67 20 6f 72 20 6f 74 dvertising or ot
0780: 68 65 72 77 69 73 65 20 74 6f 20 70 72 6f 6d 6f herwise to promo
0790: 74 65 20 74 68 65 20 73 61 6c 65 2c 20 75 73 65 te the sale, use
07a0: 20 6f 72 20 6f 74 68 65 72 0a 2f 20 64 65 61 6c or other./ deal
07b0: 69 6e 67 73 20 69 6e 20 74 68 69 73 20 53 6f 66 ings in this Sof
07c0: 74 77 61 72 65 20 77 69 74 68 6f 75 74 20 70 72 tware without pr
07d0: 69 6f 72 20 77 72 69 74 74 65 6e 20 61 75 74 68 ior written auth
07e0: 6f 72 69 7a 61 74 69 6f 6e 20 66 72 6f 6d 20 74 orization from t
07f0: 68 6f 73 65 0a 2f 20 61 75 74 68 6f 72 73 2e 0a hose./ authors..
0800: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
0810: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
0820: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
0830: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
0840: 2f 2f 2f 2f 2f 2f 2f 2f 0a 0a 09 50 41 47 45 20 ////////...PAGE
0850: 30 0a 6c 6f 6f 70 2c 09 49 53 5a 20 64 65 6c 61 0.loop,.ISZ dela
0860: 79 09 2f 20 63 72 65 61 74 65 20 61 20 64 65 6c y./ create a del
0870: 61 79 0a 09 4a 4d 50 20 6c 6f 6f 70 0a 09 43 4c ay..JMP loop..CL
0880: 41 09 09 2f 20 63 6c 65 61 72 20 41 43 20 73 6f A../ clear AC so
0890: 20 77 65 20 63 61 6e 20 6c 6f 61 64 20 69 74 0a we can load it.
08a0: 09 54 41 44 20 76 61 6c 75 65 09 2f 20 67 65 74 .TAD value./ get
08b0: 20 76 61 6c 75 65 0a 09 4d 51 4c 09 09 2f 20 73 value..MQL../ s
08c0: 74 61 73 68 20 41 43 20 69 6e 74 6f 20 4d 51 0a tash AC into MQ.
08d0: 09 54 41 44 20 76 61 6c 75 65 09 2f 20 66 65 74 .TAD value./ fet
08e0: 63 68 20 76 61 6c 75 65 20 61 67 61 69 6e 0a 09 ch value again..
08f0: 43 4d 41 09 09 2f 20 63 6f 6d 70 6c 65 6d 65 6e CMA../ complemen
0900: 74 20 41 43 0a 09 49 53 5a 20 76 61 6c 75 65 09 t AC..ISZ value.
0910: 2f 20 67 65 74 20 74 6f 20 6e 65 78 74 20 76 61 / get to next va
0920: 6c 75 65 0a 09 4e 4f 50 09 09 2f 20 69 67 6e 6f lue..NOP../ igno
0930: 72 65 20 70 6f 73 73 69 62 6c 65 20 22 73 6b 69 re possible "ski
0940: 70 22 20 66 72 6f 6d 20 49 53 5a 0a 09 4a 4d 50 p" from ISZ..JMP
0950: 20 6c 6f 6f 70 09 2f 20 61 6e 64 20 64 6f 20 69 loop./ and do i
0960: 74 20 61 6c 6c 20 61 67 61 69 6e 0a 0a 09 2a 32 t all again...*2
0970: 30 09 09 2f 20 73 6b 69 70 20 6f 76 65 72 20 74 0../ skip over t
0980: 68 65 20 61 75 74 6f 69 6e 63 72 65 6d 65 6e 74 he autoincrement
0990: 20 72 65 67 69 73 74 65 72 73 0a 64 65 6c 61 79 registers.delay
09a0: 2c 09 30 0a 76 61 6c 75 65 2c 09 30 0a 24 0a ,.0.value,.0.$.