Advertisement
Shailrshah

Exchange 2 Blocks of Data

Aug 19th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     MOV 20h, #01h
  2.     MOV 21h, #02h
  3.     MOV 22h, #03h
  4.     MOV 23h, #04h
  5.     MOV 24h, #05h
  6.     MOV 25h, #06h
  7.     MOV 26h, #07h
  8.     MOV 27h, #08h
  9.     MOV 28h, #09h
  10.     MOV 29h, #0Ah
  11.  
  12.     MOV 40h, #0Ah
  13.     MOV 41h, #09h
  14.     MOV 42h, #08h
  15.     MOV 43h, #07h
  16.     MOV 44h, #06h
  17.     MOV 45h, #05h
  18.     MOV 46h, #04h
  19.     MOV 47h, #03h
  20.     MOV 48h, #02h
  21.     MOV 49h, #01h
  22.  
  23.     MOV R2, #0Ah    ;counter
  24.     MOV R0, #20h    ;place A
  25.     MOV R1, #40h    ;place B
  26. loop:   MOV A, @R0
  27.     MOV R3, A
  28.     MOV A, @R1
  29.     MOV @R0, A
  30.     MOV A, R3
  31.     MOV @R1, A
  32.     INC R0
  33.     INC R1
  34.     DJNZ R2, loop
  35.     END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement