PLEASE NEED HELP ASAP__SIMPLE QUESTION

Hi,

I wrote a code that is supposed to draw a diagonal line in graphical

mode with the line equation y=2x+5, to draw the line I substituted values

for x that range between 0 to 50, ex. after substiuting x for 1st time

we'll get (0,5). then i call a procedure that will draw that dot, but

at the running time i get a single dot and i really don't know why,here's

my code, any help will be really great.Thanks in advance


data_seg segment

x dw ?

y dw ?

data_seg ends

;------------------------------------

code_seg segment

main proc far

assume ss:stack_seg,cs:code_seg,ds:data_seg

mov dx,data_seg

mov ds,dx


mov bl,50

mov x,0

aa: mov ax,2

mul x

add ax,5

mov y,ax

call drawd

inc x

dec bl

cmp bl,0

jg aa


mov ah,4ch

int 21h


main endp

drawd proc near


mov ah,00 ; service to change mode

mov al,12h

int 10h


mov ah,0ch ; draw a picel dot

mov al,6

mov bh,0

mov cx,y

mov dx,x

int 10h

ret

drawd endp

code_seg ends

end main





Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories