Hello. I have a buffer containing a load of data with the starting address in BX. I am wanting to copy just a section of this data into another buffer with starting address BP. The offset of the start of the data i want to copy is held in SI, and the length of subsector i want to copy is held in AX.
This is the code i am trying:
;use length of subsector as count
mov CX, AX
For:
mov AX,[BX+SI+CX] ;Buffer+StartLocation+Count
mov [BP+CX],AX ;Subsector Address+Count
loop For
However i get two errors pointing at the two lines in my for loop, saying 'Invalid Effective Address'
Any ideas/solutions?
Thanks in advance
This is the code i am trying:
;use length of subsector as count
mov CX, AX
For:
mov AX,[BX+SI+CX] ;Buffer+StartLocation+Count
mov [BP+CX],AX ;Subsector Address+Count
loop For
However i get two errors pointing at the two lines in my for loop, saying 'Invalid Effective Address'
Any ideas/solutions?
Thanks in advance