mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 08:59:26 +02:00
rtl/atari: check for application/acc at startup
This commit is contained in:
parent
b4d8f2d1b6
commit
a237aaa1f5
@ -33,9 +33,22 @@ procedure PascalMain; external name 'PASCALMAIN';
|
||||
|
||||
{ this function must be the first in this unit which contains code }
|
||||
{$OPTIMIZATION OFF}
|
||||
procedure _FPC_proc_start(pd: PPD); cdecl; public name '_start';
|
||||
procedure _FPC_proc_start; cdecl; public name '_start';
|
||||
var pd: PPD;
|
||||
begin
|
||||
procdesc:=pd;
|
||||
asm
|
||||
move.l a0,d0
|
||||
beq @Lapp
|
||||
moveq #0,d1
|
||||
bra @Lacc
|
||||
@Lapp:
|
||||
move.l 8(a6),a0
|
||||
moveq #1,d1
|
||||
@Lacc:
|
||||
move.b d1,AppFlag
|
||||
move.l a0,procdesc
|
||||
end;
|
||||
pd:=procdesc;
|
||||
tpasize:=align(sizeof(pd^) + pd^.p_tlen + pd^.p_dlen + pd^.p_blen + stklen, sizeof(pointer));
|
||||
|
||||
if gemdos_mshrink(0, pd, tpasize) < 0 then
|
||||
|
@ -63,6 +63,7 @@ var
|
||||
argc: LongInt;
|
||||
argv: PPChar;
|
||||
envp: PPChar;
|
||||
AppFlag: Boolean; { Application or Accessory }
|
||||
|
||||
|
||||
{$if defined(FPUSOFT)}
|
||||
|
Loading…
Reference in New Issue
Block a user