Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!elvin!nucsrl!accuvax.nwu.edu!bob From: bob@accuvax.nwu.edu (Bob Hablutzel) Newsgroups: comp.sys.mac.programmer Subject: Re: MAC ASSEMBLY HELP NEEDED (REAL QUICK!!) Message-ID: <10050095@accuvax.nwu.edu> Date: 7 Apr 89 14:13:22 GMT References: <384@dalcsug.UUCP> Organization: Northwestern U, Evanston IL, USA Lines: 22 > I would like some help with Assembly. I am trying to write a DA > in MDS and have no idea how to create variable space for the DA. > I need some variables to reference my resources. You should be able to declare storage you need (NOT at the start of the code) with DC operators. For example, let's say that you need a longword to store a handle in. You would do the following: Label: dc.l 1 To access this variable, you have two choices, which are really a question of if you can spare an A-register throughout the call; you can either point an A-register (A4, for example) to the start of the declared variables and access appropriate offsets from it; or you can lea each variable as needed to access. Note that you only need to reference via an A register for writing into memory, not reading from, due to quirks in the 68000 instruction set. Any further questions, feel free to write directly. Bob Hablutzel Wildwood Software BOB@NUACC.ACNS.NWU.EDU