home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / language / bcpl / BCPL / alib / BcplMacsB < prev    next >
Encoding:
Text File  |  1986-04-23  |  1.9 KB  |  152 lines

  1. pc        RN    15
  2. r14        RN    14
  3. rb        RN    8
  4. rl        RN    12
  5. rts        RN    11
  6. rp        RN    10
  7. rg        RN    9
  8. rgb        RN    7
  9. w1        RN    4
  10. w2        RN    5
  11. nil        RN    13
  12. nilbase     RN    6
  13. r0        RN    0
  14. a1        RN    4
  15. a2        RN    3
  16. a3        RN    2
  17. a4        RN    1
  18.  
  19. ; SWI calls
  20. KWrch        *    0
  21. KWrite0     *    2
  22. KNewline    *    3
  23. KRdch        *    4
  24. KCLI        *    5
  25. KByte        *    6
  26. KWord        *    7
  27. KFile        *    8
  28. KArgs        *    9
  29. KBget        *    &a
  30. KBput        *    &b
  31. Kgbpb        *    &c
  32. KFind        *    &d
  33. KControl    *    &f
  34. KReadEnv    *    &10
  35. KExit        *    &11
  36. KSetEnv     *    &12
  37. KCallBack    *    &15
  38.  
  39. PSRBits     *    &fc000000
  40. OverflowBit    *    &10000000
  41.  
  42. ; 3rd argument (what to do) for SetEventHandler
  43. ev_ignore    *    0
  44. ev_set_flag    *    1
  45. ev_call_proc    *    2
  46. ev_buffer    *    3
  47.  
  48.     GBLA    xxrelocs
  49.     GBLA    xxglobs
  50.     GBLA    xxtopglobal
  51.     GBLA    tempa
  52.     GBLS    temps
  53. xxrelocs SETA    0
  54. xxglobs SETA    0
  55. UserGlobals * 150
  56.  
  57. xxtopglobal SETA  UserGlobals
  58.  
  59.     MACRO
  60.     Module $name,$date
  61. Start
  62.     =    "BCPL"
  63.     &    globinits-Start
  64.     =    ("$name":CC:"        "):LEFT:8
  65.  [ "$date"=""
  66.     =    "<unset> <unset>",0,0,0,0,0
  67.   |
  68.     =    "$date",0,0
  69.  ]
  70.     &    0
  71.     MEND
  72.  
  73.     MACRO
  74. $name    GlobNo $no
  75. G_$name *    ($no)*4
  76.  [ $no>xxtopglobal
  77. xxtopglobal SETA $no
  78.  ]
  79.     MEND
  80.  
  81.     MACRO
  82.     GlobDef $no,$name
  83.     &    -1
  84.     =    7,("$name":CC:"       "):LEFT:7
  85. G_$name *    ($no)*4
  86.  [ $no>xxtopglobal
  87. xxtopglobal SETA $no
  88.  ]
  89. temps    SETS    "xxgname":CC:"$xxglobs"
  90.     GBLS    $temps
  91. $temps    SETS    "$name"
  92. xxglobs SETA    xxglobs+1
  93. $name
  94.     MEND
  95.  
  96.     MACRO
  97.     GlobInits
  98. globinits
  99. tempa    SETA    0
  100.      WHILE tempa<xxglobs
  101. temps    SETS    "xxgname":CC:"$tempa"
  102. temps    SETS    $temps
  103.     GlobInit $temps
  104. tempa    SETA    tempa+1
  105.      WEND
  106.     MEND
  107.  
  108.     MACRO
  109. $lab    Address $value
  110.  [ "$lab"<>""
  111. $lab
  112.  ]
  113. temps    SETS    "rx":CC:"$xxrelocs"
  114. $temps
  115.     &    $value-Start
  116. xxrelocs SETA    xxrelocs+1
  117.     MEND
  118.  
  119.     MACRO
  120.     GlobInit $name
  121.     &    G_$name/4
  122. temps    SETS    "rx":CC:"$xxrelocs"
  123. $temps
  124.     &    $name-Start
  125. xxrelocs SETA    xxrelocs+1
  126.     MEND
  127.  
  128.     MACRO
  129.     EndModule
  130. globinits
  131. tempa    SETA    0
  132.      WHILE tempa<xxglobs
  133. temps    SETS    "xxgname":CC:"$tempa"
  134. temps    SETS    $temps
  135.     GlobInit $temps
  136. tempa    SETA    tempa+1
  137.      WEND
  138.     &    &$xxtopglobal
  139.     &    0
  140.  
  141.     &    &12345678
  142. tempa    SETA    0
  143.      WHILE tempa<>xxrelocs
  144. temps    SETS    "rx":CC:"$tempa"
  145. tempa    SETA    tempa+1
  146.     &    $temps-Start
  147.      WEND
  148.     &    &87654321
  149.     MEND
  150.  
  151.     END
  152.