*
*``````````````````````````````*
* ZMLOAD :: RESTORE 0-PAGE MEM *
*-                            -*
* RESTORES PREVIOUSLY SAVED    *
* ZERO PAGE VALUES FROM        *
* HIGHER MEMORY LOCATION.      *
* CLOBBERS:                    *
*                              *
* FLAGS:  ????----  REG: AXYM  *
*-                            -*
* CYCLES: ???                  *
* SIZE:                        *
*-                            -*
* USAGE:                       *
*                              *
*  LDA #>$6A00                 *
*  PHA                         *
*  LDA #<$6A00                 *
*  PHA                         *
*  JSR ZMLOAD                  *
*-                            -*
* ENTRY                        *
*                              *
* TOP OF STACK                 *
*                              *
* LOW BYTE OF RETURN ADDRESS   *
* HI BYTE OF RETURN ADDRESS    *
* LOW BYTE OF SOURCE           *
* HIGH BYTE OF SOURCE          *
*-                            -*
* EXIT                         *
*                              *
* TOP OF STACK                 *
*                              *
* LOW BYTE OF RETURN ADDRESS   *
* HI BYTE OF RETURN ADDRESS    *
*                              *
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
*
ZMLOAD
*
** SAVE  RETURN ADDRESS
*
         PLA
         STA   :RETADR
         PLA
         STA   :RETADR+1
*
** GET PARAMETERS
*
         PLA
         STA   ADDR1
         PLA
         STA   ADDR1+1
*
** COPY ZERO PAGE TO SPECIFIED
** NON-ZERO LOCATION (ONLY THE
** FREE ONES..)
*
         LDY   #2         ; START 2 AHEAD
         LDA   (ADDR1),Y  ; AND PUT ADDR1
         STA   $08        ; AREA LAST
         INY
         LDA   (ADDR1),Y
         STA   $09
         INY
         LDA   (ADDR1),Y
         STA   $19
         INY
         LDA   (ADDR1),Y
         STA   $1E
         INY
         LDA   (ADDR1),Y
         STA   $E3
         INY
         LDA   (ADDR1),Y
         STA   $EB
         INY
         LDA   (ADDR1),Y
         STA   $EC
         INY
         LDA   (ADDR1),Y
         STA   $ED
         INY
         LDA   (ADDR1),Y
         STA   $EE
         INY
         LDA   (ADDR1),Y
         STA   $EF
         INY
         LDA   (ADDR1),Y
         STA   $FA
         INY
         LDA   (ADDR1),Y
         STA   $FB
         INY
         LDA   (ADDR1),Y
         STA   $FC
         INY
         LDA   (ADDR1),Y
         STA   $FD
         INY
         LDA   (ADDR1),Y
         STA   $FE
         INY
         LDA   (ADDR1),Y
         STA   $FF
*
** NOW GET ZERO PAGE VALUES
** FOR SPACE OCCUPIED BY ADDR; RETURN IN X,Y
*
         LDY   #0
         LDA   (ADDR1),Y
         TAX
         LDA   (ADDR1+1),Y
         TAY
         STX   ADDR1
         STY   ADDR1+1
*
** RESTORE RETURN ADDRESS
*
         LDA   :RETADR+1
         PHA
         LDA   :RETADR
         PHA
*
         RTS
*
** DATA
*
:RETADR  DS    2
*
