www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/20/19:25:48

Message-ID: <358C43D2.D68CE69@hotmail.com>
Date: Sun, 21 Jun 1998 01:20:50 +0200
From: Archee/CoNTRACT <soltesz AT hotmail DOT com>
Reply-To: soltesz AT hotmail DOT com
Organization: School
MIME-Version: 1.0
To: Nate Eldredge <nate AT cartsys DOT com>
CC: sl AT psycode DOT com DOT NOSPAM, djgpp AT delorie DOT com
Subject: Re: AT&T assembler
References: <19980607051814 DOT AAF17825 AT ppp124 DOT cartsys DOT com>

Nate Eldredge wrote:
> 
> At 02:24  6/7/1998 GMT, Gili wrote:
> >Hi,
> >
> >       I know very little assembler as is, so learning AT&T assembler (for
> >DJGPP) isn't an easy matter.
> >
> >       Could someone please convert the following into proper DJGPP asm
> >code?
> >---------------------------------
> >        mov dx,$3da
> >@1:     in al,dx
> >        test al,8
> >        jz @1
> >@2:     in al,dx
> >        test al,8
> >        jnz @2
> >---------------------------------
> 
>         movw $0x3da, %dx
> 1:      inb %dx, %al
>         testb $8, %al
>         jz 1b
> 2:      inb %dx, %al
>         testb $8, %al
>         jnz 2b
This is ok

> 
> But also consider:
> 
> while (inportb(0x3da) & 8) ;
> while (inportb(0x3da) & 8) ;
> 

This is not ok.

while (!(inportb(0x3da) & 8)) ;
while (inportb(0x3da) & 8) ;

:)

> The right tools for the right job.
> 
> Nate Eldredge
> nate AT cartsys DOT com

- Raw text -


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