Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site utai.UUCP
Path: utzoo!utcsri!utai!jenkin
From: jenkin@utai.UUCP (Michael Jenkin)
Newsgroups: net.micro.atari
Subject: Re: 520ST xbios() calls
Message-ID: <913@utai.UUCP>
Date: Mon, 11-Nov-85 09:55:52 EST
Article-I.D.: utai.913
Posted: Mon Nov 11 09:55:52 1985
Date-Received: Mon, 11-Nov-85 10:42:14 EST
References: <174@pluto.UUCP> <1665@trwrba.UUCP>
Reply-To: jenkin@utai.UUCP (Michael Jenkin)
Organization: CSRI, University of Toronto
Lines: 50
Summary: 

In article <1665@trwrba.UUCP> sansom@trwrba.UUCP (Richard E. Sansom) writes:
>As promised, here is a list of some of the xbios() calls which
>owners of the Hippo-C compiler may wish to use.  Since I don't know
>much about the Hippo I can't promise that they will work as listed
>here (I've heard that the Hippo int size is 32 bits?).  Oh well,
>good luck!
>
>-------------------------------------------------------------------------------
>
>/*
> * If Hippo-C has no xbios() call available, you may be able to
> * get away with the following:
> *
> *		.text
> *	_xbios:	move.l	(sp)+,.temp	; get return address
> *		trap	#14		; trap 14 is xbios
> *		move.l	.temp,-(sp)	; push return address
> *		rts			; return to calling program
> *
> *		.bss
> *	.temp:	ds.l			; temporary storage
> *
> *
> * In this document, the following definitions are assumed:
> *
> *	char = 8-bits
> *	int  = 16-bits
> *      long = 32-bits
> *
> */

sorry - it just will not work under HIPPO-C.  Unlike the 'C' that comes
with the development system, HIPPO-C passes everything on the stack as
a 4 byte quantity - thus calls which expect objects of size < 4 will
not execute correctly.  For example, the setscreen call will not
execute correctly as the resolution parameter must be passed as a WORD
value on the stack.

While I'm here.... I'd like to check something out with ST developers
on the net.  A TTP program gets passed argc/argv on the stack, this
stuff is read from the base page before the task is fired up. HIPPO-C
will generate a .PRG file but it does not set up the stack properly for
the call.  Is there a way to get the base page back after a .TTP program
has started up?
-- 
--
Michael Jenkin					University of Toronto
USENET:	{decvax,ihnp4,allegra}!utcsri!utai!jenkin
CSNET:	jenkin@Toronto 
BELL: 	416-978-7321