X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=doc%2Ffuncref.sgml;h=2a84f718535c14522fb61b63768832a60ee8d261;hb=6c0960819e263b55beebe5d9342831d6f0553760;hp=4d637dd12308a6a9c0279683e1791e3a9f27cd0b;hpb=cb78d2c1bdfab22a4012a3d02f56e7c4340ec81b;p=cc65 diff --git a/doc/funcref.sgml b/doc/funcref.sgml index 4d637dd12..2a84f7185 100644 --- a/doc/funcref.sgml +++ b/doc/funcref.sgml @@ -7,7 +7,7 @@ cc65 is a C compiler for 6502 based systems. This function reference describes -the available C functions supplied by the library. +the C functions available in the standard library. @@ -55,10 +55,31 @@ function. - - - - + + + + + + + +

+ + +_dos_type + +rebootafterexit + + + +

+ + +_dos_type + +rebootafterexit +textframe +textframexy + @@ -69,6 +90,63 @@ function. +

+ + + + + +(incomplete) + + +

+ +(incomplete) + + +

+ + + + + + + + + + +

+ +(incomplete) + + +

+ + + + + + +

+ + + + + + + + + +

+ + + + + + + + +

@@ -80,11 +158,11 @@ function. - - - - - + + + + + @@ -95,7 +173,7 @@ function. - + @@ -122,1177 +200,5500 @@ function. +

+ +(incomplete) + + +

+ +(incomplete) + + +

+ + + + + + + + + + + + + + + +

+ +(incomplete) + + +

+ + + + + + + + +

+ +(incomplete) + + +

+ + + + + + + + + + + +

+ + + + + + + +

+ + + + + + + +

+ + + + + + + + + + + + + + + + + +(incomplete) + + +

+ +(incomplete) + + +

+ +The . +It does not declare any functions. + + +

+ + + + + + + + + +

+ +(incomplete) + + +

+ +(incomplete) + + +

+ + + +(incomplete) + + +

+ + + + + + + +

+ + + + + + + +

+ +(incomplete) + + +

+ +(incomplete) + + +

+ + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +(incomplete) + +

+ + + + + + + + + + + + + + + + + + + + + + + + + +

- + + + + + + + + + + + + + + + + + + + + + + + + + + +(incomplete) + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + + + + + + + + + +(incomplete) + + +

+ + + + + + + + + + + +(incomplete) +

+ +(incomplete) + + +

+ +(incomplete) + Alphabetical function reference

-BRK

+_heapadd

-/ -/ + +The minimum blocksize that can be added is 6 bytes; the function will +ignore smaller blocks. + , - +, +, +, +, +, +, + -CLI

+_heapblocksize

-/ -/ +/, / or /. + +Passing a pointer to a block that was is not the result of one of the +allocation functions, or that has been free'd will give unpredicable results. + , - +, +, +, +, +, +, + -SEI

+_heapmaxavail

-/ -/ +/. , - +, +, +, +, +, +, + -abort

+_heapmemavail

-/ - +This function is of less use than usually assumed, since the returned +heap space may be available but not in one block. So even if this function +says that several times more heap space is available than needed, may still return +, - +, +, +, +, +, +, + -assert

+_poserror

-/ -/ +/ with an +argument of +Since operating system specific error code are - you guessed it - +operating system specific, the value in The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, - +, + -atexit

+_randomize

-/ - +The randomness of the seed depends on the machine hardware. + +, - +, + -bgcolor

+_stroserror

-/ -/ + +Since operating system specific error code are - you guessed it - +operating system specific, the parameter and the string returned depend on the +cc65 target. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + , - + -bordercolor

+_swap

-/ -/ + +The memory areas may not overlap, otherwise the results are undefined. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + , - +, + -cclear

+_sys

-/ -/ + +Bits 4 and 5 of the flags value in the The function is only available as fastcall function, so it may only be +used in presence of a prototype. + , - -cclearxy

+BRK

-/ -/ + +The function is actually a macro. +The inserted instruction may lead to unexpected results if no debugger +is present. + , - +, + -cgetc

