cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/12/07:15:59

Newsgroups: comp.os.msdos.djgpp
From: Tomas Kratochvil <xkratoc1 AT fi DOT muni DOT cz>
Subject: How works inline asm in DJGPP
Message-ID: <35582E82.41C6@fi.muni.cz>
Sender: news AT dior DOT ics DOT muni DOT cz (News Admin)
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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019