string in memory

Página 2/2
1 |

Por NetNomad

Resident (51)

imagem de 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

Por Metalion

Paragon (1625)

imagem de 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.

Por ~mk~

Champion (328)

imagem de ~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.

Por TheKid

Paragon (1238)

imagem de 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$

Página 2/2
1 |