From: ajps AT mail DOT telepac DOT pt (aperes) Newsgroups: comp.os.msdos.djgpp Subject: HELP! (ASSEMBLY LANGUAGE) Date: Sun, 08 Aug 1999 09:56:38 GMT Lines: 45 Message-ID: <37ad5065.631051@news.telepac.pt> NNTP-Posting-Host: 194.65.163.199 X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com How can i translate this piece of code in Inline Assembler in DJGPP? The code is in INTEL format and fills in the buffer (a video buffer) with a color: void Fill_Double_Buffer(int color) { _asm { mov cx, double_buffer_size // size of buffer in WORDS mov al, color mov ah, al les di, double_buffer <--- MY PROBLEM IS HERE!!!! rep stosw } } My try: void Fill_Double_Buffer(unsigned char color) { short selector = _dos_ds; short size = double_buffer_size; asm(" pushw %%es movw %0, %%es movw %1, %%cx movb %2, %%al movb %%al, %%ah ??????????????? <------------ my big problem! rep stosw popw %%es" : : "g" (selector), "g" (size), "g" (color) : "ax", "cx", "di" ); } Thanks in advance Aperes