CONNEXION
  • RetourJeux
    • Sorties
    • Hit Parade
    • Les + populaires
    • Les + attendus
    • Soluces
    • Tous les Jeux
    • Gaming
  • RetourActu Gaming
    • News
    • Astuces
    • Tests
    • Previews
    • Toute l'actu gaming
  • RetourBons plans
    • Bons plans
    • Bons plans Smartphone
    • Bons plans Hardware
    • Bons plans Image et Son
    • Bons plans Amazon
    • Bons plans Cdiscount
    • Bons plans Decathlon
    • Bons plans Fnac
    • Tous les Bons plans
  • RetourJVTech
    • Actus High-Tech
    • Intelligence Artificielle
    • Smartphones
    • Mobilité urbaine
    • Hardware
    • Image et son
    • Tutoriels
    • Tests produits High-Tech
    • Guides d'achat High-Tech
    • JVTech
  • RetourCulture
    • Actus Culture
    • Culture
  • RetourVidéos
    • A la une
    • Gaming Live
    • Vidéos Tests
    • Vidéos Previews
    • Gameplay
    • Trailers
    • Chroniques
    • Replay Web TV
    • Toutes les vidéos
  • RetourForums
    • Hardware PC
    • PS5
    • Switch 2
    • Xbox Series
    • Switch
    • Pokemon pocket
    • FC 25 Ultimate Team
    • League of Legends
    • Tous les Forums
  • PC
  • PS5
  • Xbox Series
  • Switch 2
  • PS4
  • One
  • Switch
  • iOS
  • Android
  • MMO
  • RPG
  • FPS
En ce moment Genshin Impact Valhalla Breath of the wild Animal Crossing GTA 5 Red dead 2
Liste des sujets

Pb en pascal

DJFullGore
DJFullGore
Niveau 8
25 avril 2004 à 18:09:00

salut,
lorsque je veux compiler les code source ci dessous,le compilateur me dit " cannot find CLAVIER".
Pourquoi?

{$M 2048,0,0}

program Sinus;

uses Clavier,EcranVga,Polic8x8;

const
TxtY = 100; Samp = 5; Slen = 255; { samp 0..30 / sofs = height }
Taille = 2; { min=1; cool=4; max=10 }
Curve = 3;
Xmax = 309 div Taille;
ScrSpd = -1;
ScrText : string =
´ Hai world... This looks a bit like the scroll of the second part´+
´ of Future Crew´´s Unreal demo ( part one)... It´´s not filled´+
´ but it sure looks nicer ( imho)... ´;

type
ScrArray = array[0..Xmax,0..7] of byte;

var
TableSin : array[0..Slen] of word;
BitMap : ScrArray;
X,I,SinIdx,vram : word;
Y,ScrIdx,CurChar : byte;

procedure CalcSinus; var I : word; begin
for I := 0 to Slen do TableSin[I] := round(sin(I*4*pi/Slen)*Samp); end;

procedure Scroll; begin
fillchar(BitMap,sizeof(BitMap),0);

ScrIdx := 1; SinIdx := 0;
repeat
Curchar := ord(ScrText[ScrIdx]);

inc(ScrIdx); if ScrIdx = length(ScrText) then ScrIdx := 1;

for I := 0 to 7 do begin
{ Dessine le caractŠre dans ´Bitmap´ }
move(BitMap[1,0],BitMap[0,0],Xmax shl 3);
for Y := 0 to 7 do
if ( (Police8x8^[CurChar,Y] shl I) and 128) < > 0 then
BitMap[Xmax,Y] := ( (ScrIdx+Y-I) mod 70)+32 else BitMap[Xmax,Y] := 0;

{ --- Le scrolling --- }
AttendEcran;
EffaceEcran ( 0);

for X := 0 to Xmax do
for Y := 0 to 7 do begin
vram := ( Taille*Y+TableSin[(SinIdx+X+Curve*Y) mod SLen]) +TxtY;
vram := vram shl 8 + vram shl 6 +Taille*X +TableSin[(X+Y) mod SLen];

if BitMap[X,Y] < >0 then Mem[$A000: vram] := BitMap[X,Y];
end;

SinIdx := ( SinIdx+ScrSpd) mod SLen;
{ -------------------- }
end;

until TouchPresse;
end;

begin
CalcSinus;

ModeVga256;

Scroll;

ModeTxt;
end.

Yoda_Software
Yoda_Software
Niveau 30
25 avril 2004 à 18:45:22

Tous simplement parce qu´il ne trouve pas l´unité CLAVIER que tu as déclarée dans la clause USES.
Peut-être parce qu´elle ne se trouve pas dans le répertoire défini dans les options de configuration.

DJFullGore
DJFullGore
Niveau 8
25 avril 2004 à 19:01:52

Quelle modif dois je faire?

Yoda_Software
Yoda_Software
Niveau 30
25 avril 2004 à 19:16:44

