Determining BASIC Base Address (Development MSX Fora)MSX Resource Center MSX Info Update - Finnish MSX madness at its best           
            
English Nederlands Español Português Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 132 gasten en 4 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - Determining BASIC Base Address

Schrijver

Determining BASIC Base Address

BiFi
msx guru
Berichten: 3142
Geplaatst: 08 Mei 2004, 18:49   
In this thread flyguille explains a few things the BASIC interpreter does to do a RENUM. This brought me to the following:

When saving a tokenized BASIC program it also saves the addresses it uses to point to the beginning of the next line. It's possible to change the BASIC Base address using:

POKE &HC000,0
POKE &HF676,1
POKE &HF677,&HC0

which changes the pointer from the default &H8000 (on MSX computers with at least 32 KB RAM) to &HC000 (which is the default for 16 KB RAM MSX computers).

I've been trying to figure out how BASIC determines the BASIC Base for that program to changes the addresses to the (newly set) BASIC Base on that computer. I haven't found the method yet, but maybe someone else already found out how things are done?

flyguille
msx master
Berichten: 1183
Geplaatst: 08 Mei 2004, 19:15   
one thing is the base address of all the basic program and other the current line number base address

It use diferent variables.

That base address of all the program is use on the RUN or LOAD "",R or CLOAD "",R commands TO:

so , the value in F676-7, (value +1), is used to set the variable "base address of the next line number to execute", and also the interpreter set a variable that say "which is the line number of that base address", so, if got a error, the ERL variable is set with that value. AND then run the basic engine......well, not forgot all events verifications done on each change of line number.

Well, i remember that, now, i got a lot of note of that when i dissasemble the basic interpreter 10 years before, because that i can't post more details...





flyguille
msx master
Berichten: 1183
Geplaatst: 08 Mei 2004, 19:19   
because that , you can change the base address of all the program without bothering the executing of the current basic program.

I not remember if the GOTO or GOSUB will to work after you change the base address of all the basic program. I think no.


 
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.