flat assembler
Message board for the users of flat assembler.
Index
> DOS > bresenham line drawing [it seems work] |
Author |
|
edfed 09 Jan 2013, 09:03
good start, pc assembly always starts with iterative division to trace lines
next is to boot from floppy image |
|||
09 Jan 2013, 09:03 |
|
SeproMan 13 Jan 2013, 15:28
kty11,
The video mode 13h has a resolution of 320x200 and you are drawing a line to a point off screen! You have set (x1,y1)=(204,204). Take care because such things are not always harmless. At ".cmp_e2_ndy" your comment states that "AX=-AX" where in fact AX becomes -AL. This will become a problem on a video resolution with more than 256 lines. Simply use "neg ax" Are you aware that the line you've drawn is actually a special case? 45° You should try many different lines to verify if your program is correct. Since you like using the instruction "leave" why not consider using "enter" also? You can replace "push bp : mov bp,sp : sub sp,12" by "enter 12,0" (and shave off 2 bytes) _________________ Real Address Mode. |
|||
13 Jan 2013, 15:28 |
|
AsmGuru62 13 Jan 2013, 16:02
That does not look like a correct 45 degree line.
First I see 2 pixels on top of each other, then same pixels shifted down and the pattern repeats. A correct line would be where a single pixels are connected with their corners. This above line looks like TWO lines of 45 drawn side by side. |
|||
13 Jan 2013, 16:02 |
|
SeproMan 13 Jan 2013, 18:19
AsmGuru62,
Your observation is correct but it undoubtedly relates to the fact that the picture is taken from a windowed DosBox. On a true 320x200 screen it'll probably look fine. _________________ Real Address Mode. |
|||
13 Jan 2013, 18:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.