Programs
Programs
• Solution. In this problem we will have to refer to two different memory locations in
different
• segments, hence we will have to initialize the data segment twice here with the given
values.
• .MODEL SMALL
• .STACK
• .DATA
• .CODE
• START:MOV CX,64H ;load the count of 100
• XOR AL,AL ;load 00 in register al
• AGAIN:MOV [BX],AL ;load 00 in the memory location whose offset is provided
in bx
• INC BX ;increment bx to point to offset of next loc.
• LOOP AGAIN ;repeat the loop 100 times
• MOV AH,4CH ;exit to dos prompt
• INT 21H
• END ;end of program
12/19/2023 Prepared By: Dr. Nikhil Marriwala 20
Maximum number
TITLE 8086 ALP to find maximum in the arra
• .model small
• .stack 100
• .data
• ARRAY DB 63H, 32H, 45H, 75H, 12H, 42H, 09H, 14H, 56H, 38H; Array of ; ten numbers