+CLI

-/ -/ + +The function is actually a macro. +Disabling interrupts may lead to unexpected results. + , - +, + -chline

+PEEK

-/ -/ + +The function is actually a macro. +This function depends highly on the platform and environment. + , -, - +, + -chlinexy

+PEEKW

-/ -/ + +The function is actually a macro. +This function depends highly on the platform and environment. +The order in which the two bytes are read is unspecified and may +depend of the address expression used. + , -, - +, + -clrscr

+POKE

-/ -/ + +The function is actually a macro. +This function depends highly on the platform and environment. +Careless use will cause the program to act strange or may crash the +machine. + , - +, + -cursor

+POKEW

-/ -/ + +The function is actually a macro. +This function depends highly on the platform and environment. +Careless use will cause the program to act strange or may crash the +machine. +The order in which the two bytes are written is unspecified and may +depend of the address expression used. + , - +, + -cvline

+SEI

-/ -/ + +The function is actually a macro. +Disabling interrupts may lead to unexpected results. + , -, - +, + -cvlinexy

+abort

-/ -/ +, -, - +, +, + -exit

+abs

-/ -/ are called. Common values for status are /. - +The return value is undefined if The function is only available as fastcall function, so it may only be +used in presence of a prototype. + , - + -gotox

+assert

-/ -/ + +The function is actually a macro. + +, -, -, - +, + -gotoxy

+atexit

-/ -/ + +A maximum of 5 exit functions can be registered. +There is no way to unregister an exit function. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, -, -, - +, + -gotoy

+atoi

-/ -/ + +There is no way to detect any conversion errors. +The function does not check for an numerical overflow when converting. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, -, -, - +, +, +, +, + -isalnum

+atol

-/ -/ + +There is no way to detect any conversion errors. +The function does not check for an numerical overflow when converting. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + , -, -, -, -, -, -, -, -, -, -, - +, +, +, +, + -isalpha

+bgcolor

-/ -/ + +Background colors are system dependent. The function may have no effect +on systems where the background color cannot be changed. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, -, -, -, -, -, -, -, -, -, -, - +, + -isascii

+bordercolor

-/ -/ + +Border colors are system dependent. The function may have no effect +on systems where the border color cannot be changed. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, -, -, -, -, -, -, -, -, -, -, - +, + -isblank

+bsearch

-/ -/ + +The contents of the array must be sorted in ascending order according to +the compare function given. +If there are multiple members that match the key, the function will +return one of the members. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, -, -, -, -, -, -, -, -, -, -, - + -iscntrl

+bzero

-/ -/ + +The function is non standard and therefore only available in non ANSI +mode. You should use / instead. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, -, -, -, -, -, -, -, -, -, -, - +, +, +, +, -isdigit

+c64mode

-/ -, -, -, -, -, -, -, -, -, -, -, - +/ + +The function is specific to the C128. +The function will not return to the caller. + + -isgraph

+calloc

-/ -/ + +Clearing the memory may not have the expected effect on all platforms: +pointers in the block may not be The function is only available as fastcall function, so it may only +be used in presence of a prototype. + , -, -, -, -, -, -, -, -, -, -, - +, +, +, +, +, +, + -islower

+cclear

-/ -/ + +The function is only available as fastcall function, so it may +only be used in presence of a prototype. + +, -, -, -, -, -, -, -, -, -, -, - +, + -isprint

+cclearxy

-/ -/ + +The function is only available as fastcall function, so it may +only be used in presence of a prototype. + +, -, -, -, -, -, -, -, -, -, -, - +, + -ispunct

+cgetc

-/ -/ + +If the system supports a keyboard buffer, +, -, -, -, -, -, -, -, -, -, -, - +, + -isspace

+chline

-/ -/ + +The character used to draw the horizontal line is system dependent. +If available, a line drawing character is used. Drawing a line that is partially +off screen leads to undefined behaviour. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, -, -, -, -, -, -, -, -, -, -, - +, +, + -isupper

