Compiles fine without error for me.
You running a demo or otherwise restricted version of PICBasic?
Compiles fine without error for me.
You running a demo or otherwise restricted version of PICBasic?
or you run out of the RAM capability on your 12XXXX PIC.
Post your whole code here and PIC model, we'll have a look to that.
Compile ok here to.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I'm using PICBasic Pro 2.46 and programming a 16F59. I really can't show the entire code (because it is for work). However, its not that large and an associate told me he has always had problems with << and >> so he shifts bits in assembly language, ie. RRF _MyVariable, 1. Do you know what that error message means? Is there a complete list of error codes published ?
Well as i'd never ever heard about that problem and never ever had it myself, even if i use that >> and << often, i can't comment. and i tried the following
so the RAM oveflow guess is a probable cause IMHO. what about if you compile your code with another PIC???Code:a var byte b var byte c var byte d var byte f var word a=f.Lowbyte & $0F b=f.Lowbyte >> 4 c=f.Highbyte & $0F d=f.Highbyte >> 4
ALL MPASM error are listed in the following pdf
http://gputils.sourceforge.net/33014g.pdf
Error 101 is a user-defined error. And i'm really not sure it's related to the PM error message 101
That make no sense at all. BTW all error message of PM are listed in PM.TXT101 Use of Local Label Prior to Use of Non-Local Label
Indicates that a local label (i.e. starting with a colon) has been defined
prior to the definition of a non-local label (i.e. a legal label name
starting with other than a colon). Because local names depend on the named
of last non-local label defined, this usage is obviously suspicious. The
label generating the warning is not expanded as are other local labels (see
Local Labels).
Sometimes error message do not reflect the real error. So is that error disapear when you comment-out the lines who use >> ???
Last edited by mister_e; - 8th September 2005 at 17:16.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I have v2.46 and just compiled a small test program (350 words) for the 16F59 incorporating the example I posted for you without error.
If you are getting errors with usage of << or >>, then your compiler may be corrupt. Reinstall from your master disk, and if problems still persist, contact Jeff at MeLabs for his comment.
May I suggest you also check your labels and definitions that you're not using a reserved word as a label.
I remed out most of the code except the code containing the shifts. and started compiling. all went well until I unremed the following line:
SEROUT PORTA.3,BRate,[32,Leader,#DataOut[5],#DataOut[4],#DataOut[3],#DataOut[2],#DataOut[1],10]
then the error occurred.
If I rem out all lines containing >> the above line compiles fine. If I rem out the line above (SEROUT PORTA.3 ... )the >> lines compile fine. If I change the above line to:
SEROUT PORTA.3,BRate,[32,Leader,DataOut[5],DataOut[4],#DataOut[3],#DataOut[2],#DataOut[1],10]
(thus removing the pound sign (#))
Everything compiles fine.
WIRD WIRD WEIRD can't confirm it here...
what about if you split your SEROUT statement in two like..
or in a multiple line likeCode:SEROUT PORTA.3,BRate,[32,Leader,#DataOut[5],#DataOut[4]] SEROUT PORTA.3,BRate,[#DataOut[3],#DataOut[2],#DataOut[1],10]
the little thing that could do... i said could, if DataOut is a word size variable BUT i tried it also... works for me.Code:SEROUT PORTA.3,BRate,[32,Leader,#DataOut[5],_ #DataOut[4],#DataOut[3],_ #DataOut[2],#DataOut[1],10]
BTW there's certainely somebody here or at MELABS who know why... over for me![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks