diff options
author | Leonard Kugis <leonard@kug.is> | 2022-10-05 21:01:37 +0200 |
---|---|---|
committer | Leonard Kugis <leonard@kug.is> | 2022-10-05 21:01:37 +0200 |
commit | 927a6564ced09f1ed8355a0b77774e3757a9b77c (patch) | |
tree | 9bc0113907611043d7a9eaf4e57fec1ad76b3300 /test.asm | |
parent | d7965de3e189996c99b45b2776c0110c44897cd5 (diff) |
Diffstat (limited to 'test.asm')
-rw-r--r-- | test.asm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test.asm b/test.asm new file mode 100644 index 0000000..fc63cbb --- /dev/null +++ b/test.asm @@ -0,0 +1,27 @@ + +.include "tn85def.inc" +.def tmp0 = r16 +.def tmp1 = r17 +.def tmp2 = r18 +.def tmp3 = r19 + +; Interrupt vectors +.org 0x0000 +interrupts: + rjmp init + +.org INT_VECTORS_SIZE +init: + ; Initialize stack pointer + ldi tmp0, HIGH(RAMEND) + out SPH, tmp0 + ldi tmp0, LOW(RAMEND) + out SPL, tmp0 + ; Set pin directions + ldi tmp0, 0b00010010 + out DDRB, tmp0 + ldi tmp0, 0b00010010 + out PORTB, tmp0 + +main: + rjmp main |