; Originally taken from came from Motorola's Dr. BuB DSP board. ; Obtained from Todd Day's FTP archive as sloader.asm ; Modified for TDSG56 project by Quinn Jensen ; ; Text from original: ; Serial Loader for the DSP56000. ; This loader initializes the serial communications interface (SCI) ; on the DSP56001 for 9600 baud and then loads OMF records (output ; by the DSP56000 assembler) into internal memory. The loader takes ; the upper 128 bytes of P memory allowing the lower memory from ; $0000-(LDRMEM-1) to be used by the user. The following records are ; interpreted: ; _DATA X ADDR ; _DATA Y ADDR ; _DATA P ADDR ; _END ADDR ; After the END record is encountered, the loader jumps to the address ; in the END record. Note that an address MUST be present in the ; END record (the program must contain at least one P segment). ; ; To generate a EPROM of this loader (8Kx8), perform the following: ; $ asm56000 -b -l -a sloader ; $ srec sloader ; ; The EPROM is in file SLOADER.P. To program the EPROM, set the ; programmer to MOTOROLA S record format, download the file with ; a zero address offset and program the part. ; ; BTW, S record format is LSB MidSB MSB (what! Intel format? :-) ; Took me a few hours to figure this one out! [Not really. S records ; are big-endian, its just the 56001 boot loader that wants LSB first. ; -QJ] ; ; If you don't have the program srec (where can I get this?), ; you have to do some gnarly contortions on the .LOD file. ; ; So, if your .LOD file resulting from compiling this program ; looks like this: ; ; _START SLOADER 0000 0000 ; ; _DATA P 0020 ; 010203 040506 070809 ; _END 0020 ; ; then, program your PROM with this sequence: ; $0020 0302 0106 0504 0908 07..... etc. (Fun, eh? :) ; ; ; The loader loads the following memory spaces: ; X - 0 to FF ; Y - 0 to FF ; P - 0 to LDRMEM-1 ; PAGE 68,66,1,1 00FFF0 SCR EQU $FFF0 ;SCI CONTROL REGISTER 00FFF2 SCCR EQU $FFF2 ;SCI CLOCK CONTROL REGISTER 00FFE1 PCC EQU $FFE1 ;PORT C CONTROL REGISTER 000002 RDRF EQU $2 ;RECEIVE DATA REGISTER FULL FLAG 00FFF1 SSR EQU $FFF1 ;SCI STATUS REGISTER 00FFF6 SRXH EQU $FFF6 ;SCI RECEIVE IN HIGH BYTE 00FFE0 PBC equ $FFE0 ;port B control 00FFE2 PBDDR equ $FFE2 ;port B data direction 00FFE4 PBD equ $FFE4 ;port B data 00FFFE BCR equ $FFFE ;port a bus control reg 000080 LDRMEM EQU $80 ;START OF LOADER IN P MEMORY P:0000 ORG P:$0000 ;RESET VECTOR FOR BOOTING P:0000 RVEC P:0000 0C0080 JMP 4,X0 ;CLEAR VALUE, GET 4 P:00CD 000004 P:00CE 0C00D3 JMP 6,X0 ;CLEAR VALUE, GET 6 P:00D2 000006 P:00D3 READHEX P:00D3 06C400 DO X0,_READHEX ;READ ASCII HEX AND CONVERT TO BINARY P:00D4 0000E8 P:00D5 _GET P:00D5 0D00C2 JSR