
PROGRAMMING CONCEPTS–II 3-21
Example 3.10b
.MODEL SMALL
.DATA
NUMS1 DB 45H, 67H, 89H, 65H, 34H, 23H
NUMS2 DB 09, 09, 12H, 13H, 08, 02
NUMS3 DB 6 DUP(0)
.CODE
.STARTUP
MOV CX, 6
MOV BX, 0
REPEA: MOV AL, NUMS1[BX] ;point to the first array
ADD AL, NUMS2[BX] ;add numbers of the second array
MOV NUMS3[BX], AL ;save in the third array
INC BX
LOOP REPEA ;repeat until CX = 0
.EXIT
END
Now, we will digress to the discussion of arithmetic instructions, but you can see that
branch instructions in various forms will continue to be used.
3.4 | Arithmetic Instructions
The complete list of arithmetic instructions is given in Table 3.4. Instructions ...