Determining BASIC Base Address (Development Foros MSX)MSX Resource Center MSX Info Update - Finnish MSX madness at its best           
                       
English Nederlands Español Português Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 131 invitados y 1 miembro en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - Determining BASIC Base Address

Autor

Determining BASIC Base Address

BiFi
msx guru
Mensajes: 3142
Publicado: Mayo 08 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
Mensajes: 1181
Publicado: Mayo 08 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
Mensajes: 1181
Publicado: Mayo 08 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 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation