rtl.doc 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. .sp 1.5i
  2. .ft B
  3. Appendix B: Changes to the run time library
  4. .ft R
  5. .nh
  6. .sp
  7. Some minor changes in the run time library have been made concerning the
  8. external files (i.e. program arguments). The old compiler reserved
  9. space for the file structures of the external files in one \fBhol\fR block.
  10. In the new compiler, every file structure is placed in a separate \fBbss\fR
  11. block. This implies that the arguments with which \fI_ini\fR is called are
  12. slightly different. The second argument was the base of the \fBhol\fR block
  13. to relocate the buffer addresses, it is changed into an integer denoting the
  14. size of the array passed as third argument. The third argument was a pointer
  15. to an array of integers containing the description of external files, this
  16. argument is changed into a pointer to an array of pointers to file structures.
  17. The differences in the generated EM code for an arbitrary Pascal program are
  18. listed below (only the relevant parts are shown):
  19. .in +5m
  20. .nf
  21. \fBprogram\fR external_files(output,f);
  22. \fBvar\fR
  23. f : \fBfile of \fIsome-type\fR;
  24. .
  25. .
  26. \fBend\fR.
  27. .in -5m
  28. EM code generated by Pascal-VU:
  29. .in +5m
  30. .
  31. .
  32. hol 1088,-2147483648,0 ; space belonging to file structures of the program arguments
  33. .
  34. .
  35. .
  36. \&.2
  37. con 3, -1, 544, 0 \h'80u'; description of external files
  38. lxl 0
  39. lae .2
  40. lae 0 \h'146u'; base of hol block, to relocate buffer addresses
  41. lxa 0
  42. cal $_ini
  43. asp 16
  44. .
  45. .
  46. .in -5m
  47. EM code generated by our compiler:
  48. .in +5m
  49. .
  50. .
  51. f
  52. bss 540,0,0 \h'100u'; space belonging to file structure of program argument f
  53. output
  54. bss 540,0,0 \h'100u'; space belonging to file structure of standard output
  55. .
  56. .
  57. .
  58. \&.2
  59. con 0U4, output, f \h'50u'; the absence of standard input is denoted by a null pointer
  60. lxl 0
  61. lae .2
  62. loc 3 \h'144u'; denotes the size of the array of pointers to file structures
  63. lxa 0
  64. cal $_ini
  65. asp 16
  66. .
  67. .
  68. .in -5m
  69. .po
  70. The following files in the run time library have been changed:
  71. .in +1m
  72. pc_file.h
  73. hlt.c
  74. ini.c
  75. opn.c
  76. pentry.c
  77. pexit.c
  78. .in -1m
  79. .fi
  80. .bp
  81. .po