> Marco DI LEO wrote: > > > Please double check your statement. I just downloaded from my page > > the tea11.zip file and compiled tea.asm with the enclosed > > teatest.asm and math32.inc. After the call at TEAenc > > .... > > you can see my code produces the correct values (0x41ea3a0a > > 0x94baa940). I don't know wy you get the cited result. Have you used > > the test drive code I supply or did you write another > > Marco: > > I just ran your code again, and it produced the same (incorrect) > results that I mentioned earlier. > > I used your TEATEST.ASM front-end, your MATH32.INC file, the > P16F84.INC file distributed with MPASM, and MPLAB-SIM 3.32.18. > > I'll take a third look at it later this afternoon and let you know > what I discover. > > -Andy > > === Andrew Warren - fastfwd@ix.netcom.com > === Fast Forward Engineering - Vista, California > === http://www.geocities.com/SiliconValley/2499 (personal) > === http://www.netcom.com/~fastfwd (business) Andy, I think I found the nature of the problem you are experimenting with my TEA code. After your note on the erratic results from my tea11.zip, I got crazy trying to reproduce the results you reported. I ran a complete set of tests both on a reference machine running the original 'C' code by Wheeler and Needham and on my MPLAB 3.40. I did the same with the TEA-N code and the results from every test matched each other. Because of the mail messages I was receiving I decided to put a reference sheet on my page at http://members.tripod.com/~mdileo/ so everyone could test the code by himself. I didn't get yet any feedback on this. Determined to solve the puzzle I went home (where I am currently), downloaded my code from internet and I compiled it on MPLAB 3.31. I ran the program and I GOT THE SAME RESULT YOU REPORTED!! While I was thinking about the possible cause of this strange behaviour, a ligth bulb suddenly shined over me, I smacked my hand on my head, opened the Option > Development Mode menu, set the processor to SIMulate a PIC16_F_84 and everything went just fine. I guess there are some problems to get a processor with 36 bytes of RAM running a program that needs 37 of them!! Please check if you have this sort of problem in your configuration and let me know if the error went away. Ciao Marco BTW: my TEA-N code don't have the same problem since it just use 33 bytes of memory.