1.The given program generates a 10*10 sodil box of astericks.
.MODEL SMALL
.STACK 100H
.DATA
SQUARE DB ‘**********’,0DH,0AH,’$’
.CODE
MAIN PROC
MOV AX, @DATA ; initialize DS
MOV DS, AX
LEA DX, SQUARE ; load the string
MOV AH, 9
INT 21H
INT 21H ; display the string 10 times
INT 21H
INT 21H
INT 21H
INT 21H
INT 21H
INT 21H
INT 21H
INT 21H
MOV AH, 4CH ; return control to DOS
INT 21H
MAIN ENDP
END MAIN
Now you have to change the code and generate a diamond with 10 rows.
2.Create a calculator which could do the following operations. Such as
i) Addition and subtruction of two single digits
ii)Other than this it could say whether the single digit is Odd or Even.
Put 2 single digits and say whether 1st number is greater than 2nd numbe, less than 2nd number or equal.