(1 / 11)
Date: February 07, 1990 16:39
From: SANDY::MARGOLIN
To: SHEPPERD
CC: MARGOLIN
;This is what used to work: .TITLE DSOUND .ENABL USD,LC .INCLUDE TMS320.INC .ASECT .RADIX 16 .ENABL AMA ; Driver Sound Tests routines for TMS-320 ; ; Programmer: Jed Margolin ; ; Date: 8/5/85 ; ; Hardware: Driver Sound ; ; MAC65 ;------------------------------------------------------------------------------- ; Use: ; MAC65 TMS320.MAC/NP ; LINKM TMS320/NP ; LTO TMS320 ; This produces TMS320.OL with TMSCODE and TMSEND Labels ;------------------------------------------------------------------------------- : code
(2 / 11)
Date: February 07, 1990 17:13
From: GAWD::SHEPPERD
To: MARGOLIN
CC: SHEPPERD
Change the following and should work: old: .INCLUDE TMS320.INC new: .INCLUDE UTL$MAC:TMS320.INC old: ; Use: old: ; MAC65 TMS320.MAC/NP old: ; LINKM TMS320/NP new: ; Use: new: ; MAC65 TMS320/LIS !/LIS only if you want a listing file new: ; LLF TMS320.OB/MAP !/MAP only if you want a map file ds
(3 / 11)
Date: February 08, 1990 14:18
From: CHARM::SHEPPERD
To: MARGOLIN
CC: SHEPPERD
The old stuff: ;------------------------------------------------------------------------------- ; Use: ; MAC65 TMS320.MAC/NP ; LINKM TMS320/NP ; LTO TMS320 ; This produces TMS320.OL with TMSCODE and TMSEND Labels ;------------------------------------------------------------------------------- The new stuff: ;------------------------------------------------------------------------------- ; Use: ; MAC68K TMS320/LIS !/LIS only if you want a listing ; ^^^ use a different assembler ; The creates a TMS320.OB object file. ;------------------------------------------------------------------------------- Plus you have to add to and change a couple of things in your TMS320.MAC file: ----------------------------------------------------------------------------- New | Old -------------------------------- 80 ----------------------------------------- .psect TICODE | .=0 .globl TMSCODE | TMSBEGIN: | -------------------------------- 88 ----------------------------------------- .=TMSBEGIN+10 | .=10 -------------------------------- 94 ----------------------------------------- .=TMSBEGIN+30 | .=30 -------------------------------- 1168 --------------------------------------- TMSEND == .-TMSBEGIN | ----------------------------------------------------------------------------- Then you can LLF the TMS320.OB file with your 68000 code directly BUT you will need to include it in an options file: TMS320.OPT: FILE (TMS320.OB additional_68k_files_to_link ...) LOCATE (TICODE_ : 0x0000 TO 0x3FFF OUTPUT 0x????) DECLARE (TMSCODE 0x????) where the ???? is the address in 68k address space where you want the TMS320 code to reside. (NOTE that the section name is TICODE_ with a trailing underscore, even though the .psect name in the .MAC file doesn't have a trailing underscore). The global symbol TMSCODE is set in the options file by the DECLARE directive and TMSEND is set by the assembler. ds
(4 / 11)
Date: February 08, 1990 15:30
From: SANDY::MARGOLIN
To: SHEPPERD
CC: MARGOLIN
I made the changes in TMS320.MAC and it seems to run, except that it insists on assembling statements even after '.END' on TMS320.OPT: I would like the TMS code to appear after the program segment like it did before. The following is my old locate file: locate(PROGRAM TICODE: #1000); locate(VECTORS: #0000); locate($$seg14 : #0FFC000 TO #0FFCFFF ); Does this need to change and what is 0x0000 TO 0x3FFF and do I need to fill in the 'x'? How do I tell it there is an .OPT file and whom would I tell? TMS320.OPT: FILE (TMS320.OB additional_68k_files_to_link ...) LOCATE (TICODE_ : 0x0000 TO 0x3FFF OUTPUT 0x????) DECLARE (TMSCODE 0x????) The following is how I used to link it. Does it need to change? $ LLF DSOUND,TMS320,STUB,dsound.lc/opt/sym/map $ EXIT Jed
(5 / 11)
Date: February 08, 1990 15:59
From: KIM::SHEPPERD
To: SANDY::MARGOLIN
CC: SHEPPERD
>I made the changes in TMS320.MAC and it seems to run, except that it insists >on assembling statements even after '.END' .END is only advisory (it's a comment as far as the assembler is concerned) except if there's a label on it in which case the label is read to be the program start address. >on TMS320.OPT: I would like the TMS code to appear after the program segment > like it did before. The following is my old locate file: Oh. This will require some more work. I'll have to fix a problem in LLF in order for you to do that. > locate(PROGRAM TICODE: #1000); > locate(VECTORS: #0000); > locate($$seg14 : #0FFC000 TO #0FFCFFF ); > >Does this need to change and what is 0x0000 TO 0x3FFF and do I need to >fill in the 'x'? 0x is another way of specifying hex (it's the C syntax for hexidecimal). The 0 to 3FFF is to locate the TMS320 program in TMS320 address space (0-3FFF or whatever) and the OUTPUT is to locate that block of code into the 68000's address space. LLF won't do what you want directly, I'll have to figure something out. In the meantime, you can put the TMS320 code somewhere in the 68000's address space that doesn't conflict with the 68000's program. You might make your option file (DSOUND.LC) look like: FILE (DSOUND STUB TMS320.OB) locate(PROGRAM : #1000 TO 7FFF); locate(VECTORS : #0000); locate($$seg14 : #0FFC000 TO #0FFCFFF ); LOCATE (TICODE_ : 0x0000 TO 0x3FFF OUTPUT 0x8000) DECLARE (TMSCODE 0x8000) Change the 7FFF and 8000 to whatever is appropriate (wherever there is room for the TMS code). Then you link it with: $ LLF dsound.lc/opt/sym/map $ EXIT ds
(6 / 11)
Date: February 08, 1990 16:33
From: SANDY::MARGOLIN
To: SHEPPERD
CC: MARGOLIN
I changed DSOUND.LC to: FILE (DSOUND STUB TMS320.OB) locate(PROGRAM : #1000 TO 7FFF); locate(VECTORS : #0000); locate($$seg14 : #0FFC000 TO #0FFCFFF ); LOCATE (TICODE_ : 0x0000 TO 0x3FFF OUTPUT 0x8000) DECLARE (TMSCODE 0x8000) and ran $ LLF dsound.lc/opt/sym/map $ EXIT and got: $ @LNK %LLF-E-ERROR,Segment is not present in object code locate(PROGRAM : #1000 TO 7FFF); ^ %LLF-E-ERROR,Expected ':' here, assumed DECLARE (TMSCODE 0x8000) ^ %LLF-W-WARN,Segment {VECTORS } at 00000000 overlays another segment or reserved mem %LLF-I-INFO,Completed with 2 error(s) and 1 warning(s) MARGOLIN job terminated at 8-FEB-1990 16:27:52.85 Accounting information: Buffered I/O count: 183 Peak working set size: 930 Direct I/O count: 202 Peak page file size: 3319 Page faults: 4226 Mounted volumes: 0 Charged CPU time: 0 00:00:07.88 Elapsed time: 0 00:00:21.31 Jed
(7 / 11)
Date: February 08, 1990 16:58
From: KIM::SHEPPERD
To: SANDY::MARGOLIN
CC: SHEPPERD
> FILE (DSOUND STUB TMS320.OB) > locate(PROGRAM : #1000 TO 7FFF); ^ need a # or 0x here > [...] > DECLARE (TMSCODE 0x8000) ^ apparently need a : here. > >%LLF-W-WARN,Segment {VECTORS } at 00000000 overlays another segment or reserved mem To fix this (or at least make LLF shut up about it), you'll need to make a small change to TMS320.MAC: new old ----------------------------------------------------------------------------- .GLOBL TMSCODE | .ASECT .PSECT TICODE | TMSBEGIN: | ----------------------------------------------------------------------------- .=TMSBEGIN | .=0000 ----------------------------------------------------------------------------- .=TMSBEGIN | .globl TMSCODE | .psect TICODE | TMSBEGIN: ----------------------------------------------------------------------------- ds
(8 / 11)
Date: February 08, 1990 18:02
From: KIM::SHEPPERD
To: MARGOLIN
CC: SHEPPERD
From: SANDY::MARGOLIN 8-FEB-1990 18:25:33.15 To: SHEPPERD CC: MARGOLIN Subj: Thank You It seems to work. Thank you. Jed
(9 / 11)
Date: February 09, 1990 14:12
From: SANDY::MARGOLIN
To: SHEPPERD
CC: MARGOLIN
After adding some code it assembles ok but gives the following message during LLF: $ LNK %LLF-E-ERROR,.TEST expression computed true: ;DMA too big %LLF-E-ERROR,.TEST expression computed true: ;DMA too big %LLF-E-ERROR,.TEST expression computed true: ;DMA too big %LLF-I-INFO,Completed with 3 error(s) and 0 warning(s) MARGOLIN job terminated at 9-FEB-1990 14:08:47.68 Accounting information: Buffered I/O count: 181 Peak working set size: 1040 Direct I/O count: 180 Peak page file size: 3352 Page faults: 4032 Mounted volumes: 0 Charged CPU time: 0 00:00:08.35 Elapsed time: 0 00:00:19.70 Jed
(10 / 11)
Date: February 09, 1990 19:15
From: CHARM::SHEPPERD
To: SANDY::MARGOLIN
CC: SHEPPERD
The .TEST is an assembler directive that instructs LLF to check the value of an expression and print the accompanying error message if the test is true. The TMS320.INC file has a .TEST directive in the OOP (One Operand Instruction) primative which checks that the value of the one operand is less than 128. The assembler doesn't flag the error because I had you put the ram variables in a relocatable .PSECT so you wouldn't get the LLF warning about overlapping sections and therefore it doesn't know what the value of the variables are until link time. Until I can figure out a way around this, you'll either have to live with an LLF warning or not finding out about ram "out of range" until link time. There is another bug, however, since LLF is also supposed to give you the line number in the source file where the .TEST directive was given. Damn. ds
(11 / 11)
Date: February 09, 1990 19:19
From: SANDY::MARGOLIN
To: CHARM::SHEPPERD
CC: MARGOLIN
ok
Feb 07, 1990