summaryrefslogtreecommitdiff
path: root/test.asm
diff options
context:
space:
mode:
Diffstat (limited to 'test.asm')
-rw-r--r--test.asm27
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