Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!umbc3!gmuvax2!2113av From: 2113av@gmuvax2.gmu.edu (John Porter) Newsgroups: comp.os.msdos.programmer Subject: Re: WANTED: list of useful BIOS locations Message-ID: <2875@gmuvax2.gmu.edu> Date: 12 Nov 90 05:24:04 GMT References: <90304.161727DLV101@psuvm.psu.edu> <2867@gmuvax2.gmu.edu> Reply-To: 2113av@gmuvax2.UUCP (John Porter) Organization: George Mason Univ. Fairfax, Va. Lines: 32 For those of you who may have tried to use my biosarea.h file, or who might in the future, there are some things I would like to point out. There is a third data type used in the struct which I forgot to define at the top (I define it another include file, whose reference I deleted from this file, to keep things clean. I only needed the typedefs.) Namely, vfp. I define this as void far *. You might want to simply replace 'vfp' with 'void far *', or, even better, far * to the actual object type. The best example of this is the field called vidtbl; it is one nasty nested structure. So I left it void. Also, the intvector table, and the various BASIC handlers are far * to functions. The #pragma pack(1) directive is important because the BIOS expects its data in certain places; we must conform. Byte-wise alignment is de rigeur. Equally important is the order in which the fields are defined; again, since we do what BIOS says, rearranging any of these fields results in fubar. Lastly, as some people will no doubt notice, there is no reason why you *can't* declare/allocate a structure of this type. It just won't be the real thing. Possible uses include TOTAL machine context save/restore. I use the biosarea mainly for fast reading of the screen height, width, location, cursor, etc. If you're already doing direct screen writes in your program anyway, you may as well not suffer BIOS speed just to get these data either. Another great use is to directly read the system master clock. This is the number of ticks since midnight. Need a random seed? -- john porter # "Baby...Mother...Hospital...Scissors... # # "Creature...Judgment...Butcher...Engineer" OMD #