From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: Asm -> .cc ? Date: 26 May 2001 15:38:01 -0700 Organization: MindSpring Enterprises Lines: 41 Sender: nate AT mercury DOT bitbucket Message-ID: <83eltbd9di.fsf@mercury.bitbucket> References: <9eop9s$31k$1 AT info DOT cyf-kr DOT edu DOT pl> NNTP-Posting-Host: a5.f7.d8.5a Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Server-Date: 26 May 2001 22:38:02 GMT User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Rafal Maj" writes: > Hi, > where can I find some FAQ or DOCs to learn how to translate typical asm code > to asm syntax that I can use in .cc file for DJGPP ? > And can someone be so nice to spend some time and write lilte .cc file that > will use folowing code : > ======[snip]======= > WaitVRT proc near > > push ax > push dx > mov dx,3DAh > WaitVRT1: in al,dx > test al,8 > jz WaitVRT1 > WaitVRT2: in al,dx > test al,8 > jnz WaitVRT2 > pop dx > pop ax > ret > > WaitVRT endp You don't need assembly for this. All you are doing is reading from a port, waiting until a certain bit becomes set and then until it becomes clear. #include void waitvrt(void) { while (!(inportb(0x3da) & 8)) ; while (inportb(0x3da) & 8) ; } -- Nate Eldredge neldredge AT hmc DOT edu