hello
i've just started learning assembly and i need some help..
i've got an excersive which says to:
A. store the numbers FF,FE,FD blah blah blah.. to memory positions from $400600-$4006FF.
ORG $400400
MOVE.B #$FF,D0
LEA $400600,A0
MOVE.W #256,D1
LOOP MOVE.B D0,(A0)+
SUBQ.B #1,D1
BNE LOOP
and
B. to move all those numbers to memory positions $400700-$4007FF conversely. The content of memory position $4006FF to $400700, $4006FE to $400701 etc etc...
LEA $400700,A1
LOOP2 MOVE.B -(A0),(A1)+
ADDI.B #1,D1
BNE LOOP2
END $400400
is this code correct?
another thing i noticed.. i run my code today in another system and when i trace it comes up with MOVE.W #$0100,D1 instead of #256,D1 (256 is the number of the entries of my numbers -FF to 00- that will be saved in the memory positions.
why does this happen?
again im newb in assembly so excuse any beginners mistakes i might be doing.
i've just started learning assembly and i need some help..
i've got an excersive which says to:
A. store the numbers FF,FE,FD blah blah blah.. to memory positions from $400600-$4006FF.
ORG $400400
MOVE.B #$FF,D0
LEA $400600,A0
MOVE.W #256,D1
LOOP MOVE.B D0,(A0)+
SUBQ.B #1,D1
BNE LOOP
and
B. to move all those numbers to memory positions $400700-$4007FF conversely. The content of memory position $4006FF to $400700, $4006FE to $400701 etc etc...
LEA $400700,A1
LOOP2 MOVE.B -(A0),(A1)+
ADDI.B #1,D1
BNE LOOP2
END $400400
is this code correct?
another thing i noticed.. i run my code today in another system and when i trace it comes up with MOVE.W #$0100,D1 instead of #256,D1 (256 is the number of the entries of my numbers -FF to 00- that will be saved in the memory positions.
why does this happen?
again im newb in assembly so excuse any beginners mistakes i might be doing.