home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / atari / st / tech / 4706 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.9 KB  |  41 lines

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