Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.
Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
fpc -Mdelphi -vh -O3 mp.pas
fpc -Mdelphi -vh -O3 mads.pas
wget ht tp://mads.atari8.info/mads_210.7z
wget ht tp://mads.atari8.info/mp_162.7z
fpc -Mdelphi -v -O3 plik.pas
➜ docker run --rm -v `pwd`:/tmp frolvlad/alpine-fpc fpc -Mdelphi -v -O3 /tmp/mp.pas
Free Pascal Compiler version 3.0.4 [2017/10/03] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling /tmp/mp.pas
mp.pas(346,51) Note: Values in enumeration types have to be ascending
mp.pas(597,5) Note: Local variable "i" is assigned but never used
mp.pas(19627,16) Note: Local variable "AllocElementType" is assigned but never used
mp.pas(19628,5) Note: Local variable "NumAllocElements" is assigned but never used
mp.pas(23719,5) Note: Local variable "NumAllocElements" is assigned but never used
mp.pas(23953,22) Note: Local variable "AllocElementType" is assigned but never used
mp.pas(23955,1) Warning: Function result variable does not seem to initialized
mp.pas(29262,3) Note: Local variable "NumAllocTypes" not used
Linking /tmp/mp
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
31056 lines compiled, 8.6 sec
1 warning(s) issued
7 note(s) issued
FROM alpine:3.7
MAINTAINER Carlos Lopes "cmplopes67@gmail.com"
ENV FPC_VERSION="3.0.4" \
FPC_ARCH="x86_64-linux"
RUN apk add --no-cache binutils git && \
cd /tmp && \
wget "ftp://ftp.hu.freepascal.org/pub/fpc/dist/${FPC_VERSION}/${FPC_ARCH}/fpc-${FPC_VERSION}.${FPC_ARCH}.tar" -O fpc.tar && \
tar xf "fpc.tar" && \
cd "fpc-${FPC_VERSION}.${FPC_ARCH}" && \
rm demo* doc* && \
\
# Workaround musl vs glibc entrypoint for `fpcmkcfg`
mkdir /lib64 && \
ln -s /lib/ld-musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 && \
\
echo -e '/usr\nN\nN\nN\n' | sh ./install.sh && \
find "/usr/lib/fpc/${FPC_VERSION}/units/${FPC_ARCH}/" -type d -mindepth 1 -maxdepth 1 \
-not -name 'fcl-base' \
-not -name 'rtl' \
-not -name 'rtl-console' \
-not -name 'rtl-objpas' \
-exec rm -r {} \; && \
rm -r "/lib64" "/tmp/"*
RUN apk add --no-cache bash bash-doc bash-completion
RUN cd /tmp && \
git clone ->link<- && \
cd Mad-Pascal && \
fpc -Mdelphi -v -O3 mp.pas && \
cp mp /bin/
WORKDIR /source
CMD mp -iV
➜ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 9703b2fc9a12 21 minutes ago 109MB
➜ docker run --rm -v `pwd`:/tmp 9703b2fc9a12 mp
Mad Pascal Compiler version 1.6.3 [2019/11/19] for 6502
Syntax: mp <inputfile> [options]
-d Diagnostics mode
-define:symbol Defines the symbol
-ipath:<x> Add <x> to include path
-code:address Code origin hex address
-data:address Data origin hex address
-stack:address Software stack hex address (size = 64 bytes)
-zpage:address Variables on the zero page hex address (size = 24 bytes)
docker rm $(docker ps -qa)
docker container rm $(docker ps -qa)
docker rmi $(docker images -q)
docker image rm $(docker images -q)
RUN cd /root && \
git clone ->link<- && \
cd Mad-Pascal && \
fpc -Mdelphi -v -O3 mp.pas && \
ln -s /root/Mad-Pascal/mp /bin/mp
WORKDIR /source
CMD mp -iV
docker run --rm -v `pwd`:/tmp acb25c894b1e mp /tmp/80col.pas
Mad Pascal Compiler version 1.6.3 [2019/11/19] for 6502
Compiling /tmp/80col.pas
/root/Mad-Pascal/lib/graph.inc (672) Warning: lo/hi(dword/qword) returns the upper/lower word/dword
/root/Mad-Pascal/lib/graph.inc (673) Warning: lo/hi(dword/qword) returns the upper/lower word/dword
/tmp/80col.pas (36) Warning: Range check error while evaluating constants (8235 must be between 0 and 65535)
/tmp/80col.pas (36) Warning: Range check error while evaluating constants (8240 must be between 0 and 65535)
/tmp/80col.pas (36) Warning: Range check error while evaluating constants (8245 must be between 0 and 65535)
/tmp/80col.pas (36) Warning: Range check error while evaluating constants (8250 must be between 0 and 65535)
/tmp/80col.pas (36) Warning: Range check error while evaluating constants (8255 must be between 0 and 65535)
/tmp/80col.pas (36) Warning: Range check error while evaluating constants (8260 must be between 0 and 65535)
/tmp/80col.pas (36) Warning: Range check error while evaluating constants (8265 must be between 0 and 65535)
/tmp/80col.pas (37) Warning: Range check error while evaluating constants (8270 must be between 0 and 65535)
/tmp/80col.pas (63) Warning: Comparison might be always true due to range of constant and expression
/tmp/80col.pas (32) Note: Local const 'CHAR_SPACE' not used
81 lines compiled, 1.00 sec, 11111 tokens, 1064 idents, 305 blocks, 6 types
11 warning(s) issued
1 note(s) issued
garaz = array[0..2] of word;
motocykl = record
marka : string;
symbol : string[10];
predkoscmax : integer;
END;
garaz = array[0..2] of motocykl;
program hello;
uses crt;
type
motocykl = record
marka : string;
symbol : string[10];
predkoscmax : integer;
END;
var
garaz : array[0..2] of ^motocykl;
begin
Writeln('Hello ATARI!');
ReadKey;
end.
garaz = array[0..2] of motocykl;
type
player = record
gold: smallInt;
score: cardinal;
END;
var
players : array[0..3] of ^player;
begin
players[0].gold := 3;
players[1].gold := 4;
writeln('1p,players[0].gold);
writeln('2p',players[1].gold);
end.
program hello;
uses crt;
type
player = record
gold : smallInt;
score : cardinal;
end;
var
players : array[0..3] of ^player;
playerOne : player;
PlayerTwo : player;
begin
playerOne.gold := 2;
playerTwo.gold := 7;
players[0] := @playerOne;
players[1] := @playerTwo;
writeln('1p gold = ', players[0].gold);
writeln('2p gold = ', players[1].gold);
ReadKey;
end.
type
player = record
gold : smallInt;
score : cardinal;
end;
var
player0 : player;
Player1 : player;
Player2 : player;
Player3 : player;
players : array[0..3] of ^player = (@player0, @player1, @player2, @player3);
program hello;
uses crt;
type
player = record
gold : smallInt;
score : cardinal;
end;
var
players : array[0..3] of ^player;
playerOne : player;
PlayerTwo : player;
currentplayer: ^player;
begin
players[0] := @playerOne;
players[1] := @playerTwo;
currentplayer := players[0];
currentplayer.gold := 3;
currentplayer := players[1];
currentplayer.gold := 4;
writeln('1p gold = ', players[0].gold);
writeln('2p gold = ', players[1].gold);
ReadKey;
end.
program hello;
uses crt;
type
player = record
gold : smallInt;
score : cardinal;
end;
var
players : array[0..3] of ^player;
playerOne : player;
PlayerTwo : player;
currentplayer : ^player;
begin
players[0] := @playerOne;
players[1] := @playerTwo;
currentplayer := players[0];
currentplayer.gold := 1;
writeln(word(@currentplayer));
currentplayer := players[1];
currentplayer.gold := 8;
writeln(word(@currentplayer));
writeln('1p gold = ', players[0].gold);
writeln('2p gold = ', players[1].gold);
ReadKey;
end.
program hello;
uses crt;
type
player = record
gold : smallInt;
score : cardinal;
end;
var
players : array[0..3] of ^player;
playerOne : player;
PlayerTwo : player;
currentplayer : ^player;
begin
players[0] := @playerOne;
players[1] := @playerTwo;
currentplayer := players[0];
currentplayer.gold := 1;
Inc(currentplayer);
currentplayer.gold := 8;
writeln('1p gold = ', players[0].gold);
writeln('2p gold = ', players[1].gold);
ReadKey;
end.
astrofor:
Odkryłem że fix do mojego programu to writeln(word(@currentplayer));if(word(@currentplayer)=word(@currentplayer))then write('');
program hello;
uses crt;
type
player = record
gold : smallInt;
score : cardinal;
end;
var
players : array[0..3] of ^player;
playerOne : player;
PlayerTwo : player;
currentplayer : ^player;
begin
players[0] := @playerOne;
players[1] := @playerTwo;
currentplayer := players[0];
currentplayer^.gold := 1;
currentplayer := players[1];
currentplayer^.gold := 8;
writeln('1p gold = ', players[0].gold);
writeln('2p gold = ', players[1].gold);
ReadKey;
end.