/** Test program to see
    if the assembler is working */

#include "test.inc"

#define _HAS_BLAH
#define COUNT 23
#define move_stuff \
  mov r6, r7 \
  mov r6, r8
#define test_param(a,reg) mov #a, reg

org 0 

start:
  push.w r10
a_label:
  mov #COUNT, r5
  mov #5-3-2+8, r9
  mov #010, r10

  rrc.b r15
  rra.w r14

  push r15
  inc.w r14
  dec.b r15
  rla.b r15
  pop r15

  mov #(pending-ending), r10
  mov #MIKE, r11

  jmp start
ending:
  jeq datas
pending:

  test_param(99,r12)

#ifdef _HAS_BLAH
  nop
  nop
  nop
#else
  jmp ending
#endif

  reti
  ret

  dint
  eint
  clrc
  clrn
  clrz
  setc
  setn
  setz
  br #start

datas:
  db 0x69, 3, -1, 255, 4
  dw 1024, -1, 255, -50
  db "Testing by Michael Kohn", 0x55, 0

  end


