home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / modula2 / 1370 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.2 KB

  1. Path: sparky!uunet!know!cass.ma02.bull.com!think.com!spool.mu.edu!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!uwm.edu!linac!mp.cs.niu.edu!uxa.ecn.bgu.edu!mgmam
  2. From: mgmam@uxa.ecn.bgu.edu (Mark A. Morrell)
  3. Newsgroups: comp.lang.modula2
  4. Subject: Re: executing from within a modula-program
  5. Message-ID: <BxJ2rn.Du4@uxa.ecn.bgu.edu>
  6. Date: 11 Nov 92 01:28:34 GMT
  7. References: <16490.2AFB1912@puddle.fidonet.org> <721218424snx@black.demon.co.uk>
  8. Organization: Educational Computing Network
  9. Lines: 23
  10.  
  11.  
  12.  > I use Topspeed modula 3.1 and had a problem in my last program. Does
  13.  > anyone know how Ii can execute another program from a modula program so
  14.  
  15. This is a procedure which stuffs a character into the keyboard buffer,
  16. and may be of use to you.  Stuff the buffer, then exit your program.
  17.  
  18. PROCEDURE Stuff( c : CHAR );
  19. VAR
  20.    R : SYSTEM.Registers;
  21. BEGIN
  22.     R.AH := 05H;
  23.     R.CL := c;
  24.     R.CH := 0;
  25.     Lib.Intr( R, 16H );
  26. END Stuff;
  27.  
  28. The keyboard buffer will only hold around 16 characters, so you can't
  29. overdo it...
  30. -- 
  31. --------------------------------------------------------------------
  32. Mark A. Morrell     Disclaimer:  _I_ probably don't even believe it.
  33. Literary Reference:  The introduction to Cervantes' Don Quixote.
  34.