                    ORG     $1F00

                    EXPORT  COPY_URARAM_FROMADDR
                    EXPORT  COPY_URARAM_ENDADDR
                    EXPORT  COPY_URARAM_TOADDR

                    EXPORT  COPY_URARAM

COPY_URARAM_FROMADDR    FDB     0
COPY_URARAM_ENDADDR     FDB     0
COPY_URARAM_TOADDR      FDB     0

COPY_URARAM         PSHS    A,B,X,U,CC
                    ORCC    #$50
                    STA     $FD0F   ; URA-RAM On

                    LDX     COPY_URARAM_FROMADDR,PCR
                    LDU     COPY_URARAM_TOADDR,PCR

COPY_URARAM_LOOP    LDA     ,X+
                    STA     ,U+
                    CMPX    COPY_URARAM_ENDADDR,PCR
                    BLS     COPY_URARAM_LOOP

                    LDA     $FD0F   ; URA-RAM Off
                    PULS    A,B,X,U,CC,PC
