To: djgpp AT delorie DOT com Date: Sat, 25 Jan 1997 18:10:51 c:\ Subject: AT&T assembly code won't compile Message-ID: <19970125.171134.4439.2.aclemmer@juno.com> From: aclemmer AT juno DOT com (Aaron M Clemmer) When I try to compile this code, it tells me "not a known 386 instruction". I don't know which two lines they are (I'm using RHIDE), but that the error messages were for two adjacent lines of code. Why it doesn't work, I don't know, it seems to be valid assembly code... As I am no longer subscribing to the mailing list (my email is long distance now...), please reply to my email address, or I will never see any replies. =) Thanks, Aaron (aclemmer AT juno DOT com) void flipBanked(unsigned char *bufPtr, unsigned long numBanks, unsigned long lastBytes) // As you may have guessed, this *should* copy a buffer to a banked video // card. // ES:DI -> vga // DS:SI -> memory block to Blt // DH = number of full banks to fill // ECX = lastBytes __asm__ __volatile__ ( "pusha \n" "movl %%ebx, %%ds \n" // load up the values in the "movl %%eax, %%es \n" // segment regs. "xor %%edi, %%edi \n" // clear edi "xor %%dl, %%dl \n" // and dl. "or %%dh, %%dh \n" // see if the is "jz DoPartial \n" // only a single bank to handle. "OuterLoop: nop \n" // Move all of the full 64k banks first. "movb %%dl, %%al \n" "call setBank \n" "movl $0x4000, %%ecx \n" // Need to set 4000h DWORDS per bank "rep \n" // I know the above line causes "movsl \n" // DoPartial to not work, but I was "xor %%di, %%di \n" // planning on fixing it when this "incb %%dl \n" // compiles "decb %%dh \n" "jnz OuterLoop \n" "DoPartial: nop \n" // Now fill the last partial bank "movb %%dl, %%al \n" "call setBank \n" "shrw $2, %%cx \n" "rep \n" "movsl \n" "popa " : : "a" ( 0xA0000 ), // AX "b" ( RM_SEGMENT( (unsigned long)bufPtr) ), // BX "S" ( RM_OFFSET ( (unsigned long)bufPtr) ), // SI "d" ( numBanks ), // DX "c" ( lastBytes ) // CX ); }