Mail Archives: djgpp/1996/06/13/12:19:38
Chris Grubb <Cgrubb AT ccm DOT tdsnet DOT com> wrote:
>
> hi, I'm trying to make a putpixel routine for mode 13h in inline asm .. so far I have converted everything
> correctly, but I looked through 'brennan's guide to inline assembly' .. and couldn't find help for this..so
> I'm turning here..this is the line I'm trying to convert:
>
> 'mov [es:di],color' .. where es:di is the memory location of the pixel..
>
> now, I read something that said you have to put an underscore before variables..so sofar I have this..
>
> 'movl _color,' .. but then I'm not sure about the next part..any help is GREATLY appreciated..thanks
I don't think it's a good idea to use inline assembler to make a putpixel routine in DJGPP2. It would be better
to use *poke to putpixel and *peek to getpixel. To switch to MODE 13h I conseill you to use DJGGP2 interrupt
hander, and to put in the register struct the info that processor needs.
Note that farpoke or farpeek need only 1 clik or processor time to execute, so I have a lot of doubts that using
inline assembler would be faster!!!
But you can try if you want...
Please tell us if you do so!!!
(For more information see the FAQ, sear poke, peek, interrupt!!!)
See you!!
Bruno(Universidad Autónoma de Madrid)
- Raw text -