BBC BASIC
Programming >> Assembly Language >> Assembler use of static variables
http://bbcbasic.conforums.com/index.cgi?board=assembly&action=display&num=1522062735

Assembler use of static variables
Post by Richard Russell on Mar 26th, 2018, 11:12am

A proposal has been made at the discussion group that the BBC BASIC assembler be adapted for 64-bit addressing as follows:
(The 'code origin', O%, is virtually never used so is not considered here; see the group for more details).

The implication of this proposal is that allocation of memory for the assembler would need to be done like this, or similar:

Code:
      DIM limit -1, mcode size%, limit -1      FOR pass% = 8 TO 10 STEP 2        P% = !^mcode : Q% = mcode>>32        L% = !^limit : M% = limit>>32        [OPT pass%        ....        ]      NEXT pass% 

An alternative approach, using the 64-bit indirection operator in the 64-bit versions of BBC BASIC, would be as follows:

Code:
      DIM limit -1, mcode size%, limit -1      FOR pass% = 8 TO 10 STEP 2        ]^P% = mcode         ]^L% = limit        [OPT pass%        ....        ]      NEXT pass% 

If anybody has any comments on, or objections to, these proposals speak now or forever hold your peace!

Note that there is currently no 64-bit assembler to take advantage of these changes; I am relying on both the x86-64 and aarch64 assemblers being contributed by users, and to date nobody has offered to do so.

Richard.