+chlinexy

-/ -/ + +The character used to draw the horizontal line is system dependent. +If available, a line drawing character is used. Drawing a line that is partially +off screen leads to undefined behaviour. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, -, -, -, -, -, -, -, -, -, -, - +, +, + -isxdigit

+clearerr

-/ -/ + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + , -, -, -, -, -, -, -, -, -, -, - +, + + + + + +clrscr

+ + + +/ +, + + + + + +close

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +creat

+ + + +/ + +/ with +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +cprintf

+ + + +/ +/. --> + +Like all other +, +, +, +, + + + + + +cputc

+ + + +/ + +Like all other The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, +, + + + + + +cputcxy

+ + + +/ + +Like all other The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, +, + + + + + +cputs

+ + + +/ + +Like all other The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, +, + + + + + +cputsxy

+ + + +/ + +Like all other The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, +, + + + + + +cursor

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +cvline

+ + + +/ + +The character used to draw the vertical line is system dependent. +If available, a line drawing character is used. Drawing a line that is partially +off screen leads to undefined behaviour. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +cvlinexy

+ + + +/ + +The character used to draw the vertical line is system dependent. +If available, a line drawing character is used. Drawing a line that is partially +off screen leads to undefined behaviour. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +div

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + + +em_commit

+ + + +/ +/, /, +/ or / are called without calling +Calling The function is only available as fastcall function, so it may only be +used in presence of a prototype. +The function produces undefined results if no extended memory driver is +loaded. + +, +, + + + + + +em_copyfrom

+ + + +/ + +Calling / first, or the changes are lost. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. +The function produces undefined results if no extended memory driver is +loaded. + +, +, + + + + + +em_copyto

+ + + +/ + +Calling / first, or the changes are lost. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. +The function produces undefined results if no extended memory driver is +loaded. + +, +, + + + + + +em_install

+ + + +/ + +Not all drivers are able to detect if the supported hardware is really +present. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +em_load_driver

+ + + +/ + +Not all drivers are able to detect if the supported hardware is really +present. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. +The driver is loaded by name, so currently you must know the type of +extended memory that should be supported. There is no autodetect capability. + + + + + + +em_map

+ + + +/ +/ instead. +Calling / first, or the changes are lost. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. +The function produces undefined results if no extended memory driver is +loaded. + +, +, + + + + + +em_pagecount

+ + + +/ + +The function returns zero if no extended memory driver is loaded. +The function may return zero if the supported hardware was not detected. + + + + + + +em_uninstall

+ + + +/ + +If the driver has been loaded using /, / +should be used instead of The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +em_unload

+ + + +/ + +The function does nothing if no driver is loaded. + + + + + + +em_use

+ + + +/ +/, but will not transfer data into the +actual memory window in the assumption that the existing data is wrong or +will get overwritten. + +Calling / first, or the changes are lost. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. +The function produces undefined results if no extended memory driver is +loaded. + +, +, + + + + + +exit

+ + + +/ +/ are called. Common values for status are /. + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +It depends on the host machine if the program return code can be +evaluated or is ignored. + +, + + + + + +fast

+ + + +/ + +The function is specific to the C128. +2MHz clock will not work in 40 column mode. + +, +, + + + + + +feof

+ + + +/ + +The indicator is set only after a read past the end of a file is +attempted. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, + + + + + +ferror

+ + + +/ + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, + + + + + +fileno

+ + + +/ + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. +Mixing C file I/O functions and POSIX file I/O functions for the same +file may have unpredictable results. + +, + + + + + + + +free

+ + + +/ +/, / +or /. As an exception, if the passed +pointer is +Passing an already free'd block to The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, +, +, +, + + + + + +get_ostype

+ + + +, +, / + +The function does not exist on all platforms. +The return codes are platform dependent. + + + + + +getenv

+ + + +/ + +What exactly is stored in the environment depends on the machine the +program is running on. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + + +getcpu

+ + + +/ + + + +Other, more exotic CPU types are not disinguished. + + + + + +gotox

