pixel in asm

cpu: amd k6-2 500

system: win98

compiler: c++ (ms-dos)



is it correct to draw a pixel?:



int 10h

mov ah,00h

mov al,13h 320x200x256



int 10h

mov ah,0ch

mov al,5

mov bh,(page)

mov cx,15

mov dx,25



question 1: what is "page"?

question 2: i've tried to put some values in bh but it doesn't works; the screen is black and I can't see any pixel drawed.

Thanks.






Comments

  • You have everything backwards. The registers need to be loaded BEFORE calling the INT.



    : cpu: amd k6-2 500

    : system: win98

    : compiler: c++ (ms-dos)

    :

    : is it correct to draw a pixel?:



    mov ah,00h

    mov al,13h 320x200x256



    : int 10h



    mov ah,0ch

    mov al,5

    mov bh,(page)

    mov cx,15

    mov dx,25

    : int 10h

    :

    : question 1: what is "page"?



    Well, in your case, just put 0 in for bh. A video page is just a backbuffer, an offscreen buffer, or a double-buffer, whichever term you prefer.



    However, mode 13h doesn't have any extra pages, but you can still make a software double-buffer.



    : question 2: i've tried to put some values in bh but it doesn't works; the screen is black and I can't see any pixel drawed.



    It might work now.

    : Thanks.

    :

    :

    :






Sign In or Register to comment.

Howdy, Stranger!

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

Categories