Newsgroups: comp.os.msdos.djgpp From: Tomas Kratochvil Subject: How works inline asm in DJGPP Content-Type: text/plain; charset=iso-8859-2 Message-ID: <35582E82.41C6@fi.muni.cz> Sender: news AT dior DOT ics DOT muni DOT cz (News Admin) Content-Transfer-Encoding: 7bit Organization: Masaryk University,Brno Mime-Version: 1.0 Date: Tue, 12 May 1998 11:12:02 GMT Lines: 40 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hello I have problem with inline assembler in DJGPP. I write this procedure in Borland C++ and I don`t how can I rewrite it to DJGPP. Please help me. This procedure draw point in any VESA mode. void drawxy(unsigned x, unsigned y, unsigned char Col) { asm { mov ax,0a000h mov es,ax mov ax,y mov cx,scanlength mul cx add ax,x adc dx,0 push dx push ax mov ax,dx xor dx,dx mov cx,granul mul cx cmp al,bank je dale mov bank,al mov dx,ax mov bx,0 mov ax,4f05h int 10h } dale: asm { pop ax pop dx mov di,ax mov al,Col mov es:[di],al } } ToM