
Initial value
Global variables cannot be initialized when declared. Local variables do not
have this constraint. Constant variables must be initialized when declared.
For example:
unsigned int i1= 0;
//illegal declaration; can not be
//initialized
unsigned int i2;
const unsigned int i3;
//illegal declaration; should be
//initialized
const unsigned int i4=5;
const char a1[5];
//illegal declaration; should be
//initialized
const char a2[5]={0
×
1,0
×
2,0
×
3,0
×
4,0
×
5};
const char a3[]="abcde";
Multiply/Divide/Modulus
The multiply, divide and modulus (’*’, ’/’, ’%’) operators are implemented by
system calls. It is necessary to include the math.lib library if these arith-
metical operators are used. To include a library, select [options] in the main
menu, select [project...], put the library name in the [libraries] field.
Stack
Because the Holtek HT48CX0 microcontrollers have from 2 to 8 stacks the
programmer needs to consider the function call depth to avoid stack over-
flow. The multiply, divide and modulus of the Holtek C language are
implemented by "call" instructions, taking one stack. The input/output port
system functions are implemented without "call" instructions.
Operator/System Function
Stack Needed
main ( )
0
*
1
/
1
%
1
peekPX(), X=A,B,C,D,E,F,G
0
peekPXC(), X=A,B,C,D,E,F,G
0
pokePX(), X=A,B,C,D,E,F,G
0
pokePXC(), X=A,B,C,D,E,F,G
0
setPX(), X=A,B,C,D,E,F,G
0
setPXi(), i=0,1,2,3,4,5,6,7 and X=A,B,C,D,E,F,G
0
setPXC(), X=A,B,C,D,E,F,G
0
HT-IDE User’s Guide
112
Содержание HT-IDE
Страница 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Страница 12: ...HT IDE User s Guide 2 ...
Страница 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Страница 24: ...HT IDE User s Guide 14 ...
Страница 70: ...HT IDE User s Guide 60 ...
Страница 76: ...HT IDE User s Guide 66 ...
Страница 92: ...HT IDE User s Guide 82 ...
Страница 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Страница 94: ...HT IDE User s Guide 84 ...
Страница 148: ...HT IDE User s Guide 138 ...
Страница 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Страница 154: ...HT IDE User s Guide 144 ...
Страница 192: ...HT IDE User s Guide 182 ...
Страница 194: ...HT IDE User s Guide 184 ...
Страница 218: ...HT IDE User s Guide 208 ...
Страница 235: ...P a r t V Appendix Part V Appendix 225 ...
Страница 236: ...HT IDE User s Guide 226 ...
Страница 250: ...HT IDE User s Guide 240 ...