+ + + +/ + +The function is only available as fastcall function, so it may +only be used in presence of a prototype. +Invalid values for the X position (out of screen coordinates) may +lead to undefined behaviour. + +, +, +, + + + + + +gotoxy

+ + + +/ + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. +Invalid values for any of both coordinates (out of screen positions) may +lead to undefined behaviour. + +, +, +, + + + + + +gotoy

+ + + +/ + +The function is only available as fastcall function, so it may +only be used in presence of a prototype. +Invalid values for the Y position (out of screen coordinates) may lead +to undefined behaviour. + +, +, +, + + + + + +isalnum

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +isalpha

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +isascii

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +isblank

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +iscntrl

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +isdigit

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +isgraph

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +islower

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +isprint

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +ispunct

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +isspace

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +isupper

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +isxdigit

+ + + +/ + +When compiling with When compiling without +, +, +, +, +, +, +, +, +, +, +, + + + + + +itoa

+ + + +/ + +There are no provisions to prevent a buffer overflow. +If The function is non standard, so it is not available in strict ANSI mode. +You should probably use The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, +, +, + + + + + +joy_count

+ + + +/ + +A joystick driver must be loaded using before calling this function. +The function returns the number of joysticks supported by the driver. +There's no way to check for the number of actually connected joysticks. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, + + + + + +joy_install

+ + + +/ + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +joy_load_driver

+ + + +/ + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +joy_read

+ + + +/ +. + +A joystick driver must be loaded using before calling this function. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +joy_uninstall

+ + + +/ + +A joystick driver must be installed using before calling this function. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +joy_unload

+ + + +/ + +A joystick driver must be loaded using before calling this function. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + + + + + + +kbhit

+ + + +/ + +If the system does not support a keyboard buffer (most systems +do), the function is rather useless. + +, + + + + + +labs

+ + + +/ + +The return value is undefined if The function is only available as fastcall function, so it may only be +used in presence of a prototype. + + + + + + +ltoa

+ + + +/ + +There are no provisions to prevent a buffer overflow. +If The function is non standard, so it is not available in strict ANSI mode. +You should probably use The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, +, +, + + + + + +localeconv

+ + + +/ + +cc65 supports only the "C" locale, so even after setting a new locale +using /, the structure returned will +always be the same. + + + + + + +longjmp

+ + + +/ +/. Program execution continues as if the +call to / has just returned the value + +If the parameter The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + + + +malloc

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, +, +, +, +, + + + + + +memchr

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + + + +memcpy

+ + + +/ + +The result is undefined if the memory areas do overlap. Use +/ to copy overlapping memory areas. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, + + + + + +memmove

+ + + +/ + +While /. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, + + + + + +memset

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, + + + + + +mod_free

+ + + +/ +/ function. + +The pointer passed as parameter is the pointer to the module memory, +not the pointer to the control structure. + + + + + + +mod_load

+ + + +/ + + + +The linker is needed to create +relocatable o65 modules for use with this function. + + + + + + +mouse_setbox

+ + + +/ + +The function does not check if the mouse cursor is currently within the +given rectangle. Placing the mouse cursor within the bounding box is the +responsibility of the programmer. +While the bounding box may be larger than the actual screen size, the +standard mouse cursor draw routines may fail to set the cursor to coordinates +outside of the screen area. Depending on the platform, you may have to supply +your own mouse cursor routines. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, + + + + + +mouse_getbox

+ + + +/ + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, + + + + + +mouse_buttons

+ + + +/ + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, + + + + + +mouse_geterrormsg

+ + + +/ + +The function will return "Unknown error" for invalid error codes. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +mouse_hide

+ + + +/ +/ and +/ to make the mouse cursor +visible. + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + + + + + + +mouse_info

+ + + +/ + +The / instead. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, + + + + + +mouse_install

+ + + +/ + +Not all drivers are able to detect if the supported hardware is really +present. +After installing a driver, the mouse cursor is hidden. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +mouse_ioctl

