我这个程序为什么只画出半个圆。
我想画一个圆,为什么只画出半个圆?data segment
source_buffer db 40 ('a')
circle DB 00H,00H,47H,0C0H,3FH,0F0H,3FH,0F8H,3FH,0F8H,7FH,0FCH,7FH,0FCH,7FH,0FCH
DB 7FH,0FCH,7FH,0FCH,3FH,0F8H,3FH,0F8H,1FH,0F8H,07H,0C4H,00H,02H,00H,00H
row dw 50
col dw 50
lp1num db 0
lp2num db 2
lp3num db 0 ;第3层循环的次数,最大为8
cmpnum db 80h
data ends
;
code segment
main proc far
assume cs:code,ds:data,es:data
start:
push ds
sub ax,ax
push ax
mov ax,data
mov ds,ax
MOV AH,00H
MOV AL,12H
INT 10H
MOV AH,0BH
MOV BH,00
MOV BL,00H
INT 10H
mov si,offset circle
call show
FLAG3:
MOV AH,0
INT 16H
CMP AL,1BH
JZ EXIT
JMP FLAG3
EXIT:
RET
show proc near
push ax
push bx
push cx
push dx
push si
push word ptr row
push word ptr col
;mov cx,16
mov ah,0ch
mov dx,row
mov cx,col
mov al,00001010b
int 10h
mov lp1num,0
lp1:
mov lp2num,0
mov lp3num,0
lp2:
mov bl,[si]
mov cmpnum,80h
lp3:test bl,cmpnum
jz wr2
mov al,00001010b
int 10h
jmp ag3
wr2:
mov al,0
int 10h
ag3:
shr cmpnum,1
inc cx
; inc cx
inc lp3num
cmp lp3num,8
jb lp3
inc si
inc lp2num
cmp lp2num,2
jb lp2
inc dx
mov cx,col
inc lp1num
cmp lp1num,16
jb lp1
exitshow:
pop word ptr col
pop word ptr row
pop si
pop dx
pop cx
pop bx
pop ax
ret
show endp
main endp
code ends
end start
[此贴子已经被作者于2016-7-27 08:20编辑过]