[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in crt0.cpp ?
>
> Hi,
> I just came across an interesting point: in crt0, there is a test for
> the program being started as accessory:
> subl a6, a6 | clear a6 for debuggers
> cmpw #0, a0 | test if acc or program
> beq __startprg | if a program, go elsewhere
> tstl a0@(36) | also test parent basepage pointer
> bne __startprg | for accs, it must be 0
> movel a0, Base | acc basepage is in A0
> lea a0@(252), sp | use the command line as a temporary stack
> jmp __acc_main | function is in crtinit.c
> But atari has documented that accessories are started with a0 containing
> the basepage pointer, they said nothing about the pointer to the parent's
> basepage.
> Why is there a test for the parent pointer to be zero?
> It might break some accessories written with gcc, or am I too pessimistic?
>
> Ulrich
Especially when started from MultiTOS, I think.
--
________________ cut here _________________________
Julian F. Reschke, Hensenstr. 142, D-W4400 Muenster
eMail: julian@math.uni-muenster.de, jr@ms.maus.de
________ correct me if I'm wrong __________________