Newsgroups: comp.sys.sinclair
Path: ulke.hiMolde.no!trane.uninett.no!sunic!sunic.sunet.se!news.luth.se!eru.mt.luth.se!bloom-beacon.mit.edu!panix!news.mathworks.com!hookup!swrinde!pipex!uknet!festival!leeds.ac.uk!news
From: agl100@york.ac.uk (URY - 999kHz AM)
Subject: More HiSoft C bits
Message-ID: <1995Mar6.121428.2055@leeds.ac.uk>
Organization: The University of York, UK
Date: Mon, 6 Mar 1995 12:14:27 +0000 (GMT)
X-Newsreader: TIN [version 1.2 PL2]
Lines: 45

First let me thank John Garner for pointing out that I forgot to tell you 
how to produce binaries with HiSoft C.. well here goes

Lets assume that you have typed in a program, and it is held in the text 
editor.. go into the compiler and type;

	#translate <filename>
	#include
	press SYM-I
wait a while, et voila one binary produced..

	<filename> is as for #includes, eg xxx for tape or n:xxx for uDrive

	the binaries produced LOAD at 25200, so you'll need CLEAR 25199 
first, and should be RUN with RANDOMIZE USR 25200.. 

	if within main() there is no exit(); function then when the 
program finishes, the Spectrum will likely reset with RST 00h, but you 
can incorporate exit(); into programs eg..

	main()
	{
		printf("hello world!\n");
		exit(0);
	}

will run, and finish with

0 OK, 0:1

the value passed to exit() is the same as native Spectrum errors..

	exit(0)		as above
	exit(4)		Out of Memory 
	and so on, see Manual for full list..

right, thats about all for now, I promise I really will get a full set of 
instructions typed in soon, and inform you all when its done...

I'll also try and get the compiler and libraries knocked up into a .MDR 
file, but this may take some time.. :)

y'all come back now.. y'hear ;)

Majikthise (agl100@york.ac.uk - http://www.york.ac.uk/~agl100)