+ + + +/ + +Calling this function is non portable, because each driver may +implement different ioctl calls (or none at all). +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + + + + + +mouse_load_driver

+ + + +/ + +The driver is loaded by name, so currently you must know the type of +mouse that should be supported. There is no autodetect capability. +Not all drivers are able to detect if the supported hardware is really +present. +After installing a driver, the mouse cursor is hidden. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +mouse_move

+ + + +/ + +The function does not check if the new position is within the bounding +box specified with /. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, + + + + + +mouse_pos

+ + + +/ + +The / instead. +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, + + + + + +mouse_show

+ + + +/ +/ and +/. + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + + + + + + +mouse_uninstall

+ + + +/ + +If the driver has been loaded using /, / +should be used instead of The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + +mouse_unload

+ + + +/ + +The function does nothing if no driver is loaded. + +, +, + + + + + +offsetof

+ + + +/ + +The function is actually a macro. + + + + + +open

+ + + +/ + +POSIX specifies an additional +, + + + + + +peekbsys

+ + + +/, +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +This function may be a macro depending on the compiler options. The +actual function is accessible by #undef'ing the macro. + +, +, +, +, + + + + + +peekwsys

+ + + +/, +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The order in which the two bytes are read is undefined. + +, +, +, +, + + + + + +perror

+ + + +/ +/ with an argument of +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +pokebsys

+ + + +/, +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, +, + + + + + +pokewsys

+ + + +/, +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The order in which the two bytes are written is undefined. + +, +, +, +, + + + + + +qsort

+ + + +/ + +If there are multiple members with the same key, the order after calling +the function is undefined. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + + + +raise

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +rand

+ + + +/ + +Without using , always the same +flow of numbers is generated. +On startup, the function behaves as if +had been used with an argument of 1. + +, + + + + + +realloc

+ + + +/ + +The part of the memory block that is returned will have its contents +unchanged. +This function is somewhat dangerous to use. Be careful to save the +pointer you're passing somewhere else, otherwise + + ptr = realloc (ptr, size); + +will loose your only copy of The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, +, +, +, + + + + + +remove

+ + + +/ + +This function is not available on all cc65 targets (depends on the +availability of file I/O). +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + +#include <stdio.h> + +#define FILENAME "helloworld" + +if (remove (FILENAME) == 0) { + printf ("We deleted %s successfully\n", FILENAME); +} else { + printf ("There was a problem deleting %s\n", FILENAME); +} + + + + + +rename

+ + + +/ + +This function is not available on all cc65 targets (depends on the +capabilities of the storage devices). +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + +#include <stdio.h> + +#define OLDNAME "textfile.txt" +#define NEWNAME "textfile.bak" + +if (rename (OLDNAME, NEWNAME) == 0) { + printf ("Renamed %s to %s\n", OLDNAME, NEWNAME); +} else { + printf ("Error renaming %s to %s\n", OLDNAME, NEWNAME); +} + + + + + +reset_brk

+ + + +/ + +Since / installs an exit handler, +it is not strictly necessary to call this function as part of the cleanup when +the program ends. + + + + + + +revers

+ + + +/ + +The function may not be supported by the hardware, in which case +the call is ignored. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + + + +screensize

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, +, + + + + + +set_brk

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The stub saves the zero page registers used by the C runtime and switches +to a small break handler stack. This means that it is safe to execute C code, +even if C code was interrupted. Be careful however not to use too many local +variables, and do not enable stack checks for the handler function or any other +function called from it. +The Since / as part of the cleanup when +the program terminates. + + + + + + +setjmp

+ + + +/ +/ function and +returns zero. + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + + + +setlocale

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +cc65 supports only the "C" locale, so calling this function to set a +different locale has no effect. + +, + + + + + + +signal

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +sleep

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + + +slow

+ + + +/ + +The function is specific to the C128. + +, +, + + + + + +srand

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +strcasecmp

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The function is not available in strict ANSI mode. + +, +, +, + + + + + + +strcat

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +If copying takes place between objects that overlap, the behaviour +is undefined. + +, +, + + + + + +strchr

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +strcmp

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, + + + + + + +strcoll

