[Coco] MAMOU bug?

Lothan lothan at newsguy.com
Wed Jan 23 23:22:18 EST 2013


I just checked the mamou code and I think I see the problem. If you search 
for the _rlist function in h6309.c, you'll see this code. It looks as if the 
code used to check to ensure S wasn't pushed or pulled from the S stack and 
U wasn't pushed or pulled from the U stack. This check was commented out and 
replaced with a simpler version that isn't checking for the S register (RS). 
It looks as if the first if needs to have || j == RS added.

It probably wouldn't hurt to change #if 0 to #if 1 to put the secondary 
checks back in place assuming this code is still technically correct.

        /* check for valid registers which can be used in push/pull 
operations */
        if (!(j == RPC || j == RU || j == RY || j == RX || j == RDP || j == 
RD || j == RA || j == RB ||  j == RCC))
        {
            error(as, "illegal register name");
        }
#if 0
        else if (j == RS && (opcode == 52))
        {
            error(as, "can't push S on S");
        }
        else if (j == RU && (opcode == 54))
        {
            error(as, "can't push U on U");
        }
        else if (j == RS && (opcode == 53))
        {
            error(as, "can't pull S from S");
        }
        else if (j == RU && (opcode == 55))
        {
            error(as, "can't pull U from U");
        }
#endif
        else
        {
            pbyte |= _regs[j];
            as->cumulative_cycles += rcycl[j];
        }

-----Original Message----- 
From: Willi Kusche
Sent: Wednesday, January 23, 2013 5:55 PM
To: coco at maltedmedia.com
Subject: [Coco] MAMOU bug?

Hi!

    I get an error when I try to assemble " pshu s".  The error is
"illegal register name".

Willi

--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list