Fixed problem in DeviceSettings::strParam, returned wrong string
[avr-sim.git] / test / test_cntr.asm
blob1b0703e12b3fca28298a1a91a9cfbd0103f5b7a6
2 ; $Id: test_cntr.asm,v 1.1 2004/03/20 23:05:26 titzer Exp $
4 ; Use simple opcodes to test the instruction decoder.
6 ;;; .device AT90S8515
8 .include "8515def.inc"
10 ;;; .cseg
11 rjmp MAIN ; reset
12 nop ; int0
13 nop ; int1
14 nop ; timer1 capt
15 nop ; timer1 compa
16 nop ; timer1 compb
17 nop ; timer1 ovf
18 nop ; timer0 ovf
19 nop ; spi, stc
20 nop ; uart, rx
21 nop ; uart, udre
22 nop ; uart, tx
23 nop ; ana_comp
25 MAIN:
26 ;; init stack pointer to 0x025f (the last byte of int sram)
27 ldi r16, 0x5f ; low byte of end of int sram
28 out SPL, r16
29 ldi r16, 0x02 ; high byte of end of int sram
30 out SPH, r16
32 ldi r16, 0xff ; initialize outer loop counter
34 LOOP1:
35 cpi r16, 0x00
36 breq DONE
37 dec r16
38 rcall INNER
39 rjmp LOOP1
41 INNER:
42 ldi r17, 0xff ; initialize inner loop counter
44 LOOP2:
45 cpi r17, 0x00
46 breq REPEAT
47 dec r17
48 rjmp LOOP2
49 REPEAT:
50 ret
52 DONE:
53 nop