;****************** Constant Definitions ****************** symbol control = outpinsA ;A.0 = BC1, A.1 = BDIR symbol bus = outpinsB ;AY-8910 control codes and register addresses symbol inactive = %00000000 symbol latchData = %00000010 symbol latchAddr = %00000011 symbol Reg7 = %00000111 symbol Reg15 = %00001111 ;LED on IOB symbol IOBOut = %10111111 ;IOB data direction code symbol LED_On = %00000001 symbol LED_Off = %00000000 ;********************** Main Program ********************** pgm: dirsA = %11111111 ;make all output dirsB = %11111111 ;make all output ;set up the AY Port B for output bus = Reg7 ;set address to register 7 control = latchAddr ;latch the address control = inactive bus = IOBOut ;make Port IOB output control = latchData ;latch data control = inactive main: bus = Reg15 ;Turn on LED control = latchAddr control = inactive bus = LED_on control = latchData control = inactive pause 500 bus = Reg15 ;Turn off LED control = latchAddr control = inactive bus = LED_off control = latchData control = inactive pause 500 goto main ;and repeat forever end