delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/31/08:50:32

Date: Wed, 31 Jul 1996 08:48:39 -0400 (EDT)
From: patrick fox <web183 AT charweb DOT org>
To: Joona <joonah AT sci DOT fi>
cc: djgpp AT delorie DOT com
Subject: Re: Drawing a pixel??
In-Reply-To: <4tckga$14n@tron.sci.fi>
Message-ID: <Pine.SOL.3.91.960730200841.16539A-100000@wilbur>
MIME-Version: 1.0

void v_putpixel(int x,int y,char clr)
{
  __asm__ __volatile__(
    "pushl %%eax\n"
    "pushl %%edi\n"
    "pushw %%es\n"
    "movl %0,%%eax\n"
    "movl %%eax,%%edi\n"
    "shll $8,%%eax\n"
    "shll $6,%%edi\n"
    "addl %0,%%eax\n"
    "addl %%eax,%%edi\n"
    "movw _dos_ds,%%ax\n"
    "movw %%ax,%%es\n"
    "movb %2,%%al\n"
    "stosb\n"
    "popw %%es\n"
    "popl %%edi\n"
    "popl %%eax");
}

On Sat, 27 Jul 1996, Joona wrote:

> How can I draw a pixel on screen? 
> Could someone explain it short and clearly and mail me an
> example program.
> 
> 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019