; DISPATCH6309.ASM -- copy a station code with the HD6309 block move.
; Choose the HD6309 guest and assembly target. Start in Disk BASIC.
CHROUT      equ     $a002
            org     $3f00
start       leax    packet,pcr
            leay    received,pcr
            ldw     #size       ; W counts the bytes left to transfer
copy        tfm     x+,y+       ; move from X to Y and increment both
inspect     leax    received,pcr ; stop here to inspect W, X, Y and RAM
next        lda     ,x+
            beq     finish
            pshs    x
            jsr     [CHROUT]
            puls    x
            bra     next
finish      lda     #13
            jsr     [CHROUT]
            rts                 ; no change to the guest's processor mode
packet      fcc     "ORB"
size        equ     *-packet
received    fcb     0,0,0,0
            end     start
