Am 18.05.2016 um 13:15 schrieb Steve Hobson:
>From Bernd Oppolzer:
If you specify this global "baseless" parameter (specified at the
startup macro and controlling
all SP macros and the lightweight CALL and PROC macros), there is
only one base register
which covers the area after ENDPROC, allowing for up to 4 k of local
static variables
FWIW, if you can use the long-displacement instuctions then you can
access a pretty much unlimited amount of local static with one base
register.
Best regards, Steve Hobson
Thank you for your comments on this.
The macros I mentioned in my original post had their origins in a time
when all instructions
had 12 bit offsets, so that the range covered by one base register was 4
k only. Anyway: because
every function block has its own 4 k local static area and you can have
an unlimited number of them
in one module, the module size could be really large, in those long gone
times already, if you used
those (procedure) macros and the SP macros from the start. All function
blocks shared the same base
registers (one for the code area = 4k, one for the static area = 4k) and
then there were two for the
code area of the main line, two for the global static area, and this
still left some for other addressing
and computing tasks. Some large programs ran out of registers, anyway.
Going "baseless" made things
much easier.
Kind regards
Bernd