+ + + +/ +/. It returns a value that is less than zero if +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, +, + + + + + + +strcpy

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +If copying takes place between objects that overlap, the behaviour +is undefined. + +, +, + + +#include <string.h> + +static char hello[14]; + +strcpy (hello, "Hello world!\n"); + + + + + +strcspn

+ + + +/ +not consist of +characters contained in the string +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, + + + + + +strdup

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +It is up to the caller to free the allocated memory block. + +, + + + + + +strerror

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +While the return type of the function is a + + + + + +stricmp

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The function is not available in strict ANSI mode. + +, +, +, + + + + + + +strlen

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +When compiling with + + + + + +strlower

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The function prototype is unavailable when compiling in strict ANSI mode. +An alias name for this function is +, + + + + + +strlwr

+ + +See + + +strncat

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +If copying takes place between objects that overlap, the behaviour +is undefined. + +, +, + + + + + +strncmp

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, +, +, + + + + + + +strncpy

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. If there is no null byte in the first If copying takes place between objects that overlap, the behaviour is +undefined. + +, +, + + +#include + +static char hello[6]; + +strcpy (hello, "Hello world!\n", sizeof (hello) - 1); +hello[5] = '\0'; + + + + + +strrchr

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + + + +strspn

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +strstr

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +strtok

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +strxfrm

+ + + +/ + +If The function is only available as fastcall function, so it may only +be used in presence of a prototype. +Since cc65 doesn't support different charcter sets, . + +, +, +, + + + + +strupper

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The function prototype is unavailable when compiling in strict ANSI mode. +An alias name for this function is + + + + + + +strupr

+ + +See + + +textcolor

+ + + +/ + +Text colors are system dependent. The function may have no effect +on systems where the text color cannot be changed. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + + +tgi_bar

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +tgi_setcolor(COLOR_GREEN); +tgi_bar(10, 10, 100, 60); + + + + +tgi_circle

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +tgi_setcolor(COLOR_BLACK); +tgi_circle(50, 40, 40); + + + + +tgi_clear

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_done

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getcolor

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +color = tgi_getcolor(); + + + + +tgi_getcolorcount

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +if (tgi_getcolorcount() == 2) { + printf("Only monochrome graphics is supported\n"); +} + + + + +tgi_getdefpalette

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_geterror

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_geterrormsg

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getmaxcolor

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getmaxx

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getmaxy

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getpagecount

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + +, + + + + +tgi_getpalette

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getpixel

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getxres

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_getyres

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_gotoxy

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_init

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +extern char lynxtgi[]; //Include the driver statically instead of loading it. +tgi_install(&lynxtgi); +tgi_init(); //Set up the default palette and clear the screen. + + + + +tgi_install

+ + + +/ + +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + +extern char lynxtgi[]; //Include the driver statically instead of loading it. + +tgi_install(&lynxtgi); +tgi_init(); //Set up the default palette and clear the screen. + + + + +tgi_ioctl

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +These functions are not easily portable to other cc65 platforms. + + +#define tgi_sprite(spr) tgi_ioctl(0, (unsigned)(spr)) +#define tgi_flip() tgi_ioctl(1, 0) +#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (unsigned)(bgcol)) +#define tgi_setframerate(rate) tgi_ioctl(3, (unsigned)(rate)) +#define tgi_busy() tgi_ioctl(4, 0) +#define tgi_updatedisplay() tgi_ioctl(4, 1) +if (!tgi_busy()) { + tgi_sprite(&background); + tgi_setcolor(COLOR_BLUE); + tgi_outttextxy(20,40,"Hello World"); + tgi_updatedisplay(); +} + + + + +tgi_line

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_lineto

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_load

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + - -kbhit

+tgi_load_driver

-/ -/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + , - + - -revers

+tgi_outtext

-/ -/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + - -screensize

+tgi_outtextxy

