wishlist for NXC
-
- Posts: 175
- Joined: 28 Dec 2011, 13:07
- Location: Gelderland, Netherlands
- Contact:
Re: wishlist for NXC
John, I'm looking at the SVN log for the compiler to determine of you by any chance implemented the varjump opcode already. I some places it says "Lots of stuff", so I can't exactly tell.
If you did, thanks a lot. If you did not, is there anything I can do to help?
If you did, thanks a lot. If you did not, is there anything I can do to help?
-- Pepijn
http://studl.es Mindstorms Building Instructions
http://studl.es Mindstorms Building Instructions
Re: wishlist for NXC
I haven't checked in my changes, iirc, for the new opcodes. I am trying to figure out what I did wrong in the firmware that causes it to crash when I try to use the opcode. It is hard to know whether the problem is in the compiler or the firmware. Swamped at work, sick for a couple weeks. It's all combined to slow my NXT development progress.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: wishlist for NXC
I wish you a speedy recovery! :)
-
- Posts: 175
- Joined: 28 Dec 2011, 13:07
- Location: Gelderland, Netherlands
- Contact:
Re: wishlist for NXC
Me too.doc-helmut wrote:I wish you a speedy recovery!
Does any specific opcode make it crash? The absolute jump sounds like a good candidate for weird stuff happening, the others seem straightforward to me, but then I have no real expertise on the matter.
-- Pepijn
http://studl.es Mindstorms Building Instructions
http://studl.es Mindstorms Building Instructions
-
- Posts: 220
- Joined: 23 Jan 2012, 17:07
- Location: Round Rock, TX
Re: wishlist for NXC
It appears to me that the compiler generates really unique name space prefixes as it munches down through some NXC code, possibly unique for each macro (which is what the INLINE would be called in other, older languages). How about allowing the % character at the beginning of a variable name used in an INLINE function to generate a unique prefix? That way we could have INLINE functions with private variable space.
When I ran into this a couple of weeks ago, before I understood that INLINE code really can't have local variables, the compiler was not only generating line numbers globally through all the included libraries, the errors I was getting made no sense whatsoever, at least to my feeble brain.
I don't know what I was seeing. It doesn't do it now. But, then again, I've updated to a new version of BricxCC. I'm going to claim that the gremlin that was counting line numbers from the very beginning and so I couldn't figure out where in my code my idiot mistakes were located was the same gremlin doing this. Please ignore my drug induced ramblings. (Yes, I've got a sinus infection and I don't really know what effect it has when I mix all my normal "old man" drugs with the new stuff.)
McSummation aka James
http://www.mcsummation.com/Mindstorms/
http://www.mcsummation.com/Mindstorms/
Re: wishlist for NXC
if I dare recommend to you a fantastic pharmacy drug store... [email protected]
Re: wishlist for NXC
Is it possible to make a variable a bit? Like it is 1 or 0?
If so, could you add that?
If so, could you add that?
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
-
- Posts: 220
- Joined: 23 Jan 2012, 17:07
- Location: Round Rock, TX
Re: wishlist for NXC
I doubt that NXC will let you define a 1 bit variable. The smallest "normal" variable is a byte (8 bits). However, when building an I/O (or storage buffer), you can mash them together. I did a database many years ago where disk space was expensive and I packed variables based on the number of bits that could actually be used. So, for instance, dates were packed: month took 4 bits, day of month took 5 bits, etc. Boolean flags took only 1 bit. You can store a lot of data in a small space when you do that. I've got 30 years worth of checkbook entries packed into 445KB.nxtboyiii wrote:Is it possible to make a variable a bit? Like it is 1 or 0?
If so, could you add that?
McSummation aka James
http://www.mcsummation.com/Mindstorms/
http://www.mcsummation.com/Mindstorms/
-
- Posts: 358
- Joined: 01 Oct 2010, 06:37
- Location: Denmark
- Contact:
Re: wishlist for NXC
Support for Bit fields would actually be rather nice.
My blog: http://spillerrec.dk/category/lego/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
-
- Posts: 175
- Joined: 28 Dec 2011, 13:07
- Location: Gelderland, Netherlands
- Contact:
Re: wishlist for NXC
As ar as I know, the data space is byte-alligned. So even if you made a bit, the next 7 bits would be unused. Maybe if you defined 8 bits in a row...
-- Pepijn
http://studl.es Mindstorms Building Instructions
http://studl.es Mindstorms Building Instructions
Who is online
Users browsing this forum: No registered users and 4 guests