Assembly Program to Display a 10*10 solid box of Asterisk
This program will print a 10*10 solid box of Asterisk. There are two loops in the program first for rows and the second is for columns.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | .MODEL SMALL .STACK 100H .DATA NEWLINE DB 0DH, 0AH, "$" .CODE MAIN PROC MOV AX, @DATA MOV DS, AX MOV CX, 10 LOOP1: MOV AH, 2 MOV DL, "*" MOV BX, 10 LOOP2: CMP BX, 0 JE END_LOOP2 INT 21H DEC BX JMP LOOP2 END_LOOP2: MOV AH, 9 LEA DX, NEWLINE INT 21H LOOP LOOP1 EXIT: MAIN ENDP |
No comments