1 <!doctype linuxdoc system>
4 <title>cc65 function reference
5 <author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">
9 cc65 is a C compiler for 6502 based systems. This function reference describes
10 the available C functions supplied by the library.
13 <!-- Table of contents -->
16 <!-- Begin the document -->
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.
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">.
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.
33 Each entry for a function contains a detailed description
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
41 <tag/Description/Description of the function.
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.
50 <sect>Functions by header file<p>
52 <sect1><tt/6502.h/<label id="6502.h"><p>
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"> -->
65 <sect1><tt/assert.h/<label id="assert.h"><p>
68 <item><ref id="assert" name="assert">
72 <sect1><tt/conio.h/<label id="conio.h"><p>
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">
104 <sect1><tt/ctype.h/<label id="ctype.h"><p>
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">
125 <sect1><tt/stdlib.h/<label id="stdlib.h"><p>
128 <item><ref id="abort" name="abort">
129 <item><ref id="atexit" name="atexit">
130 <item><ref id="exit" name="exit">
134 <sect1><tt/string.h/<label id="string.h"><p>
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">
152 <sect>Alphabetical function reference<p>
154 <sect1>BRK<label id="BRK"><p>
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
168 <tag/Availability/cc65
170 <ref id="CLI" name="CLI">,
171 <ref id="SEI" name="SEI">
177 <sect1>CLI<label id="CLI"><p>
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
187 <tag/Limits/<itemize>
188 <item>The function is actually a macro.
189 <item>Disabling interrupts may lead to unexpected results.
191 <tag/Availability/cc65
193 <ref id="BRK" name="BRK">,
194 <ref id="SEI" name="SEI">
200 <sect1>SEI<label id="SEI"><p>
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.
213 <tag/Availability/cc65
215 <ref id="BRK" name="BRK">,
216 <ref id="CLI" name="CLI">
222 <sect1>abort<label id="abort"><p>
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
233 <ref id="assert" name="assert">,
234 <ref id="exit" name="exit">
240 <sect1>assert<label id="assert"><p>
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.
253 <tag/Availability/ISO 9899
255 <ref id="abort" name="abort">,
256 <ref id="exit" name="exit">
262 <sect1>atexit<label id="atexit"><p>
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
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.
280 <tag/Availability/ISO 9899
282 <ref id="abort" name="abort">,
283 <ref id="exit" name="exit">
289 <sect1>bgcolor<label id="bgcolor"><p>
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.
304 <tag/Availability/cc65
306 <ref id="bordercolor" name="bordercolor">,
307 <ref id="textcolor" name="textcolor">
313 <sect1>bordercolor<label id="bordercolor"><p>
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.
328 <tag/Availability/cc65
330 <ref id="bgcolor" name="bgcolor">,
331 <ref id="textcolor" name="textcolor">
337 <sect1>cclear<label id="cclear"><p>
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.
350 <tag/Availability/cc65
352 <ref id="cclearxy" name="cclearxy">,
353 <ref id="clrscr" name="clrscr">
359 <sect1>cclearxy<label id="cclearxy"><p>
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
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.
374 <tag/Availability/cc65
376 <ref id="cclear" name="cclear">,
377 <ref id="clrscr" name="clrscr">
383 <sect1>cgetc<label id="cgetc"><p>
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.
398 <tag/Availability/cc65
400 <ref id="cursor" name="cursor">,
401 <ref id="kbhit" name="kbhit">
407 <sect1>chline<label id="chline"><p>
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.
423 <tag/Availability/cc65
425 <ref id="chlinexy" name="chlinexy">,
426 <ref id="cvline" name="cvline">,
427 <ref id="cvlinexy" name="cvlinexy">
433 <sect1>chlinexy<label id="chlinexy"><p>
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.
449 <tag/Availability/cc65
451 <ref id="chline" name="chline">,
452 <ref id="cvline" name="cvline">,
453 <ref id="cvlinexy" name="cvlinexy">
459 <sect1>clrscr<label id="clrscr"><p>
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
470 <ref id="cclear" name="cclear">,
471 <ref id="cclearxy" name="cclearxy">
477 <sect1>cursor<label id="cursor"><p>
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.
491 <tag/Availability/cc65
493 <ref id="cgetc" name="cgetc">,
494 <ref id="kbhit" name="kbhit">
500 <sect1>cvline<label id="cvline"><p>
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.
516 <tag/Availability/cc65
518 <ref id="chline" name="chline">,
519 <ref id="chlinexy" name="chlinexy">,
520 <ref id="cvlinexy" name="cvlinexy">
526 <sect1>cvlinexy<label id="cvlinexy"><p>
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.
542 <tag/Availability/cc65
544 <ref id="chline" name="chline">,
545 <ref id="chlinexy" name="chlinexy">,
546 <ref id="cvline" name="cvline">
552 <sect1>exit<label id="exit"><p>
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"
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.
571 <tag/Availability/ISO 9899
573 <ref id="abort" name="abort">,
574 <ref id="exit" name="exit">
580 <sect1>gotox<label id="gotox"><p>
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.
596 <tag/Availability/cc65
598 <ref id="gotoy" name="gotoy">,
599 <ref id="gotoxy" name="gotoxy">,
600 <ref id="wherex" name="wherex">,
601 <ref id="wherey" name="wherey">
607 <sect1>gotoxy<label id="gotoxy"><p>
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.
623 <tag/Availability/cc65
625 <ref id="gotox" name="gotox">,
626 <ref id="gotoy" name="gotoy">,
627 <ref id="wherex" name="wherex">,
628 <ref id="wherey" name="wherey">
634 <sect1>gotoy<label id="gotoy"><p>
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.
650 <tag/Availability/cc65
652 <ref id="gotox" name="gotox">,
653 <ref id="gotoxy" name="gotoxy">,
654 <ref id="wherex" name="wherex">,
655 <ref id="wherey" name="wherey">
661 <sect1>isalnum<label id="isalnum"><p>
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
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
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.
680 <tag/Availability/ISO 9899
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">
699 <sect1>isalpha<label id="isalpha"><p>
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
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.
717 <tag/Availability/ISO 9899
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">
736 <sect1>isascii<label id="isascii"><p>
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
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
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.
755 <tag/Availability/ISO 9899
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">
774 <sect1>isblank<label id="isblank"><p>
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
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
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.
793 <tag/Availability/cc65
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">
812 <sect1>iscntrl<label id="iscntrl"><p>
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
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
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.
831 <tag/Availability/ISO 9899
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">
850 <sect1>isdigit<label id="isdigit"><p>
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
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.
868 <tag/Availability/ISO 9899
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">
887 <sect1>isgraph<label id="isgraph"><p>
891 <tag/Function/Check if a given character is a printable character (except
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
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.
907 <tag/Availability/ISO 9899
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">
926 <sect1>islower<label id="islower"><p>
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
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
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.
945 <tag/Availability/ISO 9899
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">
964 <sect1>isprint<label id="isprint"><p>
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
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.
983 <tag/Availability/ISO 9899
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">
1002 <sect1>ispunct<label id="ispunct"><p>
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
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.
1022 <tag/Availability/ISO 9899
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">
1041 <sect1>isspace<label id="isspace"><p>
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
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
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.
1062 <tag/Availability/ISO 9899
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">
1081 <sect1>isupper<label id="isupper"><p>
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
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
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.
1100 <tag/Availability/ISO 9899
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">
1119 <sect1>isxdigit<label id="isxdigit"><p>
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
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.
1138 <tag/Availability/ISO 9899
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">
1157 <sect1>kbhit<label id="kbhit"><p>
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.
1170 <tag/Availability/cc65
1172 <ref id="cgetc" name="cgetc">,
1173 <ref id="cursor" name="cursor">
1179 <sect1>revers<label id="revers"><p>
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.
1195 <tag/Availability/cc65
1197 <ref id="textcolor" name="textcolor">
1203 <sect1>screensize<label id="screensize"><p>
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.
1215 <tag/Availability/cc65
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">
1227 <sect1>strcat<label id="strcat"><p>
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
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
1244 <tag/Availability/ISO 9899
1246 <ref id="strcpy" name="strcpy">
1247 <ref id="strncpy" name="strncpy">
1253 <sect1>strchr<label id="strchr"><p>
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.
1268 <tag/Availability/ISO 9899
1270 <ref id="strrchr" name="strrchr">
1276 <sect1>strcpy<label id="strcpy"><p>
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
1292 <tag/Availability/ISO 9899
1294 <ref id="strcat" name="strcat">
1295 <ref id="strncpy" name="strncpy">
1300 static char hello[14];
1302 strcpy (hello, "Hello world!\n");
1308 <sect1>strlen<label id="strlen"><p>
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.
1323 <tag/Availability/ISO 9899
1325 <ref id="strcpy" name="strcpy">
1331 <sect1>strlower<label id="strlower"><p>
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/.
1346 <tag/Availability/cc65
1348 <ref id="strupper" name="strupper">
1349 <ref id="tolower" name="tolower">
1355 <sect1>strlwr<label id="strlwr"><p>
1362 <sect1>strncpy<label id="strncpy"><p>
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
1381 <tag/Availability/ISO 9899
1383 <ref id="strcat" name="strcat">
1384 <ref id="strcpy" name="strcpy">
1389 static char hello[6];
1391 strcpy (hello, "Hello world!\n", sizeof (hello) - 1);
1398 <sect1>strrchr<label id="strrchr"><p>
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.
1413 <tag/Availability/ISO 9899
1415 <ref id="strchr" name="strchr">
1421 <sect1>strupper<label id="strupper"><p>
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/.
1436 <tag/Availability/cc65
1438 <ref id="strlower" name="strlower">
1439 <ref id="toupper" name="toupper">
1445 <sect1>strupr<label id="strupr"><p>
1452 <sect1>textcolor<label id="textcolor"><p>
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.
1468 <tag/Availability/cc65
1470 <ref id="bgcolor" name="bgcolor">,
1471 <ref id="bordercolor" name="bordercolor">
1477 <sect1>tolower<label id="tolower"><p>
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.
1490 <tag/Availability/ISO 9899
1492 <ref id="islower" name="islower">,
1493 <ref id="isupper" name="isupper">,
1494 <ref id="toupper" name="toupper">
1500 <sect1>toupper<label id="toupper"><p>
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.
1513 <tag/Availability/ISO 9899
1515 <ref id="islower" name="islower">,
1516 <ref id="isupper" name="isupper">,
1517 <ref id="tolower" name="tolower">
1523 <sect1>wherex<label id="wherex"><p>
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
1534 <ref id="gotox" name="gotox">,
1535 <ref id="gotoy" name="gotoy">,
1536 <ref id="gotoxy" name="gotoxy">,
1537 <ref id="wherey" name="wherey">
1543 <sect1>wherey<label id="wherey"><p>
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
1554 <ref id="gotox" name="gotox">,
1555 <ref id="gotoy" name="gotoy">,
1556 <ref id="gotoxy" name="gotoxy">,
1557 <ref id="wherex" name="wherex">