Also try the following program:
Code: Select all
PROGRAM FIB(INPUT,OUTPUT);
VAR I,N: INTEGER;
FUNCTION FIB(N:INTEGER);
BEGIN
IF N=0 THEN FIB:=0;
IF N=1 THEN FIB:=1;
IF N>1 THEN FIB:=FIB(N-1)+FIB(N-2);
END;
BEGIN
WRITELN("HOW MANY NUMBERS?");
READ(N);
FOR I:=1 TO N DO
WRITELN(I,"TH FIB.NUM IS ",FIB(I));
END.
Sadly I did not manage to get the full 32k in the ZXpand+ to work. I poked the RAMTOP with POKE 16389,192 like the manual said and then typed CONFIG "M=H" and then started the Compiler. In edit mode it gives me ERROR=1 meaning: RAMTOP is set wrong?? Has someone a hint for me?
Greetings