| ??? 01/09/01 14:17 Read: times |
#8024 - Back to the Turing's machine |
Hello gues,
Well, I was pressed for time. So there are my replies now. First of all, no any advertisement, all the more, here at such excellent '52 forum. There is my private opinion only. TO HANS: The XCH is good opcode. For your example you can just use INC DPTR :-). Besides, you forgot "D" in the adDc instruction. But if be seriously you example is very good. It takes 6 cycles and 12 bytes. My one was not optimized. I have got 2 optimized version ;First version xch a,counter add a,#1 ;Watch carry! xch a,counter jnc eocnt inc counter+1 ;carry through eocnt: ;Second version inc counter xch a,counter jnz eocnt inc counter+1 ;carry through eocnt: xch a,counter Both version takes 6/5 cycles and 10 bytes. Second example is preferable because doesn't affect carry. TO PETER: 1) Yes, my example was intended for interrupt routine. 2) >Typically on 8051 projects 16 bit increment only needed to access >external memory or lookup tables. And then "INC DPTR" can be used. Yes, you are right. But you have to put the 16-bit value into DPTR, and after incrementting you have to put it into RAM again. mov dpl,counter mov dph,counter+1 inc dptr mov counter,dpl mov counter+1,dph Get compare it with this code for MSP430: INC COUNTER. To increment 64-bit value: INC COUNTER ADC COUNTER+1 ADC COUNTER+2 ADC COUNTER+3 Peter, please write the same code for '51. More complex example. CRC-16 calculation by table way: SWPB R14 ;Swap CRC bytes XOR.B R14,R15 ;Word table entry MOV TABLE(R15),R15 CLR.B R14 XOR R15,R14 ;Get new CRC Please compare this with the tutorial CRC calculation. I hope this is not "the most awkward code" :-) 3) >Also I believe, 0.99$ was not the single quantity price for the MSP430F149. I did not say it. Pricing starting at $0.99 each 4) Is the MSP430F149 really so hungry (250mA = 0.25A) or mean you 250µA ? No, it is mistake. Must be 0.25 mA in operation mode. 5) >The 51 never die . . . God forbid! I use '51 derivatives in many applications Peter, why do not you use the 4004, 8008 etc? Let's go back to the Turing's machine. No, with due respect of A.M.Turing. TO MATT: The English language is not my native one. I started to learn English two years ago. Some times I am using idiom drills, may be not correctly enough. Actually my title " There is life after '51" means "There is big choice" for you. TO ALL LISTENERS: The main thing: I like the '51 but I love the MSP430 instruction set. Thanks for your attention, George |
| Topic | Author | Date |
| Philips XA Family | 01/01/70 00:00 | |
| RE: Philips XA Family | 01/01/70 00:00 | |
| RE: There is life after '51:-) | 01/01/70 00:00 | |
| RE: Philips XA Family | 01/01/70 00:00 | |
| RE: There is life after '51:-) | 01/01/70 00:00 | |
| RE: There is life inside the '51:-) | 01/01/70 00:00 | |
| XA | 01/01/70 00:00 | |
| RE: Philips XA Family | 01/01/70 00:00 | |
| RE: Philips XA Family | 01/01/70 00:00 | |
| RE: Philips XA Family | 01/01/70 00:00 | |
| RE: Philips XA Family | 01/01/70 00:00 | |
| RE: Philips XA Family | 01/01/70 00:00 | |
| Back to the Turing's machine | 01/01/70 00:00 | |
| RE: Philips XA Family | 01/01/70 00:00 | |
RE: XA | 01/01/70 00:00 |



