; FILE: DO_HEADER ; PURPOSE: To make the header and to copy it to the proper location ; METHOD: ; The header is always made to a fixed location (page 11) and then copied ; to the final desination. The routine HDECODE is called before this routine. ; The header is constructed using the DESINATION slot information, however ; the source page (for the camera header) is from the SOURCE page. ; ; Inputs: ; $IPRP_HDECODE_ADDR - holds the pointers to the source and destination header slots ; Outputs/Modifies: ; (none?) ; Internal Use: ; $IPRL_HEAD_WORK - used by the HRDINIT instruction ; $IPRL_HEAD_COPY - used to copy the header to the proper location ; HISTORY: Written 14-Aug-95 by M.Morrison ; 30-Aug-95 (MDM) - Changed the name ; 5-Sep-95 (MDM) - Modified to do 4 byte math when backing the address up ; 6-Sep-95 (MDM) - Fixed the source address to back up to start of header ; 18-Sep-95 (MDM) - Fixed to use _MOVBLKI instead of MOVBLK ; 17-Oct-95 (MDM) - Patched to use the source page for the HRDINIT instruction ; to get the camera header properly. ; 16-Nov-95 (MDM) - Removed all debug statements ; QSR_DO_HEADER:: COPYRI2D $IPRP_HDECODE_ADDR+1 $IPRL_HEAD_WORK 10 ;copy the header information into a fixed location COPYRI2D $IPRP_HDECODE_ADDR $IPRL_HEAD_WORK 3 ;copy the source page address into a fixed location (17-Oct-95) ;;ADDADR $IPRL_HEAD_WORK $IPRL_NEG_549W $IPRL_HEAD_WORK ;shift the source address back the header number of words REGADD $IPRL_HEAD_WORK $IPRL_NEG_549W $IPRL_HEAD_WORK ;shift the source address back the header number of words HRDINIT $IPRL_HEAD_WORK ;destination is always to a fixed place************ ;first 2 words of $IPRL_HEAD_COPY are fixed as "10:0x0000" COPYRD2D $IPRL_HEAD_WORK+6 $IPRL_HEAD_COPY+2 3 ;copy final dest into the copy reg list instruc area (copies extra word) ;;ADDADR $IPRL_HEAD_COPY+2 $IPRL_NEG_550W $IPRL_HEAD_COPY+2 ;shift the address back the header number of words ;TODO!!!! Fix the math to work with 32 bits REGADD $IPRL_HEAD_COPY+2 $IPRL_NEG_550W $IPRL_HEAD_COPY+2 ;shift the address back the header number of words SETREG $IPRL_HEAD_COPY+4 0x0226 ;set the low word for number of words to be copied (header only) _MOVBLKI $IPRL_HEAD_COPY ;copy the constructed header to it's final place RTNQUE