;misc test
incdir  "tests"
include "dsp_base.inc"

lri $AR1,    #0x0080
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65409 (0xff81)

lri $AR1,    #0x0081
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65410 (0xff82)

lri $AR1,    #0x0082
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65411 (0xff83)

lri $AR1,    #0x0083
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65412 (0xff84)

lri $AR1,    #0x0084
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65413 (0xff85)

lri $AR1,    #0x0085
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65414 (0xff86)

lri $AR1,    #0x0086
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65415 (0xff87)

lri $AR1,    #0x0087
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65416 (0xff88)

lri $AR1,    #0x0088
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65417 (0xff89)

lri $AR1,    #0x0089
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65418 (0xff8a)

lri $AR1,    #0x008a
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65419 (0xff8b)

lri $AR1,    #0x008b
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65420 (0xff8c)

lri $AR1,    #0x008c
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65421 (0xff8d)

lri $AR1,    #0x008d
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65422 (0xff8e)

lri $AR1,    #0x008e
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65423 (0xff8f)

lri $AR1,    #0x008f
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65424 (0xff90)

lri $AR1,    #0x0090
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65425 (0xff91)

lri $AR1,    #0x0091
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65426 (0xff92)

lri $AR1,    #0x0092
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65427 (0xff93)

lri $AR1,    #0x0093
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65428 (0xff94)

lri $AR1,    #0x0094
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65429 (0xff95)

lri $AR1,    #0x0095
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65430 (0xff96)

lri $AR1,    #0x0096
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65431 (0xff97)

lri $AR1,    #0x0097
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65432 (0xff98)

lri $AR1,    #0x0098
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65433 (0xff99)

lri $AR1,    #0x0099
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65434 (0xff9a)

lri $AR1,    #0x009a
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65435 (0xff9b)

lri $AR1,    #0x009b
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65436 (0xff9c)

lri $AR1,    #0x009c
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65437 (0xff9d)

lri $AR1,    #0x009d
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65438 (0xff9e)

lri $AR1,    #0x009e
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65439 (0xff9f)

lri $AR1,    #0x009f
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65440 (0xffa0)

lri $AR1,    #0x00a0
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65441 (0xffa1)

lri $AR1,    #0x00a1
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65442 (0xffa2)

lri $AR1,    #0x00a2
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65443 (0xffa3)

lri $AR1,    #0x00a3
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65444 (0xffa4)

lri $AR1,    #0x00a4
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65445 (0xffa5)

lri $AR1,    #0x00a5
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65446 (0xffa6)

lri $AR1,    #0x00a6
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65447 (0xffa7)

lri $AR1,    #0x00a7
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65448 (0xffa8)

lri $AR1,    #0x00a8
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65449 (0xffa9)

lri $AR1,    #0x00a9
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65450 (0xffaa)

lri $AR1,    #0x00aa
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65451 (0xffab)

lri $AR1,    #0x00ab
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65452 (0xffac)

lri $AR1,    #0x00ac
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65453 (0xffad)

lri $AR1,    #0x00ad
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65454 (0xffae)

lri $AR1,    #0x00ae
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65455 (0xffaf)

lri $AR1,    #0x00af
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65456 (0xffb0)

lri $AR1,    #0x00b0
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65457 (0xffb1)

lri $AR1,    #0x00b1
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65458 (0xffb2)

lri $AR1,    #0x00b2
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65459 (0xffb3)

lri $AR1,    #0x00b3
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65460 (0xffb4)

lri $AR1,    #0x00b4
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65461 (0xffb5)

lri $AR1,    #0x00b5
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65462 (0xffb6)

lri $AR1,    #0x00b6
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65463 (0xffb7)

lri $AR1,    #0x00b7
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65464 (0xffb8)

lri $AR1,    #0x00b8
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65465 (0xffb9)

lri $AR1,    #0x00b9
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65466 (0xffba)

lri $AR1,    #0x00ba
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65467 (0xffbb)

lri $AR1,    #0x00bb
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65468 (0xffbc)

lri $AR1,    #0x00bc
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65469 (0xffbd)

lri $AR1,    #0x00bd
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65470 (0xffbe)

lri $AR1,    #0x00be
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65471 (0xffbf)

lri $AR1,    #0x00bf
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65472 (0xffc0)

lri $AR1,    #0x00c0
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65473 (0xffc1)

lri $AR1,    #0x00c1
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65474 (0xffc2)

