From: "Peter Hunkeler"
That is my intent. I'm asking for an address in (dynamically allocated) storage (RX-type address) and a length that the macro is allowed to use at that address. I want to make sure the code the macro generates does not write beyond that area. If the area is to short, I want to inform the programmer, via MNOTE about this fact and tell how much storage is needed. This MNOTE will fail a successful assembly.

Under no circumstance must the macro generate code that would write into storage it has not been given and I don't want the error to be caught and displayed only at run time.

Peter,

IMHO there is no easy solution to catch an error leading to an MNOTE. My preference would be to rely on the same area mapping DSECT used to obtain the area in the first place. Then I'd reference inside your macro the "area_length" label of that DSECT. Thus the area mapping DSECT must be included wherever your macro is used. Now you can use any of the suggested methods to verify if "area_length LE 1234" at compile time, where "1234" is a hard coded constant in your macro. If subject to (frequent) change I'd append a version number, e.g. "area_length_V01" to the label in the DSECT (and your macro!) to catch changing one but forgetting the other and/or SYSLIB concatenation error.

Äs Grüessli,

Andreas Geissbühler

Reply via email to