-/ -/ + +The function is only available as fastcall function, so it may only be used in presence of a prototype. + , -, -, -, - + - -strcat

+tgi_setcolor

-/ -/ + +The function is only available as fastcall function, so it may only be used in presence of a prototype. - - - + +tgi_setcolor(COLOR_BLACK); +tgi_bar(0,0,30,30); +tgi_setcolor(COLOR_WHITE); +tgi_bar(10,10,20,20); + +tgi_setdrawpage

-strchr

+ + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +tgi_setdrawpage(1); +tgi_outtextxy(10, 10, "Hello World"); +tgi_setviewpage(1); // Show page 1 +tgi_setdrawpage(0); +tgi_outtextxy(10, 10, "Creating next frame"); +... +tgi_setviewpage(0); // Show page 0 + + + + +tgi_setpalette

-/ -/ + +The function is only available as fastcall function, so it may only be used in presence of a prototype. - + + - -strcpy

+tgi_setpixel

-/ -/ + +The function is only available as fastcall function, so it may only be used in presence of a prototype. - - - -#include + + + -static char hello[14]; +tgi_setviewpage

-strcpy (hello, "Hello world!\n"); + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +tgi_setdrawpage(1); +tgi_outtextxy(10, 10, "Hello World"); +tgi_setviewpage(1); // Show page 1 +tgi_setdrawpage(0); +tgi_outtextxy(10, 10, "Creating next frame"); +... +tgi_setviewpage(0); // Show page 0 - -strlen

+tgi_textheight

-/ - +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + - -strncpy

+tgi_textstyle

-/ - -If the array pointed to by -The function will always return - - -#include +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + -static char hello[6]; +tgi_textwidth

-strcpy (hello, "Hello world!\n", sizeof (hello) - 1); -hello[5] = '\0'; - + + +/ +/ +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + +tgi_uninstall

-strrchr

+ + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. + + + + +tgi_unload

-/ -/ + +The function is only available as fastcall function, so it may only be used in presence of a prototype. + + + + +time

+ + + +/ + +The function is only available as fastcall function, so it may +only be used in presence of a prototype. +Many platforms supported by cc65 do not have a realtime clock, so the +returned value may not be valid. + -textcolor

+toggle_videomode

-/ -/ + +The function is specific to the C128. +This function is deprecated. Please use instead! + +, - +, +, + @@ -1307,8 +5708,10 @@ prototype. +The function is only available as fastcall function, so it may only be used in presence of a prototype. + , @@ -1328,8 +5731,10 @@ only be used in presence of a prototype. +The function is only available as fastcall function, so it may only be used in presence of a prototype. + , @@ -1340,6 +5745,161 @@ only be used in presence of a prototype. +ultoa

+ + + +/ + +There are no provisions to prevent a buffer overflow. +The function is non standard, so it is not available in strict ANSI mode. +You should probably use The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, +, +, + + + + + +unlink

+ + + +/ + +The use of this function is discouraged. Please use / instead, which is a native ANSI C function and does the same. +This function is not available on all cc65 targets (depends on the +availability of file I/O). +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +Instead of / should be +used, which has the same semantics, but is more portable, because it conforms +to the ISO C standard. + + + +#include <stdio.h> +#include <unistd.h> + +#define FILENAME "helloworld" + +if (unlink (FILENAME) == 0) { + printf ("We deleted %s successfully\n", FILENAME); +} else { + printf ("There was a problem deleting %s\n", FILENAME); +} + + + + + +utoa

+ + + +/ + +There are no provisions to prevent a buffer overflow. +The function is non standard, so it is not available in strict ANSI mode. +You should probably use The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, +, +, + + + + + +vcprintf

+ + + +/ +/. --> + +Like all other The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, +, +, + + + + + +videomode

+ + + +, +/ + +The function is specific to the C128 and enhanced Apple //e. +This function replaces . +The function is only available as fastcall function, so it may only be +used in presence of a prototype. + +, +, + + + + + wherex

@@ -1381,5 +5941,3 @@ cursor. Zero is returned for the uppermost screen position. - -