.sect .text .globl _start _start: ;; enable the RTI ldaa #0x40 staa 0x1024 ;; enable the ADC, and configure IRQ' for edge-sensitive operation ldaa #0xa0 staa 0x1039 ;; set RTI intervals, and PA3/7 DDRs ldaa #0x81 staa 0x1026 ;; clear ADC register clra staa 0x1030 ;; set the stack pointer lds _stack ;; blank initialised variables - should match memory.x's page0 ldx #0x0000 loop1: cpx #0x0080 bcc out1 clr 00,x inx bra loop1 out1: jsr main infinity: bra infinity