Edasm Macros

Include new and ported/converted games, and old games/tools. Subjects about CP/M software goes in the CP/M Forum.
Post Reply
User avatar
thewiz
Posts: 120
Joined: 12 Aug 2012 16:08

Edasm Macros

Post by thewiz » 17 Dec 2013 14:33

I've converted the Edasm macros from tape and been pleasantly surprised when I was able to load them into MEMU.

It appears that EDASM must use the ROM routine at 0x0AAE to load files as all I did was add the converted macro data to the end of the EDASM mtx file.

The format of the file is:

0xd3 <11 bytes for filename> <2 byte length> <2 byte load addr>

The actual file has some simple RLE compression. I wrote a quick and dirty perl script to turn it into text. Note the file I used had the filename removed:

Code: Select all

#!/usr/bin/perl

open INPFILE, "<", "edas_data.bin";

binmode INPFILE;

my ($inpbyt, $ordbyt, $repchar, $repcnt, $loop);

while (!eof INPFILE) {

        read INPFILE, $inpbyt, 1;

        $ordbyt = ord ($inpbyt);

        #printf ("byt: %d\n", $ordbyt);

        if (($ordbyt >= 32) && ($ordbyt < 128)) {
                printf ("%s", $inpbyt);
        } elsif ($ordbyt == 1) {

                read INPFILE, $repchar, 1;      # char to repeat
                read INPFILE, $repcnt, 1;       # repeat + $80
                for ($loop = 0 ; $loop < (ord( $repcnt) & 0x7f); $loop++) {
                        printf ("%s", $repchar);
                }

        } elsif ($ordbyt == 13) {               # New Line
                printf ("\n");
        } elsif ($ordbyt == 9) {                # Tab
                printf ("\t");
        } elsif ($ordbyt == 26) {               # End of File
                printf ("\n");
        } else {
                printf ("byt: %d\n", $ordbyt);
                exit;
        }

}

1;
I've attached the resultant text file.



Enjoy.
Attachments
edasm_macros.rar
(1.93 KiB) Downloaded 148 times
THIS is what Memotech is doing now.

Post Reply