XPost: comp.theory   
   From: redelm@nospicedham.ev1.net.invalid   
      
   In comp.lang.asm.x86 olcott wrote in part:   
   > On 12/22/2020 4:07 AM, Bernhard Schornak wrote:   
   >> olcott wrote:   
   >>   
   >> _H_Hat:   
   >> [000005e6](01)? 55????????????????? push ebp   
   >> [000005e7](02)? 8bec??????????????? mov ebp,esp   
   >> [000005e9](01)? 51????????????????? push ecx   
   >> [000005ea](03)? 8b4508????????????? mov eax,[ebp+08]   
   >> [000005ed](01)? 50????????????????? push eax   
   >> [000005ee](03)? 8b4d08????????????? mov ecx,[ebp+08]   
   >> [000005f1](01)? 51????????????????? push ecx   
   >> [000005f2](05)? e8effdffff????????? call 000003e6   
   >> [000005f7](03)? 83c408????????????? add esp,+08   
   >> [000005fa](03)? 8945fc????????????? mov [ebp-04],eax   
   >> [000005fd](04)? 837dfc00??????????? cmp dword [ebp-04],+00   
   >> [00000601](02)? 7404??????????????? jz 00000607   
   >> [00000603](02)? ebfe??????????????? jmp 00000603   
   >> [00000605](02)? eb01??????????????? jmp 00000608   
   >> [00000607](01)? f4????????????????? hlt   
   >> [00000608](02)? 8be5??????????????? mov esp,ebp   
   >> [0000060a](01)? 5d????????????????? pop ebp   
   >> [0000060b](01)? c3????????????????? ret   
   >>   
   >>   
   >> 0603 jumps to itself. Reduce to   
   >>   
   >> _H-Hat:movl? 0x0C(%esp), %eax   
   >> ?????? subl? $0x08,????? %esp   
   >> ?????? movl? %eax,?????? 0x00(%esp)   
   >> ?????? movl? %eax,?????? 0x04(%esp)   
   >> ?????? call? _WHATEVER_THAT_IS   
   >> ?????? testl %eax,?????? %eax   
   >> ?????? je??? 0f   
   >> ?? L00:jmp?? L00????????????????????? # loop forever   
   >> ???? 0:hlt??????????????????????????? # CLI/STI?   
   >> ?????? addl $0x08,?????? %esp   
   >> ?????? ret   
   >>   
   >>   
   >>   
   >> As long as the code at 0x03E6 is unknown, it is impossible to tell   
   >> anything. _H_Hat itself does nothing ... except wasting clocks and   
   >> electrical power when the returned value is not zero.   
   >>   
   >> The only thing I can see in your debug trace is that you would run   
   >> out of stack,   
      
   If it doesn't get caught in the infinite loop at 603, likely less   
   than one million before you hit the stack guard page.   
      
      
   > That is the answer that I expected and confirms that I am correct.   
   >   
   > I am using the x86 code that was translated from C as the   
   > machine description language of a Universal Turing Machine   
   > equivalent. I wrote a whole x86utm operating system for   
   > this purpose. This means that the assumption is infinite   
   > memory and thus infinite stack.   
      
   ??? I don't think any general-use compiler will emit a HLT   
   instruction. No need, this is a priviliged ring0 instruction   
   on modern x86 p-mode OSes.   
      
   -- Robert   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|