Copy_S_Records IDNT ; title Rev 4-NOV-1993 SECTION Copy_S_Records,4,C ; Declare a noncommon code ; section. Align to Longwords. INCLUDE 135Bug_Equates.Include ; Get the 135Bug "Sytem Calls". ************************************************************************* * This section defines program-specific macros: * * * * SOFTWAIT: Software delay timer for short waits * * * ************************************************************************* SoftWait MACRO ; Software timer loop. LOCAL WaitMore ; Define a local symbol. MOVE.L \1,D4 ; Load delay time \1 into D4. WaitMore SUBI.L #1,D4 ; Decrement loop counter. BNE WaitMore ; Test for end of delay. ENDM ; Called with an argument ; of $1000 and with cashe off causes a delay of about 4 ; mill seconds, with cashe on the delay is 2.4 mill sec. Start MOVE.L #1,D0 ; Get the Cashe running MOVEC D0,CACR PEA.L Hello_1_Loc ; push message address on stack. JSR ChrStrgOut ; and send it out. PEA.L Hello_2_Loc ; push message address on stack. JSR ChrStrgOut ; and send it out. PEA.L Hello_3_Loc ; push message address on stack. JSR ChrStrgOut ; and send it out. SOFTWAIT #$1000 ; Wait about 3 mill seconds. PEA.L CharSpace ; Push space and carage return message JSR ChrStrgOut ; on the stack and send it out. ***** Now move 1023 longwords from where they were S Record Loaded in ***** ***** the MVME135 memory to the Hydra-II Dual Port Shared SRAM. ***** MoveA.L #S_Record_Source,A1 ; Load the Source address MoveA.L #S_Record_Destination,A2 ; Load the Destination address FOR.L D0 = #0 TO #1023 DO.S ; Move.L (A1)+,(A2)+ ; Move the S Records ENDF ; ***** Now modify a couple of locations in the data in the ***** ***** Hydra-II Dual Port Shared SRAM. ***** Move.L #Load_Mem_Width,First_Word ; Tell the on-chip Boot ; Loader the real width of ; the data that it reads. Move.L #BootMon_Arg_1,Start_BootMon_Args+0 ; 1st BootMon Argument Move.L #BootMon_Arg_2,Start_BootMon_Args+4 ; 2nd BootMon Argument Move.L #BootMon_Arg_3,Start_BootMon_Args+8 ; 3rd BootMon Argument Move.L #BootMon_Arg_4,Start_BootMon_Args+12 ; 4th BootMon Argument Move.L #BootMon_Arg_5,Start_BootMon_Args+16 ; 5th BootMon Argument First_Word EQU $00A00000 ; Address of the first word that is ; read by on-chip Boot Loader. Start_BootMon_Args EQU $00A00120 ; Address of the beginning of ; the BootMon Argument list. Load_Mem_Width EQU $00000020 ; On-Chip Boot Loader reads 32 bit data BootMon_Arg_1 EQU $00000003 ; BootMon Argument #1, 3 -> use DSP #3 BootMon_Arg_2 EQU $00000005 ; BootMon Argument #2, 5 -> use IIOF2 BootMon_Arg_3 EQU $00000000 ; BootMon Argument #3, keep it zero BootMon_Arg_4 EQU $00000000 ; BootMon Argument #4, keep it zero BootMon_Arg_5 EQU $00000000 ; BootMon Argument #5, keep it zero PEA.L GoodByeLoc ; push message address on stack. JSR ChrStrgOut ; and send it out. SYSCALL .return ; return to the bug Hello_1_Loc DC.B 50,' Hello from the Copy-S-Records program ' Hello_2_Loc DC.B 50,' Copy 1024 S Record LongWords ' Hello_3_Loc DC.B 50,' from $0004 0000 to $00A0 0000 ' GoodByeLoc DC.B 50,' Bye from the Copy-S-Records program ' CharSpace DC.B 4,' ' Low4Long DC.L $0000000F ; Low order 4 bits set, Mask for Sync. S_Record_Source EQU $00040000 S_Record_Destination EQU $00A00000 XREF ChrStrgOut,ChrWrtOut,BinASCII XDEF Low4Long END