Video Mode 13h in windows XP ... impossible?

From: da_buddha (achesser_at_hotmail.com)
Date: 02/15/04


Date: 15 Feb 2004 12:43:14 -0800

Hello,

    I'm trying to figure out a way that I can use x86 ASM
to draw a pixel to the screen. I've been researching for
a while and have read the faq, but it now seems to me that
what I'm trying to do *MAY* be impossible on newer operating
systems

    I'm a teacher trying to come up with a good lesson on
Machine Language and how graphics work. From what i've seen
Mode 13h (320x200x256) is the best way to introduce someone
to the way graphics function (especially and the grade 11 / 12
high school level)

can anyone out there help me come up with a practical example
of an ASM program that will draw a pixel to the screen?

    

[ -------- sample code start here ---------- ]
AX=0000 BX=0000 CX=00C8 DX=0000 SP=FFFE BP=0000 SI=0000 DI=0000
DS=0C4F ES=0C4F SS=0C4F CS=0C4F IP=0100 NV UP EI PL NZ NA PO NC
-u 100
0C4F:0100 B81300 MOV AX,0013
0C4F:0103 CD10 INT 10
0C4F:0105 BF00A0 MOV DI,A000
0C4F:0108 8EC7 MOV ES,DI
0C4F:010A 31FF XOR DI,DI
0C4F:010C BA0000 MOV DX,0000
0C4F:010F B84001 MOV AX,0140
0C4F:0112 F7E2 MUL DX
0C4F:0114 89C7 MOV DI,AX
0C4F:0116 01D7 ADD DI,DX
0C4F:0118 B0FF MOV AL,FF
0C4F:011A 83C201 ADD DX,+01
0C4F:011D AA STOSB
0C4F:011E E2EF LOOP 010F
0C4F:0120 CD20 INT 20
[ -------- sample code end here ---------- ]



Relevant Pages

  • Re: Anti-aliased drawing
    ... The problem will be modifying it to draw arc's, ... Dim ErrorAdj As Long, ErrorAcc As Long ... Dim ErrorAccTemp As Long, Weighting As Long ... ' Draw the initial pixel, ...
    (microsoft.public.vb.general.discussion)
  • Re: Draw pixel
    ... picture box, but instead draw right onto the form. ... simple example, I would want to draw a square, pixel by pixel to the ... Private Declare Function SetPixel Lib "gdi32" _ ...
    (comp.lang.basic.visual.misc)
  • Re: difference between drawrectangle and fillrectangle
    ... anti-aliasing. ... is at pixel 10.5, and the center of coordinate 12 is at pixel 12.5, the pen ... If you draw with SmoothingMode set to AntiAlias, you will see the fill now ... pens always draw a figure that is increased in width and height ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Graphics help please
    ... Actually, I don't think the code below helps me much with what I want to do (draw images pixel by pixel) as I don't want to clear the entire image before displaying the changes, which is effectively what happens below. ... The JPanel is buffered so that it doesn't actually clear the screen just the offscreen buffer. ... public void paintComponent{ ...
    (comp.lang.java.programmer)
  • Re: Draw pixel
    ... picture box, but instead draw right onto the form. ... simple example, I would want to draw a square, pixel by pixel to the ... Here's an example using the SetPixel ...
    (comp.lang.basic.visual.misc)