On 16/02/2018 12:50, pjwitte via Ql-Users wrote:
On 16/02/2018 10:27, Jan Bredenbeek via Ql-Users wrote:
<>
SBASIC bahaves in much the same way as QLiberated programs. I guess
QLib has always used the Common Heap for its names and variables, as
SBASIC does now. Also a6 is fixed under both models (and Turbo); the
only reason to double index references is where it is necessary to
maintain compatibility with SuperBASIC.
I made a quick test today regarding what I stated above about QLib:
10 ch = FOPEN('con')
11 m = FREE_MEM
12 DIM a$(32000, 200)
13 PRINT#ch; HEX$(m - FREE_MEM, 32)
14 PAUSE#ch
I compiled it with QLib; dataspace 3.5Kb. It proves that QLib reserves
memory in the CHP rather than being bound within its dataspace. Some
470 bytes additional to the array+descriptor requirements were taken,
so whether it performs the same stunt as SBASIC and creates a whole
new name table/name list area once it outgrows an old one, or just
reserves room for the array and some extra, is not revealed by this
simple test.
I seem to recall, back in the mists of time, that QLib (or was it
SuperCharge?) had this restriction: Everything had to fit within the
dataspace; if you DIMed large arrays etc, you needed to increase your
dataspace accordingly.
If Ive understood correctly, SBASIC sets up each array in its own
heap. That doesnt seem to be the case with QLib, but I cant say for sure..
P
_______________________________________________
QL-Users Mailing List