Table of Contents

RCHANNEL Source

References

Source Listing

RCHANNEL.MACRO.txt
  1. MACRO 00001000
  2. RCHANNEL &ADDRESS=,&CHTYPE= 00002000
  3. .* THIS MACRO GENERATES A REAL CHANNEL BLOCK 00005000
  4. GBLA &CHADDR,&DEC,&RCHCNT 00006000
  5. GBLA &RDVCNT,&RCUCNT 00006500
  6. GBLB &RCODE 00007000
  7. GBLC &HEX,&CHTBL(16),&CUTBL(512) 00008000
  8. LCLA &COUNT,&INDEX 00009000
  9. LCLC &NAME,&RCHTYPE 00010000
  10. AIF (&RDVCNT EQ 0 OR &RCUCNT EQ 0).ERR15 00010500
  11. AIF (K'&ADDRESS NE 1).ERR1 00011000
  12. &HEX SETC '&ADDRESS' 00012000
  13. HEXDEC 00013000
  14. AIF (&RCODE).ERR1 00014000
  15. &CHADDR SETA &DEC 00015000
  16. &INDEX SETA &CHADDR*32+1 00016000
  17. &NAME SETC 'RCHAN'.'&ADDRESS' 00017000
  18. AIF ('&CHTYPE' NE 'MULTIPLEXER').MPX2 00017100
  19. &RCHTYPE SETC 'RCHMPX' 00017200
  20. AGO .TOK 00017300
  21. .MPX2 ANOP 00017400
  22. AIF ('&CHTYPE' NE 'MULTIPLEXOR').SEL 00018000
  23. &RCHTYPE SETC 'RCHMPX' 00019000
  24. AGO .TOK 00020000
  25. .SEL AIF ('&CHTYPE' NE 'SELECTOR').BMX 00021000
  26. &RCHTYPE SETC 'RCHSEL' 00022000
  27. AGO .TOK 00023000
  28. .BMX AIF ('&CHTYPE' NE 'BLKMPXR').ERR2 00024000
  29. &RCHTYPE SETC 'RCHBMX' 00025000
  30. .TOK AIF (&RCHCNT NE 0).N1ST 00026000
  31. ENTRY DMKRIOCH 00027000
  32. DMKRIOCH DS 0D 00028000
  33. .N1ST ANOP 00029000
  34. &CHTBL(&CHADDR+1) SETC '&NAME' 00030000
  35. &NAME DS 0D 00031000
  36. DC XL2'&ADDRESS.00' - RCHADD 00032000
  37. DC H'0' - RCHLOCK 00033000
  38. DC AL1(0) - RCHSTAT 00034000
  39. DC AL1(&RCHTYPE+RCH370) -RCHTYPE 00035000
  40. DC H'0' - RESERVED 00036000
  41. DC A(&NAME) - RCHFIOB 00037000
  42. DC A(&NAME) - RCHLIOB 00038000
  43. DC 4X'00' - ERROR COUNTS 00039000
  44. DC F'0' - RESERVED 00040000
  45. DC A(&NAME) - RCHRSTQ 00041000
  46. DC F'0' - RCHOPER 00042000
  47. DS 0D RCHCUTBL 00043000
  48. &COUNT SETA 1 00044000
  49. .LOOP ANOP 00045000
  50. AIF ('&CUTBL(&INDEX)' EQ '').SKIP 00046000
  51. DC AL2(&CUTBL(&INDEX)-DMKRIOCU) 00047000
  52. AGO .CONT 00048000
  53. .SKIP ANOP 00049000
  54. DC H'-1' 00050000
  55. .CONT ANOP 00051000
  56. &COUNT SETA &COUNT+1 00052000
  57. &INDEX SETA &INDEX+1 00053000
  58. AIF (&COUNT LE 32).LOOP 00054000
  59. &RCHCNT SETA &RCHCNT+1 00055000
  60. EJECT 00056000
  61. MEXIT 00057000
  62. .ERR1 MNOTE 8,'INVALID CHANNEL ADDRESS' 00058000
  63. MEXIT 00059000
  64. .ERR2 MNOTE 8,'INVALID CHANNEL TYPE' 00060000
  65. MEXIT 00060300
  66. .ERR15 MNOTE 12,'RCHANNEL MACRO OUT OF SEQUENCE' 00060700
  67. MEND 00061000