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 1,508 of 2,978   
   Marco van de Voort to Markus Humm   
   Re: timing pascal code(actuall wall cloc   
   12 Apr 05 17:53:33   
   
   From: marcov@stack.nl   
      
   On 2005-04-11, Markus Humm  wrote:   
   >>   
   >> Remember that 16-bit TP/BP do not read the longint atomically   
   >> (), though   
   >> it should be trivial to do so in an ASM section.  One just uses a 32-bit   
   >> read, and returns it in DX:AX, if a function is used   
   >>   
   >   
   > Yes, but you can do that in TP/BP by declarind a longint variable to   
   > this absolute adress seg0040:$6c.   
   >   
   > var timer:longint absolute [seg0040:$6c]; I think is that declaration.   
   > Now it should be atomic, shouldn't it?   
      
   No. TP is a 16-bit compiler, and generates multiple instructions for   
   this load. The solution is what John said; use a 32-bit instruction function   
   wrapper.   
      
   --- 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