
ACLK equ 1
TAIE equ 1
TACLR equ 1
TACTL equ 1
MC_1 equ 1
crtbuf equ 1

ADCCHN   EQU    0x024A            ;contains current/next convsn INCH in bits 12-15
ADCCTL   EQU    0x024E            ;image of ADC10CTL1


start:
  mov blah(r13), r12
nothing:
  mov r11, r12;blah

blah:
  //mov r6, r8

  mov.w   #ACLK+TAIE+TACLR,&TACTL
  bis.w   #MC_1,&TACTL
  mov.w   #00h, R8
  mov.w   &TACTL,&TACTL

  rra 1024
  swpb r6
  mov.w   #5, &vectors

  mov.w   #0,&ADCCHN         ;set first conv chn = A0
  mov.w   &ADCCHN,&ADCCTL         ;get INCH bits for first conversion

  rrc &1024

  call mysub

  jmp nothing

mysub:
  swpb    R9
  reti

  org 0xfffe
vectors:
  dw blah



