koleman@pnet51.orb.mn.org (Kurt Koller) (11/29/90)
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 lea mt_songpos(pc),a5 move.b -$3b7(a4),(a5) movem.l (a7)+,a5-a6 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
lphillips@lpami.wimsey.bc.ca (Larry Phillips) (11/30/90)
In <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 > lea mt_songpos(pc),a5 > move.b -$3b7(a4),(a5) > movem.l (a7)+,a5-a6 > movem.l a5-a6,-(sp) move.l #mt_data(pc),a4 ; ( or... lea mt_data(pc),a4 ) lea mt_songpos(pc),a5 move.b -$3b7(a4),(a5) movem.l (a7)+,a5-a6 -larry -- The only things to survive a nuclear war will be cockroaches and IBM PCs. +-----------------------------------------------------------------------+ | // Larry Phillips | | \X/ lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips | | COMPUSERVE: 76703,4322 -or- 76703.4322@compuserve.com | +-----------------------------------------------------------------------+
bbaker@cbmvax.commodore.com (Bob Baker) (12/01/90)
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
DXB132@psuvm.psu.edu (12/01/90)
In article <3534@orbit.cts.com>, koleman@pnet51.orb.mn.org (Kurt Koller) says: >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 Try this: move.l a0,-(a7) lea mt_songpos(pc),a0 move.b mt_data+$3b7(pc),(a0) move.l (a7)+,a0 -- Dan Babcock
csg019@cck.cov.ac.uk (-~=Zaphod=~-) (12/06/90)
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 > lea mt_songpos(pc),a5 > move.b -$3b7(a4),(a5) > movem.l (a7)+,a5-a6 Messing with sound tracker eh? Try: movem.l a4-a5,-(sp) lea mt_data+$3b7(pc),a4 lea mt_songpos(pc),a5 move.b (a4),(a5) movem.l (sp)+,a4-a5 This will work in devpac, i'm not sure about other assemblers. -- *********/// O O **A member of S.H.I.T. (Super High Intelegence Team)**///*** * /// u Fight, defeat and kill organized laming. /// * * \\\ /// --- Zaphod of Intuition csg019@uk.ac.cov.cck ok? \\\ /// * ****\\X//**********************************************************\\X//******