Write data to disk (Software and gaming Foros MSX)MSX Resource Center            
                       
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 38 invitados y 2 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Software and gaming - Write data to disk

Autor

Write data to disk

Bryan_Fury
msx friend
Mensajes: 12
Publicado: Mayo 30 2005, 15:55   
I need to write and read a data in a disk, it's 2 bytes i wont save a counter in the disk. I don't know if exist a function like open ... for output as#1. In that case i don't remember the syntax....... this is only my idea, if exist another command to do that ..... better.

I need to save a counter and load it after the reset, I remember in the real msx1 when push the reset button the ram don't reinitialized, but in the emulator it's different.

I try in my MSX to write Poke 34000,12 ..... i reset and when i digit print peek(34000) the result is 12, but in the emulator it's not the same.

For that i need to write this counter in the disk then i can read the correct value after the reset.

Thans.


flyguille
msx master
Mensajes: 1237
Publicado: Mayo 30 2005, 16:10   
in basic it is
OPEN "filename" for output as#1
print#1,var
CLOSE#1

then

OPEN"filename" for input as#1
line input#1,a$:var=val(a$)
close#1



Bryan_Fury
msx friend
Mensajes: 12
Publicado: Mayo 30 2005, 16:20   
Thanks, i work on it immediately.
NYYRIKKI
msx master
Mensajes: 1533
Publicado: Mayo 30 2005, 21:04   
Quote:


I try in my MSX to write Poke 34000,12 ..... i reset and when i digit print peek(34000) the result is 12, but in the emulator it's not the same.


Many emulators have Hard reset (power off and power back on). and Soft reset (reset button). Hard reset is the one that clears memory as well. If your program just need to reset the computer, you can use DEFUSR=0:A=USR(0) to reset the computer without clearing the memory.

flyguille
msx master
Mensajes: 1237
Publicado: Mayo 30 2005, 21:49   
memry DRAM can save data up to 5 seconds and more without power.

up to 3 seconds is safe to get a clean data!

later you gets a bit corruptions

10 seconds and more it is all destroyed.

but that depends on brandname and model of ram chip
 
 







(c) 1994 - 2009 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation