From: MERC::"uunet!WKUVX1.BITNET!goathunter" 25-JAN-1993 19:33:34.82 To: alpha-ids@WKUVX1.BITNET CC: GAVRON@ACES.COM Subj: For your info: reference problem in system spce Date sent: 25-JAN-1993 17:08:13 DEC has successfully duplicated my problem and is researching a solution where macro32 dec c ------------------------------------------------------ movl (r7),r8 p = *q r8 ends up = r7, not (r7) p ends up =q, not *q If you want to have fun with this yourself, try this on an ALPHA running VMS: main() { int ini$brk; /* Where the breakpoint vector is */ int *p,*q; int opcode; p = (int *)ini$brk; /* The ini$brk vector address in p */ p += 2; /* The address of the ini$brk code */ q = (int *)*p; /* Q points to code */ /* Now here a debugger will let you see that Q is something like 8000204C and *Q is the 477F... opcode! */ opcode = *q; /* Now here you'd expect that opcode would be 477F... just like the debugger figured. BZZT, wrong, actually opcode now equals Q!!! Arghh!!! */ } The same problem is trivial to duplicate in MACRO32: .entry bogon,^m<> movl #ini$brk,r6 ; Address of INI$BRK vector addl #8,r6 ; Address of INI$BRK code address movl (r6),r7 ; Address of first bytes of code movl (r7),r8 ; Now R8 SHOULD be the opcode but ; instead it's the same as R7. WHY!!!!!????!! .end bogon Ehud -- Ehud Gavron (EG76) gavron@Spades.ACES.COM