[comp.sys.atari.st] MWC questions

lansd@utgpu.UUCP (07/26/87)

    I have a few Mark Williams C related questions:

1) Can the MWC Assembler handle constant labels? My code looked something
like:
	constant = 0x100
	.
	.
	move.w		$constant,d0

   yet it spews out the 'o' and 'a' error messages at the 'move.w'
instruction.

2) What is the proper way to set up the GULAM gulam.g profile so it
will run under MWC? I have moved the MWC profile's setenvs and sets
into gulam.g (and took out the equal signs), but compiling a file will
bomb out when it gets to the cc0.prg stage (I believe). It reports
not being able to find the file D0000000123 (This was an argument to
that pass of the compiler), yet the msh handles this argument fine.

3) Can you pass an address of a structure to another procedure? I am using
version 1.2 of MWC and it chokes when it gets to a line that contains 
'&dfn' in it, where 'dfn' is a structure of chars and a union. It works
fine on my Z80 Aztec C compiler which is suppose to be fully K&R C.
   By the way, the compiler says 'lvalue expected' when it sees the '&dfn'
line.

   Any insights into these problems would be much appreciated....

dinolt@wdl1.UUCP (George W. Dinolt) (11/17/87)

I recently, last weekend, broke down and bought a "real C compiler"
for my 1040 ST.  I purchased the Mark Williams compiler since it
seemed to be getting the most use and best reviews on the net.  The
documentation organization takes a little getting used to but all and
in I only have found two problems I haven't been able to deal with.

The first is very strange.  I have a BMS hard disk which includes a
battery backed clock.  As part of my bootup process, I run a program
called setclock (in the auto folder) which sets the system clock to
the "correct" date and time.  The GULAM shell, the file system dates
and other programs all have a realistic notion of the time after boot.
MSH (the shell supplied with MW Compiler) is completely confused about
the time. (MSH thinks the date is in the 21st century on a consistent
basis).  I thought that maybe it was getting its idea of the current
time from the keyboard clock since that survives resets, so I wrote a
program to transfer the system time to the keyboard time.  I ran this
program before I used the MSH date function.  That had no effect.  I
am very confused.  Anyone have any other ideas?  

The second problem involves the MAKE program supplied with the MWC
compiler.  If I run MAKE under MSH everthing works like a champ.
If I run MAKE under the GULAM shell (lattest distribution from
comp.binaries.atari.st, thanks Turner et al) I get the message

Shell not found 

after make prints out the cc command line it is planning to execute. 
When I run the MAKE program with the -d option, all the all the
environment variables seem to be set correctly, including 
SHELL=d:\bin\msh.prg

The CC command itself works fine under GULAM.  A version of the public
domain program MAKE which was on the net a few months ago also works
fine under both SHELLs.  The other bit of evidence I have is that when
I run XPROLOG, posted in comp.binaries.atari.st I found exactly the
same symptoms.  XPROLOG could not find the SHELL when running under
GULAM but could find the SHELL when running under MSH.  

Obviously something is wrong with my environment, but I haven't been
able to figure it out yet.  Anybody have any ideas?

Please send responses to me and I will post if there is sufficient
interest.

Regards,
George Dinolt (dinolt@ford-wdl1.arpa, ...!sun!ford-wdl1!dinolt)

weber_w@apollo.UUCP (11/21/87)

In article <4120002@wdl1.UUCP> dinolt@wdl1.UUCP (George W. Dinolt) writes:
>The first is very strange.  I have a BMS hard disk which includes a
>battery backed clock.  As part of my bootup process, I run a program
>called setclock (in the auto folder) which sets the system clock to
>the "correct" date and time.
>.......MSH thinks the date is in the 21st century........

Our configurations are similar - I run BMS hard disks off of a 1MB 520.
The MWC file \bin\profile may be setting your TZ environment variable to
a value which produces this result.  Additionally, the line which reads
"  date `date -i`  " in the released \bin\profile is setting the system
clock from the IKBD clock, and may be the culprit.  I would suggest the
following boot sequence:
1) bms disk driver
2) setclock
3) your program which reformats and copies sysclock to IKBD clock
last) foldrxxx/gemboot combination to fix 40-folder problem.

>If I run MAKE under the GULAM shell (lattest distribution from
>comp.binaries.atari.st, thanks Turner et al) I get the message
>
>Shell not found 

I am not certain, but a first guess is that GULAM and MSH use different
techniques for passing command-line variables which are not compatible.
Second guess would be that the MWC make is looking for a pointer in
it's environment in order to find an entry point for a shell routine to
receive a command line to execute.  Check the MWC 2.0 release document (not the
lexicon, but the pamphlet) for a ciscussion of compatibility issues with other shells
(like Beckmeyer).

...walt...
-- 
Walt Weber               PHONE: (617) 256-6600 x7004
Apollo Computer          GENIE: W.WEBER
Chelmsford, People's Republic of Massachusetts

weber@incas.UUCP (11/28/87)

> Written  9:28 pm  Nov 17, 1987 by dinolt@wdl1 in incas:comp.sys.at.st
> ....
> The second problem involves the MAKE program supplied with the MWC
> compiler.  If I run MAKE under MSH everthing works like a champ.
> If I run MAKE under the GULAM shell (lattest distribution from
> comp.binaries.atari.st, thanks Turner et al) I get the message
> 
> Shell not found 
> 
> after make prints out the cc command line it is planning to execute. 
> When I run the MAKE program with the -d option, all the all the
> environment variables seem to be set correctly, including 
> SHELL=d:\bin\msh.prg
Try the following:
	setenv PATH=d:\bin
	setenv SHELL=msh.prg
This works for both make and db. If you want to use gulam instead of msh, use
	setenv PATH="directory of gulam"
	setenv SHELL=gulam.prg

> The CC command itself works fine under GULAM.
Well, it works - but cc wants me to "hit return". Obviously, cc assumes it
is called from the desktop... I haven't yet figured out that one.

By the way, "pr something >prn:" hangs gulam.

							Markus

Markus Weber, ...!uunet!unido!uklirb!incas!weber