home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 4,011 of 4,675   
   none) (albert to All   
   Why does adding a 49 prefix to this inst   
   07 Mar 20 10:39:51   
   
   XPost: comp.lang.forth   
   From: albert@nospicedham.cherry   
      
   I have an 64 bits Forth system, and I can add a program that   
   executes a single instruction, like so   
   "   
   WANT ASSEMBLERi86   
      
   CODE PIET   
    MOVI|X, AX| 2 IL,   
   NEXT,   
   END-CODE   
   "   
      
   And execute it like so   
   PIET OK   
      
   This program does nothing. It fills EAX with 2 which is inconsequential   
   because EAX is a free register. [Only SP BP and SI are used in the   
   virtual system.]   
   Now let us prefix the instruction, such that the alternate register set   
   is used. This should be likewise inconsequential.   
      
   CODE PIET1   
   $49 C,   \ That is the way to do that in Forth   
    MOVI|X, AX| 2 IL,   
   NEXT,   
   END-CODE   
      
   Now PIET1 leads to a segfault.   
   I've no clue what could cause this.   
      
   I have been working with those prefixes for ages.   
   My ciasdis has disassembled and reassembled a 64 bit elf program   
   without problems.   
   [ This is in the context of an optimiser, I seem to have used   
   this R1 in optimised programs, that work. ]   
      
   Groetjes Albert   
   --   
   This is the first day of the end of your life.   
   It may not kill you, but it does make your weaker.   
   If you can't beat them, too bad.   
   albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca