T
T
Type Programmer2018-06-28 18:37:10
assembler
Type Programmer, 2018-06-28 18:37:10

Is there an algorithm for drawing lines without fractions?

I was able to figure out some kind of algorithm, in C ++ I made a rhyme of the necessary numbers there, in paint I built a line on them and it seemed to work.
I already thought, well, now it would be nice to transfer this to my OS (only BIOS interrupts, real time mode), and then I realized that ordinary registers work only with integers .. What should I do.
Also, are there any simple line drawing algorithms that do not encounter this problem?
PS: Do not judge strictly for the question, I'm just learning assembler.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2018-06-28
@MegaCraZy6

Good old Bresenham

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question