• SVS Pascal: mandelbrot demo

    From Martin@21:1/5 to All on Tue Mar 15 19:40:54 2022
    Ported from the CB68 CBASIC Compiler Demo


    $ ./cpmsim.sh
    Read 32768 bytes from boot track


    CP/M-68K(tm) Version 1.2 03/20/84
    Copyright (c) 1984 Digital Research, Inc.

    CP/M-68K BIOS Version 1.0
    Simulated system of April 2014
    TPA =16251 K

    AUTOST.SUB

    INIT.REL M
    Do you really want to init disk M ?
    a:

    type mandel.for
    PROGRAM MANDEL
    REAL CA, CB, A, B, T
    INTEGER X, Y, I, K
    CHARACTER CH*1
    CHARACTER*80 OUT

    DO 300, Y=-12,12
    DO 200, X=-39,39
    CA=X*0.0458
    CB=Y*0.08333
    A=CA
    B=CB
    K=99
    DO 100, I=0,15
    IF (K .NE. 99) GOTO 100
    T=A*A-B*B+CA
    B=2.0*A*B+CB
    A=T
    IF ((A*A+B*B) .GT. 4.0) K=I
    100 CONTINUE
    IF (K .GT. 9) K=K+7
    IF (K .GT. 99) OUT(X+40:X+40)=' '
    IF (K .LT. 99) OUT(X+40:X+40)=CHAR(48+K)
    200 CONTINUE
    9000 FORMAT(1X,79A)
    WRITE(*,9000) OUT
    300 CONTINUE
    END

    b:f mandel

    B:FORTRAN.REL MANDEL.FOR
    MC68000 Fortran77 Compiler V2.1 01-Dec-83
    (C) Copyright 1983 Silicon Valley Software, Inc.

    MANDEL [16521650 bytes]
    {16520150 bytes}


    0 errors. 28 lines. File mandel.for
    Smallest available space: 16521650 bytes.

    B:CODE.REL MANDEL.I
    MC68000 Code Generator V2.1 01-Dec-83
    (C) Copyright 1983 Silicon Valley Software, Inc.

    MANDEL - MANDEL Code size = 386
    Total code size = 386

    B:ULINKER.REL -L MANDEL.O MANDEL.OBJ B:FTNLIB.OBJ B:PASLIB.OBJ
    MC68000 CPM Object Code Formatter V2.1 01-Dec-83
    (C) Copyright 1983 Silicon Valley Software, Inc.


    ERA MANDEL.OBJ

    C:LO68 -S -O MANDEL.68K -T10100 B:S.O MANDEL.O B:OPTOFF.O B:CLIB

    ERA MANDEL.O

    mandel
    000000011111111111111111122222233347E7AB322222111100000000000000000000000000000
    000001111111111111111122222222333557BF75433222211111000000000000000000000000000
    000111111111111111112222222233445C 643332222111110000000000000000000000000
    011111111111111111222222233444556C 654433332211111100000000000000000000000
    11111111111111112222233346 D978 BCF DF9 6556F4221111110000000000000000000000
    111111111111122223333334469 D 6322111111000000000000000000000
    1111111111222333333334457DB 85332111111100000000000000000000
    11111122234B744444455556A 96532211111110000000000000000000
    122222233347BAA7AB776679 A32211111110000000000000000000
    2222233334567 9A A532221111111000000000000000000
    222333346679 9432221111111000000000000000000
    234445568 F B5432221111111000000000000000000
    864332221111111000000000000000000
    234445568 F B5432221111111000000000000000000
    222333346679 9432221111111000000000000000000
    2222233334567 9A A532221111111000000000000000000
    122222233347BAA7AB776679 A32211111110000000000000000000
    11111122234B744444455556A 96532211111110000000000000000000
    1111111111222333333334457DB 85332111111100000000000000000000
    111111111111122223333334469 D 6322111111000000000000000000000
    11111111111111112222233346 D978 BCF DF9 6556F4221111110000000000000000000000
    011111111111111111222222233444556C 654433332211111100000000000000000000000
    000111111111111111112222222233445C 643332222111110000000000000000000000000
    000001111111111111111122222222333557BF75433222211111000000000000000000000000000
    000000011111111111111111122222233347E7AB322222111100000000000000000000000000000

    c:bbye
    CP/M-68K terminating normally

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin@21:1/5 to Martin on Tue Mar 15 19:43:28 2022
    Am 03/15/2022 07:40 PM, Martin schrieb:
    Ported from the CB68 CBASIC Compiler Demo


    OOPS :-O


    $ ./cpmsim.sh
    Read 32768 bytes from boot track


    CP/M-68K(tm) Version 1.2 03/20/84
    Copyright (c) 1984 Digital Research, Inc.

    CP/M-68K BIOS Version 1.0
    Simulated system of April 2014
    TPA =16251 K

    AUTOST.SUB

    INIT.REL M
    Do you really want to init disk M ?
    a:

    type mandel.pas
    program mandel;
    var
    ca, cb, a, b, t: real;
    x, y, i, k: integer;
    ch: char;

    begin
    for y := -12 to 12 do
    begin
    for x := -39 to 39 do
    begin
    ca := x * 0.0458;
    cb := y * 0.08333;
    a := ca;
    b := cb;
    k := 99;
    for i := 0 to 15 do
    if k = 99 then
    begin
    t := a * a - b * b + ca;
    b := 2.0 * a * b + cb;
    a := t;
    if (a * a + b * b) > 4.0 then k := i;
    end;
    if k > 9 then k := k + 7;
    if k > 99 then write(' ');
    if k < 99 then write(chr(48 + k));
    end;
    writeln;
    end
    end.

    b:p mandel

    B:PASCAL.REL MANDEL.PAS
    MC68000 Pascal Compiler V2.1 27-Feb-84
    (C) Copyright 1983 Silicon Valley Software, Inc.

    MANDEL [16520996 bytes]
    {16519934 bytes}

    0 errors. 31 lines. File mandel.pas

    B:CODE.REL MANDEL.I
    MC68000 Code Generator V2.1 27-Feb-84
    (C) Copyright 1983 Silicon Valley Software, Inc.

    MANDEL - MANDEL Code size = 286
    Total code size = 286

    B:ULINKER.REL -L MANDEL.O MANDEL.OBJ B:FTNLIB.OBJ B:PASLIB.OBJ
    MC68000 CPM Object Code Formatter V2.1 27-Feb-84
    (C) Copyright 1983 Silicon Valley Software, Inc.


    ERA MANDEL.OBJ

    C:LO68 -S -O MANDEL.68K -T10100 B:S.O MANDEL.O B:OPTOFF.O B:CLIB

    ERA MANDEL.O

    mandel 000000011111111111111111122222233347E7AB322222111100000000000000000000000000000 000001111111111111111122222222333557BF75433222211111000000000000000000000000000 000111111111111111112222222233445C 643332222111110000000000000000000000000 011111111111111111222222233444556C 654433332211111100000000000000000000000 11111111111111112222233346 D978 BCF DF9 6556F4221111110000000000000000000000 111111111111122223333334469 D 6322111111000000000000000000000 1111111111222333333334457DB 85332111111100000000000000000000 11111122234B744444455556A 96532211111110000000000000000000 122222233347BAA7AB776679 A32211111110000000000000000000 2222233334567 9A A532221111111000000000000000000 222333346679 9432221111111000000000000000000 234445568 F B5432221111111000000000000000000
    864332221111111000000000000000000 234445568 F B5432221111111000000000000000000 222333346679 9432221111111000000000000000000 2222233334567 9A A532221111111000000000000000000 122222233347BAA7AB776679 A32211111110000000000000000000 11111122234B744444455556A 96532211111110000000000000000000 1111111111222333333334457DB 85332111111100000000000000000000 111111111111122223333334469 D 6322111111000000000000000000000 11111111111111112222233346 D978 BCF DF9 6556F4221111110000000000000000000000 011111111111111111222222233444556C 654433332211111100000000000000000000000 000111111111111111112222222233445C 643332222111110000000000000000000000000 000001111111111111111122222222333557BF75433222211111000000000000000000000000000 000000011111111111111111122222233347E7AB322222111100000000000000000000000000000

    c:bbye
    CP/M-68K terminating normally

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)