12-11-2014, 05:48 PM
Eww no.. that's waisted program lines. The less nops in ur program the better. If I can fix it with out adding program lines I much rather do that.
and the nop before a return wouldn't work.
right now when a Call is determined to be taken or not, the PC is already 6 lines ahead of where the first line of branch inst is. (Branch inst, is 3 inst word's long) so that makes the value that is pushed to the stack 2 lines to far in the program. So when u return, the PC value loaded wont be the line directly after the Call inst. It will skip 3 inst.. when I only need to skIP the 1 3word long Call inst.
so to fix this, u just hardcode the PC controler, to subtract 2 from the Return address, which is easy to do, u just have to say return, and put 0000010 in the Dest Address I'm the return inst. Then it will sub that and load up the very next line after he initial Call was placed.
and the nop before a return wouldn't work.
right now when a Call is determined to be taken or not, the PC is already 6 lines ahead of where the first line of branch inst is. (Branch inst, is 3 inst word's long) so that makes the value that is pushed to the stack 2 lines to far in the program. So when u return, the PC value loaded wont be the line directly after the Call inst. It will skip 3 inst.. when I only need to skIP the 1 3word long Call inst.
so to fix this, u just hardcode the PC controler, to subtract 2 from the Return address, which is easy to do, u just have to say return, and put 0000010 in the Dest Address I'm the return inst. Then it will sub that and load up the very next line after he initial Call was placed.