質問

Im working with ASSEMBLY, and basically I'm looping through employee data such as (hourly wage, hours worked, tax deductions, etc.). I want to be able to loop through instructions, and on each iteration, I want the register I'm using to go to the next register. As in,

loop iteration 1 -> using register 2
loop iteration 2 -> using register 3
loop iteration 3 -> using register 4
... and so on...

Is there an instruction, or a simple way to do this?

役に立ちましたか?

解決

Well, it'd be more helpful if you told us which assembly language so we could look at the instruction set. If it's say 68HC11, I'm not aware of any instruction that could let you implement this.

How many registers do you have? 8 Multipurpose registers? Some architectures only have 4 registers. It's not likely to be very many. There are also different kinds of registers such as accumulators and index registers.

If you're programming in x68 assembly I don't think theres a way to loop through registers and the closest that you get to it is the pop all registers and push all registers into a stack. But that's not going to accomplish what you are going for here.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top