TITLE Diamond

INCLUDE Irvine16.inc

.data
msg1 byte "Enter rows : ", 0
no   byte ?

.code

main PROC

	mov ax,@data
	mov ds,ax

        call ClrScr
        mov  dx, offset msg1
        call WriteString
        call ReadInt
        call Crlf
        mov  no, al

        mov  cx, ax
        mov  dx, 1

        L1:
                mov  bx, cx
                mov  al, 32

                L2:
                        call WriteChar
                loop L2

                mov  cx, dx
                mov  al, '*'

                L3:
                        call WriteChar
                loop L3

                mov  cx, bx
                add  dx, 2
                call Crlf

        loop L1


        movzx  cx, no
        dec  cx
        mov  dh, 2           ; Spaces
        sub  dl, 4           ; Stars

        L4:
                mov  bx, cx
                mov  al, 32
                movzx cx, dh

                L5:
                        call WriteChar
                loop L5

                movzx  cx, dl
                mov  al, '*'

                L6:
                        call WriteChar
                loop L6

                mov  cx, bx
                sub  dl, 2
                inc  dh
                call Crlf

        loop L4

	exit
main ENDP
END main
