home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Interdit
/
pc-interdit.iso
/
memory
/
xms
/
memtest.pas
< prev
Wrap
Pascal/Delphi Source File
|
1994-10-28
|
3KB
|
99 lines
program Mem_test;
uses Memory,crt,gifunit;
var xmsh : array[1..2] of XMSHandle;
emsh : array[1..2] of EMSHandle;
procedure xms_test;
var ta : array[1..20] of word;
li : integer;
begin;
gotoxy(1,5); write('Orginal : ');
for li := 1 to 20 do begin;
ta[li] := li;
gotoxy(14,li+4);
write(ta[li]);
end;
readln;
gotoxy(21,5); write('sauve la mémoire XMS &');
gotoxy(21,6); write('rempli de 0 :');
Getmem_XMS(xmsh[1],40);
RAM_2_XMS(@ta,xmsh[1],40);
fillchar(ta,40,0);
for li := 1 to 20 do begin;
gotoxy(44,li+4);
write(ta[li]);
end;
readln;
gotoxy(54,5); write('Produit de nouveau la ');
gotoxy(54,6); write('mémoire XMS :');
Getmem_XMS(xmsh[2],40);
XMS_2_XMS(xmsh[1],xmsh[2],40);
XMS_2_RAM(@ta,xmsh[2],40);
for li := 1 to 20 do begin;
gotoxy(74,li+4);
write(ta[li]);
end;
readln;
Freemem_XMS(xmsH[1]);
Freemem_XMS(xmsH[2]);
end;
procedure Ems_test;
var ta : array[1..20] of word;
li : integer;
picptr : pointer;
begin;
getmem(picptr,64000);
Init_ModeX;
blackpal;
LoadGif('Exemple.gif',picptr,0,0);
Getmem_EMS(emsh[1],64000);
RAM_2_EMS(picptr,emsh[1],64000);
freemem(picptr,64000);
getmem(vscreen,64000);
fillchar(vscreen^,64000,123);
EMS_2_RAM(vscreen,emsh[1],64000);
p13_2_modex(0,16000);
setpal;
readln;
freemem(vscreen,64000);
Freemem_EMS(emsH[1]);
asm mov ax,0003; int 10h; end;
end;
begin;
clrscr;
writeln('Programme de démonstration de l''unité MEMORY ');
writeln('(c) 1994 par MICRO APPLICATION Auteur: Boris Bertelsons');
writeln;
writeln('Mémoire libre : ',Base_Free,' Octets');
writeln('XMS libre : ',XMS_Free,' Octets');
writeln('EMS libre : ',EMS_Free,' Octets');
writeln('XMS Version : ',hi(XMS_Version),'.',lo(XMS_Version));
writeln('EMS Version : ',hi(EMS_Version),'.',lo(EMS_Version));
readln;
clrscr;
writeln('Programme de démonstration de l''unité MEMORY ');
writeln('(c) 1994 par MICRO APPLICATION Auteur: Boris Bertelsons');
writeln;
writeln(' X M S - T E S T');
if XMS_existe then
xms_test
else
writeln('Pas de mémoire XMS disponible !');
clrscr;
writeln('Programme de démonstration de l''unité MEMORY ');
writeln('(c) 1994 par MICRO APPLICATION Auteur: Boris Bertelsons');
writeln;
writeln(' T E S T - E M S');
if EMS_existe then
ems_test
else
writeln('Pas de mémoire EMS disponible !');
end.