KIMMEL@ecs.umass.edu.UUCP (02/27/87)
When the Vertical Blank Interrupt Handler (VBI.ARC) came over the net, I saved it for when I got a C compiler. Well, I now have Megamax C. However, it seems that VBI tries to #include a header file not included with Megamax C (<basepage.h>). It seems that the only macro/constant it accesses from this file is BP (apparently the Basepage of the current program). Is there an equivalent of this in Megamax C? If not, how can I find the basepage of the current program, or the length of the current program (for Ptermres)? Thanks, Matt Kimmel, KIMMEL@UMAECS.BITNET KIMMEL%UMAECS.BITNET@wiscvm.ARPA KIMMEL@UMASS-ECS.CSNET
sc_dra@bath63.ux63.bath.ac.uk (Dave Allum) (03/05/87)
Megamax stores the basepage address in a variable called _base which is declared in the runtime startup routine (as char *_base). If you have the library source disk then the routine to look at is init.c. If you are going to call Ptermres remember that the runtime code will already have returned unused memory to TOS during startup and to add the stack size in use to the program size given on the Ptermres call. The stack size reserved is normally 8K and, I think, 2K if you link in the desk accessory library. ~ ---------------------------------------------------------- O^O Dave Allum, SWURCC, University of Bath, BATH BA2 7AY, U.K. V / \ USENET ..!mcvax!ukc!bath63!sc_dra ISD +44 225 60371 /\_/\ JANET dave@uk.ac.swurcc.gecdv STD 0225 60371 _| |_ __________________________________________________________