Lattice C

From Atari Wiki
Jump to navigation Jump to search
Lattice C ST 5.06.02 - 30 October 1990
======================================

This is the READ.ME file for Lattice C version 5.06.02. Please write
this version number on your registration card and return it now. Please
note the zeroes are very important and allow us to work out exactly
which version you have should you require technical support. Without
this version number we will be less able to help you if you have
problems.

Of the seven disks, only disk 1 is serialised, this is quite normal and
you may, if you wish, copy the serial number to your other disks.
Should you need to return your disks for any reason, then you MUST
return all seven disks. 

This file details the last minute changes which we have made to Lattice
C that did not make it into the manuals.

Version 1.9 of the HiSoft File Selector can be found in the FSEL folder
of disk 2. The .TXT file contains its documentation.

Version 1.1 of the HiSoft AES path patch program can be found in the
AESPATH folder of disk 3. The .TXT file contains its documentation.

The file PRELINK.TXT contains some information for advanced users on the
pre-linkage features available in the linker.

Re-installation for upgrade users
=================================

If you are upgrading from an earlier Lattice 5 release, re-installation
can be performed safely by simply re-running the installation program
which will overwrite any old versions of the tools/libraries it finds.
Note that any files which you have added in the directory structure
will not be changed.

Features of 5.06.02
===================

Editor
------
A cycle windows command is available on the Options menu, or via Ctrl-V.

Integrated compiler
-------------------
The left mouse button may be used as an alternative to a keyboard
key-press at any of the 'Press a key' prompts.

Compiler
--------
A new option -Lq is available to add the QUIET option for CLink.

The -cq option strengthens the aggregate equivalence type checker. When
disabled (the default), this option allows two aggregates with common
initial subsequences over the length of one of the aggregates to type
check equivalent. This option is automatically enabled by -ca.

Bugs fixed for 5.06.02
======================

Compiler
--------
A condition codes tracking problem was corrected.
Invalid dates are detected and ignored. If no valid date and time is
available for __DATE__ and __TIME__ the time and date of compiler build
is used.
Passing floats to prototyped functions was fixed up.
Register passing of volatile objects (meaningless concept) to functions
was changed to fix a CXERR 26.
-cl now generates the correct code for passed parameters.

Integrated compiler
-------------------
Linking with the normal maths library was corrected.

Linker
------
Absolute symbols are correctly re-exported when prelinking.

Header Files
------------
assert.h:	Modified to conform to the ANSI definition.

Library
-------
form_keybd() doesn't swap its parameters.
assert() changed to conform to the ANSI definition.
movmem() fixed in register passing mode.
_main() fixed so I/O redirection works again.

Features of 5.06.01
===================

Integrated Compiler
-------------------
Support now exists for using the -L option in the LC_OPT variable. This
enables additional libraries to be specified simply in the integrated
environment. HiSoft C users may simply specify -L+hc.lib to use the
HiSoft C library without needing to become involved in the intricasies
of WITH files.

The -f8, -fa and -fi options now pull in the lcm8, lcma and lcmi
libraries for use with the 68881 maths co-processor libraries
(available separately).

Library
-------
An additional function stime() is available for setting the system time
and date. It has the prototype:

	int stime(const time_t *);

and is passed a pointer to a time_t value as processed via time.

Header Files
------------
time.h:		Includes the prototype for stime().

Bugs fixed for 5.06.01
======================

Compiler
--------
A minor problem with very long strings was corrected.

Linker
------
A bus error introduced in 5.06.00 was eliminated. Pre-linkage was
reworked to improve coalescing of unmerged unnamed sections.

Assembler
---------
A problem with using macros was corrected.

Debugger
--------
Various incorrect dissasemblies were corrected.

Installation Program
--------------------
This correctly from drive B.

Ramdisk
-------
This now handles the initial reset correctly on the Atari TT030.

Strip
-----
Re-linked with fixed stat() function.

