I want to look through the 'CONTROL_BLOCK' spec info in the memory,
and I can get the start memory address of 'CONTROL_BLOCK' by the way
of addr(CONTROL_BLOCK), but i do not know where is end of memory
address.
Is there any function to calculate 'CONTROL_BLOCK' structure allocated
memory size?
Many Thanks,
Kelvin
The BYTESIZE built-in should do the trick. Maybe something like:
PUT SKIP LIST('The size of CONTROL_BLOCK is', BYTESIZE(CONTROL_BLOCK));
Tim.
I usually stick something like "02 end_of_control_block char(0);" as the
last item, both to give me the end address and also to have all the
"real" declarations end with a comma, to avoid a silly syntax error if I
want to add something at the end and forget to change the ';" to a "'"
on the preceeding item.
Tim's "BYTESIZE" builtin is probably "STORAGE" or "SIZE" if this is IBM,
or you could compute it using "addr(end_of_control_block) -
addr(control_block)"
I usually stick something like "02 end_of_control_block char(0);" as the
It is very useful.
Thanks guys!
Best regards,
Kelvin