Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Type1:
- mov ax, [y1] ; if dx and dy are both same exit
- cmp ax, [y0]
- je done
- mov cx, [err]
- add cx, [err]
- mov [e2], cx
- neg word[difY]
- cmp [difY],cx ; compare e2 with negative difference of Y
- jg ErrMinusDY ; if e2 greater than -dy, err now equals dx - 2dy
- return1:
- mov dx, [x0]
- add dx, [sx] ; add 1 to x0
- mov [x0], dx
- cmp [difX], cx
- jl ErrPlusDX
- return2:
- mov dx, [y0]
- add dx, [sy] ;
- mov [y0], dx
- jmp goloop
- ErrMinusDY:
- mov dx,[difY]
- sub [err],dx
- jmp return1
- ErrPlusDX:
- mov dx,[difX]
- add [err],dx
- jmp return2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement