Mail Archives: djgpp/1998/06/20/19:25:48
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 -