]> git.sur5r.net Git - cc65/blob - doc/funcref.sgml
A few more functions
[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 For an overview about the available libraries, their purpose, and any
26 differences to the ISO standard, please have a look at the <htmlurl
27 url="library.html" name="cc65 Library Overview">.
28
29 <bf/Note:/ Standard C functions are listed here, but not described in detail.
30 Since these functions behave identical on all standard compliant systems, they
31 are described in any book covering standard C.
32
33 Each entry for a function contains a detailed description
34
35 <quote>
36 <descrip>
37 <tag/Function/Summary of what <bf/function/ does.
38 <tag/Header/The header file that contains the declaration.
39 <tag/Declaration/Describes the needed header files and declaration of the
40 function.
41 <tag/Description/Description of the function.
42 <tag/Limits/Limits.
43 <tag/Availability/The availability of the function.
44 <tag/See also/Other related functions.
45 <tag/Example/A piece of actual code using the function.
46 </descrip>
47 </quote>
48
49
50 <sect>Functions by header file<p>
51
52 <sect1><tt/6502.h/<label id="6502.h"><p>
53
54 <itemize>
55 <item><ref id="BRK" name="BRK">
56 <item><ref id="CLI" name="CLI">
57 <item><ref id="SEI" name="SEI">
58 <!-- <item><ref id="_sys" name="_sys"> -->
59 <!-- <item><ref id="getcpu" name="getcpu"> -->
60 <!-- <item><ref id="reset_brk" name="reset_brk"> -->
61 <!-- <item><ref id="set_brk" name="set_brk"> -->
62 </itemize>
63
64
65 <sect1><tt/assert.h/<label id="assert.h"><p>
66
67 <itemize>
68 <item><ref id="assert" name="assert">
69 </itemize>
70
71
72 <sect1><tt/conio.h/<label id="conio.h"><p>
73
74 <itemize>
75 <item><ref id="bgcolor" name="bgcolor">
76 <item><ref id="bordercolor" name="bordercolor">
77 <item><ref id="cclear" name="cclear">
78 <item><ref id="cclearxy" name="cclearxy">
79 <item><ref id="cgetc" name="cgetc">
80 <item><ref id="chline" name="chline">
81 <item><ref id="chlinexy" name="chlinexy">
82 <item><ref id="clrscr" name="clrscr">
83 <!-- <item><ref id="cprintf" name="cprintf"> -->
84 <!-- <item><ref id="cputc" name="cputc"> -->
85 <!-- <item><ref id="cputcxy" name="cputcxy"> -->
86 <!-- <item><ref id="cputs" name="cputs"> -->
87 <!-- <item><ref id="cputsxy" name="cputsxy"> -->
88 <item><ref id="cursor" name="cursor">
89 <item><ref id="cvline" name="cvline">
90 <item><ref id="cvlinexy" name="cvlinexy">
91 <item><ref id="gotox" name="gotox">
92 <item><ref id="gotoxy" name="gotoxy">
93 <item><ref id="gotoy" name="gotoy">
94 <item><ref id="kbhit" name="kbhit">
95 <item><ref id="revers" name="revers">
96 <item><ref id="screensize" name="screensize">
97 <item><ref id="textcolor" name="textcolor">
98 <!-- <item><ref id="vcprintf" name="vcprintf"> -->
99 <item><ref id="wherex" name="wherex">
100 <item><ref id="wherey" name="wherey">
101 </itemize>
102
103
104 <sect1><tt/ctype.h/<label id="ctype.h"><p>
105
106 <itemize>
107 <item><ref id="isalnum" name="isalnum">
108 <item><ref id="isalpha" name="isalpha">
109 <item><ref id="isascii" name="isascii">
110 <item><ref id="isblank" name="isblank">
111 <item><ref id="iscntrl" name="iscntrl">
112 <item><ref id="isdigit" name="isdigit">
113 <item><ref id="isgraph" name="isgraph">
114 <item><ref id="islower" name="islower">
115 <item><ref id="isprint" name="isprint">
116 <item><ref id="ispunct" name="ispunct">
117 <item><ref id="isspace" name="isspace">
118 <item><ref id="isupper" name="isupper">
119 <item><ref id="isxdigit" name="isxdigit">
120 <item><ref id="tolower" name="tolower">
121 <item><ref id="toupper" name="toupper">
122 </itemize>
123
124
125 <sect1><tt/stdlib.h/<label id="stdlib.h"><p>
126
127 <itemize>
128 <item><ref id="abort" name="abort">
129 <item><ref id="atexit" name="atexit">
130 <item><ref id="exit" name="exit">
131 </itemize>
132
133
134 <sect1><tt/string.h/<label id="string.h"><p>
135
136 <itemize>
137 <item><ref id="strcat" name="strcat">
138 <item><ref id="strchr" name="strchr">
139 <item><ref id="strcpy" name="strcpy">
140 <item><ref id="strlen" name="strlen">
141 <item><ref id="strlower" name="strlower">
142 <item><ref id="strlwr" name="strlwr">
143 <item><ref id="strncpy" name="strncpy">
144 <item><ref id="strrchr" name="strrchr">
145 <item><ref id="strupper" name="strupper">
146 <item><ref id="strupr" name="strupr">
147 </itemize>
148
149
150
151
152 <sect>Alphabetical function reference<p>
153
154 <sect1>BRK<label id="BRK"><p>
155
156 <quote>
157 <descrip>
158 <tag/Function/Insert a 6502 BRK instrunction into the code.
159 <tag/Header/<tt/<ref id="6502.h" name="6502.h">/
160 <tag/Declaration/<tt/void BRK (void);/
161 <tag/Description/The function will insert a 6502 BRK instruction into the code
162 which may be used to trigger a debugger.
163 <tag/Limits/<itemize>
164 <item>The function is actually a macro.
165 <item>The inserted instruction may lead to unexpected results if no debugger
166 is present.
167 </itemize>
168 <tag/Availability/cc65
169 <tag/See also/
170 <ref id="CLI" name="CLI">,
171 <ref id="SEI" name="SEI">
172 <tag/Example/None.
173 </descrip>
174 </quote>
175
176
177 <sect1>CLI<label id="CLI"><p>
178
179 <quote>
180 <descrip>
181 <tag/Function/Insert a 6502 CLI instrunction into the code.
182 <tag/Header/<tt/<ref id="6502.h" name="6502.h">/
183 <tag/Declaration/<tt/void CLI (void);/
184 <tag/Description/The function will insert a 6502 CLI instruction into the code,
185 so interrupts are disabled. Note that non maskable interrupts cannot be
186 disabled.
187 <tag/Limits/<itemize>
188 <item>The function is actually a macro.
189 <item>Disabling interrupts may lead to unexpected results.
190 </itemize>
191 <tag/Availability/cc65
192 <tag/See also/
193 <ref id="BRK" name="BRK">,
194 <ref id="SEI" name="SEI">
195 <tag/Example/None.
196 </descrip>
197 </quote>
198
199
200 <sect1>SEI<label id="SEI"><p>
201
202 <quote>
203 <descrip>
204 <tag/Function/Insert a 6502 SEI instrunction into the code.
205 <tag/Header/<tt/<ref id="6502.h" name="6502.h">/
206 <tag/Declaration/<tt/void SEI (void);/
207 <tag/Description/The function will insert a 6502 SEI instruction into the code,
208 so interrupts are enabled. Enabling interrupts has no effects if they are
209 already enabled (the default).
210 <tag/Limits/<itemize>
211 <item>The function is actually a macro.
212 </itemize>
213 <tag/Availability/cc65
214 <tag/See also/
215 <ref id="BRK" name="BRK">,
216 <ref id="CLI" name="CLI">
217 <tag/Example/None.
218 </descrip>
219 </quote>
220
221
222 <sect1>abort<label id="abort"><p>
223
224 <quote>
225 <descrip>
226 <tag/Function/Terminates a program abnormally.
227 <tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
228 <tag/Declaration/<tt/void abort (void);/
229 <tag/Description/<tt/abort/ writes a termination message on stderr, then
230 terminates the program with an exit code of 3.
231 <tag/Availability/ISO 9899
232 <tag/See also/
233 <ref id="assert" name="assert">,
234 <ref id="exit" name="exit">
235 <tag/Example/None.
236 </descrip>
237 </quote>
238
239
240 <sect1>assert<label id="assert"><p>
241
242 <quote>
243 <descrip>
244 <tag/Function/Test a condition and possibly abort.
245 <tag/Header/<tt/<ref id="assert.h" name="assert.h">/
246 <tag/Declaration/<tt/void assert (int cond);/
247 <tag/Description/<tt/assert/ is a macro that expands to a <tt/id/
248 statement. If the condition evaluates t zero (false), assert prints a message
249 on stderr and aborts the program.
250 <tag/Limits/<itemize>
251 <item>The function is actually a macro.
252 </itemize>
253 <tag/Availability/ISO 9899
254 <tag/See also/
255 <ref id="abort" name="abort">,
256 <ref id="exit" name="exit">
257 <tag/Example/None.
258 </descrip>
259 </quote>
260
261
262 <sect1>atexit<label id="atexit"><p>
263
264 <quote>
265 <descrip>
266 <tag/Function/Register an exit function.
267 <tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
268 <tag/Declaration/<tt/int __fastcall__ atexit (void (*exitfunc) (void));/
269 <tag/Description/<tt/atexit/ registers the function pointed to by
270 <tt/exitfunc/ as an exit function. Exit functions are called when the program
271 terminates, they are called in LIFO order (the last function registered is
272 called first). <tt/atexit/ returns zero on success and a nonzero value on
273 failure.
274 <tag/Limits/<itemize>
275 <item>A maximum of 5 exit functions can be registered.
276 <item>There is no way to unregister an exit function.
277 <item>The function is only available as fastcall function, so it may only be
278 used in presence of a prototype.
279 </itemize>
280 <tag/Availability/ISO 9899
281 <tag/See also/
282 <ref id="abort" name="abort">,
283 <ref id="exit" name="exit">
284 <tag/Example/None.
285 </descrip>
286 </quote>
287
288
289 <sect1>bgcolor<label id="bgcolor"><p>
290
291 <quote>
292 <descrip>
293 <tag/Function/Set the background text color.
294 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
295 <tag/Declaration/<tt/unsigned char __fastcall__ bgcolor (unsigned char color);/
296 <tag/Description/The function will set a new background text color. It returns
297 the old (current) background color.
298 <tag/Limits/<itemize>
299 <item>Background colors are system dependent. The function may have no effect
300 on systems where the background color cannot be changed.
301 <item>The function is only available as fastcall function, so it may only be
302 used in presence of a prototype.
303 </itemize>
304 <tag/Availability/cc65
305 <tag/See also/
306 <ref id="bordercolor" name="bordercolor">,
307 <ref id="textcolor" name="textcolor">
308 <tag/Example/None.
309 </descrip>
310 </quote>
311
312
313 <sect1>bordercolor<label id="bordercolor"><p>
314
315 <quote>
316 <descrip>
317 <tag/Function/Set the border (frame) color.
318 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
319 <tag/Declaration/<tt/unsigned char __fastcall__ bordercolor (unsigned char color);/
320 <tag/Description/The function will set a new border color. It returns the old
321 (current) border color.
322 <tag/Limits/<itemize>
323 <item>Border colors are system dependent. The function may have no effect
324 on systems where the border color cannot be changed.
325 <item>The function is only available as fastcall function, so it may only
326 be used in presence of a prototype.
327 </itemize>
328 <tag/Availability/cc65
329 <tag/See also/
330 <ref id="bgcolor" name="bgcolor">,
331 <ref id="textcolor" name="textcolor">
332 <tag/Example/None.
333 </descrip>
334 </quote>
335
336
337 <sect1>cclear<label id="cclear"><p>
338
339 <quote>
340 <descrip>
341 <tag/Function/Clear part of a line (write a given amount of spaces).
342 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
343 <tag/Declaration/<tt/void __fastcall__ cclear (unsigned char length);/
344 <tag/Description/The function clears part of a line by writing <tt/length/
345 spaces in the current text color.
346 <tag/Limits/<itemize>
347 <item>The function is only available as fastcall function, so it may
348 only be used in presence of a prototype.
349 </itemize>
350 <tag/Availability/cc65
351 <tag/See also/
352 <ref id="cclearxy" name="cclearxy">,
353 <ref id="clrscr" name="clrscr">
354 <tag/Example/None.
355 </descrip>
356 </quote>
357
358
359 <sect1>cclearxy<label id="cclearxy"><p>
360
361 <quote>
362 <descrip>
363 <tag/Function/Clear part of a line (write a given amount of spaces) starting
364 at a specific screen position.
365 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
366 <tag/Declaration/<tt/void __fastcall__ cclearxy (unsigned char length);/
367 <tag/Description/The function moves the cursor to a specific position, and
368 will then clear part of the line by writing <tt/length/ spaces in the current
369 text color.
370 <tag/Limits/<itemize>
371 <item>The function is only available as fastcall function, so it may
372 only be used in presence of a prototype.
373 </itemize>
374 <tag/Availability/cc65
375 <tag/See also/
376 <ref id="cclear" name="cclear">,
377 <ref id="clrscr" name="clrscr">
378 <tag/Example/None.
379 </descrip>
380 </quote>
381
382
383 <sect1>cgetc<label id="cgetc"><p>
384
385 <quote>
386 <descrip>
387 <tag/Function/Read a character from the keyboard.
388 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
389 <tag/Declaration/<tt/char cgetc (void);/
390 <tag/Description/The function reads a character from the keyboard. If there is
391 no character available, <tt/cgetc/ waits until the user presses a key. If the
392 cursor is enabled by use of the <tt/cursor/ function, a blinking cursor is
393 displayed while waiting.
394 <tag/Limits/<itemize>
395 <item>If the system supports a keyboard buffer, <tt/cgetc/ will fetch a key
396 from this buffer and wait only if the buffer is empty.
397 </itemize>
398 <tag/Availability/cc65
399 <tag/See also/
400 <ref id="cursor" name="cursor">,
401 <ref id="kbhit" name="kbhit">
402 <tag/Example/None.
403 </descrip>
404 </quote>
405
406
407 <sect1>chline<label id="chline"><p>
408
409 <quote>
410 <descrip>
411 <tag/Function/Output a horizontal line in text mode.
412 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
413 <tag/Declaration/<tt/void __fastcall__ chline (unsigned char length);/
414 <tag/Description/The function outputs a horizontal line with the given length
415 starting at the current cursor position.
416 <tag/Limits/<itemize>
417 <item>The character used to draw the horizontal line is system dependent.
418 If available, a line drawing character is used. Drawing a line that is partially
419 off screen leads to undefined behaviour.
420 <item>The function is only available as fastcall function, so it may only be
421 used in presence of a prototype.
422 </itemize>
423 <tag/Availability/cc65
424 <tag/See also/
425 <ref id="chlinexy" name="chlinexy">,
426 <ref id="cvline" name="cvline">,
427 <ref id="cvlinexy" name="cvlinexy">
428 <tag/Example/None.
429 </descrip>
430 </quote>
431
432
433 <sect1>chlinexy<label id="chlinexy"><p>
434
435 <quote>
436 <descrip>
437 <tag/Function/Output a horizontal line at a given position in text mode.
438 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
439 <tag/Declaration/<tt/void __fastcall__ chlinexy (unsigned char x, unsigned char y, unsigned char length);/
440 <tag/Description/The function outputs a horizontal line with the given length
441 starting at a given position.
442 <tag/Limits/<itemize>
443 <item>The character used to draw the horizontal line is system dependent.
444 If available, a line drawing character is used. Drawing a line that is partially
445 off screen leads to undefined behaviour.
446 <item>The function is only available as fastcall function, so it may only be
447 used in presence of a prototype.
448 </itemize>
449 <tag/Availability/cc65
450 <tag/See also/
451 <ref id="chline" name="chline">,
452 <ref id="cvline" name="cvline">,
453 <ref id="cvlinexy" name="cvlinexy">
454 <tag/Example/None.
455 </descrip>
456 </quote>
457
458
459 <sect1>clrscr<label id="clrscr"><p>
460
461 <quote>
462 <descrip>
463 <tag/Function/Clear the text screen.
464 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
465 <tag/Declaration/<tt/void clrscr (void);/
466 <tag/Description/The function clears the text screen and moves the cursor to
467 the upper left corner.
468 <tag/Availability/cc65
469 <tag/See also/
470 <ref id="cclear" name="cclear">,
471 <ref id="cclearxy" name="cclearxy">
472 <tag/Example/None.
473 </descrip>
474 </quote>
475
476
477 <sect1>cursor<label id="cursor"><p>
478
479 <quote>
480 <descrip>
481 <tag/Function/Enable/disable a blinking cursor when waiting for keyboard input.
482 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
483 <tag/Declaration/<tt/unsigned char __fastcall__ cursor (unsigned char onoff);/
484 <tag/Description/If the argument to the function is non zero, a blinking cursor
485 will be enabled when the <tt/cgetc/ function waits for input from the keyboard.
486 If the argument is zero, <tt/cgetc/ will wait without a blinking cursor.
487 <tag/Limits/<itemize>
488 <item>The function is only available as fastcall function, so it may only
489 be used in presence of a prototype.
490 </itemize>
491 <tag/Availability/cc65
492 <tag/See also/
493 <ref id="cgetc" name="cgetc">,
494 <ref id="kbhit" name="kbhit">
495 <tag/Example/None.
496 </descrip>
497 </quote>
498
499
500 <sect1>cvline<label id="cvline"><p>
501
502 <quote>
503 <descrip>
504 <tag/Function/Output a vertical line in text mode.
505 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
506 <tag/Declaration/<tt/void __fastcall__ cvline (unsigned char length);/
507 <tag/Description/The function outputs a vertical line with the given length
508 starting at the current cursor position.
509 <tag/Limits/<itemize>
510 <item>The character used to draw the vertical line is system dependent.
511 If available, a line drawing character is used. Drawing a line that is partially
512 off screen leads to undefined behaviour.
513 <item>The function is only available as fastcall function, so it may only be
514 used in presence of a prototype.
515 </itemize>
516 <tag/Availability/cc65
517 <tag/See also/
518 <ref id="chline" name="chline">,
519 <ref id="chlinexy" name="chlinexy">,
520 <ref id="cvlinexy" name="cvlinexy">
521 <tag/Example/None.
522 </descrip>
523 </quote>
524
525
526 <sect1>cvlinexy<label id="cvlinexy"><p>
527
528 <quote>
529 <descrip>
530 <tag/Function/Output a vertical line at a given position in text mode.
531 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
532 <tag/Declaration/<tt/void __fastcall__ cvlinexy (unsigned char x, unsigned char y, unsigned char length);/
533 <tag/Description/The function outputs a vertical line with the given length
534 starting at a given position.
535 <tag/Limits/<itemize>
536 <item>The character used to draw the vertical line is system dependent.
537 If available, a line drawing character is used. Drawing a line that is partially
538 off screen leads to undefined behaviour.
539 <item>The function is only available as fastcall function, so it may only be
540 used in presence of a prototype.
541 </itemize>
542 <tag/Availability/cc65
543 <tag/See also/
544 <ref id="chline" name="chline">,
545 <ref id="chlinexy" name="chlinexy">,
546 <ref id="cvline" name="cvline">
547 <tag/Example/None.
548 </descrip>
549 </quote>
550
551
552 <sect1>exit<label id="exit"><p>
553
554 <quote>
555 <descrip>
556 <tag/Function/Terminate the program.
557 <tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
558 <tag/Declaration/<tt/void __fastcall__ exit (int status);/
559 <tag/Description/<tt/exit/ terminates the program. The argument specifies the
560 return code of the program. Before termination, all files are closed, buffered
561 output is written and any functions registered with <tt/<ref id="atexit"
562 name="atexit">/ are called. Common values for status are <tt/EXIT_SUCCESS/ and
563 <tt/EXIT_FAILURE/ which are also defined in <tt/<ref id="stdlib.h"
564 name="stdlib.h">/.
565 <tag/Limits/<itemize>
566 <item>The function is only available as fastcall function, so it may only
567 be used in presence of a prototype.
568 <item>It depends on the host machine if the program return code can be
569 evaluated or is ignored.
570 </itemize>
571 <tag/Availability/ISO 9899
572 <tag/See also/
573 <ref id="abort" name="abort">,
574 <ref id="exit" name="exit">
575 <tag/Example/None.
576 </descrip>
577 </quote>
578
579
580 <sect1>gotox<label id="gotox"><p>
581
582 <quote>
583 <descrip>
584 <tag/Function/Move the text mode cursor to a new X position.
585 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
586 <tag/Declaration/<tt/void __fastcall__ gotox (unsigned char x);/
587 <tag/Description/The function moves the text mode cursor to the specified X
588 position while leaving the Y position untouched. The leftmost position on the
589 screen has the coordinate 0.
590 <tag/Limits/<itemize>
591 <item>The function is only available as fastcall function, so it may
592 only be used in presence of a prototype.
593 <item>Invalid values for the X position (out of screen coordinates) may
594 lead to undefined behaviour.
595 </itemize>
596 <tag/Availability/cc65
597 <tag/See also/
598 <ref id="gotoy" name="gotoy">,
599 <ref id="gotoxy" name="gotoxy">,
600 <ref id="wherex" name="wherex">,
601 <ref id="wherey" name="wherey">
602 <tag/Example/None.
603 </descrip>
604 </quote>
605
606
607 <sect1>gotoxy<label id="gotoxy"><p>
608
609 <quote>
610 <descrip>
611 <tag/Function/Move the text mode cursor to a new position.
612 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
613 <tag/Declaration/<tt/void __fastcall__ gotoxy (unsigned char x, unsigned char y);/
614 <tag/Description/The function moves the text mode cursor to the specified
615 position. The leftmost position on the screen has the X coordinate 0, the
616 topmost line has the Y coordinate 0.
617 <tag/Limits/<itemize>
618 <item>The function is only available as fastcall function, so it may only be
619 used in presence of a prototype.
620 <item>Invalid values for any of both coordinates (out of screen positions) may
621 lead to undefined behaviour.
622 </itemize>
623 <tag/Availability/cc65
624 <tag/See also/
625 <ref id="gotox" name="gotox">,
626 <ref id="gotoy" name="gotoy">,
627 <ref id="wherex" name="wherex">,
628 <ref id="wherey" name="wherey">
629 <tag/Example/None.
630 </descrip>
631 </quote>
632
633
634 <sect1>gotoy<label id="gotoy"><p>
635
636 <quote>
637 <descrip>
638 <tag/Function/Move the text mode cursor to a new Y position.
639 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
640 <tag/Declaration/<tt/void __fastcall__ gotoy (unsigned char x);/
641 <tag/Description/The function moves the text mode cursor to the specified Y
642 position while leaving the X position untouched. The uppermost position on the
643 screen has the coordinate 0.
644 <tag/Limits/<itemize>
645 <item>The function is only available as fastcall function, so it may
646 only be used in presence of a prototype.
647 <item>Invalid values for the Y position (out of screen coordinates) may lead 
648 to undefined behaviour.
649 </itemize>
650 <tag/Availability/cc65
651 <tag/See also/
652 <ref id="gotox" name="gotox">,
653 <ref id="gotoxy" name="gotoxy">,
654 <ref id="wherex" name="wherex">,
655 <ref id="wherey" name="wherey">
656 <tag/Example/None.
657 </descrip>
658 </quote>
659
660
661 <sect1>isalnum<label id="isalnum"><p>
662
663 <quote>
664 <descrip>
665 <tag/Function/Check if a given character is a letter or digit.
666 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
667 <tag/Declaration/<tt/int __fastcall__ isalnum (int c);/
668 <tag/Description/The function returns a value of zero if the given argument
669 is a letter or digit. The return value is non zero if the character
670 is anything else.
671 <tag/Limits/<itemize>
672 <item>When compiling with <tt/-Os/ the function is actually a macro. The
673 inline sequence generated by the macro will not work correctly for values 
674 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of 
675 this range. The non inline function may be accessed by <tt/#undef/'ing 
676 the macro. 
677 <item>When compiling without <tt/-Os/, the function is only available as 
678 fastcall function, so it may only be used in presence of a prototype.
679 </itemize>
680 <tag/Availability/ISO 9899
681 <tag/See also/
682 <ref id="isalpha" name="isalpha">,
683 <ref id="isascii" name="isascii">,
684 <ref id="isblank" name="isblank">,
685 <ref id="iscntrl" name="iscntrl">,
686 <ref id="isdigit" name="isdigit">,
687 <ref id="isgraph" name="isgraph">,
688 <ref id="islower" name="islower">,
689 <ref id="isprint" name="isprint">,
690 <ref id="ispunct" name="ispunct">,
691 <ref id="isspace" name="isspace">,
692 <ref id="isupper" name="isupper">,
693 <ref id="isxdigit" name="isxdigit">
694 <tag/Example/None.
695 </descrip>
696 </quote>
697
698
699 <sect1>isalpha<label id="isalpha"><p>
700
701 <quote>
702 <descrip>
703 <tag/Function/Check if a given character is a letter.
704 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
705 <tag/Declaration/<tt/int __fastcall__ isalpha (int c);/
706 <tag/Description/The function returns a value of zero if the given argument
707 is a letter. The return value is non zero if the character is anything else.
708 <tag/Limits/<itemize>
709 <item>When compiling with <tt/-Os/ the function is actually a macro. The
710 inline sequence generated by the macro will not work correctly for values
711 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
712 this range. The non inline function may be accessed by <tt/#undef/'ing the
713 macro.
714 <item>When compiling without <tt/-Os/, the function is only available as
715 fastcall function, so it may only be used in presence of a prototype.
716 </itemize>
717 <tag/Availability/ISO 9899
718 <tag/See also/
719 <ref id="isalnum" name="isalnum">,
720 <ref id="isascii" name="isascii">,
721 <ref id="isblank" name="isblank">,
722 <ref id="iscntrl" name="iscntrl">,
723 <ref id="isdigit" name="isdigit">,
724 <ref id="isgraph" name="isgraph">,
725 <ref id="islower" name="islower">,
726 <ref id="isprint" name="isprint">,
727 <ref id="ispunct" name="ispunct">,
728 <ref id="isspace" name="isspace">,
729 <ref id="isupper" name="isupper">,
730 <ref id="isxdigit" name="isxdigit">
731 <tag/Example/None.
732 </descrip>
733 </quote>
734
735
736 <sect1>isascii<label id="isascii"><p>
737
738 <quote>
739 <descrip>
740 <tag/Function/Check if a given character is in the ASCII (0..127) range.
741 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
742 <tag/Declaration/<tt/int __fastcall__ isascii (int c);/
743 <tag/Description/The function returns a value of zero if the given argument
744 is in the range 0..127 (the range of valid ASCII characters) and a non zero
745 value if not.
746 <tag/Limits/<itemize>
747 <item>When compiling with <tt/-Os/ the function is actually a macro. The
748 inline sequence generated by the macro will not work correctly for values
749 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
750 this range. The non inline function may be accessed by <tt/#undef/'ing the
751 macro.
752 <item>When compiling without <tt/-Os/, the function is only available as
753 fastcall function, so it may only be used in presence of a prototype.
754 </itemize>
755 <tag/Availability/ISO 9899
756 <tag/See also/
757 <ref id="isalnum" name="isalnum">,
758 <ref id="isalpha" name="isalpha">,
759 <ref id="isblank" name="isblank">,
760 <ref id="iscntrl" name="iscntrl">,
761 <ref id="isdigit" name="isdigit">,
762 <ref id="isgraph" name="isgraph">,
763 <ref id="islower" name="islower">,
764 <ref id="isprint" name="isprint">,
765 <ref id="ispunct" name="ispunct">,
766 <ref id="isspace" name="isspace">,
767 <ref id="isupper" name="isupper">,
768 <ref id="isxdigit" name="isxdigit">
769 <tag/Example/None.
770 </descrip>
771 </quote>
772
773
774 <sect1>isblank<label id="isblank"><p>
775
776 <quote>
777 <descrip>
778 <tag/Function/Check if a given character is a space or tab.
779 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
780 <tag/Declaration/<tt/int __fastcall__ isblank (int c);/
781 <tag/Description/The function returns a value of zero if the given argument
782 is a blank or space character. The return value is non zero if the character
783 is anything else.
784 <tag/Limits/<itemize>
785 <item>When compiling with <tt/-Os/ the function is actually a macro. The
786 inline sequence generated by the macro will not work correctly for values
787 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
788 this range. The non inline function may be accessed by <tt/#undef/'ing the
789 macro.
790 <item>When compiling without <tt/-Os/, the function is only available as
791 fastcall function, so it may only be used in presence of a prototype.
792 </itemize>
793 <tag/Availability/cc65
794 <tag/See also/
795 <ref id="isalnum" name="isalnum">,
796 <ref id="isalpha" name="isalpha">,
797 <ref id="isascii" name="isascii">,
798 <ref id="iscntrl" name="iscntrl">,
799 <ref id="isdigit" name="isdigit">,
800 <ref id="isgraph" name="isgraph">,
801 <ref id="islower" name="islower">,
802 <ref id="isprint" name="isprint">,
803 <ref id="ispunct" name="ispunct">,
804 <ref id="isspace" name="isspace">,
805 <ref id="isupper" name="isupper">,
806 <ref id="isxdigit" name="isxdigit">
807 <tag/Example/None.
808 </descrip>
809 </quote>
810
811
812 <sect1>iscntrl<label id="iscntrl"><p>
813
814 <quote>
815 <descrip>
816 <tag/Function/Check if a given character is a control character.
817 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
818 <tag/Declaration/<tt/int __fastcall__ iscntrl (int c);/
819 <tag/Description/The function returns a value of zero if the given argument
820 is a control character. The return value is non zero if the character
821 is anything else.
822 <tag/Limits/<itemize>
823 <item>When compiling with <tt/-Os/ the function is actually a macro. The
824 inline sequence generated by the macro will not work correctly for values
825 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
826 this range. The non inline function may be accessed by <tt/#undef/'ing the
827 macro.
828 <item>When compiling without <tt/-Os/, the function is only available as
829 fastcall function, so it may only be used in presence of a prototype.
830 </itemize>
831 <tag/Availability/ISO 9899
832 <tag/See also/
833 <ref id="isalnum" name="isalnum">,
834 <ref id="isalpha" name="isalpha">,
835 <ref id="isascii" name="isascii">,
836 <ref id="isblank" name="isblank">,
837 <ref id="isdigit" name="isdigit">,
838 <ref id="isgraph" name="isgraph">,
839 <ref id="islower" name="islower">,
840 <ref id="isprint" name="isprint">,
841 <ref id="ispunct" name="ispunct">,
842 <ref id="isspace" name="isspace">,
843 <ref id="isupper" name="isupper">,
844 <ref id="isxdigit" name="isxdigit">
845 <tag/Example/None.
846 </descrip>
847 </quote>
848
849
850 <sect1>isdigit<label id="isdigit"><p>
851
852 <quote>
853 <descrip>
854 <tag/Function/Check if a given character is a digit.
855 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
856 <tag/Declaration/<tt/int __fastcall__ isdigit (int c);/
857 <tag/Description/The function returns a value of zero if the given argument
858 is a digit. The return value is non zero if the character is anything else.
859 <tag/Limits/<itemize>
860 <item>When compiling with <tt/-Os/ the function is actually a macro. The
861 inline sequence generated by the macro will not work correctly for values
862 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
863 this range. The non inline function may be accessed by <tt/#undef/'ing the
864 macro.
865 <item>When compiling without <tt/-Os/, the function is only available as
866 fastcall function, so it may only be used in presence of a prototype.
867 </itemize>
868 <tag/Availability/ISO 9899
869 <tag/See also/
870 <ref id="isalnum" name="isalnum">,
871 <ref id="isalpha" name="isalpha">,
872 <ref id="isascii" name="isascii">,
873 <ref id="isblank" name="isblank">,
874 <ref id="iscntrl" name="iscntrl">,
875 <ref id="isgraph" name="isgraph">,
876 <ref id="islower" name="islower">,
877 <ref id="isprint" name="isprint">,
878 <ref id="ispunct" name="ispunct">,
879 <ref id="isspace" name="isspace">,
880 <ref id="isupper" name="isupper">,
881 <ref id="isxdigit" name="isxdigit">
882 <tag/Example/None.
883 </descrip>
884 </quote>
885
886
887 <sect1>isgraph<label id="isgraph"><p>
888
889 <quote>
890 <descrip>
891 <tag/Function/Check if a given character is a printable character (except
892 space).
893 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
894 <tag/Declaration/<tt/int __fastcall__ isgraph (int c);/
895 <tag/Description/The function returns a value of zero if the given argument
896 is a printable character with the exception of space. The return value is non
897 zero if the character is anything else.
898 <tag/Limits/<itemize>
899 <item>When compiling with <tt/-Os/ the function is actually a macro. The
900 inline sequence generated by the macro will not work correctly for values
901 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
902 this range. The non inline function may be accessed by <tt/#undef/'ing the
903 macro.
904 <item>When compiling without <tt/-Os/, the function is only available as
905 fastcall function, so it may only be used in presence of a prototype.
906 </itemize>
907 <tag/Availability/ISO 9899
908 <tag/See also/
909 <ref id="isalnum" name="isalnum">,
910 <ref id="isalpha" name="isalpha">,
911 <ref id="isascii" name="isascii">,
912 <ref id="isblank" name="isblank">,
913 <ref id="iscntrl" name="iscntrl">,
914 <ref id="isdigit" name="isdigit">,
915 <ref id="islower" name="islower">,
916 <ref id="isprint" name="isprint">,
917 <ref id="ispunct" name="ispunct">,
918 <ref id="isspace" name="isspace">,
919 <ref id="isupper" name="isupper">,
920 <ref id="isxdigit" name="isxdigit">
921 <tag/Example/None.
922 </descrip>
923 </quote>
924
925
926 <sect1>islower<label id="islower"><p>
927
928 <quote>
929 <descrip>
930 <tag/Function/Check if a given character is a lower case letter.
931 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
932 <tag/Declaration/<tt/int __fastcall__ islower (int c);/
933 <tag/Description/The function returns a value of zero if the given argument
934 is a lower case letter. The return value is non zero if the character is
935 anything else.
936 <tag/Limits/<itemize>
937 <item>When compiling with <tt/-Os/ the function is actually a macro. The
938 inline sequence generated by the macro will not work correctly for values
939 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
940 this range. The non inline function may be accessed by <tt/#undef/'ing the
941 macro.
942 <item>When compiling without <tt/-Os/, the function is only available as
943 fastcall function, so it may only be used in presence of a prototype.
944 </itemize>
945 <tag/Availability/ISO 9899
946 <tag/See also/
947 <ref id="isalnum" name="isalnum">,
948 <ref id="isalpha" name="isalpha">,
949 <ref id="isascii" name="isascii">,
950 <ref id="isblank" name="isblank">,
951 <ref id="iscntrl" name="iscntrl">,
952 <ref id="isdigit" name="isdigit">,
953 <ref id="isgraph" name="isgraph">,
954 <ref id="isprint" name="isprint">,
955 <ref id="ispunct" name="ispunct">,
956 <ref id="isspace" name="isspace">,
957 <ref id="isupper" name="isupper">,
958 <ref id="isxdigit" name="isxdigit">
959 <tag/Example/None.
960 </descrip>
961 </quote>
962
963
964 <sect1>isprint<label id="isprint"><p>
965
966 <quote>
967 <descrip>
968 <tag/Function/Check if a given character is a printable character.
969 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
970 <tag/Declaration/<tt/int __fastcall__ isprint (int c);/
971 <tag/Description/The function returns a value of zero if the given argument
972 is a printable character (this includes the space character). The return value
973 is non zero if the character is anything else.
974 <tag/Limits/<itemize>
975 <item>When compiling with <tt/-Os/ the function is actually a macro. The
976 inline sequence generated by the macro will not work correctly for values
977 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
978 this range. The non inline function may be accessed by <tt/#undef/'ing the
979 macro.
980 <item>When compiling without <tt/-Os/, the function is only available as
981 fastcall function, so it may only be used in presence of a prototype.
982 </itemize>
983 <tag/Availability/ISO 9899
984 <tag/See also/
985 <ref id="isalnum" name="isalnum">,
986 <ref id="isalpha" name="isalpha">,
987 <ref id="isascii" name="isascii">,
988 <ref id="isblank" name="isblank">,
989 <ref id="iscntrl" name="iscntrl">,
990 <ref id="isdigit" name="isdigit">,
991 <ref id="isgraph" name="isgraph">,
992 <ref id="islower" name="islower">,
993 <ref id="ispunct" name="ispunct">,
994 <ref id="isspace" name="isspace">,
995 <ref id="isupper" name="isupper">,
996 <ref id="isxdigit" name="isxdigit">
997 <tag/Example/None.
998 </descrip>
999 </quote>
1000
1001
1002 <sect1>ispunct<label id="ispunct"><p>
1003
1004 <quote>
1005 <descrip>
1006 <tag/Function/Check if a given character is a printable character but not a
1007 space or an alphanumeric character.
1008 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
1009 <tag/Declaration/<tt/int __fastcall__ ispunct (int c);/
1010 <tag/Description/The function returns a value of zero if the given argument
1011 is a printable character, but not a space or anything alphanumeric. The return
1012 value is non zero if the character is anything else.
1013 <tag/Limits/<itemize>
1014 <item>When compiling with <tt/-Os/ the function is actually a macro. The
1015 inline sequence generated by the macro will not work correctly for values
1016 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
1017 this range. The non inline function may be accessed by <tt/#undef/'ing the
1018 macro.
1019 <item>When compiling without <tt/-Os/, the function is only available as
1020 fastcall function, so it may only be used in presence of a prototype.
1021 </itemize>
1022 <tag/Availability/ISO 9899
1023 <tag/See also/
1024 <ref id="isalnum" name="isalnum">,
1025 <ref id="isalpha" name="isalpha">,
1026 <ref id="isascii" name="isascii">,
1027 <ref id="isblank" name="isblank">,
1028 <ref id="iscntrl" name="iscntrl">,
1029 <ref id="isdigit" name="isdigit">,
1030 <ref id="isgraph" name="isgraph">,
1031 <ref id="islower" name="islower">,
1032 <ref id="isprint" name="isprint">,
1033 <ref id="isspace" name="isspace">,
1034 <ref id="isupper" name="isupper">,
1035 <ref id="isxdigit" name="isxdigit">
1036 <tag/Example/None.
1037 </descrip>
1038 </quote>
1039
1040
1041 <sect1>isspace<label id="isspace"><p>
1042
1043 <quote>
1044 <descrip>
1045 <tag/Function/Check if a given character is a a white-space character.
1046 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
1047 <tag/Declaration/<tt/int __fastcall__ isspace (int c);/
1048 <tag/Description/The function returns a value of zero if the given argument
1049 is a white space character. The return value is non zero if the character is
1050 anything else. The standard white space characters are: space, formfeed ('\f'),
1051 newline ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab
1052 ('\v').
1053 <tag/Limits/<itemize>
1054 <item>When compiling with <tt/-Os/ the function is actually a macro. The
1055 inline sequence generated by the macro will not work correctly for values
1056 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
1057 this range. The non inline function may be accessed by <tt/#undef/'ing the
1058 macro.
1059 <item>When compiling without <tt/-Os/, the function is only available as
1060 fastcall function, so it may only be used in presence of a prototype.
1061 </itemize>
1062 <tag/Availability/ISO 9899
1063 <tag/See also/
1064 <ref id="isalnum" name="isalnum">,
1065 <ref id="isalpha" name="isalpha">,
1066 <ref id="isascii" name="isascii">,
1067 <ref id="isblank" name="isblank">,
1068 <ref id="iscntrl" name="iscntrl">,
1069 <ref id="isdigit" name="isdigit">,
1070 <ref id="isgraph" name="isgraph">,
1071 <ref id="islower" name="islower">,
1072 <ref id="isprint" name="isprint">,
1073 <ref id="ispunct" name="ispunct">,
1074 <ref id="isupper" name="isupper">,
1075 <ref id="isxdigit" name="isxdigit">
1076 <tag/Example/None.
1077 </descrip>
1078 </quote>
1079
1080
1081 <sect1>isupper<label id="isupper"><p>
1082
1083 <quote>
1084 <descrip>
1085 <tag/Function/Check if a given character is an upper case letter.
1086 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
1087 <tag/Declaration/<tt/int __fastcall__ isupper (int c);/
1088 <tag/Description/The function returns a value of zero if the given argument
1089 is an upper case letter. The return value is non zero if the character is
1090 anything else.
1091 <tag/Limits/<itemize>
1092 <item>When compiling with <tt/-Os/ the function is actually a macro. The
1093 inline sequence generated by the macro will not work correctly for values
1094 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
1095 this range. The non inline function may be accessed by <tt/#undef/'ing the
1096 macro.
1097 <item>When compiling without <tt/-Os/, the function is only available as
1098 fastcall function, so it may only be used in presence of a prototype.
1099 </itemize>
1100 <tag/Availability/ISO 9899
1101 <tag/See also/
1102 <ref id="isalnum" name="isalnum">,
1103 <ref id="isalpha" name="isalpha">,
1104 <ref id="isascii" name="isascii">,
1105 <ref id="isblank" name="isblank">,
1106 <ref id="iscntrl" name="iscntrl">,
1107 <ref id="isdigit" name="isdigit">,
1108 <ref id="isgraph" name="isgraph">,
1109 <ref id="islower" name="islower">,
1110 <ref id="isprint" name="isprint">,
1111 <ref id="ispunct" name="ispunct">,
1112 <ref id="isspace" name="isspace">,
1113 <ref id="isxdigit" name="isxdigit">
1114 <tag/Example/None.
1115 </descrip>
1116 </quote>
1117
1118
1119 <sect1>isxdigit<label id="isxdigit"><p>
1120
1121 <quote>
1122 <descrip>
1123 <tag/Function/Check if a given character is a hexadecimal digit.
1124 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
1125 <tag/Declaration/<tt/int __fastcall__ isxdigit (int c);/
1126 <tag/Description/The function returns a value of zero if the given argument
1127 is a hexadecimal digit (0..9, a..f and A..F). The return value is non zero
1128 if the character is anything else.
1129 <tag/Limits/<itemize>
1130 <item>When compiling with <tt/-Os/ the function is actually a macro. The
1131 inline sequence generated by the macro will not work correctly for values
1132 outside the range 0..255. <bf/Note:/ The constant <tt/EOF/ is not part of
1133 this range. The non inline function may be accessed by <tt/#undef/'ing the
1134 macro.
1135 <item>When compiling without <tt/-Os/, the function is only available as
1136 fastcall function, so it may only be used in presence of a prototype.
1137 </itemize>
1138 <tag/Availability/ISO 9899
1139 <tag/See also/
1140 <ref id="isalnum" name="isalnum">,
1141 <ref id="isalpha" name="isalpha">,
1142 <ref id="isascii" name="isascii">,
1143 <ref id="isblank" name="isblank">,
1144 <ref id="iscntrl" name="iscntrl">,
1145 <ref id="isdigit" name="isdigit">,
1146 <ref id="isgraph" name="isgraph">,
1147 <ref id="islower" name="islower">,
1148 <ref id="isprint" name="isprint">,
1149 <ref id="ispunct" name="ispunct">,
1150 <ref id="isspace" name="isspace">,
1151 <ref id="isupper" name="isupper">
1152 <tag/Example/None.
1153 </descrip>
1154 </quote>
1155
1156
1157 <sect1>kbhit<label id="kbhit"><p>
1158
1159 <quote>
1160 <descrip>
1161 <tag/Function/Check if there's a key waiting in the keyboard buffer.
1162 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
1163 <tag/Declaration/<tt/unsigned char kbhit (void);/
1164 <tag/Description/The function returns a value of zero if there is no character
1165 waiting to be read from the keyboard. It returns non zero otherwise.
1166 <tag/Limits/<itemize>
1167 <item>If the system does not support a keyboard buffer (most systems
1168 do), the function is rather useless.
1169 </itemize>
1170 <tag/Availability/cc65
1171 <tag/See also/
1172 <ref id="cgetc" name="cgetc">,
1173 <ref id="cursor" name="cursor">
1174 <tag/Example/None.
1175 </descrip>
1176 </quote>
1177
1178
1179 <sect1>revers<label id="revers"><p>
1180
1181 <quote>
1182 <descrip>
1183 <tag/Function/Control revers character display.
1184 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
1185 <tag/Declaration/<tt/unsigned char __fastcall__ revers (unsigned char onoff);/
1186 <tag/Description/If the argument is non zero, the function enables reverse
1187 character display. If the argument is zero, reverse character display is
1188 switched off. The old value of the setting is returned.
1189 <tag/Limits/<itemize>
1190 <item>The function may not be supported by the hardware, in which case
1191 the call is ignored.
1192 <item>The function is only available as fastcall function, so it may only 
1193 be used in presence of a prototype.
1194 </itemize>
1195 <tag/Availability/cc65
1196 <tag/See also/
1197 <ref id="textcolor" name="textcolor">
1198 <tag/Example/None.
1199 </descrip>
1200 </quote>
1201
1202
1203 <sect1>screensize<label id="screensize"><p>
1204
1205 <quote>
1206 <descrip>
1207 <tag/Function/Return the dimensions of the text mode screen.
1208 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
1209 <tag/Declaration/<tt/void __fastcall__ screensize (unsigned char* x, unsigned char* y);/
1210 <tag/Description/The function returns the dimensions of the text mode screen.
1211 <tag/Limits/<itemize>
1212 <item>The function is only available as fastcall function, so it may only
1213 be used in presence of a prototype.
1214 </itemize>
1215 <tag/Availability/cc65
1216 <tag/See also/
1217 <ref id="gotox" name="gotox">,
1218 <ref id="gotoxy" name="gotoxy">,
1219 <ref id="gotoy" name="gotoy">,
1220 <ref id="wherex" name="wherex">,
1221 <ref id="wherey" name="wherey">
1222 <tag/Example/None.
1223 </descrip>
1224 </quote>
1225
1226
1227 <sect1>strcat<label id="strcat"><p>
1228
1229 <quote>
1230 <descrip>
1231 <tag/Function/Concatentate two strings.
1232 <tag/Header/<tt/<ref id="string.h" name="string.h">/
1233 <tag/Declaration/<tt/char* __fastcall__ strcat (char* s1, const char* s2);/
1234 <tag/Description/The <tt/strcat/ function appends a copy of the string
1235 pointed to by s2 (including the terminating null byte) to the end of the
1236 string pointed to by s1. The initial byte of s2 overwrites the null byte at
1237 the end of s1.
1238 <tag/Limits/<itemize>
1239 <item>The function is only available as fastcall function, so it may only
1240 be used in presence of a prototype.
1241 <item>If copying takes place between objects that overlap, the behavior
1242 is undefined.
1243 </itemize>
1244 <tag/Availability/ISO 9899
1245 <tag/See also/
1246 <ref id="strcpy" name="strcpy">
1247 <ref id="strncpy" name="strncpy">
1248 <tag/Example/None.
1249 </descrip>
1250 </quote>
1251
1252
1253 <sect1>strchr<label id="strchr"><p>
1254
1255 <quote>
1256 <descrip>
1257 <tag/Function/Search for a character in a string.
1258 <tag/Header/<tt/<ref id="string.h" name="string.h">/
1259 <tag/Declaration/<tt/char* __fastcall__ strchr (const char* s, int c);/
1260 <tag/Description/The <tt/strchr/ function locates the first occurrence of <tt/c/
1261 (converted to a char) in the string pointed to by <tt/s/. The terminating null
1262 byte is considered to be part of the string. Upon completion, the function
1263 returns a pointer to the byte, or a null pointer if the byte was not found.
1264 <tag/Limits/<itemize>
1265 <item>The function is only available as fastcall function, so it may only
1266 be used in presence of a prototype.
1267 </itemize>
1268 <tag/Availability/ISO 9899
1269 <tag/See also/
1270 <ref id="strrchr" name="strrchr">
1271 <tag/Example/None.
1272 </descrip>
1273 </quote>
1274
1275
1276 <sect1>strcpy<label id="strcpy"><p>
1277
1278 <quote>
1279 <descrip>
1280 <tag/Function/Copy a string.
1281 <tag/Header/<tt/<ref id="string.h" name="string.h">/
1282 <tag/Declaration/<tt/char* __fastcall__ strcpy (char* s1, const char* s2);/
1283 <tag/Description/The <tt/strcpy/ function copies the string pointed to by
1284 <tt/s2/ (including the terminating null byte) into the array pointed to by
1285 <tt/s1/. The function will always return <tt/s1/.
1286 <tag/Limits/<itemize>
1287 <item>The function is only available as fastcall function, so it may only
1288 be used in presence of a prototype.
1289 <item>If copying takes place between objects that overlap, the behavior
1290 is undefined.
1291 </itemize>
1292 <tag/Availability/ISO 9899
1293 <tag/See also/
1294 <ref id="strcat" name="strcat">
1295 <ref id="strncpy" name="strncpy">
1296 <tag/Example/
1297 <verb>
1298 #include <string.h>
1299
1300 static char hello[14];
1301
1302 strcpy (hello, "Hello world!\n");
1303 </verb>
1304 </descrip>
1305 </quote>
1306
1307
1308 <sect1>strlen<label id="strlen"><p>
1309
1310 <quote>
1311 <descrip>
1312 <tag/Function/Return the length of a string.
1313 <tag/Header/<tt/<ref id="string.h" name="string.h">/
1314 <tag/Declaration/<tt/size_t __fastcall__ strlen (const char* s);/
1315 <tag/Description/The <tt/strlen/ function computes the number of bytes in the
1316 string to which s points, not including the terminating null byte.
1317 <tag/Limits/<itemize>
1318 <item>The function is only available as fastcall function, so it may only
1319 be used in presence of a prototype.
1320 <item>When compiling with <tt/-Os/ (inline known standard functions), the
1321 function does not work correctly for strings with more than 255 characters.
1322 </itemize>
1323 <tag/Availability/ISO 9899
1324 <tag/See also/
1325 <ref id="strcpy" name="strcpy">
1326 <tag/Example/None.
1327 </descrip>
1328 </quote>
1329
1330
1331 <sect1>strlower<label id="strlower"><p>
1332
1333 <quote>
1334 <descrip>
1335 <tag/Function/Make a string lower case.
1336 <tag/Header/<tt/<ref id="string.h" name="string.h">/
1337 <tag/Declaration/<tt/char* __fastcall__ strlower (char* s);/
1338 <tag/Description/The <tt/strlower/ function will apply the <tt/tolower/
1339 function to each character of a string. The function will always return <tt/s/.
1340 <tag/Limits/<itemize>
1341 <item>The function is only available as fastcall function, so it may only
1342 be used in presence of a prototype.
1343 <item>The function prototype is unavailable when compiling in strict ANSI mode.
1344 <item>An alias name for this function is <tt/strlwr/.
1345 </itemize>
1346 <tag/Availability/cc65
1347 <tag/See also/
1348 <ref id="strupper" name="strupper">
1349 <ref id="tolower" name="tolower">
1350 <tag/Example/None.
1351 </descrip>
1352 </quote>
1353
1354
1355 <sect1>strlwr<label id="strlwr"><p>
1356
1357 <quote>
1358 See <tt/strlower/.
1359 </quote>
1360
1361
1362 <sect1>strncpy<label id="strncpy"><p>
1363
1364 <quote>
1365 <descrip>
1366 <tag/Function/Copy part of a string.
1367 <tag/Header/<tt/<ref id="string.h" name="string.h">/
1368 <tag/Declaration/<tt/char* __fastcall__ strcpy (char* s1, const char* s2, size_t n);/
1369 <tag/Description/The <tt/strncpy/ function copies not more than n bytes from
1370 the array pointed to by <tt/s2/ to the array pointed to by <tt/s1/. If the array 
1371 pointed to by <tt/s2/ is a string that is shorter than n bytes, null bytes are 
1372 appended to the copy in the array pointed to by <tt/s1/, until <tt/n/ bytes are 
1373 written. The function will always return <tt/s1/.
1374 <tag/Limits/<itemize>
1375 <item>The function is only available as fastcall function, so it may only
1376 be used in presence of a prototype. If there is no null byte in the first <tt/n/
1377 bytes of the array pointed to by <tt/s2/, the result is not null-terminated.
1378 <item>If copying takes place between objects that overlap, the behavior is 
1379 undefined.
1380 </itemize>
1381 <tag/Availability/ISO 9899
1382 <tag/See also/
1383 <ref id="strcat" name="strcat">
1384 <ref id="strcpy" name="strcpy">
1385 <tag/Example/
1386 <verb>
1387 #include <string.h>
1388
1389 static char hello[6];
1390
1391 strcpy (hello, "Hello world!\n", sizeof (hello) - 1);
1392 hello[5] = '\0';
1393 </verb>
1394 </descrip>
1395 </quote>
1396
1397
1398 <sect1>strrchr<label id="strrchr"><p>
1399
1400 <quote>
1401 <descrip>
1402 <tag/Function/Search for a character in a string.
1403 <tag/Header/<tt/<ref id="string.h" name="string.h">/
1404 <tag/Declaration/<tt/char* __fastcall__ strrchr (const char* s, int c);/
1405 <tag/Description/The <tt/strrchr/ function locates the last occurrence of <tt/c/
1406 (converted to a char) in the string pointed to by <tt/s/. The terminating null
1407 byte is considered to be part of the string. Upon completion, the function
1408 returns a pointer to the byte, or a null pointer if the byte was not found.
1409 <tag/Limits/<itemize>
1410 <item>The function is only available as fastcall function, so it may only
1411 be used in presence of a prototype.
1412 </itemize>
1413 <tag/Availability/ISO 9899
1414 <tag/See also/
1415 <ref id="strchr" name="strchr">
1416 <tag/Example/None.
1417 </descrip>
1418 </quote>
1419
1420
1421 <sect1>strupper<label id="strupper"><p>
1422
1423 <quote>
1424 <descrip>
1425 <tag/Function/Make a string upper case.
1426 <tag/Header/<tt/<ref id="string.h" name="string.h">/
1427 <tag/Declaration/<tt/char* __fastcall__ strupper (char* s);/
1428 <tag/Description/The <tt/strupper/ function will apply the <tt/toupper/
1429 function to each character of a string. The function will always return <tt/s/.
1430 <tag/Limits/<itemize>
1431 <item>The function is only available as fastcall function, so it may only
1432 be used in presence of a prototype.
1433 <item>The function prototype is unavailable when compiling in strict ANSI mode.
1434 <item>An alias name for this function is <tt/strupr/.
1435 </itemize>
1436 <tag/Availability/cc65
1437 <tag/See also/
1438 <ref id="strlower" name="strlower">
1439 <ref id="toupper" name="toupper">
1440 <tag/Example/None.
1441 </descrip>
1442 </quote>
1443
1444
1445 <sect1>strupr<label id="strupr"><p>
1446
1447 <quote>
1448 See <tt/strupper/.
1449 </quote>
1450
1451
1452 <sect1>textcolor<label id="textcolor"><p>
1453
1454 <quote>
1455 <descrip>
1456 <tag/Function/Set the text color.
1457 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
1458 <tag/Declaration/<tt/unsigned char __fastcall__ textcolor (unsigned char color);/
1459 <tag/Description/The function will set a new text color. It returns the old
1460 (current) text color. Text output using any <tt/conio.h/ function will use
1461 the color set by this function.
1462 <tag/Limits/<itemize>
1463 <item>Text colors are system dependent. The function may have no effect
1464 on systems where the text color cannot be changed.
1465 <item>The function is only available as fastcall function, so it may only
1466 be used in presence of a prototype.
1467 </itemize>
1468 <tag/Availability/cc65
1469 <tag/See also/
1470 <ref id="bgcolor" name="bgcolor">,
1471 <ref id="bordercolor" name="bordercolor">
1472 <tag/Example/None.
1473 </descrip>
1474 </quote>
1475
1476
1477 <sect1>tolower<label id="tolower"><p>
1478
1479 <quote>
1480 <descrip>
1481 <tag/Function/Convert a character into its lower case representation.
1482 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
1483 <tag/Declaration/<tt/int __fastcall__ tolower (int c);/
1484 <tag/Description/The function returns the given character converted to lower
1485 case. If the given character is not a letter, it is returned unchanged.
1486 <tag/Limits/<itemize>
1487 <item>The function is only available as fastcall function, so it may
1488 only be used in presence of a prototype.
1489 </itemize>
1490 <tag/Availability/ISO 9899
1491 <tag/See also/
1492 <ref id="islower" name="islower">,
1493 <ref id="isupper" name="isupper">,
1494 <ref id="toupper" name="toupper">
1495 <tag/Example/None.
1496 </descrip>
1497 </quote>
1498
1499
1500 <sect1>toupper<label id="toupper"><p>
1501
1502 <quote>
1503 <descrip>
1504 <tag/Function/Convert a character into its upper case representation.
1505 <tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
1506 <tag/Declaration/<tt/int __fastcall__ toupper (int c);/
1507 <tag/Description/The function returns the given character converted to upper
1508 case. If the given character is not a letter, it is returned unchanged.
1509 <tag/Limits/<itemize>
1510 <item>The function is only available as fastcall function, so it may
1511 only be used in presence of a prototype.
1512 </itemize>
1513 <tag/Availability/ISO 9899
1514 <tag/See also/
1515 <ref id="islower" name="islower">,
1516 <ref id="isupper" name="isupper">,
1517 <ref id="tolower" name="tolower">
1518 <tag/Example/None.
1519 </descrip>
1520 </quote>
1521
1522
1523 <sect1>wherex<label id="wherex"><p>
1524
1525 <quote>
1526 <descrip>
1527 <tag/Function/Return the current X position of the text mode cursor.
1528 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
1529 <tag/Declaration/<tt/unsigned char wherex (void);/
1530 <tag/Description/The function returns the current X position of the text mode
1531 cursor. Zero is returned for the leftmost screen position.
1532 <tag/Availability/cc65
1533 <tag/See also/
1534 <ref id="gotox" name="gotox">,
1535 <ref id="gotoy" name="gotoy">,
1536 <ref id="gotoxy" name="gotoxy">,
1537 <ref id="wherey" name="wherey">
1538 <tag/Example/None.
1539 </descrip>
1540 </quote>
1541
1542
1543 <sect1>wherey<label id="wherey"><p>
1544
1545 <quote>
1546 <descrip>
1547 <tag/Function/Return the current Y position of the text mode cursor.
1548 <tag/Header/<tt/<ref id="conio.h" name="conio.h">/
1549 <tag/Declaration/<tt/unsigned char wherey (void);/
1550 <tag/Description/The function returns the current Y position of the text mode
1551 cursor. Zero is returned for the uppermost screen position.
1552 <tag/Availability/cc65
1553 <tag/See also/
1554 <ref id="gotox" name="gotox">,
1555 <ref id="gotoy" name="gotoy">,
1556 <ref id="gotoxy" name="gotoxy">,
1557 <ref id="wherex" name="wherex">
1558 <tag/Example/None.
1559 </descrip>
1560 </quote>
1561
1562
1563 </article>
1564
1565