hi-tech language

tshuck

Joined Oct 18, 2012
3,534
You are using Hi-Tech C. Hi-Tech is (was?) the conpany. And you are using their version of C.

Those are hexadecimal values, as per the C specification.

The goto seems to be a holdover from assembly, but I have never used it.

Have a look at the user's manual.
 
Last edited:

ErnieM

Joined Apr 24, 2011
8,377
0x (zero and the letter x) is the standard way to designate a hexadecimal number, so this is the same as saying 0, 3, 255, and 0 again. Very helpful when setting bits. one day you will grow to love doing just that.

"goto" means just that: go to the address defined by the lable, here "line1". So it is the same as a jump command. Note the lable is arbitrary but must not be repeated.
 

kubeek

Joined Sep 20, 2005
5,795
"goto" means just that: go to the address defined by the lable, here "line1". So it is the same as a jump command. Note the lable is arbitrary but must not be repeated.
Oh please don´t use gotos when you write your code. They should be allowed to use in only a few very specific cases, and definitely not as a general way to write code. Any unexperienced coder who uses goto will 99 out of 100 times make the ugliest mess of spaghetti code that he nor anyone else will be able to understand just a week later. Learn how to use functions and blocks instead, and how to write nice and understandable code.
 

tshuck

Joined Oct 18, 2012
3,534
OK very nice
what is meant by FOSC ? (( __config (FOSC_HS & WDTE_OFF..........)
It references the oscillator. You've, effectively configured the PIC for a high-speed crystal to make your oscillator.

What it stands for, you'd have to ask the people that decided on it...
 

ErnieM

Joined Apr 24, 2011
8,377
It seems time for you to RTFM: Read The Fine Manual that comes with the compiler to explain these things.

Much faster than asking here too!
 
Top