         org $fffe
         fdb start
         org $a000

start    ldaa #%11111100
         staa 0

beri     ldaa 2
         anda #%00000011
         beq beri
         cmpa #%00000010
         beq ugasni
         cmpa #%00000001
         beq prizgi
         bra prepo
prizgi   ldaa #%00000100
         staa 2
         bra beri
ugasni   clr 2
         bra beri
prepo    ldaa #%0001000
         staa 2
         bra beri
