|
----------------------------------------
Program : box Procedure
FileName : box.asm
I/P : Nill
O/P : Displays a box
By : Murugan AD
----------------------------------------
box proc near ; Requires rowup rowdn collt colrt attrf attrb
push ax bx cx dx si di ; shadow fillbox
mov ah,rowup
mov al,collt
mov bh,rowdn
mov bl,colrt
mov dh,attrf
push ax
push bx
push dx
cmp shadow,1
jne shadowbox_loop12
push ax bx cx dx
mov ah,06h
mov al,rowdn
sub al,rowup
inc al
mov bh,attrb
mov ch,rowup
inc ch
mov cl,collt
inc cl
mov dh,rowdn
mov dl,colrt
int 10h
pop dx cx bx ax
shadowbox_loop12:
cmp fillbox,1
jne fillbox_loop12
push ax bx cx dx
mov ah,06h
mov al,rowdn
sub al,rowup
dec al
mov bh,attrf
mov ch,rowup
mov cl,collt
mov dh,rowdn
dec dh
mov dl,colrt
dec dl
int 10h
pop dx cx bx ax
fillbox_loop12:
dec rowdn
dec colrt
xor cx,cx
mov cl,rowup
mov row,cx
mov cl,collt
mov coloumn,cx
mov si,offset rowup_collt_12
call typestring
mov cl,rowdn
mov row,cx
mov cl,collt
mov coloumn,cx
mov si,offset rowdn_collt_12
call typestring
mov cl,rowup
mov row,cx
mov cl,colrt
mov coloumn,cx
mov si,offset rowup_colrt_12
call typestring
mov cl,rowdn
mov row,cx
mov cl,colrt
mov coloumn,cx
mov si,offset rowdn_colrt_12
call typestring
mov cl,collt
mov coloumn,cx
mov cl,rowup
inc cl
mov si,offset line_up_12
loop_line_ltup_12:
push cx
mov row,cx
call typestring
pop cx
inc cx
cmp cl,rowdn
jne loop_line_ltup_12
mov cl,colrt
mov coloumn,cx
mov cl,rowup
inc cl
mov si,offset line_up_12
loop_line_uprt_12:
push cx
mov row,cx
call typestring
pop cx
inc cx
cmp cl,rowdn
jne loop_line_uprt_12
mov cl,rowup
mov row,cx
mov cl,collt
inc cl
mov si,offset line_st_12
loop_line_stlt_12:
push cx
mov coloumn,cx
call typestring
pop cx
inc cx
cmp cl,colrt
jne loop_line_stlt_12
mov cl,rowdn
mov row,cx
mov cl,collt
inc cl
mov si,offset line_st_12
loop_line_strt_12:
push cx
mov coloumn,cx
call typestring
pop cx
inc cx
cmp cl,colrt
jne loop_line_strt_12
pop dx
pop bx
pop ax
mov rowup,ah
mov collt,al
mov rowdn,bh
mov colrt,bl
mov attrf,dh
pop di si dx cx bx ax
ret
line_st_12 db "Ä$"
line_up_12 db "³$"
rowup_collt_12 db "Ú$"
rowdn_collt_12 db "ÃÆâ€ââÃÆâ€ââ€
|