Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;------------------------------------------------------------------------
- ; |
- ; FILE :Demo.src |
- ; DATE :Mon, Jul 07, 2008 |
- ; DESCRIPTION :Main Program |
- ; CPU TYPE :H8S/2215 |
- ; |
- ; This file is generated by Renesas Project Generator (Ver.4.9). |
- ; |
- ;------------------------------------------------------------------------
- .program yks_kaks
- .include "equt.inc"
- .section koodi,code,locate=h'ffa200
- start: mov.l #h'ffefc0, ER7
- bsr alusta_SCI
- wait_RDRF: mov.b @SSR_0, R0L
- btst #6, R0L
- bne lue_merkki
- and.b #b'0011100111, R0L
- beq wait_RDRF
- mov.b @SSR_0, R0L
- and.b #b'0011100111, R0L
- mov.b R0L, @SSR_0
- bra wait_RDRF
- lue_merkki: mov.b @RDR_0, R0L
- bclr #6, @SSR_0
- onko_1: cmp.b #h'31, R0L
- bne onko_2
- mov.l #text1, ER5
- bsr send_text
- bne wait_RDRF
- onko_2: cmp.b #h'32, R0L
- bne wait_RDRF
- mov.l #text2, ER5
- bsr send_text
- bne wait_RDRF
- send_text: mov.b @ER5+, R0L
- beq pois
- wait_TRDE: btst #7, @SSR_0
- beq wait_TRDE
- mov.b R0L, @TDR_0
- bclr #7, @SSR_0
- bra send_text
- rts
- pois:
- alusta_SCI: bclr #7, @MSTPCRB
- xor.b R0L, R0L
- mov.b R0L, @SCR_0
- mov.b @SSR_0, R1L
- mov.b R0L, @SSR_0
- mov.b R0L, @SCR_0
- mov.b R0L, @SMR_0
- mov.b #77, R0L
- mov.w #500, R0
- wait: dec.w #1, R0
- bne wait
- mov.b #b'00110000, R0L
- mov.b R0L, @SCR_0
- rts
- text1: .sdata "Hevone"<h'0d><00>
- text2: .sdata "Lauri"<h'0d><00>
- .section vektorit,code,locate=0
- .data.l start
- .end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement