I have a problem with creating a loop that swaps every two bits. The general idea is this (without loops):
JMP START
N: equ 8
Data1: DB 03h, 23h, N, 34h, 2Bh, 6Fh, 8AEh, 24h, 1EAh
START: LDA N
MOV D, A
LDA $4203h
MOV B, A
LDA $4204h
STA $4203H
MOV A, B
STA $4204h
LDA $4206h
MOV B, A
LDA $4207h
STA $4206H
MOV A, B
STA $4207h
LDA $4208h
MOV B, A
LDA $4209h
STA $4208H
MOV A, B
STA $4209h
LDA $420Ah
MOV B, A
LDA $420Bh
STA $420AH
MOV A, B
STA $420Bh
END: HLT
How I can use loop and counters with this code? This is my first week on Asselmbly but I have worked previously on programming.