Fill in the contents of the given memory portion at the end of the following program MOV BX, 26 MOV CX, 7 Next:MOV AL, [BX] PUSH AX INC BX LOOP Next MOV CX, 7 MOV BX, 26 Next2:POP AX MOV [BX], AL INC BX LOOP Next2
Solution
ORG 00H
MOV BX,26 ;initialises base register with indexed address
MOV CX,7 ;initialises count register with count 7
L1:MOV AL,[BX] ;moving base register to the accumulator
PUSH AX ;pushing the values into primary accumulator
INC BX ;incrementing base register
LOOP L1 ;it checks with count register,that if it is zero or not and go to loop l1
MOV CX,7 ;initialise count register with count 7
MOV BX,26 ;intialise base register with indexed address
L2:POP AX ; poping the values from primary accumulator
MOV [BX],AL ;moving al register to bx register
INC BX ;increment bx
LOOP L2 ;check the count register and go to loop l2
L3:PUSH AH ;pushing values into accumulator
MOV AH,07H ;moving values into accumulator
MOV [BX],AH ;moving values from ah register to bx register
INC BH ;increment bh register
DEC AH ;decrement values in ah register
CMP AH,00H ;compare if ah is 0
JNE L3 ;jump to loop le if ah not equal to 0
END
.