
#define P1DDR  0xfe30:16
#define P1DR   0x00:8 /* same as 0xff00:16 */
#define P1DATA 0xb0:8 /* same as 0xffb0:16 */

#define P1_PIN_PMODE   0x80
#define P1_PIN_USERLED 0x20
	
	.text
	.org 0
	.h8300s
	
	.globl start
start:
	mov.b #(P1_PIN_PMODE + P1_PIN_USERLED), r0l   /* pins are outputs */
	mov.b #P1_PIN_USERLED, r1l   
	mov.b r0l, @P1DDR

loop:		
	mov.b r1l, @P1DR
	mov.l #0x100000, er2

loop_delay:
	sub.l #0x0001, er2
	bne loop_delay

	xor.b #P1_PIN_USERLED, r1l
	
	bra loop

