string in memory

صفحة 2/2
1 |

بواسطة NetNomad

Rookie (31)

صورة NetNomad

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

بواسطة Metalion

Paragon (1456)

صورة Metalion

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.

بواسطة ~mk~

Champion (303)

صورة ~mk~

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.

بواسطة TheKid

Paragon (1236)

صورة TheKid

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$

صفحة 2/2
1 |