b b b
c c c c c一至到g程序是怎么表示啊能给我说说吗?
刚好有个想法,于是现在开始磨刀写.......>___________<
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; triangle.asm
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.386
.model stdcall, flat
option casemap: none
include windows.inc
include kernel32.inc
include user32.inc
includelib kernel32.lib
includelib user32.lib
.data
szBuffer db 512 dup(?)
szCaption db "显示三角形",0
.code
main:
pushad
mov edi, offset szBuffer
mov al, 41h ;41=A
mov edx, 1
@@: mov ecx, edx
rep stosb
add edx, 2
;*****************************
push ax
mov ax, 0d0ah ;0d0ah=Enter
stosw
pop ax
:*****************************
inc al
cmp al, 47h ;47=G
jz @Display
jmp @b
popad
@Display: invoke MessageBox, NULL, offset szBuffer, offset szCaption, MB_OK
invoke ExitProcess, NULL
end main
编译链接好在对话框中显示
a
bbb
ccccc
ddddddd
eeeeeeeee
.....
[此贴子已经被作者于2007-10-9 18:47:34编辑过]