home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / intel / 1587 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  2.5 KB

  1. Path: sparky!uunet!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!sun!amdcad!sono!porky!mayer
  2. From: mayer@sono.uucp (Ron Mayer)
  3. Newsgroups: comp.sys.intel
  4. Subject: Re: PLM programming query
  5. Message-ID: <MAYER.92Aug26102743@porky.sono.uucp>
  6. Date: 26 Aug 92 18:27:43 GMT
  7. References: <1992Aug26.093356.6125@canon.co.uk>
  8. Sender: mayer@acuson.com (Ron Mayer)
  9. Organization: Acuson; Mountain View, California
  10. Lines: 58
  11. In-Reply-To: chudley@canon.co.uk's message of 26 Aug 92 09: 33:56 GMT
  12.  
  13.  
  14. chudley@canon.co.uk (Martin Chudley) <1992Aug26.093356.6125@canon.co.uk> writes:
  15. >
  16. >Apologies for this, it shouldn't be necessary but the PLM manual isn't very
  17. >helpful on this subject.
  18.  
  19. How true.
  20.  
  21. >All I want to do is pass a string to a procedure. At present I'm
  22. >using the dot operator to pass a string constant in the function call
  23. >and a based variable to access it inside the procedure, and I get
  24. >garbage. Can anyone send a few lines of code showing how to do this -
  25.  
  26. When I call the procedure, I use the "@" operator to find the address
  27. of the strings; and use the bizzare construct below to zero-terminate
  28. the string.
  29.  
  30.     call showstring(@('High Voltage Power Supply Failed.',0));
  31.  
  32. In the procedure being declared, I use something like:
  33.  
  34.     showstring: procedure (s_base) reentrant public;
  35.         declare s_base                pointer;
  36.         declare s based s_base (1)            byte;
  37.         /* the array s seems to contain the string */
  38.     end showstring;
  39.  
  40. This is using an old version of Intel's compiler.
  41.     DOS 3.30 (038-N) PL/M-86 COMPILER V2.7
  42.     Copyright Intel Corporation 1980, 1984, 1985
  43. Does anyone know if PL/M compiler technology advanced somewhere within
  44. the past 8 years?  Would anyone know if upgrading has any benifits
  45. (better optimizer, something like libc.a(1/2:-), fewer bugs, fewer
  46. compiler limits (size of strucure, etc))?
  47.  
  48.  
  49. >maybe I should just fork out for something sensible like a C
  50. >compiler.
  51.  
  52. Yeah, me too.  Unless you have a huge codebase of existing PL/M code
  53. which needs to be maintained, I'd _strongly_ recommend switching to C
  54. (or c++, fortran, lisp, forth, teco, assembly language, or anything
  55. but PL/M (1/2 :-)).
  56.  
  57.  
  58. Also, on a similar subject, has anyone had any experience with any of
  59. these things, could you let me know your opinions of them:
  60.  
  61.     The plm front end for GCC supposedly being developed by someone at
  62.     the "Technical Research Centre of Finland, Laboratory for
  63.     Information Processing (VTT/TIK)"
  64.  
  65.     The PL/M-86 to C converter by
  66.     "Micro-Processor Services, Inc.; (516) 499 4461"
  67.  
  68.  
  69.     Ron Mayer
  70.     mayer@acuson.com
  71.