Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Variable values of system variables in macros #237

Open
jirimosinger opened this issue Mar 15, 2022 · 1 comment
Open

Variable values of system variables in macros #237

jirimosinger opened this issue Mar 15, 2022 · 1 comment

Comments

@jirimosinger
Copy link
Contributor

Describe the bug
There are some system variables whose value can change within a macro (&SYSSTMT, &SYSM_HSEV, &SYSM_SEV)

To Reproduce

      MACRO            
      MAC &ARG         
&I    SETA 0           
.LOOP AIF (&I GE 2).END
L&ARG LHI 0,0          
&I    SETA &I+1        
      AGO .LOOP        
.END  ANOP             
      MEND             
      MAC &SYSSTMT     
      END   

Expected behavior

  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2022/03/14 12.56
                                      1       MACRO                                                             00030901
                                      2       MAC &ARG                                                          00031001
                                      3 &I    SETA 0                                                            00031101
                                      4 .LOOP AIF (&I GE 2).END                                                 00031201
                                      5 L&ARG LHI 0,0                                                           00032001
                                      6 &I    SETA &I+1                                                         00032101
                                      7       AGO .LOOP                                                         00032201
                                      8 .END  ANOP                                                              00032301
                                      9       MEND                                                              00032401
                                     10       MAC &SYSSTMT                                                      00032501
000000 A708 0000                     11+L00000011 LHI 0,0                                                       01-00005
000004 A708 0000                     12+L00000012 LHI 0,0                                                       01-00005
                                     13       END                                                               00032801

Platform

  • Editor: VS Code 1.65.2
  • OS: Windows
  • Plugin version: 1.0.0
@jirimosinger
Copy link
Contributor Author

jirimosinger commented Mar 15, 2022

See also section "Scope and variability of system variable symbols" of V1R6 Language Reference for a little bit more details

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant