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
C>AUTOST.SUB
C>INIT.REL M
Do you really want to init disk M ?
C>a:
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.
A>b:p mandel
A>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
A>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
A>B:ULINKER.REL -L MANDEL.O MANDEL.OBJ B:FTNLIB.OBJ B:PASLIB.OBJ
MC68000 CPM Object Code Formatter V2.1 27-Feb-84