home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / pascal / 7408 < prev    next >
Encoding:
Text File  |  1992-12-12  |  1.3 KB  |  37 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!cs.utexas.edu!torn!news.ccs.queensu.ca!slip208.telnet1.QueensU.CA!dmurdoch
  3. From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
  4. Subject: Re: Overlays and device drivers
  5. Message-ID: <dmurdoch.227.724168011@mast.queensu.ca>
  6. Lines: 25
  7. Sender: news@knot.ccs.queensu.ca (Netnews control)
  8. Organization: Queen's University
  9. References: <724116564.AA00693@contrast.wlink.nl>
  10. Date: Sat, 12 Dec 1992 13:46:52 GMT
  11.  
  12. In article <724116564.AA00693@contrast.wlink.nl> berend@contrast.wlink.nl (Berend de Boer) writes:
  13. >
  14. >I wrote a device driver unit with OpenFunc, InOutFunc etc. I use this
  15. >unit in the following way:
  16.  
  17. I haven't gone through the RTL, but a quick trace through a call to Writeln 
  18. seems to tell me that you can't overlay a text file device driver.  Some of 
  19. the RTL routines don't set up a proper stack frame, so the overlay manager 
  20. won't be able to trace back properly.
  21.  
  22. You could probably fix this if you have the RTL; figure out which routines 
  23. are involved in text file I/O, and make sure they all have
  24.  
  25.   push bp
  26.   mov  bp,sp    
  27.  
  28. at the start, and 
  29.  
  30.   mov sp,bp
  31.   pop bp
  32.  
  33. (or just LEAVE) at the end.  If they use BP for some other purposes, restore 
  34. it to the stack frame value before calling your device driver routines.
  35.  
  36. Duncan Murdoch
  37.