'Print Graphics Between Two Points In Assembly (MASM)
I am trying to write a macro in MASM which enables me to display a graphic line from one point to another but the following code i have written just goes x axis and then y axis and not a line between the two points.
printFrom macro color, from_x, from_y, to_x , to_y
mov si, from_x
mov di, from_y
.while temp != 0
mov ah, 0ch
mov al, color
mov cx, si
mov dx, di
int 10h
.IF si < to_x && di < to_y
inc si
inc di
.ELSEIF si < to_x
inc si
.ELSEIF di < to_y
inc di
.ELSE
mov temp, 0
.ENDIF
.endw
mov si, 0
mov di, 0
mov temp, 1
endm
Kindly help me in modifying this code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