Library
-------
_dread() preserves d1 across GEMDOS calls.
_main() sets the file handle flag on handles 0,1 and 2 when redirected.
onbreak() works correctly in registerised parameter models.
open() doesn't do a disk access when opening a system device (prn:
etc.), also errno is preserved in the case where a file must be created
which didn't previously exist.
stat() corrects for timezone differences correctly.

Header Files
------------
assert.h:	NULL definition removed in accordance with ANSI.
ctype.h:	NULL definition removed in accordance with ANSI.
errno.h:	NULL definition removed in accordance with ANSI.
limits.h:	SHRT_MIN (and INT_MIN in short integer mode) reduced to
		-32767 in in accordance with ANSI.
stdarg.h:	NULL definition removed in accordance with ANSI.
stdarg.h:	NULL definition removed in accordance with spirit of ANSI.


Features of 5.06.00
===================

Compiler
--------
#pragma inline now hoists non-live variable saves to the head of the
function when possible. The code generated for short integer parameters
is better, and corrects a possible problem when passing a long value
to a a short parameter.

When using #pragma inline, if the code generation sequence is omitted
then a call to the original function is made using the calling and
register kill conventions mentioned in the pragma, this is especially
useful for calling out to languages with different register conventions.

Two new options, -b and -r, are available on LC2. Respectively these
allow the global data base register and frame register to be specified.
Note that code compiled using other than the default options (-b4 and -r6)
will *not* work with the standard run time libraries. The special option
-bn is also available, allowing register A4 to be placed on the register
selection list. Note that if this option is used and *any* reference
must be made to the global data register then a CXERR will be issued.

68020 (and above) code generation now takes full advantage of the bit
field instructions available on these processors, when manipulating
bit fields at the C level.

Both phases of the compiler have had substantial speed optimisations made
to them. This leads to approximately 35% faster compilation times.

When using default short integer mode (-w), message 135, "Assignment to
shorter data type (precision may be lost)", is automatically enabled.

The behaviour of -f8 has been modified to support the 68881 libraries
(available separately from ourselves, at the address below). Note that
two additional options are available for these users, -fi (use ST I/O
only maths library) and -fa (use auto-detecting 68881 maths for TT/ST
I/O/software emulation only systems). All of these options require the
separate 68881 maths library pack.

The pre-processor symbols available for detecting the model in use have
been greatly extended. The current list of symbols is:

  Symbol		Enabling option
  ------		---------------
  DEBUG 		Any -d
  _BASEREL		-b1
  _ANSI 		-ca
  _UNSIGNEDCHAR 	-cu
  _M881 		-f8
  _MLATTICE		-fl
  _MMIXED		-fm
  _MSINGLE		-fs
  _MDOUBL		-fd
  _PCREL		-r1
  _REGARGS		-rr
  _SHORTINT		-w
  STPR 		-w
  LPTR 		without -w

The set of static pre-processor symbols has also been extended, the
following additional symbols are now available:

  Symbol	Value	Meaning
  ------	-----	-------
  LATTICE_56	1	Current compiler release.
  __VERSION__	5	Current major version number.
  __REVISION__	6	Current minor version number.

Several changes have been made to improve overall code quality.

The macro buffer was extended to 4096 characters and the maximum number
of macro arguments increased to 32.

Optimiser
---------
When generating code for the 68881 GO performs full global allocation
of floating point data registers.

Assembler
---------
A GenST2 style INCBIN directive is available, using the normal DevpacST
syntax. Note that, in common with the current GenST2 release, the
section counter is not even aligned after an INCBIN and so a "CNOP 0,2"
should be used if required afterwards.

Editor
------
Window overlap is now more intelligent, several minor bugs which could
cause window (but not text) corruption have been fixed.

Bugs fixed for 5.06.00
======================

Compiler
--------
__builtin_strcmp correctly predicts possible register spillage to allow
correct tracking of condition codes.
__builtin_max/__builtin_min kills the register used as a working register
prior to a possible reload.
-ca now removes the near, far and huge keywords from the compiler
keyword table.
Function assignments to candidates for post-increment addressing modes
now occurs correctly, potential problems with using an address register
as left and right operands whilst being a candidates for post-increment
addressing modes was corected.
Float parameters to prototyped functions now occur correctly.
Temporaries created as a result of calls to inline functions are correctly
killed at the virtual function call boundary.
Pre-compiled header files containing #pragma inline directives should
no longer cause "File too short" messages on reloading.
When generating prototypes, all modifiers and specialised keywords are
output correctly. Note that enumerated types will use an enum tag as the
parameter type, and so the definition of the enum tag must be in scope
at the time of prototype file inclusion.
__TIME__ and __DATE__ now return the correct time/date.
Builtin errors in phase 2, do not cause bus errors when line number info
is not available.
Several CXERR's 26, 22, 31 and 124 have been fixed
The INCLUDE variable may now be specified as a ; or , separated list.
A problem with __builtin_strcpy not preserving the status has been
fixed.
Pointer/pointer subtractions use the correct return register.
A bus error caused by not declaring a function used in error as a scalar
is corrected.
Multiplies by zero which are not eliminated by phase 1 are correctly
handled by lc2.
The -rb flag generates distinct names for the two external definitions
created.
A bus error caused by attempting to initialise arrays illegally was
eliminated.
The -j options to lc1 are more effective in their treatment of warnings.
Empty files may be compiled without causing an error.
__FILE__ scans filenames doubling up '\'s as required.
-f options may be specified in any order, this corrects the problem of
using -f8 from the integrated compiler.
Problems with long effective address calculations in 68020 mode have
been fixed.

Optimiser
---------
In short integer mode GO correctly performs global register re-allocation.
In short integer mode, the computation of structure array accesses with
negative offsets occurs correctly.
In short integer mode, hoisting of constant induction variables occurs
correctly.

