Xref: news2.mv.net comp.os.msdos.djgpp:6749 From: dbarrett AT srvr1 DOT engin DOT umich DOT edu (David M Barrett) Newsgroups: comp.os.msdos.djgpp Subject: Re: Inline ASM :'Error : ect. ect." Date: 31 Jul 1996 15:43:21 GMT Organization: University of Michigan Engineering, Ann Arbor Lines: 50 Message-ID: <4tnuup$mv0@srvr1.engin.umich.edu> References: NNTP-Posting-Host: celtics.engin.umich.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Edison (s9404619 AT student DOT utwente DOT nl) wrote: : Ok... Here goes... I don't know exactly what is wrong... so I can only give : you some 'solutions' : void VGA_Mode_13h_Normal_Blit_Video_Buffer(Video_Buffer *In_Buf, : U16 X, U16 Y){ : U8 *Data_Ptr; : U16 A,B; : ASM(" \n : pushw %%es \n : movw _our_global_selector, %%es \n : --------------> movw %%es, %%ds \n : movl $0xA0000, %%edi \n : imulw $320, %%ax \n (shifts would be faster) : addw %%bx, %%ax \n : --------------> addw %%ax, %%edi \n : next_line: \n (Is that label legal ???) : pushw %%cx \n : movw %%dx, %%cx \n : rep \n : movsb \n : pop %%cx \n (popw ????) : addw $320, %%edi \n : loop next_lineb \n : popw %%es \n : " : : : : "a" (Y), : "b" (X), : "c" (In_Buf->Dimensions.Y), : "d" (In_Buf->Dimensions.X), : "S" (In_Buf->Data)); : } Thanks Edison, I'll give that a shot. Oh, and I just realized while reading over my previous post: I have ASM defined to be __asm__ __volatile__ in case you were wondering. Thanks! -David :) -- ----------------------------------------------------------------------------- David M. Barrett :) | University of Michigan / CAEN Hotline dbarrett AT engin DOT umich DOT edu | http://www-personal.engin.umich.edu/~dbarrett -----------------------------------------------------------------------------