home bbs files messages ]

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

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

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

   Message 2,870 of 2,978   
   Marco van de Voort to Adrian Devries   
   Re: FPC - trying again :(   
   13 Jan 12 09:22:01   
   
   be730a85   
   XPost: comp.lang.pascal.misc   
   From: marcov@toad.stack.nl   
      
   On 2012-01-12, Adrian Devries  wrote:   
   > I've managed to compile your sources with both VirtualPascal and   
   > FreePascal.   
      
   I've succeeded also, but the program crashed. It seems the program assumes   
   that variables are in sequence in the datasegment, and it uses pointers to   
   poke into them. Most notably triples of pointers (xxx_nxt, xxx_top, xxx_ptr)   
      
   It seems that with the current FPC versions that (wrong) assumption doesn't   
   apply any more.   
      
   The symptom was that lift_top was NIL after readfile, because that pointer   
   was updated via the above mechanism.   
      
   A possible solution would be to enforce grouping with e.g. the following   
   trick   
      
   type PWhateverPointer=pchar;   
      
   Type   
       THetPointerRecord = packed record   
                             nxt,   
                             top,   
                             _ptr  : PWhateverPointer;   
                           end;   
      
      
   const   
        list_dummy :THetPointerRecord = (nxt:nil;top:nil;_ptr:nil);   
      
   var   
        list_nxt : PWhateverPointer absolute list_dummy.nxt;   
        list_top : PWhateverPointer absolute list_dummy.top;   
        list_ptr : PWhateverPointer absolute list_dummy._ptr;   
      
   --- 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