Game programming

Moderators: None (Apply to moderate this forum)
Number of threads: 2047
Number of posts: 5331

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
pixel in asm Posted by d0kt0r (from Spain) on 3 Nov 2000 at 8:57 AM
cpu: amd k6-2 500<br>
system: win98<br>
compiler: c++ (ms-dos)<br>
<br>
is it correct to draw a pixel?:<br>
<br>
int 10h<br>
mov ah,00h<br>
mov al,13h 320x200x256<br>
<br>
int 10h<br>
mov ah,0ch<br>
mov al,5<br>
mov bh,(page)<br>
mov cx,15<br>
mov dx,25<br>
<br>
question 1: what is "page"?<br>
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.<br>
Thanks.<br>
<br>



Edit Report
Re: pixel in asm Posted by Darius on 4 Nov 2000 at 1:28 PM
You have everything backwards. The registers need to be loaded BEFORE calling the INT.<br>
<br>
: cpu: amd k6-2 500<br>
: system: win98<br>
: compiler: c++ (ms-dos)<br>
: <br>
: is it correct to draw a pixel?:<br>
<br>
mov ah,00h<br>
mov al,13h 320x200x256<br>
<br>
: int 10h<br>
<br>
mov ah,0ch<br>
mov al,5<br>
mov bh,(page)<br>
mov cx,15<br>
mov dx,25<br>
: int 10h<br>
: <br>
: question 1: what is "page"?<br>
<br>
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.<br>
<br>
However, mode 13h doesn't have any extra pages, but you can still make a software double-buffer.<br>
<br>
: 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.<br>
<br>
It might work now.<br>
: Thanks.<br>
: <br>
: <br>
: <br>
<br>






 

Recent Jobs