APPENDIX H: INTER-PROCESSOR PORTABILIY

This appendix describes those features of Pascal/MT+ which are not portable to other versions of Pascal/MT+ for other microprocessors and operating systems. A program written avoiding the following features should compile with another Pascal/MT+ compiler with little or no changes to the source code. This does not mean that all of the features listed below are not implemented on any other target processors. It only indicates that they are hardware dependent and (if implemented) will be implemented differently in different versions of the compiler. If any of these hardware dependent features are used, isolate them so that they are easily modified when the program is ported.

MT MicroSYSTEMS does not guarantee complete portability to all processors supported by the Pascal/MT+ compiler. The guidelines which follow are subject to change without notice. There is no more information concerning portability to other Pascal/MT+ compilers.

If the user wishes to write portable programs the following rules should followed:

  1. Avoid pointer arithmetic. On the 8080 the pointer and integer data types have been made somewhat compatible to allow address arithmetic.
  2. Avoid mini-assembler and INLINE
  3. Avoid I/O ports (hardware dependent )
  4. Avoid re-directed I/O (hardware dependent)
  5. Avoid device names such as CON:, RDR:, etc.
  6. Avoid scattering calls to IORESULT througout the the program and isolate the calls. IORESULT values depend upon the operating system.
  7. Avoid ABSOLUTE addressing (hardware dependent)
  8. Avoid INTERRUPT procedures (hardware dependent)
  9. Avoid the use of variant records which are used to circumvent type checking.
  10. Avoid chaining, this is not possible to use on all operating systems.
  11. Avoid having overlays call other overlays, this is not possible on other operating systems.
  12. Avoid WAIT and RIM85/SIM85. (these use 8080 and 8085 instructions)
  13. Avoid dependence upon EOF for non-TEXT files. It will probably work differently on other operating systems. This is because some operating systems keep track of how much information is in the file to the exact byte and some only keep track to the sector/block level and the last sector/block contains "garbage" information.
  14. Avoid using "temporary" files.
  15. Avoid BLOCKREAD/BLOCKWRITE as these may not be implemented on all operating systems. Use SEEKREAD/SEEKWRITE instead.
  16. Avoid the FULLHEAP logic as some operating systems provide memory management which is incompatible with our garbage collection.