Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!oliveb!tymix!3comvax!bridge2!pvf From: pvf@bridge2.3Com.Com (Paul V. Fries) Newsgroups: comp.sys.atari.st Subject: Re: Laser C Keywords: floppy needed Message-ID: <285@bridge2.3Com.Com> Date: 30 Jan 89 23:56:51 GMT References: <3155@dalcs.UUCP> Reply-To: pvf@diablo.3Com.com (Paul Fries) Organization: 3COM Corp. , Mt. View. CA Lines: 46 In article <3155@dalcs.UUCP> silvert@dalcs.UUCP (Bill Silvert) writes: >I just got my Laser C upgrade and find that even after installation >according to instructions (in folder E:\MEGAMAX) it still insists on >loading the RAM-resident routines from drive A. Anyone know how to run >Laser C without using the floppy drives? I have been running the Laser C system for quite a while now. It has been so long, in fact, that I am not entirely certain about this information... I think all I did was to go to the options menu tools submenu and tell it where the tools were. Anyway, all my tools are loaded from the F: drive, no problems. It might be good to delete the saved setup file (in the MEGAMAX folder) before you start setting this up so that you don't have to wait for the floppy before being able to setup the new environment. BTW It is not so easy to get all programs to be as small under Laser as they were under Megamax 1.0 and 1.1. This is partly due to the 32 bit pointers to global data, etc, but also because a most of the stdio library gets included even when you never use anything in it. Under 1.1, I was able to change init.c so as not to force inclusion of this stuff, at the expense of having to make sure I explicitly close disk output files when I use them. As this is a good practice anyway, the price seems small to me. What I did was to make the exit call in init.c actually call _exit(). I also had to rewrite the command line parser code so it didn't force the library in. Under Laser, they no longer supply init.c, only init.o. So, on Laser, I had to patch init.o (I used a disk utility program) so the name "_exit" became "__xit". This was done in the symbol table section. Then, I added my own __xit() routine (in a file called xit.c) that just called _exit. To complete the customization, I changed the CINIT environment variable to include both init.o and xit.o. Small changes made my command line parser work with the new execution structure of Laser. The result is that I can write little utility programs that are now very small again. Things like a hex file dumper, or a program that times other programs, etc no longer end up 6K big. (I just couldn't stand seeing all that disk space wasted :-) ) pvf