Assembler
---------
The 68020 bit field instructions now follow the standard Motorola syntax,
and the BFINS instruction is now accepted in all forms.
The BKPT and FMOVECR instructions now allow all constant legal operands.
68020 addressing modes with implicit fields are assembled correctly.
fmove.p fpx,<ea>{#-k} is assembled correctly.

Disassembler
------------
The 68020 bit field instructions are disassembled in the standard Motorola
syntax.
Line-A instructions are output as a single DC.W.
68881 FMOVEM instructions display the correct register list.
fmove.p fpx,<ea>{#-k} is dissasembled correctly.

Integrated compiler
-------------------
The -ta option now works correctly when the link with GEM option is
selected (the normal case).

Library
-------
chkml() now works correctly.
getclk() doesn't return the day two days out.
getmem() in short-integer stack based mode now works correctly.
modf() returns a fractional part of zero when the the accuracy of a
double is exceeded.
strtol() and atoi() now skip leading white space correctly.
iabs() appears in the normal libraries, not the floating point now.
_CXFERR() is passed correct values in short integer mode.
setvbuf() allocates a buffer correctly when passed a NULL pointer.
The _d...() family of functions ensure that D2/A2 is preserved.
realloc() copies the block correctly as the size increases.
stat() restores the system DTA pointer if an error occurs.
utime() takes the timezone into account when processing the time.
v_get_pixel() returns the pixel values correctly.
_ddup2() swaps its arguments prior to passing to GEMDOS Fforce().
dup() returns the internal, not the GEMDOS handle.
calloc() works correctly for large blocks.
stcgfe() and stcgfp() now copy 3 and 8 characters respectively.
Conversions from doubles to decimal strings occur correctly with no loss
of final digit precision.
mktime() fixed to give correct dates.
strftime() %I and %U conversions fixed in short integer mode.
rc_union() works correctly.
printf() using precision specifications and 0 padding requests works as
expected for floating point numbers.

Header Files
------------
ctype.h:	_toupper() fixed.
fcntl.h:	Added opene() prototype.
float.h:	Changed to take advantage of _MMIXED, _MSINGLE, _MDOUBL.
limits.h:	Changed to use _SHORTINT and _UNSIGNEDCHAR.
math.h:		Prototype for _CXFERR added.
osbind.h:	Fdatime(), Frename() definition changed to long
		returning, definitions of prototype parameters changed
		to int. 
stdio.h:	lprintf() prototype added.
stdlib.h:	bldmem() prototype added, min() and max() added.


Features of 5.04.01
===================

Editor
------
If 'Wrap' is selected in the Preferences box, pressing Delete at the
end of a line now causes following text to be closed up.
The Find box is now the full screen width.
The vertical scroll bar arrows now scroll the window rather than the
cursor.
The position of the cursor after a find or goto line is more
intelligent.

Linker
------ 
CLink now searches the environment variable LIB for all files itself.
Previously the work was done by LC.PRG or LC.TTP. As a result of this
LIB may now be specified in terms of several ',' or ';' separated
strings.

Two new keywords have been added, QUIET to suppress all output (other
than fatal errors) and VER <filename> which specifies a file to which
all output is to be directed.

Unlimited length command lines are now permitted when running from a
shell supporting the Atari extended command line format (e.g. Craft).

Note that the TO and MAP commands do not need full names for output
files. If the output file is specified as .PRG or .MAP (for example)
then a file name based on the second file linked is used (or first file
if only one file is available).

lc.ttp
------
-N, has been added which supresses all compilations, this can be used
to force the building of a .LNK file when used with -L without the
neccessity of compiling any files.

-Lb, may be used to force batch mode linking, previously all links were
done using batch mode.

-Lf, may be used to force a file map to be generated in the map file.

Libraries
---------
It is possible to turn on detection for Ctrl-C in all read and write
calls by setting the external variable __chkabort to a non-zero value.
This is easiest done by re-defining the external viz:

	int __chkabort=1;

Note that this variable has no effect on the normal GEMDOS checking.
Also it should not be used in GEM programs which expect to terminate and
clean up in a controlled manner. This code works by sending a \0 to the
GEMDOS console device, consequently it may interfere with any program
which uses VT52 codes, hence this is a powerful facility but must be
used with care.

Startup Code
------------ 
The main entry point is now named ___start which is externally visible
for those applications which wish to have some custom code before it
without having a complete new stub.

Integrated compiler
-------------------
When displaying error messages, the whole of the status line is now
used if the screen width is 80 characters or less and the length of the
message is more than 40 characters.

The -t and -L options are now available in the compiler options box,
although strictly these are functions of the linker. Please note that
the compiler in the integrated compiler is a big compiler, also the
options -B, -C, -E, -M, -N, -R and -z access special facilities of the
lc.ttp driver which are not normally needed in the integrated compiler,
and would cause a considerable overhead for 1Mb users.

As a result of these extensions any options stored in old EDCTOOLS.INF
are ignored when loading. A new options table is saved when the tool
info is saved. This ensures that old tools and environment settings are
retained.

Files
-----
A WITH for the linker (lib\hc.lnk) is supplied on disk 3 to aid users
of HiSoft C who are compiling their programs.

Batcher
-------
The FORMAT command (described below) has been extended to provide a
volume label.

e.g.
	FORMAT B: VOLID

Formats a disk in drive B with a volume label of VOLID.

The COPYWARN command lets you enable warnings when over-writing an
existing file using the COPY command. Use

COPYWARN ON

to enable this. If you are prompted, press Y to over-write this file,
N to leave this file and A to copy this and all subsequent files without
asking.

The /D and /S flags used by the COPY and DIR commands have been
extended to give the files in reverse order using /D- and /S-.

Installation program
--------------------
The installation program has been improved so that it now ensures that
the appropriate disk has been inserted by checking the volume label. If
you wish to over-ride this then press I when informed that you have
inserted the wrong disk.

If you have a Single-sided drive A
----------------------------------
The installation program can now be used on systems with a single-sided
drive A and a double-sided drive B. Users with this configuration and
no hard disk should run the installation program as normal - this will
produce disks for a 'normal' system with a double-sided drive A and
then procede as follows:

1. Half a megabyte of RAM: Use the bootdisk produced by the
   installation program in drive B and store your source files on
   drive A.

2. One megabyte of RAM: Copy the AUTO, H and LIB folders from the
   bootdisk produced by the installation program to a single-sided disk
   that you will boot from. Also make a BIN folder and copy CLINK.TTP
   and lc1.lc from the BIN folder of the double-sided. You can now use
   the Work disk produced by the installation in Drive B. You will
   probably want to use the Environment editor command so that the PATH
   environment variable refers to B:\BIN. When the system has booted
   you can remove your single-sided bootdisk from drive A and use this
   for a disk to hold your source files.

3. More than one megabyte of RAM. Use the Ramdisk installation program
   on disk 3 in the RAMDISK folder to inset B: in front of the files to
   be copied and save this to the AUTO folder of a single-sided boot
   disk. You can then boot using the bootdisk produced by the
   installation program in drive B.

Ramdisk Installation program
----------------------------
The ramdisk installation program now has two extra buttons:

1. Load driver. This loads just the ramdisk driver without the
   information on the files to be copied, disk size etc.

2. Load info. This loads the just the latter information without the
   driver.

These buttons can be used to upgrade an existing ramdisk set up to the
latest version of the driver without the need to re-enter the
information concerning the files to be copied.

MonST2C version 2.08c
---------------------
Control-W is now Single-Step for the benefit of users with French
keyboards.

The word, long and byte searches can now be made to only look for the
pattern starting on word or long word boundaries. To only search on
word boundaries finish the list of items to search for with ',W'. For
longwords use ',L'. For example:

	G W
	1234,W
	
will look for $1234 only on word boundaries.

The Textual and Instruction searches now ask further you wish the
search to be case sensitive. If you press Y then Test will match TEST
or TeSt.

Bugs fixed for 5.04.01
======================

Installation program
--------------------
The cautbin.tos archive no longer claims to extract two copies of
csnbaut.bin, in fact only one copy of csnbaut.bin was extracted, the
other was cnbaut.bin.

Integrated compiler
-------------------
Non-base relative floating point maths now works correctly when linking
in the integrated environment.

As a result of the change to CLink regarding library searching (see
above) longer path names are now possible for filenames.

A problem caused by QuickST2 was fixed, error messages should now
appear correctly.

Linker
------
The coalesce phase has been completely rewritten for use when
prelinking. This means that empty sections are no longer generated, and
sections are not merged unnecessarily. Also when prelinking, the
anonymous relocation sections are now correctly merged into a minimal
number of blocks.

XNOALVS completely suppresses all (not most!) ALV generation, including
inter-section references. This is particularly useful when prelinking as
code sections are not necessarily merged during prelinking.

Batcher
-------
Batcher has had all of its output modified so that it now uses Fwrite,
rather than Cxxxx. This means that redirection will now work correctly
under TOS 1.0. Note that any program which does not use only Fwrite for
output on TOS 1.0 will cause the machine to bomb if the output has been
redirected from Batcher. Any programs compiled with Lattice C 5 will
not suffer from this problem if only the UNIX or ANSI file routines are
used.

Batcher has been improved so that it converts file specifications that
are missing drives or directories fully before prompting - this avoids
occassional copying of the same file onto itself. Batcher also handles
folder names contains full stops fully now.

Ramdisk
-------
The ramdisk will now exit more cleanly if it runs out of space when copying
files on startup.

The ramdisk is now more tolerant of a wider range of file
specifications. When specifying directories to copy there is no need to
include \*.*. Also there is no need to use, say,  A:\H just A:H will
work fine. 

WERCS
-----
The line draw feature in the icon editor now works correctly on TOS 1.4
and above.

Startup Code
------------ 
This correctly sizes the environment string area in the fixenv
function, consequently putenv should be more reliable now.

The desk accessory register passing startup stub now calls @main rather
than _main.

_setargv() now opens output redirection files in the correct mode. This
is mainly a cosmetic change as GEMDOS did not cause any problems in the
incorrect usage anyway.

Library
-------
The v_ellipse, v_ellpie, v_arc and v_ellarc bindings now work correctly.
printf("%p") now works correctly, more complex variants already worked.
linea0() now preserves d2.
_mediach() now correctly validates the drive number in the Rwabs patch.
_AESglobal has been extended to the recommended 15 shorts.
strtol() is now named correctly in the registerised models.
swab() is now accessible in the library.
strspn() should now 'see' the last character in the spanning string.
memmove() now adds the correct offset in registerised models.
stccpy() now works in the limit case.
longjmp() now accounts for the function return address pushed by setjmp.
cprintf() now correctly calls cputs in the registerised model.
_dwrite/_dread now watch for zero length reads/writes and ignore them so
that TOS 1.0 doesn't die.
fputchar and putchar (function version) now work as expected.
fputc() no longer loses 1 character per buffer on mode w(b)+ files.
div() and ldiv now use the same layout, this corrects a problem in long
integer mode.
strftime(), setlocale() etc. recompiled to reflect the change in locale.h
strstr() now works as expected when string2 is the null string.
system() in the registerised models now calls via _shell_p correctly.
atof(), strtod() now indicate overflow correctly.

Header Files
------------
aes.h:		definition of RSHDR made int size independent
dos.h:		_dwrite #define removed (for reason above)
locale.h	Definitions of LC_xxx corrected
osbind.h:	Frename, Xbtimer, Midiws fixed. Dfree redefined as (long *).
		Keytbl changed to use char * cf. void *.
stdio.h:	Now includes the definition for FOPEN_MAX, printf et al no
		longer __stdargs (implied via ellipsis).
stdlib.h:	bsearch added. Parameters of div_t transposed
string.h:	NULL definition added
time.h:		Now includes the definition for CLOCKS_PER_SEC


Disk Contents
=============

The installation program on disk 2 is actually called INSTALL.PRG, not
INSTALL.TOS. This is so it may (optionally) auto-run Batcher after
creating the batch file. Sorry for this typo.

The non-base relative maths libraries LCM?NB.LIB are not mentioned in
the installation guide, they exist however on disk 5. Similarly the
archived GST versions can be found on disk 7, LCMNBBIN.TOS.

On disk 6 the installation guide fails to mention the C.LNK file in the
bin directory for use as a 'WITH' file for LinkST.


Documentation
=============

On page 18 of volume one there is a small problem with the options
used, in particular the -w option should not be used. This is because
there is insufficient disk space for the short integer libraries on the
default work disks, note that this only applies to floppy based users,
hard disk users may still attempt the use of this flag. On the
following page the command line for 512K users has a small typo... the
-ih option (present on all other 512K command lines) was omitted. Hence
the full command line for 512K users should read:

	-ih -csf -v -Lag wtest

The documentation on csub (complex subtraction) was accidentally
omitted. Please refer to cadd substituting the word subtraction for
addition.

The -c options, page 54 Volume I, are in fact toggle options, i.e.
specifying any such option twice will disable it.

-ca, enable ANSI mode, has the following effects, it disables register
(-cr) and extra (-ck) keywords, also the warning messages 122 - "Missing
ellipsis", 132 - "Extra tokens after valid preprocessor directive" and
135 - "Assignment to shorter data type (precision may be lost)" are
enabled.

-cl is mis-documented, and is used to force long word alignment of
externals.

-cr is mis-documented, it actually enables the register keywords __d0,
used in conjuction with the __asm directive.

Page 321 of Volume II has the parameters to strstr transposed in the
synopsis. The returns section should say that: "If s2 points to a string
with zero length, the function returns s1."

Page 92 of Volume III incorrectly describes wind_calc as taking a handle.
This parameter is not required.

Page 105 of Volume III describes the return values from the user function
wrongly. The user function should return 1 for success, 0 for failure.

Page 213 of Volume III describes vsf_interior and vsf_style incorrectly,
the first parameter is to vsf_style, the second to vsf_interior.

Page 265 of Volume III describes the info pointer of Dfree as being type
void *, this should be type long *.

Page 289 of Volume III is inconsistent in the synopsis of Pexec, the cmd
parameter should be tail.

Page 300 of Volume III omits the character 'c' in the synopsis of
Bconout. The call is of the form "error=Bconout(dev,c)".

Pages 313-358 of Volume III, the XBIOS section, contains several
references to vdi.h, these should, of course, be osbind.h.

Page 316 of Volume III has the enable/disable blinking flags of Cursconf
transposed. 2 is used to enable blinking, 3 to disable it.

Page 326 of Volume III is describes Giaccess incorrectly, bit 7 should
be *clear* to read and *set* to write, i.e. the opposite of that
described.

Page 368 of Volume III describes linea4 incorrectly in the synopsis,
with reference to Y2, this should of course be X2. The remainder of the
description is correct.


Libraries
=========

The _tzset function uses the _country variable when an environment
variable TZ cannot be found. All countries will have the correct number
of hours difference from GMT although the country codes may not be
correct as we were unable to find a reference for these.

The codes 13 and 14 for _country (Saudi Arabia and Holland) *may* have
been transposed, although we are uncertain of this at the present time
and are attempting to resolve the issue.

The variable 'long _MNEED' has been added and specifies the number of
bytes placed in the initial heap. It does not (unlike version 3) set
the maximum amount of RAM which may be used. We strongly recommend that
you do not adjust its value.

When building Desk Accessories TOS does not support dynamic memory
allocation. To circumvent this problem Lattice C 5 allows one (or more)
static arrays to be linked into its heap. To do this the _addheap
function is used; note that the length of the heap *must* be a longword
multiple:

	long heap[BYTES/sizeof(long)];

	main()
	{
		_addheap(heap,sizeof(heap));
		...
	}

Note that if you do not put any memory in the heap, any attempt to use
malloc will fail, which may or may not be important to you. The DA
example program chdiracc has no need of any malloc'd memory.

There are some special startup stubs only touched on in the manual
which allow your program to detect how it is running. All you need to
do is link with the C?AUT.O startup code and the GEM library (LCG*.LIB)
so that the variable _XMODE will be magically set. The values used are:

	0	Standard GEM program
	1	Standard TOS program
	2	GEM DA
	3	Auto folder TOS program

A simple example program testaut.c is provided in the examples
directory.

Assembler
=========

ASM, the assembler, has been extended to support standard Motorola
style macros, although we recommend the use of the Lattice macro system
as this style is more readable.

Note that ASM unlike DevpacST does not force word alignment of
instructions, hence if you have a byte table you should always follow it
with an even directive.

Batcher
=======

Several new commands were added to Batcher primarily to assist the
installation program, however these are also facilities which may be
useful to you:

FORMAT command
--------------
This will format standard ST double-sided disks without any interleave.
It should be followed by the drive to format e.g.

	FORMAT B:

will format the disk in drive B.

PAUSE command
-------------
PAUSE will wait for a single key to be pressed. This can be used in
batch files so that the user can read the previous output or change
disks.

ECHO command
------------
If the parameter to ECHO is not ON or OFF (as described in the manual)
then the text will be echoed to the screen. For example:

	ECHO This is a message

will display 'This is a message'.

VIRTUALDISK command
-------------------
This command is used by the installation program so that Batcher can
perform 'virtual disking' itself rather than using the operating system
routines, which do not work reliably. However, as all Batcher commands
do not support this facility, we do not recommend that it is used
interactively.

HiSoft, 30 October 1990
The Old School
Greenfield
Bedford
MK45 5DE
ENGLAND.

Phone:	+44 525 718181
Fax:	+44 525 713716





Back to C