Xref: news2.mv.net comp.os.msdos.djgpp:4917 From: Galileo 6 Newsgroups: comp.os.msdos.djgpp Subject: Re: asm putpixel routine in djgpp Date: 13 Jun 1996 10:28:30 GMT Organization: Universidad Autonoma de Madrid, Spain Lines: 24 Message-ID: <4poqge$7k4@acebo.sdi.uam.es> References: <31B9EF7A DOT 183D AT ccm DOT tdsnet DOT com> NNTP-Posting-Host: galileo5.adi.uam.es To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Chris Grubb 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)