lri $AR1,    #0x00c2
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65475 (0xffc3)

lri $AR1,    #0x00c3
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65476 (0xffc4)

lri $AR1,    #0x00c4
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65477 (0xffc5)

lri $AR1,    #0x00c5
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65478 (0xffc6)

lri $AR1,    #0x00c6
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65479 (0xffc7)

lri $AR1,    #0x00c7
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65480 (0xffc8)

lri $AR1,    #0x00c8
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65481 (0xffc9)

lri $AR1,    #0x00c9
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65482 (0xffca)

lri $AR1,    #0x00ca
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65483 (0xffcb)

lri $AR1,    #0x00cb
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65484 (0xffcc)

lri $AR1,    #0x00cc
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65485 (0xffcd)

lri $AR1,    #0x00cd
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65486 (0xffce)

lri $AR1,    #0x00ce
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65487 (0xffcf)

lri $AR1,    #0x00cf
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65488 (0xffd0)

lri $AR1,    #0x00d0
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65489 (0xffd1)

lri $AR1,    #0x00d1
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65490 (0xffd2)

lri $AR1,    #0x00d2
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65491 (0xffd3)

lri $AR1,    #0x00d3
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65492 (0xffd4)

lri $AR1,    #0x00d4
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65493 (0xffd5)

lri $AR1,    #0x00d5
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65494 (0xffd6)

lri $AR1,    #0x00d6
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65495 (0xffd7)

lri $AR1,    #0x00d7
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65496 (0xffd8)

lri $AR1,    #0x00d8
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65497 (0xffd9)

lri $AR1,    #0x00d9
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65498 (0xffda)

lri $AR1,    #0x00da
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65499 (0xffdb)

lri $AR1,    #0x00db
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65500 (0xffdc)

lri $AR1,    #0x00dc
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65501 (0xffdd)

lri $AR1,    #0x00dd
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65502 (0xffde)

lri $AR1,    #0x00de
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65503 (0xffdf)

lri $AR1,    #0x00df
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65504 (0xffe0)

lri $AR1,    #0x00e0
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65505 (0xffe1)

lri $AR1,    #0x00e1
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65506 (0xffe2)

lri $AR1,    #0x00e2
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65507 (0xffe3)

lri $AR1,    #0x00e3
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65508 (0xffe4)

lri $AR1,    #0x00e4
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65509 (0xffe5)

lri $AR1,    #0x00e5
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65510 (0xffe6)

lri $AR1,    #0x00e6
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65511 (0xffe7)

lri $AR1,    #0x00e7
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65512 (0xffe8)

lri $AR1,    #0x00e8
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65513 (0xffe9)

lri $AR1,    #0x00e9
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65514 (0xffea)

lri $AR1,    #0x00ea
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65515 (0xffeb)

lri $AR1,    #0x00eb
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65516 (0xffec)

lri $AR1,    #0x00ec
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65517 (0xffed)

lri $AR1,    #0x00ed
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65518 (0xffee)

lri $AR1,    #0x00ee
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65519 (0xffef)

lri $AR1,    #0x00ef
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65520 (0xfff0)

lri $AR1,    #0x00f0
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65521 (0xfff1)

lri $AR1,    #0x00f1
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65522 (0xfff2)

lri $AR1,    #0x00f2
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65523 (0xfff3)

lri $AR1,    #0x00f3
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65524 (0xfff4)

lri $AR1,    #0x00f4
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65525 (0xfff5)

lri $AR1,    #0x00f5
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65526 (0xfff6)

lri $AR1,    #0x00f6
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65527 (0xfff7)

lri $AR1,    #0x00f7
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65528 (0xfff8)

lri $AR1,    #0x00f8
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65529 (0xfff9)

lri $AR1,    #0x00f9
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65530 (0xfffa)

lri $AR1,    #0x00fa
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65531 (0xfffb)

lri $AR1,    #0x00fb
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65532 (0xfffc)

lri $AR1,    #0x00fc
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65533 (0xfffd)

lri $AR1,    #0x00fd
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65534 (0xfffe)

lri $AR1,    #0x00fe
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65535 (0xffff)

lri $AR1,    #0x00ff
lri $IX1,    #0x0000
lri $WR1,    #0x00ff
cw 0x5
call send_back  ; 65536 (0x10000)

; We're done, DO NOT DELETE THIS LINE
jmp end_of_test