Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!crdgw1!uunet!cbmvax!bbaker From: bbaker@cbmvax.commodore.com (Bob Baker) Newsgroups: comp.sys.amiga Subject: Re: An Assembler question Message-ID: <16176@cbmvax.commodore.com> Date: 30 Nov 90 16:09:45 GMT References: <3534@orbit.cts.com> Reply-To: bbaker@cbmvax.commodore.com (Bob Baker) Organization: Commodore, West Chester, PA Lines: 37 In article <3534@orbit.cts.com> koleman@pnet51.orb.mn.org (Kurt Koller) writes: > Ok, I have the following line: > > ; move.b mt_data+$3b7,mt_songpos > > > And I want to make it a "good, pc-realative" set of instructions. This didn't > work: > > movem.l a5-a6,-(a7) > move.l mt_data(pc),a4 ^^^^^^ change this to lea > lea mt_songpos(pc),a5 > move.b -$3b7(a4),(a5) ^--- remove this negative sign > movem.l (a7)+,a5-a6 > The above changes should fix your problem. You were taking the contents of the location mt_data and using it as the address in A4 instead of loading the address of mt_data into a4 as needed for the following move.b Bob > > Also, I tried adding $3b7 to a4, and doing a move.b (a4),(a5) and got > absolutely nowhere... > > Thanks. > > > (Maybe I should buy a book on assembly? Everything so far has been > guesswork.) > Kurt "Koleman" Koller - tcnet!orbit!pnet51!koleman