Message-Id: Date: Tue, 18 Jun 1996 13:37:43 +1200 From: Bill Currie To: djgpp AT delorie DOT com Subject: Re: Scale by 4 in asm faults? On 14/6/96 5:18 pm, did thus say >>> > movl %%fs:(,%2,4),%%eax ^^ This is pointing directly to your buffer (%edi) and so you are trying to address buf1*4, which is outside your address space. What you want (??) is movl %%fs:(%2),%%eax for SIB addressing the format is offset(basereg,indexreg,scaleval) giving an effective address of offset+basereg+indexreg*scaleval. For more info on 386 asm under gnu, check out the info pages (info as mach i386) as well as brennan's asm examples (don't know the url's, search the archives on dj's site (www.delorie.com)). Hope this helps Bill