Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.