#include "hw.S" .global _start _start: ;movw sp, #0xfe00 di mov a, #'a' call !!tool_tx mov !PIOR, #0 mov P0, #0 mov !PU0, #0 mov !POM0, #0 mov !PMC0, #0x7f mov !PM0, #0 mov !PER0, #0xe5 ; enable peripherals mov !OSMC, #0x10 looper: mov P0, #0xff movw ax, #0xfce0 movw hl, ax mov c, #0x40 1: mov b, #0xff mov a, #0 2: inc a dec b bnz $2b dec c mov [hl+c], a cmp0 c bnz $1b mov P0, #0 mov c, #0x18 3: mov b, #0xff 4: dec b bnz $4b dec c bnz $3b mov a, #'H' call !!tool_tx mov a, #'i' call !!tool_tx mov x, #0xaa mov c, #0x40 5: dec c mov a, [hl+c] xor a, x call !!tool_tx cmp0 c bnz $5b br $looper ret