prestrezni equ $000d
kontrg    equ $0008
prostrg  equ $0009
eici      equ %00010000
iedg      equ %00000010
icf_f     equ %10000000

          org $fffe
          fdb start
          org $2000
stevilo   rmb 2
          org $fff6
          fdb icf_prek
          org $a000

start     lds #$3000
          cli
          ldaa #%11111110
          staa 1
          ldaa #eici
          adda #iedg
          staa kontrg

          wai

icf_prek  ldaa kontrg
          bita #icf_f
          beq izhod

          ldd prestrezni
          std stevilo

izhod     rti
