Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!portal!cup.portal.com!Sullivan From: Sullivan@cup.portal.com (sullivan - segall) Newsgroups: comp.sys.amiga.tech Subject: Re: Storage in Assembly Message-ID: <18289@cup.portal.com> Date: 13 May 89 00:42:04 GMT References: <15721@gryphon.COM> Distribution: na Organization: The Portal System (TM) Lines: 35 > > > I am trying to write a simple 3d object editor in Assembler and I need to >store tthe coordinates of the vertices, edges, faces and other things such as >properties and whole objects. In C I know how to do this, but in assembler I >can't usethe same arrays. I though about creating a eries of linked lists and >then,when the time comes, writing them to an output file. Ack! pffft! Everything in C is really just an analogue for an assembly programming technique If you want to use a linked list, go ahead, but if you want an array use an array. A typical assembly array is: DS 20 ;reserve 20 words for 20 array items Might be "BSS." I get Z80 and 68000 compiler pseudo ops mixed up. To access the array you can use indexed addressing, or just about anything else you like. (eg: MoveQ #0,D0 Lea TableLabel,A0 Move 0(A0,D0),D1 ) Fix the code to work. (As I said 68000 assembly isn't my language.) -ss -Sullivan Segall _________________________________________________________________ /V\ Sullivan was the first to learn how to jump without moving. ' Is it not proper that the student should surpass the teacher? To Quote the immortal Socrates: "I drank what?" -Sullivan _________________________________________________________________ Mail to: ...sun!portal!cup.portal.com!Sullivan or Sullivan@cup.portal.com