pico430prog/test/rl78/test_g23_ocd.S

42 lines
514 B
ArmAsm

/*#include "romhdr.S"*/
#include "hw.S"
#define REG_ASIM 0xfffaf
#define REG_TXS 0xfffad
.global _start
_start:
/* ROM starts at 0xee000 on G23 */
mov es, #0
movw de, #0
/*mov a, es:[de]
mov a, #'a'*/
next:
mov a, es:[de]
br $tool_tx_fake
return_bleh:
incw de
movw ax, de
cmpw ax, #0
bnz $next
mov a, es
inc a
and a, #0xf
mov es, a
br $next
tool_tx_fake:
set1 REG_ASIM.7
nop
mov REG_TXS, a
wait_sent:
bf REG_ASIM.3, $wait_sent
clr1 REG_ASIM.3
clr1 REG_ASIM.7
br $return_bleh
/*ret*/