Regarde si les fichiers CLAVIER.pas ou CLAVIER.TPU existent quelque part sur ton disque
Va dans les options de configuration de ton compilateur, regarde le champs ´unit´ pour éventuellement rajouter/modifier le chemin vers les fichier que j´ai cités.

DJFullGore
DJFullGore
Niveau 8
25 avril 2004 à 19:48:16

ah ouais...
J´ai pas créé le fichier CLAVIER.pas , EcranVGA.pas et Polic8x8.pas

Comme je débute je sais pas trop ce qu´il faut mettre dans CLAVIER.PAS,Ecranvga.pas....

Yoda_Software
Yoda_Software
Niveau 30
25 avril 2004 à 19:59:19

? ???
Est-ce que par hasard ton programme principal ( celui que tu as donné plus haut) serait un programme récupéré quelque part ?

DJFullGore
DJFullGore
Niveau 8
27 avril 2004 à 21:22:54

oui

Yoda_Software
Yoda_Software
Niveau 30
27 avril 2004 à 21:57:46

Regarde voir si tu ne peux pas trouver les fichiers avec !

Technix59
Technix59
Niveau 5
09 mai 2004 à 16:22:25

{Essaye ça - Ca fonctionne sans aucune unité supplémentaire}

{$M 2048,0,0}
program Sinus;
{uses Clavier,EcranVga,Polic8x8;}
const
TxtY = 100;
Samp = 5;
Slen = 255; { samp 0..30 / sofs = height }
Taille = 2; { min=1; cool=4; max=10 }
Curve = 3;
Xmax = 309 div Taille;
Ymax = 7; {Hauteur du texte}
ScrSpd = -1;
ScrText : string =
´Hai world... This looks a bit like the ´+
´scroll of the second part ´+
´of Future Crew´´s Unreal demo ´+
´( part one)... It´´s not filled ´+
´but it sure looks nicer ( imho)... ´;

type
ScrArray = array[0..Xmax,0..7] of byte;

var
TableSin : array[0..Slen] of word;
BitMap : ScrArray;
X,I,SinIdx,vram : word;
Y,ScrIdx,CurChar : byte;
Fseg,Fofs : word;

procedure GetFont; assembler;
asm
mov ax,1130h;
mov bh,3; {Remettre mov bh,1 si la fonte apparait mal à l´écran}
int 10h;
mov Fseg,es;
mov Fofs,bp;
end;

procedure SetGraphics(Mode : word); assembler;
asm
mov ax,Mode;
int 10h
end;

function keypressed : boolean; assembler;
asm
mov ah,0bh;
int 21h;
and al,0feh;
end;

{Fast ClearScreen}
Procedure ClearScr; Assembler;
Asm
mov ax, $A000
mov es, ax
xor di, di
xor ah, ah
mov cx, 32000
rep stosw
end;

procedure CalcSinus;
var
I : word;
begin
for I := 0 to Slen do
TableSin[I] := round(sin(I*4*pi/Slen)*Samp);
end;

procedure Scroll;
begin
fillchar(BitMap,sizeof(BitMap),0);
ScrIdx := 1;
SinIdx := 0;
repeat
Curchar := ord(ScrText[ScrIdx]);
inc(ScrIdx);
if ScrIdx = length(ScrText) then
ScrIdx := 1;
for I := 0 to 7 do
begin
{Dessine le caractère dans ´Bitmap´}
move(BitMap[1,0],BitMap[0,0],Xmax shl 3);
for Y := 0 to 7 do
{if ( ( Police8x8^[CurChar,Y] shl I) and 128) < > 0}
if ( (mem[Fseg:Fofs+8*CurChar+Y] shl I) and 128) < > 0
then BitMap[Xmax,Y] := ( ( ScrIdx+Y-I) mod 70)+32
else BitMap[Xmax,Y] := 0;
{ --- Le scrolling --- }
{Nouveau AttendEcran;}
while ( port[$3da] and 8) < > 0 do;
while ( port[$3da] and 8) = 0 do;
{Routine qui attend la fin de raffraichissement de l´écran}
{Fin Nouveau AttendEcran :}

{EffaceEcran ( 0);}
ClearScr;

for X := 0 to Xmax do
for Y := 0 to 7 do
begin
vram := ( Taille*Y+TableSin[(SinIdx+X+Curve*Y) mod SLen]) +TxtY;
vram := vram shl 8 + vram shl 6 +Taille*X +TableSin[(X+Y) mod SLen];
if BitMap[X,Y] < >0 then
Mem[$A000: vram] := BitMap[X,Y];
end;
SinIdx := ( SinIdx+ScrSpd) mod SLen;
{ -------------------- }
end;
until KeyPressed;
end;

begin
{Avant
CalcSinus;
ModeVga256;
Scroll;
ModeTxt;
}
{Maintenant}
CalcSinus;
GetFont;
SetGraphics($13);
Scroll;
SetGraphics(3);
end.

Sous forums
  • Aide à l'achat Mac
  • Internet
  • Macintosh
  • Création de sites web
  • Création de Jeux
  • Linux
  • Programmation
  • Steam Deck
  • Hardware
La vidéo du moment