How do SAVEM and CSAVEM files work?

Allen Huffman via Coco <coco-uNHYcr1XS/wmlAP/[email protected]>
Newsgroups gmane.comp.hardware.tandy.coco
Message-ID <[email protected]>
I just noticed that the lwasm assembler will generate multiple segments if you have an RMB in your code. For example:


     ORG $3F00
START RTS
    END

If you use the -fbasic option, you get a BASIC loader that loads data at 3F00, as expected

But if there is an RMB:

     ORG $3F00
START RTS
    RMB 10
    RTS
    END

…It makes two segments with a start-end for the first part (RTS) then a start-end for the next part, 10 bytes down.

I assume if I put this in memory and did a CSAVEM/SAVEM, it has no idea about gaps like that so the file itself will just be one continual block of data”

57 for RTS, then the zeros:

3F00: 57,0,0,0,0,0,0,0,0,0,0,57

But M files support segments, such as multiple ORG statements, don’t they?

     ORG $3F00
START RTS

    ORG $3F08
START2 RTS

    END

Is there any utility in toolshed, etc. that can dump an M file and show how it looks inside?

I’ve been curious about this since the early days of my CoCo. I would CLOADM some programs and see them draw on the 32 column screen (I assume with an ORG there) followed by loading the program wherever it loaded.

I am also assuming things like EDTASM would generate this when you compiled and saved to tape/disk.

		— A


-- 
Coco mailing list
[email protected]
https://pairlist5.pair.net/mailman/listinfo/coco
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.