BSAVE of assembler program resets the MSX Computer

Door SvaboMSX

Supporter (13)

afbeelding van SvaboMSX

14-11-2018, 23:55

Hello All,
I found a basic program which stores opcodes in adress &HF300 to &HF310.
Whenever I try to save these opcodes to disk (on real MSX hardware HB-201P) then while saving it resets the MSX Computer.
For saving I use:
BSAVE "ass1.bin",&HF300,&HF310
What do I do wrong?

Thank you

Aangemeld of registreer om reacties te plaatsen

Van Pencioner

Paragon (1034)

afbeelding van Pencioner

15-11-2018, 00:04

i think those addresses are too high, it might interfere with the stack data. weird selection of addresses - too close to the system area

Van Grauw

Ascended (8612)

afbeelding van Grauw

15-11-2018, 16:24

Without disk drive the upper memory address is F380H, with the stack right below it. However with a disk drive present the upper memory address is much lower to make room for the storage of disk system data. So memory addresses that high can’t be used and will overwrite disk system data and routines, hence your troubles saving to disk.

Your best option is to keep SHIFT pressed while booting the computer to disable the disk drive, freeing up the memory, and to save to cassette instead.

Van SvaboMSX

Supporter (13)

afbeelding van SvaboMSX

15-11-2018, 18:19

Hello All
thanks for answers.
The example program moves basic area away to get room for machine code.
The basic program is this :

10 CLEAR 255,&hF300 
20 FOR C=&HF300 TO &HF300+16::READ A$:POKE C,VAL("&H"+A$):NEXT C
30 DATA 3E,06,26,F7,2E,F9,77,3D,2B,77,2B,3E,02,32,F6,63,C9
40 DEFUSR1=&HF300

When looking via monitor it displays like this: (after running basic program)

>D F300,F313
F300 3E 06 26 F7   <.&.
F304 2E F9 77 3D   ..W=
F308 2B 77 2B 3E   +W+>
F30C 02 32 F6 63   .2.o
F310 C9 00 00 00    ...

So in that memory region no data are in. zero and ff.

I will try to save to cassette.
Really need to learn about memory maps.

Thank you

Van SvaboMSX

Supporter (13)

afbeelding van SvaboMSX

15-11-2018, 18:29

oh... just tried out looking at memory before I start the basic program.
Indeed. You are absolutely right... there are some data in

>D F300,F310
F300  00  00  00  00    ....
F304  00  00  01  00    ....
F308  00  00  02  00    ....
F310  00

Van Jipe

Paragon (1366)

afbeelding van Jipe

15-11-2018, 18:45

try analyse program for shift the LM to D300 if possible

Van SvaboMSX

Supporter (13)

afbeelding van SvaboMSX

15-11-2018, 19:06

Rockn Roll!!
Starting of D300 it works.
I changed the basic program.
Saved it.
Cleared memory
Loaded again in with BLOAD
typed in basic
print A
-> 1541


But still.... I need to sort that memory maps out.

Thank you