]> git.sur5r.net Git - cc65/blob - doc/funcref.sgml
Started a function reference
[cc65] / doc / funcref.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4 <title>cc65 function reference
5 <author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">
6 <date>07.11.2002
7
8 <abstract>
9 cc65 is a C compiler for 6502 based systems. This function reference describes
10 the available C functions supplied by the library.
11 </abstract>
12
13 <!-- Table of contents -->
14 <toc>
15
16 <!-- Begin the document -->
17
18 <sect>Introduction<p>
19
20 cc65 is a C compiler for 6502 based systems. It implements a subset of the ISO
21 C standard plus additional functions specially crafted for 6502 systems or
22 just some of the supported machines. This function refrence describes the
23 available functions together with any limitations.
24
25 <bf/Note:/ Standard C functions are listed here, but not described in detail.
26 Since these functions behave identical on all standard compliant systems, they
27 are described in any book covering standard C.
28
29 Each entry for a function contains a detailed description
30
31 <quote>
32 <descrip>
33 <tag/Function/Summary of what <bf/function/ does.
34 <tag/Header/The header file that contains the declaration.
35 <tag/Declaration/Describes the needed header files and declaration of the
36 function.
37 <tag/Description/Description of the function.
38 <tag/Limits/Limits.
39 <tag/Availability/The availability of the function.
40 <tag/See also/Other related functions.
41 <tag/Example/A piece of actual code using the function.
42 </descrip>
43 </quote>
44
45
46 <sect>Functions by header file<p>
47
48 <sect1><tt/conio.h/<label id="conio.h"><p>
49
50 <itemize>
51 <item><ref id="bgcolor" name="bgcolor">
52 <item><ref id="bordercolor" name="bordercolor">
53 <item><ref id="cclear" name="cclear">
54 <item><ref id="cclearxy" name="cclearxy">
55 <item><ref id="cgetc" name="cgetc">
56 <!-- <item><ref id="chline" name="chline"> -->
57 <!-- <item><ref id="chlinexy" name="chlinexy"> -->
58 <item><ref id="clrscr" name="clrscr">
59 <!-- <item><ref id="cprintf" name="cprintf"> -->
60 <!-- <item><ref id="cputc" name="cputc"> -->
61 <!-- <item><ref id="cputcxy" name="cputcxy"> -->
62 <!-- <item><ref id="cputs" name="cputs"> -->
63 <!-- <item><ref id="cputsxy" name="cputsxy"> -->
64 <!-- <item><ref id="cursor" name="cursor"> -->
65 <!-- <item><ref id="cvline" name="cvline"> -->
66 <!-- <item><ref id="cvlinexy" name="cvlinexy"> -->
67 <!-- <item><ref id="gotox" name="gotox"> -->
68 <!-- <item><ref id="gotoxy" name="gotoxy"> -->
69 <!-- <item><ref id="gotoy" name="gotoy"> -->
70 <item><ref id="kbhit" name="kbhit">
71 <!-- <item><ref id="revers" name="revers"> -->
72 <!-- <item><ref id="screensize" name="screensize"> -->
73 <item><ref id="textcolor" name="textcolor">
74 <!-- <item><ref id="vcprintf" name="vcprintf"> -->
75 <!-- <item><ref id="wherex" name="wherey"> -->
76 </itemize>
77
78
79 <sect1><tt/ctype.h/<label id="ctype.h"><p>
80
81 <itemize>
82 <item><ref id="isalnum" name="isalnum">
83 <item><ref id="isalpha" name="isalpha">
84 <item><ref id="isascii" name="isascii">
85 <item><ref id="isblank" name="isblank">
86 <item><ref id="iscntrl" name="iscntrl">
87 <item><ref id="isdigit" name="isdigit">
88 <item><ref id="isgraph" name="isgraph">
89 <item><ref id="islower" name="islower">
90 <item><ref id="isprint" name="isprint">
91 <item><ref id="ispunct" name="ispunct">
92 <item><ref id="isspace" name="isspace">
93 <item><ref id="isupper" name="isupper">
94 <item><ref id="isxdigit" name="isxdigit">
95 <item><ref id="tolower" name="tolower">
96 <item><ref id="toupper" name="toupper">
97 </itemize>
98
99
100
101
102 <sect>Alphabetical function reference<p>
103
104 <sect1>bgcolor<label id="bgcolor"><p>
105
106 <quote>
107 <descrip>
108 <tag/Function/Set the background text color.
109 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
110 <tag/Declaration/<tt/unsigned char __fastcall__ bgcolor (unsigned char color);/
111 <tag/Description/The function will set a new background text color. It returns
112 the old (current) background color.
113 <tag/Limits/Background colors are system dependent. The function may have no effect
114 on systems where the background color cannot be changed. The function is only
115 available as fastcall function, so it may only be used in presence of a
116 prototype.
117 <tag/Availability/cc65
118 <tag/See also/
119 <ref id="bordercolor" name="bordercolor">,
120 <ref id="textcolor" name="textcolor">
121 <tag/Example/Actual code using the function.
122 </descrip>
123 </quote>
124
125
126 <sect1>bordercolor<label id="bordercolor"><p>
127
128 <quote>
129 <descrip>
130 <tag/Function/Set the border (frame) color.
131 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
132 <tag/Declaration/<tt/unsigned char __fastcall__ bordercolor (unsigned char color);/
133 <tag/Description/The function will set a new border color. It returns the old
134 (current) border color.
135 <tag/Limits/Border colors are system dependent. The function may have no effect
136 on systems where the border color cannot be changed. The function is only
137 available as fastcall function, so it may only be used in presence of a
138 prototype.
139 <tag/Availability/cc65
140 <tag/See also/
141 <ref id="bgcolor" name="bgcolor">,
142 <ref id="textcolor" name="textcolor">
143 <tag/Example/Actual code using the function.
144 </descrip>
145 </quote>
146
147
148 <sect1>cclear<label id="cclear"><p>
149
150 <quote>
151 <descrip>
152 <tag/Function/Clear part of a line (write a given amount of spaces).
153 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
154 <tag/Declaration/<tt/void __fastcall__ cclear (unsigned char length);/
155 <tag/Description/The function clears part of a line by writing <tt/length/
156 spaces in the current text color.
157 <tag/Limits/The function is only available as fastcall function, so it may
158 only be used in presence of a prototype.
159 <tag/Availability/cc65
160 <tag/See also/
161 <ref id="cclearxy" name="cclearxy">,
162 <ref id="clrscr" name="clrscr">
163 <tag/Example/Actual code using the function.
164 </descrip>
165 </quote>
166
167
168 <sect1>cclearxy<label id="cclearxy"><p>
169
170 <quote>
171 <descrip>
172 <tag/Function/Clear part of a line (write a given amount of spaces) starting
173 at a specific screen position.
174 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
175 <tag/Declaration/<tt/void __fastcall__ cclearxy (unsigned char length);/
176 <tag/Description/The function moves the cursor to a specific position, and
177 will then clear part of the line by writing <tt/length/ spaces in the current
178 text color.
179 <tag/Limits/The function is only available as fastcall function, so it may
180 only be used in presence of a prototype.
181 <tag/Availability/cc65
182 <tag/See also/
183 <ref id="cclear" name="cclear">,
184 <ref id="clrscr" name="clrscr">
185 <tag/Example/Actual code using the function.
186 </descrip>
187 </quote>
188
189
190 <sect1>cgetc<label id="cgetc"><p>
191
192 <quote>
193 <descrip>
194 <tag/Function/Read a character from the keyboard.
195 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
196 <tag/Declaration/<tt/char cgetc (void);/
197 <tag/Description/The function reads a character from the keyboard. If there is
198 no character available, <tt/cgetc/ waits until the user presses a key. If the
199 cursor is enabled by use of the <tt/cursor/ function, a blinking cursor is
200 displayed while waiting.
201 <tag/Limits/If the system supports a keyboard buffer, <tt/cgetc/ will fetch a
202 key from this buffer and wait only if the buffer is empty.
203 <tag/Availability/cc65
204 <tag/See also/
205 <ref id="cursor" name="cursor">,
206 <ref id="kbhit" name="kbhit">
207 <tag/Example/Actual code using the function.
208 </descrip>
209 </quote>
210
211
212 <sect1>clrscr<label id="clrscr"><p>
213
214 <quote>
215 <descrip>
216 <tag/Function/Clear the text screen.
217 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
218 <tag/Declaration/<tt/void clrscr (void);/
219 <tag/Description/The function clears the text screen and moves the cursor to
220 the upper left corner.
221 <tag/Availability/cc65
222 <tag/See also/
223 <ref id="cclear" name="cclear">,
224 <ref id="cclearxy" name="cclearxy">
225 <tag/Example/Actual code using the function.
226 </descrip>
227 </quote>
228
229
230 <sect1>cursor<label id="cursor"><p>
231
232 <quote>
233 <descrip>
234 <tag/Function/Enable/disable a blinking cursor when waiting for keyboard input.
235 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
236 <tag/Declaration/<tt/unsigned char __fastcall__ cursor (unsigned char onoff);/
237 <tag/Description/If the argument to the function is non zero, a blinking cursor
238 will be enabled when the <tt/cgetc/ function waits for input from the keyboard.
239 If the argument is zero, <tt/cgetc/ will wait without a blinking cursor.
240 <tag/Limits/The function is only available as fastcall function, so it may only 
241 be used in presence of a prototype.
242 <tag/Availability/cc65
243 <tag/See also/
244 <ref id="cgetc" name="cgetc">,
245 <ref id="kbhit" name="kbhit">
246 <tag/Example/Actual code using the function.
247 </descrip>
248 </quote>
249
250
251 <sect1>isalnum<label id="isalnum"><p>
252
253 <quote>
254 <descrip>
255 <tag/Function/Check if a given character is a letter or digit.
256 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
257 <tag/Declaration/<tt/int __fastcall__ isalnum (int c);/
258 <tag/Description/The function returns a value of zero if the given argument
259 is a letter or digit. The return value is non zero if the character
260 is anything else.
261 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
262 generated inline sequence will not work correctly for values outside the range
263 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
264 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
265 without <tt/-Os/, the function is only available as fastcall function, so it
266 may only be used in presence of a prototype.
267 <tag/Availability/ISO 9899
268 <tag/See also/
269 <ref id="isalpha" name="isalpha">,
270 <ref id="isascii" name="isascii">,
271 <ref id="isblank" name="isblank">,
272 <ref id="iscntrl" name="iscntrl">,
273 <ref id="isdigit" name="isdigit">,
274 <ref id="isgraph" name="isgraph">,
275 <ref id="islower" name="islower">,
276 <ref id="isprint" name="isprint">,
277 <ref id="ispunct" name="ispunct">,
278 <ref id="isspace" name="isspace">,
279 <ref id="isupper" name="isupper">,
280 <ref id="isxdigit" name="isxdigit">
281 <tag/Example/Actual code using the function.
282 </descrip>
283 </quote>
284
285
286 <sect1>isalpha<label id="isalpha"><p>
287
288 <quote>
289 <descrip>
290 <tag/Function/Check if a given character is a letter.
291 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
292 <tag/Declaration/<tt/int __fastcall__ isalpha (int c);/
293 <tag/Description/The function returns a value of zero if the given argument
294 is a letter. The return value is non zero if the character is anything else.
295 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
296 generated inline sequence will not work correctly for values outside the range
297 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
298 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
299 without <tt/-Os/, the function is only available as fastcall function, so it
300 may only be used in presence of a prototype.
301 <tag/Availability/ISO 9899
302 <tag/See also/
303 <ref id="isalnum" name="isalnum">,
304 <ref id="isascii" name="isascii">,
305 <ref id="isblank" name="isblank">,
306 <ref id="iscntrl" name="iscntrl">,
307 <ref id="isdigit" name="isdigit">,
308 <ref id="isgraph" name="isgraph">,
309 <ref id="islower" name="islower">,
310 <ref id="isprint" name="isprint">,
311 <ref id="ispunct" name="ispunct">,
312 <ref id="isspace" name="isspace">,
313 <ref id="isupper" name="isupper">,
314 <ref id="isxdigit" name="isxdigit">
315 <tag/Example/Actual code using the function.
316 </descrip>
317 </quote>
318
319
320 <sect1>isascii<label id="isascii"><p>
321
322 <quote>
323 <descrip>
324 <tag/Function/Check if a given character is in the ASCII (0..127) range.
325 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
326 <tag/Declaration/<tt/int __fastcall__ isascii (int c);/
327 <tag/Description/The function returns a value of zero if the given argument
328 is in the range 0..127 (the range of valid ASCII characters) and a non zero
329 value if not.
330 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
331 generated inline sequence will not work correctly for values outside the range
332 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
333 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
334 without <tt/-Os/, the function is only available as fastcall function, so it
335 may only be used in presence of a prototype.
336 <tag/Availability/ISO 9899
337 <tag/See also/
338 <ref id="isalnum" name="isalnum">,
339 <ref id="isalpha" name="isalpha">,
340 <ref id="isblank" name="isblank">,
341 <ref id="iscntrl" name="iscntrl">,
342 <ref id="isdigit" name="isdigit">,
343 <ref id="isgraph" name="isgraph">,
344 <ref id="islower" name="islower">,
345 <ref id="isprint" name="isprint">,
346 <ref id="ispunct" name="ispunct">,
347 <ref id="isspace" name="isspace">,
348 <ref id="isupper" name="isupper">,
349 <ref id="isxdigit" name="isxdigit">
350 <tag/Example/Actual code using the function.
351 </descrip>
352 </quote>
353
354
355 <sect1>isblank<label id="isblank"><p>
356
357 <quote>
358 <descrip>
359 <tag/Function/Check if a given character is a space or tab.
360 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
361 <tag/Declaration/<tt/int __fastcall__ isblank (int c);/
362 <tag/Description/The function returns a value of zero if the given argument
363 is a blank or space character. The return value is non zero if the character
364 is anything else.
365 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
366 generated inline sequence will not work correctly for values outside the range
367 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
368 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
369 without <tt/-Os/, the function is only available as fastcall function, so it
370 may only be used in presence of a prototype.
371 <tag/Availability/cc65
372 <tag/See also/
373 <ref id="isalnum" name="isalnum">,
374 <ref id="isalpha" name="isalpha">,
375 <ref id="isascii" name="isascii">,
376 <ref id="iscntrl" name="iscntrl">,
377 <ref id="isdigit" name="isdigit">,
378 <ref id="isgraph" name="isgraph">,
379 <ref id="islower" name="islower">,
380 <ref id="isprint" name="isprint">,
381 <ref id="ispunct" name="ispunct">,
382 <ref id="isspace" name="isspace">,
383 <ref id="isupper" name="isupper">,
384 <ref id="isxdigit" name="isxdigit">
385 <tag/Example/Actual code using the function.
386 </descrip>
387 </quote>
388
389
390 <sect1>iscntrl<label id="iscntrl"><p>
391
392 <quote>
393 <descrip>
394 <tag/Function/Check if a given character is a control character.
395 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
396 <tag/Declaration/<tt/int __fastcall__ iscntrl (int c);/
397 <tag/Description/The function returns a value of zero if the given argument
398 is a control character. The return value is non zero if the character
399 is anything else.
400 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
401 generated inline sequence will not work correctly for values outside the range
402 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
403 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
404 without <tt/-Os/, the function is only available as fastcall function, so it
405 may only be used in presence of a prototype.
406 <tag/Availability/ISO 9899
407 <tag/See also/
408 <ref id="isalnum" name="isalnum">,
409 <ref id="isalpha" name="isalpha">,
410 <ref id="isascii" name="isascii">,
411 <ref id="isblank" name="isblank">,
412 <ref id="isdigit" name="isdigit">,
413 <ref id="isgraph" name="isgraph">,
414 <ref id="islower" name="islower">,
415 <ref id="isprint" name="isprint">,
416 <ref id="ispunct" name="ispunct">,
417 <ref id="isspace" name="isspace">,
418 <ref id="isupper" name="isupper">,
419 <ref id="isxdigit" name="isxdigit">
420 <tag/Example/Actual code using the function.
421 </descrip>
422 </quote>
423
424
425 <sect1>isdigit<label id="isdigit"><p>
426
427 <quote>
428 <descrip>
429 <tag/Function/Check if a given character is a digit.
430 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
431 <tag/Declaration/<tt/int __fastcall__ isdigit (int c);/
432 <tag/Description/The function returns a value of zero if the given argument
433 is a digit. The return value is non zero if the character is anything else.
434 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
435 generated inline sequence will not work correctly for values outside the range
436 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
437 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
438 without <tt/-Os/, the function is only available as fastcall function, so it
439 may only be used in presence of a prototype.
440 <tag/Availability/ISO 9899
441 <tag/See also/
442 <ref id="isalnum" name="isalnum">,
443 <ref id="isalpha" name="isalpha">,
444 <ref id="isascii" name="isascii">,
445 <ref id="isblank" name="isblank">,
446 <ref id="iscntrl" name="iscntrl">,
447 <ref id="isgraph" name="isgraph">,
448 <ref id="islower" name="islower">,
449 <ref id="isprint" name="isprint">,
450 <ref id="ispunct" name="ispunct">,
451 <ref id="isspace" name="isspace">,
452 <ref id="isupper" name="isupper">,
453 <ref id="isxdigit" name="isxdigit">
454 <tag/Example/Actual code using the function.
455 </descrip>
456 </quote>
457
458
459 <sect1>isgraph<label id="isgraph"><p>
460
461 <quote>
462 <descrip>
463 <tag/Function/Check if a given character is a printable character (except
464 space).
465 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
466 <tag/Declaration/<tt/int __fastcall__ isgraph (int c);/
467 <tag/Description/The function returns a value of zero if the given argument
468 is a printable character with the exception of space. The return value is non
469 zero if the character is anything else.
470 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
471 generated inline sequence will not work correctly for values outside the range
472 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
473 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
474 without <tt/-Os/, the function is only available as fastcall function, so it
475 may only be used in presence of a prototype.
476 <tag/Availability/ISO 9899
477 <tag/See also/
478 <ref id="isalnum" name="isalnum">,
479 <ref id="isalpha" name="isalpha">,
480 <ref id="isascii" name="isascii">,
481 <ref id="isblank" name="isblank">,
482 <ref id="iscntrl" name="iscntrl">,
483 <ref id="isdigit" name="isdigit">,
484 <ref id="islower" name="islower">,
485 <ref id="isprint" name="isprint">,
486 <ref id="ispunct" name="ispunct">,
487 <ref id="isspace" name="isspace">,
488 <ref id="isupper" name="isupper">,
489 <ref id="isxdigit" name="isxdigit">
490 <tag/Example/Actual code using the function.
491 </descrip>
492 </quote>
493
494
495 <sect1>islower<label id="islower"><p>
496
497 <quote>
498 <descrip>
499 <tag/Function/Check if a given character is a lower case letter.
500 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
501 <tag/Declaration/<tt/int __fastcall__ islower (int c);/
502 <tag/Description/The function returns a value of zero if the given argument
503 is a lower case letter. The return value is non zero if the character is
504 anything else.
505 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
506 generated inline sequence will not work correctly for values outside the range
507 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
508 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
509 without <tt/-Os/, the function is only available as fastcall function, so it
510 may only be used in presence of a prototype.
511 <tag/Availability/ISO 9899
512 <tag/See also/
513 <ref id="isalnum" name="isalnum">,
514 <ref id="isalpha" name="isalpha">,
515 <ref id="isascii" name="isascii">,
516 <ref id="isblank" name="isblank">,
517 <ref id="iscntrl" name="iscntrl">,
518 <ref id="isdigit" name="isdigit">,
519 <ref id="isgraph" name="isgraph">,
520 <ref id="isprint" name="isprint">,
521 <ref id="ispunct" name="ispunct">,
522 <ref id="isspace" name="isspace">,
523 <ref id="isupper" name="isupper">,
524 <ref id="isxdigit" name="isxdigit">
525 <tag/Example/Actual code using the function.
526 </descrip>
527 </quote>
528
529
530 <sect1>isprint<label id="isprint"><p>
531
532 <quote>
533 <descrip>
534 <tag/Function/Check if a given character is a printable character.
535 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
536 <tag/Declaration/<tt/int __fastcall__ isprint (int c);/
537 <tag/Description/The function returns a value of zero if the given argument
538 is a printable character (this includes the space character). The return value
539 is non zero if the character is anything else.
540 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
541 generated inline sequence will not work correctly for values outside the range
542 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
543 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
544 without <tt/-Os/, the function is only available as fastcall function, so it
545 may only be used in presence of a prototype.
546 <tag/Availability/ISO 9899
547 <tag/See also/
548 <ref id="isalnum" name="isalnum">,
549 <ref id="isalpha" name="isalpha">,
550 <ref id="isascii" name="isascii">,
551 <ref id="isblank" name="isblank">,
552 <ref id="iscntrl" name="iscntrl">,
553 <ref id="isdigit" name="isdigit">,
554 <ref id="isgraph" name="isgraph">,
555 <ref id="islower" name="islower">,
556 <ref id="ispunct" name="ispunct">,
557 <ref id="isspace" name="isspace">,
558 <ref id="isupper" name="isupper">,
559 <ref id="isxdigit" name="isxdigit">
560 <tag/Example/Actual code using the function.
561 </descrip>
562 </quote>
563
564
565 <sect1>ispunct<label id="ispunct"><p>
566
567 <quote>
568 <descrip>
569 <tag/Function/Check if a given character is a printable character but not a
570 space or an alphanumeric character.
571 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
572 <tag/Declaration/<tt/int __fastcall__ ispunct (int c);/
573 <tag/Description/The function returns a value of zero if the given argument
574 is a printable character, but not a space or anything alphanumeric. The return
575 value is non zero if the character is anything else.
576 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
577 generated inline sequence will not work correctly for values outside the range
578 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
579 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
580 without <tt/-Os/, the function is only available as fastcall function, so it
581 may only be used in presence of a prototype.
582 <tag/Availability/ISO 9899
583 <tag/See also/
584 <ref id="isalnum" name="isalnum">,
585 <ref id="isalpha" name="isalpha">,
586 <ref id="isascii" name="isascii">,
587 <ref id="isblank" name="isblank">,
588 <ref id="iscntrl" name="iscntrl">,
589 <ref id="isdigit" name="isdigit">,
590 <ref id="isgraph" name="isgraph">,
591 <ref id="islower" name="islower">,
592 <ref id="isprint" name="isprint">,
593 <ref id="isspace" name="isspace">,
594 <ref id="isupper" name="isupper">,
595 <ref id="isxdigit" name="isxdigit">
596 <tag/Example/Actual code using the function.
597 </descrip>
598 </quote>
599
600
601 <sect1>isspace<label id="isspace"><p>
602
603 <quote>
604 <descrip>
605 <tag/Function/Check if a given character is a a white-space character.
606 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
607 <tag/Declaration/<tt/int __fastcall__ isspace (int c);/
608 <tag/Description/The function returns a value of zero if the given argument
609 is a white space character. The return value is non zero if the character is
610 anything else. The standard white space characters are: space, formfeed ('\f'),
611 newline ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab
612 ('\v').
613 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
614 generated inline sequence will not work correctly for values outside the range
615 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
616 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
617 without <tt/-Os/, the function is only available as fastcall function, so it
618 may only be used in presence of a prototype.
619 <tag/Availability/ISO 9899
620 <tag/See also/
621 <ref id="isalnum" name="isalnum">,
622 <ref id="isalpha" name="isalpha">,
623 <ref id="isascii" name="isascii">,
624 <ref id="isblank" name="isblank">,
625 <ref id="iscntrl" name="iscntrl">,
626 <ref id="isdigit" name="isdigit">,
627 <ref id="isgraph" name="isgraph">,
628 <ref id="islower" name="islower">,
629 <ref id="isprint" name="isprint">,
630 <ref id="ispunct" name="ispunct">,
631 <ref id="isupper" name="isupper">,
632 <ref id="isxdigit" name="isxdigit">
633 <tag/Example/Actual code using the function.
634 </descrip>
635 </quote>
636
637
638 <sect1>isupper<label id="isupper"><p>
639
640 <quote>
641 <descrip>
642 <tag/Function/Check if a given character is an upper case letter.
643 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
644 <tag/Declaration/<tt/int __fastcall__ isupper (int c);/
645 <tag/Description/The function returns a value of zero if the given argument
646 is an upper case letter. The return value is non zero if the character is
647 anything else.
648 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
649 generated inline sequence will not work correctly for values outside the range
650 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
651 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
652 without <tt/-Os/, the function is only available as fastcall function, so it
653 may only be used in presence of a prototype.
654 <tag/Availability/ISO 9899
655 <tag/See also/
656 <ref id="isalnum" name="isalnum">,
657 <ref id="isalpha" name="isalpha">,
658 <ref id="isascii" name="isascii">,
659 <ref id="isblank" name="isblank">,
660 <ref id="iscntrl" name="iscntrl">,
661 <ref id="isdigit" name="isdigit">,
662 <ref id="isgraph" name="isgraph">,
663 <ref id="islower" name="islower">,
664 <ref id="isprint" name="isprint">,
665 <ref id="ispunct" name="ispunct">,
666 <ref id="isspace" name="isspace">,
667 <ref id="isxdigit" name="isxdigit">
668 <tag/Example/Actual code using the function.
669 </descrip>
670 </quote>
671
672
673 <sect1>isxdigit<label id="isxdigit"><p>
674
675 <quote>
676 <descrip>
677 <tag/Function/Check if a given character is a hexadecimal digit.
678 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
679 <tag/Declaration/<tt/int __fastcall__ isxdigit (int c);/
680 <tag/Description/The function returns a value of zero if the given argument
681 is a hexadecimal digit (0..9, a..f and A..F). The return value is non zero
682 if the character is anything else.
683 <tag/Limits/When compiling with <tt/-Os/ the function is actually a macro. The
684 generated inline sequence will not work correctly for values outside the range
685 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of this range. The non
686 inline function may be accessed by <tt/#undef/'ing the macro. When compiling
687 without <tt/-Os/, the function is only available as fastcall function, so it
688 may only be used in presence of a prototype.
689 <tag/Availability/ISO 9899
690 <tag/See also/
691 <ref id="isalnum" name="isalnum">,
692 <ref id="isalpha" name="isalpha">,
693 <ref id="isascii" name="isascii">,
694 <ref id="isblank" name="isblank">,
695 <ref id="iscntrl" name="iscntrl">,
696 <ref id="isdigit" name="isdigit">,
697 <ref id="isgraph" name="isgraph">,
698 <ref id="islower" name="islower">,
699 <ref id="isprint" name="isprint">,
700 <ref id="ispunct" name="ispunct">,
701 <ref id="isspace" name="isspace">,
702 <ref id="isupper" name="isupper">
703 <tag/Example/Actual code using the function.
704 </descrip>
705 </quote>
706
707
708 <sect1>kbhit<label id="kbhit"><p>
709
710 <quote>
711 <descrip>
712 <tag/Function/Check if there's a key waiting in the keyboard buffer.
713 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
714 <tag/Declaration/<tt/unsigned char kbhit (void);/
715 <tag/Description/The function returns a value of zero if there is no character
716 waiting to be read from the keyboard. It returns non zero otherwise.
717 <tag/Limits/If the system does not support a keyboard buffer (most systems
718 do), the function is rather useless.
719 <tag/Availability/cc65
720 <tag/See also/
721 <ref id="cgetc" name="cgetc">,
722 <ref id="cursor" name="cursor">
723 <tag/Example/Actual code using the function.
724 </descrip>
725 </quote>
726
727
728 <sect1>textcolor<label id="textcolor"><p>
729
730 <quote>
731 <descrip>
732 <tag/Function/Set the text color.
733 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
734 <tag/Declaration/<tt/unsigned char __fastcall__ textcolor (unsigned char color);/
735 <tag/Description/The function will set a new text color. It returns the old
736 (current) text color. Text output using any <tt/conio.h/ function will use
737 the color set by this function.
738 <tag/Limits/Text colors are system dependent. The function may have no effect
739 on systems where the text color cannot be changed. The function is only
740 available as fastcall function, so it may only be used in presence of a
741 prototype.
742 <tag/Availability/cc65
743 <tag/See also/
744 <ref id="bgcolor" name="bgcolor">,
745 <ref id="bordercolor" name="bordercolor">
746 <tag/Example/Actual code using the function.
747 </descrip>
748 </quote>
749
750
751 <sect1>tolower<label id="tolower"><p>
752
753 <quote>
754 <descrip>
755 <tag/Function/Convert a character into its lower case representation.
756 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
757 <tag/Declaration/<tt/int __fastcall__ tolower (int c);/
758 <tag/Description/The function returns the given character converted to lower
759 case. If the given character is not a letter, it is returned unchanged.
760 <tag/Limits/The function is only available as fastcall function, so it may
761 only be used in presence of a prototype.
762 <tag/Availability/ISO 9899
763 <tag/See also/
764 <ref id="islower" name="islower">,
765 <ref id="isupper" name="isupper">,
766 <ref id="toupper" name="toupper">
767 <tag/Example/Actual code using the function.
768 </descrip>
769 </quote>
770
771
772 <sect1>toupper<label id="toupper"><p>
773
774 <quote>
775 <descrip>
776 <tag/Function/Convert a character into its upper case representation.
777 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
778 <tag/Declaration/<tt/int __fastcall__ toupper (int c);/
779 <tag/Description/The function returns the given character converted to upper
780 case. If the given character is not a letter, it is returned unchanged.
781 <tag/Limits/The function is only available as fastcall function, so it may
782 only be used in presence of a prototype.
783 <tag/Availability/ISO 9899
784 <tag/See also/
785 <ref id="islower" name="islower">,
786 <ref id="isupper" name="isupper">,
787 <ref id="tolower" name="tolower">
788 <tag/Example/Actual code using the function.
789 </descrip>
790 </quote>
791
792
793 </article>
794
795