mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-24 02:11:43 +02:00
* RTLLITE conditional added to produce smaller RTL.
This commit is contained in:
parent
c48b67d0b3
commit
b66d7560f1
@ -50,8 +50,11 @@ var
|
||||
argv : ppchar;
|
||||
envp : ppchar;
|
||||
dos_argv0 : pchar;
|
||||
|
||||
{$ifndef RTLLITE}
|
||||
{ System info }
|
||||
Win95 : boolean;
|
||||
{$endif RTLLITE}
|
||||
|
||||
type
|
||||
{ Dos Extender info }
|
||||
@ -301,7 +304,7 @@ begin
|
||||
rv := 0;
|
||||
while (s^ <>#0) do
|
||||
begin
|
||||
v := ord(s^) - ord('0');
|
||||
v := byte(s^) - byte('0');
|
||||
if (v > 9) then v := v - 7;
|
||||
v := v and 15; { in case it's lower case }
|
||||
rv := rv*16 + v;
|
||||
@ -475,7 +478,7 @@ begin
|
||||
inc(longint(cp)); { skip to next character }
|
||||
end;
|
||||
envp[env_count]:=nil;
|
||||
inc(longint(cp),3);
|
||||
longint(cp):=longint(cp)+3;
|
||||
getmem(dos_argv0,strlen(cp)+1);
|
||||
if (dos_argv0 = nil) then halt;
|
||||
strcopy(dos_argv0, cp);
|
||||
@ -586,9 +589,11 @@ begin
|
||||
syscopytodos(longint(p),strlen(p)+1);
|
||||
regs.realedx:=tb and 15;
|
||||
regs.realds:=tb shr 4;
|
||||
{$ifndef RTLLITE}
|
||||
if Win95 then
|
||||
regs.realeax:=$7141
|
||||
else
|
||||
{$endif RTLLITE}
|
||||
regs.realeax:=$4100;
|
||||
regs.realesi:=0;
|
||||
regs.realecx:=0;
|
||||
@ -612,9 +617,11 @@ begin
|
||||
regs.realedx:=tb and 15 + strlen(p2)+2;
|
||||
regs.realds:=tb shr 4;
|
||||
regs.reales:=regs.realds;
|
||||
{$ifndef RTLLITE}
|
||||
if Win95 then
|
||||
regs.realeax:=$7156
|
||||
else
|
||||
{$endif RTLLITE}
|
||||
regs.realeax:=$5600;
|
||||
regs.realecx:=$ff; { attribute problem here ! }
|
||||
sysrealintr($21,regs);
|
||||
@ -830,9 +837,11 @@ begin
|
||||
end;
|
||||
{ real dos call }
|
||||
syscopytodos(longint(p),strlen(p)+1);
|
||||
{$ifndef RTLLITE}
|
||||
if Win95 then
|
||||
regs.realeax:=$716c
|
||||
else
|
||||
{$endif RTLLITE}
|
||||
regs.realeax:=$6c00;
|
||||
regs.realedx:=action;
|
||||
regs.realds:=tb shr 4;
|
||||
@ -890,9 +899,11 @@ begin
|
||||
syscopytodos(longint(@buffer),length(s)+1);
|
||||
regs.realedx:=tb and 15;
|
||||
regs.realds:=tb shr 4;
|
||||
{$ifndef RTLLITE}
|
||||
if Win95 then
|
||||
regs.realeax:=$7100+func
|
||||
else
|
||||
{$endif RTLLITE}
|
||||
regs.realeax:=func shl 8;
|
||||
sysrealintr($21,regs);
|
||||
if (regs.realflags and carryflag) <> 0 then
|
||||
@ -927,9 +938,11 @@ begin
|
||||
regs.realedx:=drivenr;
|
||||
regs.realesi:=tb and 15;
|
||||
regs.realds:=tb shr 4;
|
||||
{$ifndef RTLLITE}
|
||||
if Win95 then
|
||||
regs.realeax:=$7147
|
||||
else
|
||||
{$endif RTLLITE}
|
||||
regs.realeax:=$4700;
|
||||
sysrealintr($21,regs);
|
||||
if (regs.realflags and carryflag) <> 0 then
|
||||
@ -950,11 +963,11 @@ begin
|
||||
end;
|
||||
dir[2]:=':';
|
||||
dir[3]:='\';
|
||||
dir[0]:=chr(i+3);
|
||||
dir[0]:=char(i+3);
|
||||
{ upcase the string }
|
||||
dir:=upcase(dir);
|
||||
if drivenr<>0 then { Drive was supplied. We know it }
|
||||
dir[1]:=chr(65+drivenr-1)
|
||||
dir[1]:=char(65+drivenr-1)
|
||||
else
|
||||
begin
|
||||
{ We need to get the current drive from DOS function 19H }
|
||||
@ -971,6 +984,7 @@ end;
|
||||
SystemUnit Initialization
|
||||
*****************************************************************************}
|
||||
|
||||
{$ifndef RTLLITE}
|
||||
function CheckWin95:boolean;
|
||||
var
|
||||
regs : TRealRegs;
|
||||
@ -979,6 +993,7 @@ begin
|
||||
sysrealintr($2f,regs);
|
||||
CheckWin95:=(regs.realeax=0) and ((regs.realebx and $ff00)=$400);
|
||||
end;
|
||||
{$endif RTLLITE}
|
||||
|
||||
|
||||
procedure OpenStdIO(var f:text;mode:word;hdl:longint);
|
||||
@ -1013,7 +1028,11 @@ Begin
|
||||
End.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 1998-05-31 14:18:29 peter
|
||||
Revision 1.7 1998-06-15 15:17:08 daniel
|
||||
|
||||
* RTLLITE conditional added to produce smaller RTL.
|
||||
|
||||
Revision 1.6 1998/05/31 14:18:29 peter
|
||||
* force att or direct assembling
|
||||
* cleanup of some files
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user