stack1 segment stack
dw 32 dup(0)
stack1 ends
code segment
assume cs:code,ss:stack1
main:mov cx,5
mov si,5
mov bx,9
main1:call space
call string
loop main1:
mov ax,4c00h
int 21h
space proc near
push cx
mov cx,si
mov dl,’ ‘
space1:mov ah,2
int 21h
loop space1
inc si
pop cx
ret
space endp
string proc near
push cx
mov cx,bx
mov dl,’*’
str1:mov ah,2
int 21h
loop str1
mov dl,0dh
int 21h
mov dl,0ah
int 21h
sub bx,2
pop cx
ret
string endp
code ends
end main
汇编 用子程序输出道三角(有效果图)
- THE END -
Category: 汇编
0 条评论。