shaulp@pnet02.cts.com (Shaul Peleg) (05/12/89)
I am having a alittle trouble with this.. sinceI have never had this type of situation happen I do not know what to do: 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. If this is the way to go can someone tell me and shopw me how to get all the info from a list? If this is not the way to go, please show me the way to go Thanks alot, Shaul Peleg '3d rules' for the next few months(or years) UUCP: {ames!elroy, <backbone>}!gryphon!pnet02!shaulp INET: shaulp@pnet02.cts.com
Sullivan@cup.portal.com (sullivan - segall) (05/13/89)
> > > 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
shaulp@pnet02.cts.com (Shaul Peleg) (05/14/89)
Ok.. thanks alot... this will really help me! -=SP=- UUCP: {ames!elroy, <backbone>}!gryphon!pnet02!shaulp INET: shaulp@pnet02.cts.com
shaulp@pnet02.cts.com (Shaul Peleg) (05/15/89)
Ok... I have another problem with this... In C I owuld be able to do this: struct vertex { int pos[3] next* }; (sorry if this is not so good.. I just made it up) (lets stick with vertices for now) ok.. sinceI am declaring a new array everytime I don't have to declare it all at the sasme time which would be disastrous.. my question is.. if I created a include file with a structure for a vertex such as the one in C.. would I be able to 'DS.L' from the middle or must this always be declared at the end of the program? Is there any way around all of this? What about the naming of these structures? The firts one would be called VERTEX.. what should the system for naming these be? Please help me! I can't get anything done without this basic info. -=SP=- UUCP: {ames!elroy, <backbone>}!gryphon!pnet02!shaulp INET: shaulp@pnet02.cts.com