L80

Page 1/4
| 2 | 3 | 4

By MicroTech

Champion (344)

MicroTech's picture

16-07-2004, 16:39

Hi Msx users!
I am used to compile my programs with Ascii MSX C v 1.2.
My actual project consists of several files which must all be linked together.
MSXDOS limits the number of characters on the command line to 128 chars (or similar number).
The length of the names of the files to be linked is becoming longer than that limit (I already use very short file names).

I could link files typing names by hand but this is not very "nice".
Is there a way to avoid this problem? (possibly avoiding the generation of a separate library)

Thanks in advance Smile

Login or register to post comments

By ricbit

Master (157)

ricbit's picture

17-07-2004, 17:49

I never used L80 like that, but it does have an interactive mode where you can type the commands. I guess (and this is really a guess, never tried), that you can write a commands.txt file with the L80 commands and then use redirection on DOS2 to make L80 process it:

L80 < COMMANDS.TXT

By flyguille

Prophet (2146)

flyguille's picture

17-07-2004, 18:23

but that only works in MSX-DOS2 and i think 128 is the limit per line anyway

you can do the following

COPY src1.asm+src2.asm srcMIX.asm

The
L80 srcMIX.asm

you can put several copy lines in order to mix some source files, and then to use less filenames in the L80 line... all mounted in a BAT file ofcourse.

or just check if in L80 you can do as a MAKE file config.

By HansO

Hero (639)

HansO's picture

18-07-2004, 12:03

L80 is a linker. So feeding it asm files will not work.

By flyguille

Prophet (2146)

flyguille's picture

18-07-2004, 16:39

ah!, well, so, take my previous post and imagine the same one with OBJ extensions (iirc)

By pitpan

Prophet (2768)

pitpan's picture

18-07-2004, 20:42

And what happen with the OBJ headers, Fly?

By flyguille

Prophet (2146)

flyguille's picture

18-07-2004, 21:09

And what happen with the OBJ headers, Fly?

ups....!!!

you are right pitpan.. the file mix don't work for objects files.

By ro

Prophet (3674)

ro's picture

19-07-2004, 07:46

in otherwords: Don't use them linking commands. You could rewrite your programs and use some other system to CALL commands in other modules. Linking files will also increase in assembly (and TESTING!) time.

I've always loved how WBASS2 worked 'cuz of the complete dev.env. Just type your code, ASM and Test in one go!

(if your command line will exceed 128 chars while trying to link files; How many file do you already use then?!? too much maybe?!?)

By MSX Resource Center

Paladin (985)

MSX Resource Center's picture

19-07-2004, 09:39

Linking files will also increase in assembly (and TESTING!) time.

Nonsense. The whole idea of linking object files is to *decrease* assembly/compilation time!
If you alter just 1 line in one out of 10 source files, you only need to re-assemble that one source file and then link the 10 resulting object files et voila. If you've got that same project in only 1 file, you need to reassemble (and implicitely link) the whole shebang.

OTOH, when doing cross-assembly, assembly/compiling speed is less of an issue, but still...

I've always loved how WBASS2 worked 'cuz of the complete dev.env. Just type your code, ASM and Test in one go!

Now that's fun for relatively small programs, but as soon as the programming project gets bigger, you *want* to split up your source code into modules which can be compiled & linked separately.

Now, for the original question: IIRC, there was some program (AR.COM? LIBR.COM) which can pack a number of object files into a library which can then be linked. So, instead of

link a.obj b obj c.obj ...

you'd get

libr abc.lib a.obj b.obj c.obj
link abc.lib ...

HTH

By MicroTech

Champion (344)

MicroTech's picture

19-07-2004, 10:39

L80 < COMMANDS.TXT

GREAT! It works: simple and efficent, thank you very much!
(Apparently no limits on the length of the file list)

I've realised that I've a "mix version" in my SDK:
- CG, CF, FPC & MX are v.1.20 so DOS2 is required
- M80 & L80 are v.1.0 so DOS2 is not necessary

I already use DOS2 because of compiler requirements so
< > and | can be used to redirect I/O on the command line.

You could rewrite your programs and use some other system to CALL commands in other modules.
!!! this will take lot of time... sigh Smile

Linking files will also increase in assembly (and TESTING!) time.
I use RuMSX at full speed to compile and link so "time is relative" Smile
TESTING is done with VisualC... all C code is written and debugged on PC
so problems are "limited" to porting to MSX.

I've always loved how WBASS2 worked 'cuz of the complete dev.env. Just type your code, ASM and Test in one go!
Where can I find WBASS2?
Can I use my C source/REL files?

(if your command line will exceed 128 chars while trying to link files; How many file do you already use then?!? too much maybe?!?)
18 C files + 1 ASM + various C support/runtime files
Maybe they are too much but C compiler itself has limitations so it is
necessary to split functions and to distribute them on many files...

Thanks
MicroTech

By IC

Hero (557)

IC's picture

19-07-2004, 11:04

wbass2 is basicly an assembler.. No C support there (iirc)

Page 1/4
| 2 | 3 | 4
My MSX profile