From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <51ec0cc7d9a6045ecc67de893a082d6c@collyer.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] pointer to the last TOS Date: Thu, 2 Mar 2006 17:54:58 -0800 From: geoff@collyer.net In-Reply-To: <308c5cd1e1d85ace80c202f90e490d44@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 0a84e35e-ead1-11e9-9d60-3106f5b1d025 Another way to see the stack-manipulation instructions is to look at the output of 8l -a; here's the start of it using Brantley's example: : cpu; 8l -a t.8|p 001020 (776) TEXT put+0(SB),$12 001020 83ec0c (776) SUBL $12,SP 001023 b80c690000 (778) MOVL $.string<1>+0(SB),AX 001028 890424 (778) MOVL AX,(SP) 00102b 8b442410 (778) MOVL x+16(FP),AX 00102f 89442404 (778) MOVL AX,4(SP) 001033 e86e010000 (778) CALL ,11a6+print 001038 83c40c (778) ADDL $12,SP 00103b c3 (778) RET , 00103c (782) TEXT main+0(SB),$16 00103c 83ec10 (782) SUBL $16,SP 00103f b102 (786) MOVB $2,CX 001041 0fbec1 (787) MOVBLSX CX,AX 001044 890424 (787) MOVL AX,(SP) 001047 b803000000 (787) MOVL $3,AX 00104c 89442404 (787) MOVL AX,4(SP) 001050 e8cbffffff (787) CALL ,1020+put 001055 83c410 (787) ADDL $16,SP 001058 c3 (787) RET ,