From: Nat Saiger Newsgroups: comp.os.msdos.djgpp Subject: Simple Assembly Question Date: Sat, 03 Jan 1998 05:36:25 +0000 Organization: Stayfree Internet Limited. Lines: 46 Message-ID: <34ADCE54.8AE42E7A@stayfree.co.uk> NNTP-Posting-Host: lunchbox.stayfree.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi, Being new to both DJGPP and AT&T syntax asm, i'm having difficulties implementing both inline and external assembly. This is what i'm trying to convert (in BCC and inline Intel): void Blit(char *source, char *dest) { asm{ push ds les di,dest lds si,source mov cx,32768 rep movsw pop ds } } This is how I converted it... void (char *source, char *dest) { short global_selector = _dos_ds; asm(" pushl %eds movw _global_selector, %es movl _dest, %edi movw _global_selector, %ds movl _source,%esi // my intel syntax book says %esi exists, the assembler movl $32768, %ecx // disagrees rep movsw popl %eds ") } When I compile it I get "Opcodes match no known 386 instruction" but it doesn't tell me which line is causing the error. I've read the FAQ's and also a document on AT&T syntax and it ain't much help If someone could do a working conversion for me, (and possibly an external version), I would be very grateful. Nat Saiger.