Write data to disk (Software and gaming MSX Fora)MSX Resource Center MSXdev 2008 - MSX1 development bonanza!           
            
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 175 gasten en 4 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Software and gaming - Write data to disk

Schrijver

Write data to disk

Bryan_Fury
msx friend
Berichten: 12
Geplaatst: 30 Mei 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
Berichten: 1175
Geplaatst: 30 Mei 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
Berichten: 12
Geplaatst: 30 Mei 2005, 16:20   
Thanks, i work on it immediately.
NYYRIKKI
msx master
Berichten: 1474
Geplaatst: 30 Mei 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
Berichten: 1175
Geplaatst: 30 Mei 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 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.