[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

+---------------+----------------------------+-------------------------+
| Ulrich Kuehn  | Internet:                  | Do they know that they  |
| Cand.Math.Inf | kuehn@math.uni-muenster.de | cannot eat their money? |
+---------------+----------------------------+-------------------------+