home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.atari.st.tech
- Path: sparky!uunet!cs.utexas.edu!torn!newshost.uwo.ca!uwovax.uwo.ca!7103_2622
- From: 7103_2622@uwovax.uwo.ca (Eric Smith)
- Subject: Re: How do I replace an existing GemDos routine or add a new one?
- Organization: University of Western Ont, London
- Date: Mon, 7 Sep 1992 18:29:56 GMT
- Message-ID: <1992Sep7.142956.1@uwovax.uwo.ca>
- References: <B76NqB1w165w@ersys.edmonton.ab.ca>
- Sender: news@julian.uwo.ca (USENET News System)
- Nntp-Posting-Host: hydra.uwo.ca
- Lines: 28
-
- In article <B76NqB1w165w@ersys.edmonton.ab.ca>, mforget@ersys.edmonton.ab.ca (Michel Forget) writes:
- > The reason I am asking about this is I am thinking about writing an ANSI
- > emulator, and I would like to see if it is feasible to write it in the form of
- > a TSR that any program could use simply by calling the appropriate routines.
- >
-
- That's certainly feasible, but there are better ways to do it than replacing
- (or adding new) GEMDOS calls, I think. I would set up a cookie in the cookie
- jar, say with the name 'ANSI' and with a pointer to a function table as
- its value. Programs which want to use the ANSI functions would look up the
- cookie, get the table of functions from the cookie, and then jump through
- the table to the appropriate functions.
-
- (I think this is better than trying to add/replace GEMDOS calls because it
- doesn't add any overhead on the trap #1 vector.)
-
- Under MiNT (and probably under MultiTOS) you could write your ANSI emulator
- as a device driver, and have it install a device like U:\DEV\ANSI; programs
- could then open this device and use it just like any other. It probably
- wouldn't be too hard to make your program work either as a device driver
- (if MiNT is active) or as a 'cookie-driven' TSR; just make the functions
- in the cookie's function tables the same as the functions needed for a MiNT
- device.
- --
- Eric R. Smith email:
- Dept. of Mathematics eric.smith@uwo.ca
- University of Western Ontario
-
-