/ ac-mq-blinker.pal - Rapidly modify AC and MQ
/
/ This program twiddles AC and MQ rapidly, with a small amount of delay
/ between each update so the lights aren't just a solid blur.
/
/ While this program runs at full speed, only AC and MQ appear to a
/ human to really change.  PC also changes, of course, but since the
/ program spends so much of its time in the delay loop at the top, it
/ appears to be stuck at PC=1.
/
/ It also modifies MB rapidly, but the pattern we use means it looks
/ like the lamps aren't changing, but are all on, dimmed by varying
/ amounts.
/
/ From: http://dustyoldcomputers.com/pdp8/pdp8i/testprogs/acmqblinker.html
/
/ SIMH: set throttle 30k
/ SIMH: set df disabled
/ SIMH: set cpu noidle
/
/ Copyright © 2000 Robert Krten
/
/ Permission is hereby granted, free of charge, to any person obtaining a
/ copy of this software and associated documentation files (the "Software"),
/ to deal in the Software without restriction, including without limitation
/ the rights to use, copy, modify, merge, publish, distribute, sublicense,
/ and/or sell copies of the Software, and to permit persons to whom the
/ Software is furnished to do so, subject to the following conditions:
/
/ The above copyright notice and this permission notice shall be included in
/ all copies or substantial portions of the Software.
/
/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
/ THE AUTHORS LISTED ABOVE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/ DEALINGS IN THE SOFTWARE.
/
/ Except as contained in this notice, the names of the authors above shall
/ not be used in advertising or otherwise to promote the sale, use or other
/ dealings in this Software without prior written authorization from those
/ authors.
////////////////////////////////////////////////////////////////////////

	PAGE 0
loop,	ISZ delay	/ create a delay
	JMP loop
	CLA		/ clear AC so we can load it
	TAD value	/ get value
	MQL		/ stash AC into MQ
	TAD value	/ fetch value again
	CMA		/ complement AC
	ISZ value	/ get to next value
	NOP		/ ignore possible "skip" from ISZ
	JMP loop	/ and do it all again

	*20		/ skip over the autoincrement registers
delay,	0
value,	0
$
