Howdy, Stranger!

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

Categories

repetitive drawing problem

in21hin21h Member Posts: 1
Hi. Any help you can give me on this will be highly appreciated. My problem is as follows:

I need to draw some shapes on the screen (simple shapes: rectangles, triangles, etc.) and I have the code to draw them using a lot of "int 10h"s ... or I will, very soon. The problem is that I need to draw many of those shapes on the screen, and calling the interrupt-based procedure each time I need to draw 1 shape is very slow... I was wondering if there is a way to draw the shapes once in some unseen area of the screen and then just copying that into the visible area. I'm using video mode 12h.

Thanks in advance.

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : Hi. Any help you can give me on this will be highly appreciated. My
    : problem is as follows:
    :
    : I need to draw some shapes on the screen (simple shapes: rectangles,
    : triangles, etc.) and I have the code to draw them using a lot of
    : "int 10h"s ... or I will, very soon. The problem is that I need to
    : draw many of those shapes on the screen, and calling the
    : interrupt-based procedure each time I need to draw 1 shape is very
    : slow... I was wondering if there is a way to draw the shapes once in
    : some unseen area of the screen and then just copying that into the
    : visible area. I'm using video mode 12h.
    :
    : Thanks in advance.
    :
    [color=Blue]You are most likely using the INT 10h to draw pixels one by one. The problem with that is that each time you need a pixel INT 10h will FULLY PREPARE the graphics board to draw a pixel - meaning it will set up all modes and registers in a board to just draw one pixel. What you need is to prepare once and then just draw pixels.

    If I have time I will post some FASM code later.
    [/color]
Sign In or Register to comment.