Listing generated code from ALGOL compiler

30 views
Skip to first unread message

Peter...@hotmail.com

unread,
Sep 7, 2023, 7:48:47 PM9/7/23
to retro-B5500
I've been trying to turn on the listing of generated code on a simple factorial program written in ALGOL. From what I've read, I need a $SET LIST DEBUGN  option card before the program text and after the ?DATA CARD card (see below.) I don't see any generated code. 

?COMPILE QUIRK/FACT WITH ALGOL
?DATA CARD
$SET LIST DEBUGN
BEGIN
    INTEGER PROCEDURE FACTORIAL(N); INTEGER N;
    BEGIN
        INTEGER I, FACT;
        FACT := 1;
        FOR I := 2 STEP 1 UNTIL N DO
            FACT := FACT | I; COMMENT | IS MULTIPLY ;
        FACTORIAL := FACT
    END;

    INTEGER I;
    FILE PRINT 4(2,15);
    FORMAT FMT(I2,X3,I10);
    FOR I:=1 STEP 1 UNTIL 10 DO WRITE(PRINT, FMT, I, FACTORIAL(I));
    END.
?END

Peter...@hotmail.com

unread,
Sep 7, 2023, 8:03:24 PM9/7/23
to retro-B5500
Sid McHarg pointed out that I should have used $CARD LIST PRT SINGLE DEBUGN instead of $SET ...

Sid McHarg

unread,
Sep 12, 2023, 5:58:36 AM9/12/23
to Peter...@hotmail.com, retro-B5500
With the 

BURROUGHS B-5700 ALGOL COMPILER MARK XV.3.00   THURSDAY, 09/07/23,

compiler, this did the trick for me:

$CARD LIST PRT SINGLE DEBUGN

Might you be using a newer compiler where DEBUGN may have been replaced by CODE if an effort for compatibility with the B65/B6700?

-Sid

--
You received this message because you are subscribed to the Google Groups "retro-B5500" group.
To unsubscribe from this group and stop receiving emails from it, send an email to retro-b5500...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/retro-b5500/eec3719b-7e3a-4901-83ce-d79e4b649ea7n%40googlegroups.com.

Sid McHarg

unread,
Sep 12, 2023, 5:58:42 AM9/12/23
to Peter...@hotmail.com, retro-B5500
In looking at the XV.3 Algol compiler it appears the implementation included several new dollar options:

$SET, $RESET, and $POP
$OMIT
$BEND - which prints the sequence number of the corresponding BEGIN when the END is encountered

A short example program listing is attached.

-Sid

PACKET_SID@0909201754.txt
Reply all
Reply to author
Forward
0 new messages