Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!samsung!rex!rouge!dlbres14 From: dlbres14@pc.usl.edu (Brumley David M) Newsgroups: comp.sys.amiga.programmer Subject: Re: 68K Assembly language question (stack frames) Message-ID: Date: 27 Feb 91 22:11:04 GMT References: Sender: anon@rouge.usl.edu Organization: Univ. of Southwestern LA, Lafayette Lines: 28 In-reply-to: dillon@overload.Berkeley.CA.US's message of 22 Feb 91 20:06:14 GMT In article dillon@overload.Berkeley.CA.US (Matthew Dillon) writes: The stack looks like this: [pushed D0] [pushed D1] [RETURN PC] sp-> [LINK-SAVE-A6] thus, 0(A6) references the saved link register, A6, 4(A6) references the return-pc (from the BSR), and 8(A6) points to D1, and 10(A6) points to D0 ... the 'parameter 1' and 'parameter 2' comments are mixed up .... 8(A6) is D1, or parameter 2 by the first definition. If you relate this to C you should note that C always pushes parameters in reverse order, so parameter 1 would be pushed LAST, thus 8(A6) would be parameter one and 10(A6) parameter 2, etc... in C (16 bit compilation). which makes a lot more sense and suggests the authors' were in error. Too bad, otherwise, I like the style of Krantz and Stanley's _68000 Assembly Language: Techniques for Building Programs_. Any recommendations for other texts that describe the MC680x0 assembly language at an introductory->intermediate level? -- David M. Brumley