4.5.2025

Just came across a nice short REXX program posted by Lyonel Dyck in the System Z enthusiasts discord.

It demonstrates now to elegantly walk memory with REXX. I am sure it will become handy one day.

/* rexx */                                          
cvt      = ptr(16)           /* x10  */             
cvtjesct = ptr(cvt+296)      /* x128 */             
ssct     = ptr(cvtjesct+24)  /* x18  */             
do forever                                          
   name = stg(ssct+8,4)                             
   if name = '00000000'x then leave                 
   say 'name:' name c2x(name)                       
   ssct = ptr(ssct+4)                               
   end                                              
exit 0                                              
  ptr: return c2d(storage(d2x(arg(1)),4))           
  stg: return storage(d2x(arg(1)),arg(2))