From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] APE's main From: "Russ Cox" Date: Thu, 26 Apr 2007 11:14:28 -0400 In-Reply-To: <27050359ad27ccadb8481c8da8b1f149@yourdomain.dom> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20070426151424.3428C1E8C2B@holo.morphisms.net> Topicbox-Message-UUID: 4f9abbde-ead2-11e9-9d60-3106f5b1d025 > lotte% yesterday -d /sys/src/ape/lib/ap/386/main9.s > diff /n/dump/2007/0426/sys/src/ape/lib/ap/386/main9.s /sys/src/ape/lib/ap/386/main9.s > 10a11 >> MOVL $_exits<>(SB), AX > 13a15,17 >> >> DATA _exits<>+0(SB)/4, $"main" >> GLOBL _exits<>+0(SB), $5 > My question is: "does this look right" ? no, not at all. you are passing "main" to the exit function, which expects an integer. the old one was correct: it passes the return value of int main() to exit. i'm confused about why changing the exit value would make things start working anyway. maybe it didn't really. my guess would be your actual problem is that draw and event use atexit, which ape doesn't provide. i'm surprised that you don't get link errors. russ