; ; simon for gmc-4 ; ; a:general ; b:random seed ; y:index ; z:next ptr (=score) ; gameOver: cal ends ; game over sound waitStart: ka jump waitStart initGame: tiy 0 ch tiy 0 nextValue: ch cal sift ; convert to 4-8 am ; force exec next line cal sift aia 4 am aiy 1 jump gameOver ; no room tia F am ; end mark ch tiy 0 dispLoop: ma aiy 1 cia F ; end mark? jump dispValue jump endDisp dispValue: ao cal sund jump dispLoop endDisp: tiy 0 inputLoop: ma cia F ; answer all? jump inputValue jump nextValue inputValue: ch aia 1 ; shuffle random value ch ka jump inputValue ao cal sund m- ; correct? jump gameOver aiy 1 ma ; force exec next line jump inputLoop