What instruction did you use to push the sum? Was it PEA? I'm looking in the reference I have for the 68000 instruction set and I don't see PUSH or POP instructions, which is what I would use on x86 machines.i have the sum of D0,D1 and pushed it at SP and i want to recall the most significant word of this sum from SP in the register D4.
how i do this ?
i work with 68000 motorola microcotroller
Mike,if u wanna move something to SP you write this MOVE.L D1,-(SP)
If u wanna recall something from SP you write this
Now my problem was that the sum assigned into register D1 was Longword and the excercise was asking to recall the most signifficant word of D1 from SP and i wrote this
and it worked
MOVE.W -(A0), (A1)+
CLR.L D2 MOVE.L #$12345,D1 MOVE.L D1,-(SP) ; push value in D1 on stack MOVE.W (SP)+,D2 ; pop MSW word at SP to D2
|Thread starter||Similar threads||Forum||Replies||Date|
|A||LTspice Simulation Time Problem.||Power Electronics||7|
|I||Avalanche transistor Fast Rise Time Problem||Power Electronics||7|
|L||does missing neutral line from a 3 phase source lead to problem in the device connected to it?||Power Electronics||6|
|J||(SOLVED) Problem Writing to Stack (TOSL)||Microcontrollers||21|
|S||stack overflow problem||Microcontrollers||10|
by Jake Hertz