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