[Coco] Programming help needed

Paul Shoemaker paulfe3 at swbell.net
Sat Dec 1 19:59:23 EST 2018


Need some advice. I am trying to store to a disk file a 48x40 section from a PMODE 4 screen. 
The method I am attempting to use is to peek the byte values using a nested loop and save them as a string. For example, A$ = A$ + CHR$ (PEEK(&HE00+X+(Y*32))). Note I am storing the byte value as a CHR$ because doing so makes the completed string length only 240 bytes long. Creating the string is working fine; I have validated that. 
Saving the string to a disk file is not working, however. When I execute a WRITE #1,A$ followed by a PUT #1,<record #>, Disk BASIC is not saving entire contents of A$. I believe it is parsing the string as it goes or something, as it seems to be ignoring or even stopping on some "special" CHR$ codes.. like CHR$(0). 
Is there a way around this?
Thanks!
-Paul


More information about the Coco mailing list