kontst equ $8
prosrg equ $9
primrg equ $b
konst  equ $140
eoci_f equ %00001000
ocf_f  equ %01000000

       org $fffe
       fdb start
       org $fff4
       fdb tim_prek
       org $a000
start  lds #$3000
       cli
       ldaa #$ff
       staa 0
       ldaa #eoci_f
       staa kontst
       ldd prosrg
       addd #konst
       std primrg

       wai

tim_prek ldaa kontst
         bita #ocf_f
         beq motnja

         ldd primrg
         addd #konst
         std primrg
         ldaa 2
         coma
         staa 2
motnja   rti
