User Tools

Site Tools


ibm:vm370-lib:macro:count.macro_src

COUNT Source

References

Source Listing

COUNT.MACRO.txt
  1. MACRO @V407508 00001000
  2. &NAME COUNT &CTVALUE,&R1,&R2 @V407508 00002000
  3. GBLB &AP @V407508 00003000
  4. LCLC &W1,&W2,&IN @V407508 00004000
  5. &IN SETC '&SYSNDX' @V407508 00005000
  6. AIF (T'&NAME EQ 'O').NOLAB @V407508 00006000
  7. &NAME DS 0H @V407508 00007000
  8. .NOLAB ANOP @V407508 00008000
  9. AIF (T'&CTVALUE EQ 'O').ERR1 @V407508 00009000
  10. &W1 SETC 'R14' @V407508 00010000
  11. &W2 SETC 'R15' @V407508 00011000
  12. AIF (T'&R1 EQ 'O').REG1 @V407508 00012000
  13. &W1 SETC '&R1' @V407508 00013000
  14. AIF ('&W1'(1,1) EQ 'R').REG1 @V407508 00014000
  15. &W1 SETC 'R&W1' @V407508 00015000
  16. .REG1 AIF ('&AP' EQ '0').UP @V407508 00016000
  17. AIF (T'&R2 EQ 'O').REG2 @V407508 00017000
  18. &W2 SETC '&R2' @V407508 00018000
  19. AIF ('&W2'(1,1) EQ 'R').REG2 @V407508 00019000
  20. &W2 SETC 'R&W2' @V407508 00020000
  21. .REG2 AIF ('&W1' EQ '&W2').ERR2 @V407508 00021000
  22. L &W2,&CTVALUE GET ORIGINAL VALUE OF COUNT @V407508 00022000
  23. COU&IN.A DS 0H @V407508 00023000
  24. LA &W1,1 LOAD INCREMENT OF 1 @V407508 00024000
  25. ALR &W1,&W2 ADD TO ORIGINAL COUNT @V407508 00025000
  26. TM APSTAT1,APUOPER IS THE AP OPERATIONAL? @V407508 00026000
  27. BZ COU&IN.B NO, SKIP C&S INSTRUCTION @V407508 00027000
  28. CS &W2,&W1,&CTVALUE TRY TO INCREMENT COUNT @V407508 00028000
  29. BNE COU&IN.A IF NOT SUCCESSFUL, TRY AGAIN @V407508 00029000
  30. B COU&IN.C IF SUCCESSFUL, ALL DONE @V407508 00030000
  31. COU&IN.B ST &W1,&CTVALUE INCREMENT COUNT WITHOUT C&S @V407508 00031000
  32. COU&IN.C DS 0H @V407508 00032000
  33. MEXIT @V407508 00033000
  34. .UP ANOP @V407508 00034000
  35. LA &W1,1 GET INCREMENT OF 1 @V407508 00035000
  36. AL &W1,&CTVALUE ADD TO ORIGINAL COUNT @V407508 00036000
  37. ST &W1,&CTVALUE STORE UPDATED COUNT @V407508 00037000
  38. MEXIT @V407508 00038000
  39. .ERR1 MNOTE 8,'REQUIRED POSITIONAL OPERAND MISSING' @V407508 00039000
  40. MEXIT @V407508 00040000
  41. .ERR2 MNOTE 8,'INVALID REGISTER SPECIFICATION' @V407508 00041000
  42. MEND @V407508 00042000
ibm/vm370-lib/macro/count.macro_src.txt ยท Last modified: 2023/08/06 13:38 by Site Administrator