Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- st7/
- #include "mapping.inc"
- #include "st72334n2.inc"
- segment 'ram0'
- display ds.b 1
- segment 'rom'
- tablica dc.b %01111110,%00110000
- dc.b %11011010,%11111000
- dc.b %10110100,%11101100
- dc.b %11101110,%00111000
- dc.b %11111110,%11111100
- dc.b %10111110,%11100110
- dc.b %01001110,%11110010
- dc.b %11001110,%10001110
- poczatek
- rsp
- konfiguracja_portow
- ld A,#%11111110
- ld PDDDR,A
- ld PDOR,A
- ld A,#%00001100
- ld PADDR,A
- ld PAOR,A
- ld A,#$C1
- ld display,A
- timerinit
- ld A,#%00000000 ;przeranie wyjscie porownania
- ld TACR2,A
- int_init ;inicjalizacja przerwania
- bset TACR1,#6
- rim
- bset ADCCSR,#5
- .okres1 equ 10000
- .okres2 equ 15000
- coco_chceck
- btjf ADCCSR,#7,*
- ld A,ADCDR
- ld display,A
- jp coco_chceck
- timerA_int
- ocf2_check
- btjt TASR,#3,ocf2_res
- ocf1_res
- ld A,TASR ;zerowanie flagi OCF1
- ld A,TAOC1LR ;zerowanie flagi OCF1
- zwieksz_rejestr_porow
- ld A,TAOC1LR ;odczytanie mlodszego bajtu porownania
- add A,#okres1.l ;dodanie mlodszych bajtow
- ld X,A
- ld A,TAOC1HR ;odczytanie starszego bajtu porownania
- adc A,#okres1.h
- ld TAOC1HR,A ;zapis nowego starszego bajtu porownania
- ld TAOC1LR,X ;zapis nowego mlodszego bajtu porownania
- test
- btjt PADR,#3,segment_P
- segment_L
- bres PADR,#2
- ld A,display
- swap A
- and A,#$0F
- ld X,A
- ld A,(tablica,X)
- ld PDDR,A
- bset PADR,#3
- iret
- segment_P
- bres PADR,#3
- ld A,display
- and A,#$0F
- ld X,A
- ld A,(tablica,X)
- ld PDDR,A
- bset PADR,#2
- iret
- ocf2_res
- ld A,TASR ;zerowanie flagi OCF2
- ld A,TAOC2LR ;zerowanie flagi OCF2
- iret
- infinite_loop
- jra infinite_loop
- interrupt NonHandledInterrupt
- NonHandledInterrupt
- iret
- segment 'vectit'
- dc.w NonHandledInterrupt ; irq13
- dc.w NonHandledInterrupt ; irq12
- dc.w NonHandledInterrupt ; irq11
- dc.w NonHandledInterrupt ; irq10
- dc.w NonHandledInterrupt ; irq9
- dc.w timerA_int ; irq8
- dc.w NonHandledInterrupt ; irq7
- dc.w NonHandledInterrupt ; irq6
- dc.w NonHandledInterrupt ; irq5
- dc.w NonHandledInterrupt ; irq4
- dc.w NonHandledInterrupt ; irq3
- dc.w NonHandledInterrupt ; irq2
- dc.w NonHandledInterrupt ; irq1
- dc.w NonHandledInterrupt ; irq0
- dc.w NonHandledInterrupt ; trap
- dc.w poczatek ; reset
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement