mortezamsp
سه شنبه 06 بهمن 1388, 19:03 عصر
با سلام.
اصلا نمیدونم چرا این برنامه وقتی به jne میرسه میره از اول شروع میکنه !!!! اصلا منطقی نیست .
ضمنا من از ویندوز 7 و سیستم 64 بیتی و emu8086 استفاده میکنم :
; multi-segment executable file template.
putpixel macro X ,Y
mov ax,100
sub ax,Y
;print
mov cx,x
mov dx,ax
mov ah,0ch
mov al,9
int 10h
mov ah,0
mov al,13h
int 10h
;pop ax
endm
;---------------------------------------------------------
initgraph macro
mov al,13h
mov ah,0
int 10h
endm
;================================================= ===============
data segment
; add your data here!
pkey db "press any key...$"
xP dw 1,2,3,4,5,6
yP dw 1,2,3,4,5,6
ends
;================================================= ===============
stack segment
dw 128 dup(0)
ends
;================================================= ===============
code segment
start:
; set segment registers:
mov ax, data
mov ds, ax
mov es, ax
;================================================= ===============
; add your code here
prepareing :
initgraph
lea si,xP
lea di,yP
mov bx,0
mov bl,6
pp :
mov cx,[si]
mov dx,100
sub dx,[di]
;put pixel
mov ah,0ch
mov al,9
int 10h
;end loop
inc si
inc di
dec bx
cmp bl,0
jne pp
;================================================= ===============
lea dx, pkey
mov ah, 9
int 21h ; output string at ds:dx
; wait for any key....
mov ah, 1
int 21h
mov ax, 4c00h ; exit to operating system.
int 21h
ends
end start ; set entry point and stop the assembler.
loop هم همینطوری میشه .
اصلا نمیدونم چرا این برنامه وقتی به jne میرسه میره از اول شروع میکنه !!!! اصلا منطقی نیست .
ضمنا من از ویندوز 7 و سیستم 64 بیتی و emu8086 استفاده میکنم :
; multi-segment executable file template.
putpixel macro X ,Y
mov ax,100
sub ax,Y
mov cx,x
mov dx,ax
mov ah,0ch
mov al,9
int 10h
mov ah,0
mov al,13h
int 10h
;pop ax
endm
;---------------------------------------------------------
initgraph macro
mov al,13h
mov ah,0
int 10h
endm
;================================================= ===============
data segment
; add your data here!
pkey db "press any key...$"
xP dw 1,2,3,4,5,6
yP dw 1,2,3,4,5,6
ends
;================================================= ===============
stack segment
dw 128 dup(0)
ends
;================================================= ===============
code segment
start:
; set segment registers:
mov ax, data
mov ds, ax
mov es, ax
;================================================= ===============
; add your code here
prepareing :
initgraph
lea si,xP
lea di,yP
mov bx,0
mov bl,6
pp :
mov cx,[si]
mov dx,100
sub dx,[di]
;put pixel
mov ah,0ch
mov al,9
int 10h
;end loop
inc si
inc di
dec bx
cmp bl,0
jne pp
;================================================= ===============
lea dx, pkey
mov ah, 9
int 21h ; output string at ds:dx
; wait for any key....
mov ah, 1
int 21h
mov ax, 4c00h ; exit to operating system.
int 21h
ends
end start ; set entry point and stop the assembler.
loop هم همینطوری میشه .