Longmove question
bambino
Posts: 789
I have a routine in assembly that fills a 2000 long section of ram with data. it works fine as long as the routine is in the same object the array is declared in!· I want to now move the routine to an object, but keep the array in the top object.
Is this still possible using longmove? Or does the operation just create another array in the new object!
What I am dreaming is that passing the address of the start of the array to the new object, and then putting this in par to the assembly routine, will allow my code to continue as normal and write to the array in the top object.
Thanks!
Is this still possible using longmove? Or does the operation just create another array in the new object!
What I am dreaming is that passing the address of the start of the array to the new object, and then putting this in par to the assembly routine, will allow my code to continue as normal and write to the array in the top object.
Thanks!
Comments
It sounds like you want to have the array in one object, but have the code to fill it in another object. In that case, you want to pass the address of the array to the routine that will fill it with data. In that routine, you'll use LONG[noparse][[/noparse] ... ] to access the locations while you're filling them. If you pass the base address as BASE, you'd set a location with LONG[noparse][[/noparse] BASE + i ] or some variation on that.
Once I get the base to the other object, is their anything different I would need to do in the assembly code?
My assembly routine takes just the start address in par, and increments from there to fill the array!
Thanks again, and have a nice weekend!