Subject: Fwd: Updated Dm2k v2.5

From: [email-masked]
Date: Thu, 22 Aug 2013 13:14:31 -0400 (EDT)

I don't know if the following is spam or not.  It was sent to  me outside 
of the Yahoo! OLUG.  I'd just be very careful.
 
Glenn

____________________________________
 From: [email-masked]
To: [email-masked]
Sent: 8/22/2013  12:52:49 P.M. Eastern Daylight Time
Subj: Re: Updated Dm2k v2.5

Hey, I just saw your post about the fact that asm990 didn't  detect an 
error. How come you didn't drop me a note about this? I went ahead  and fixed 
the bug. 

--- In [email-masked], fredkaal  <no_reply@...> wrote:
>
> Hi all,
> 
> An  updated version of Dm2k v2.5  can be downloaded here:
> 
>  http://home.vodafonethuis.nl/fgkaal/
> 
> I just discovered why  Dm2k sometimes crashes. It seems that there was a 
very old bug in one of the  optimizers i use. So if you are using this 
version then you'd better use this  update.
> 
> 
> For who is interested:
> 
> In a  function called prvdir(p, f) char *p,*f; that determines the 
previous  directory (or cuts off the last directory name) there is a line:
>  
> P[X] = 0;
> 
> and X is on the top of the stack and P at  offset 6:
> 
> Original c99 code:
>  MOV  14,8
>  AI 8,6
>  MOV *8,8     Address of  P
>  BL 15
>  MOV 14,8
>  INCT  8
>  MOV *8,8     Value of X
>  A  *14+,8     Address of P+X is P[X]
>  BL  15
>  S 8,8        Value 0
>  MOV  *14+,9   Addres of P+X
>  MOVB *10,*9   P[X]=0
> 
> Was optimized to:
>  MOV @6(14),8 Address  of P
>  A @,8     <--ERROR
>  MOV  8,9      Some address to R9
>  S 8,8     Value 0
>  MOVB *10,*9  Destroy  something
> 
> Instead of:
>  MOV @6(14),8 Address of  P
>  A *14,8      Addres of P+X is  P[X]
>  MOV 8,9      
>  S 8,8   Value 0
>  MOVB *10,*9  P[X]=0
>  
> and the ASM990 assembler didn't reported an error also, but that is  an 
other problem.
> Fred  ;-)