string in memory

Page 2/2
1 |

By NetNomad

Rookie (25)

NetNomad's picture

19-02-2021, 17:26

It's a less elegant solution but if you have a disk you could create an ASCII file and then use OPEN, PRINT and INPUT commands to read and write the string to and from the file

By Metalion

Paragon (1362)

Metalion's picture

19-02-2021, 18:34

NetNomad wrote:

It's a less elegant solution but if you have a disk you could create an ASCII file and then use OPEN, PRINT and INPUT commands to read and write the string to and from the file

I was exactly going to suggest that.
That's the "official" way the MSX was supposed to handle data transfer from one program to another.

By ~mk~

Champion (296)

~mk~'s picture

19-02-2021, 19:20

Similar to Thom's suggestion of using sprite data (maybe even uglier hehe) you could use VRAM, vpoke to the pattern table (e.g. extended ascii characters) and then vpeek.
Just make sure the second basic program does not reset it with SCREEN command.

By TheKid

Paragon (1152)

TheKid's picture

19-02-2021, 22:35

Thanks everyone for you help. I got a rather smart solution handed to me. It is by using the function keys.

1 GO$="TEST"
putting the string value in function key 7
2 KEY7,"'"+CHR$(LEN(GO$))+GO$
' reading the function key value
3 GI$="":GI=&HF8E0:FORL=1TOPEEK(GI):GI$=GI$+CHR$(PEEK(GI+L)):NEXTL
4 ?GI$

Page 2/2
1 |