Shop OBEX P1 Docs P2 Docs Learn Events
Manual and Propeller tool should both warn about the RES keyword! — Parallax Forums

Manual and Propeller tool should both warn about the RES keyword!

Dennis FerronDennis Ferron Posts: 480
edited 2007-05-19 21:25 in Propeller 1
The Propeller manual v1.01 does not warn about the danger of the RES keyword. Basically, the problem is all your RES's must be at the end of your program. If you accidently include a "RES" in the middle of your program, you don't get any warnings but all your code sometimes works and sometimes does not. I just spent all night trying to track down a bug in my code which was caused by RES. I finally narrowed it down enough to search for "RES" in the Propeller Tricks and Traps thread. But the Propeller manual ought to say something about this in the section about RES. And the Propeller tool ought to warn you if you include a RES in the middle of your code. I can't see any use-case where the programmer would actually intend to invoke the current (buggy) behavior of a RES in the middle of your program; this usage should simply not be allowed to compile.

Comments

  • Jasper_MJasper_M Posts: 222
    edited 2007-05-18 20:41
    I've had hard time with RES too... But RES is sometimes used in the middle of source when the code is relocated later. And I agree with you about the manual. And in many threads it has been said that adding warning support would require very much work and is therefore not done.
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-05-18 21:40
    Yes I've noticed that too. Not to sound harsh, but did the person who wrote the Propeller tool get run over by a bus or something? Have they lost the source code? Because I've noticed that too; the answer to every question about changing the Propeller tool, especially in regards to more warnings, is that it would require too much work. Parallax is usually pretty good with support; I'm they're just busy right now.
  • Jasper_MJasper_M Posts: 222
    edited 2007-05-18 21:46
    AFAIK They are busy with Propeller2.

    And here's another thing that'd need warnings or something (Ok, this topic has been discussed so many times... but anyway):
    wrlong ina, something doesn't work - some special regs can't be used as destination register
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-05-18 22:16
    Jasper_M said...
    AFAIK They are busy with Propeller2.

    Oh I forgot about that. I can't wait to see a Hydra-like system with the Propeller2; I imagine it would be possible to create a 3-d pipeline for it.
  • Jasper_MJasper_M Posts: 222
    edited 2007-05-19 09:02
    Well, I'm definitely going to put a Prop2 to my Hydra when it becomes available. And yes, I know it'll require some soldering... I think I'm going to build it so that both Props are there and they can be selected using a switch...
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-05-19 09:21
    Jasper_M said...
    Well, I'm definitely going to put a Prop2 to my Hydra when it becomes available. And yes, I know it'll require some soldering... I think I'm going to build it so that both Props are there and they can be selected using a switch...

    Ha ha, yes!

    Actually I was thinking I would put a Prop2 on my blank experimenter card. As someone mentioned in another thread, the best peripheral for the Propeller is... another Propeller!

    I wouldn't have thought of trying to replace the actual main CPU in the Hydra, but you do bring up an interesting question. I wonder whether the next generation Propeller will be pin-compatible with the current Prop? They hinted there might still be a DIP version even in the new one (it just wouldn't have the second set of 32 I/O pins). Or maybe not; but if there is, I wonder if it would be possible to simply drop it in to replace the current one?
  • Jasper_MJasper_M Posts: 222
    edited 2007-05-19 09:33
    AFAIK it won't be pin-compatible, it has different powersupply pins or something... but that won't stop me. I'm gonna solder it on a veroboard and connect it to a DIP socket, so that it can be connected just like the propeller..
  • sanandaksanandak Posts: 18
    edited 2007-05-19 12:29
    Both the "RES" and the "INA-register" subtlety are discussed in the "Tips and Traps" document ... along with a lot of other handy tips and lurking traps (look at the sticky posts in this forum). Alas, I only found it *after* being bitten by both those! [noparse]:)[/noparse]

    Sincerely,
    sa
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-05-19 17:48
    It cant be pin compatible because the core will need to be run at 1.8V while the I/O will run at 3.3V. However it would be possible to create a breakout module using a Prop 2 surface mount package where a 1.8V regulator is on-board to provide a Prop 1 pin-compatible package.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-05-19 21:25
    Paul: Thanks for the confirmation.

    sanandak: I'm thinking ought to put all this into a book, something like "Secrets of Propeller Assembly"
Sign In or Register to comment.