X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=doc%2Ffuncref.sgml;h=409eefc877dc1e4d528ccb2d8d8d4854f877022d;hb=8806c31e4a00785be628ea8cde35fa4c94cc2ab6;hp=ad9139524d533e9981aedaa0da10b8c33f4691ae;hpb=0ec5268baa8795e2ad08ddaf0641229221d87182;p=cc65 diff --git a/doc/funcref.sgml b/doc/funcref.sgml index ad9139524..409eefc87 100644 --- a/doc/funcref.sgml +++ b/doc/funcref.sgml @@ -67,6 +67,7 @@ function. _dos_type +rebootafterexit @@ -74,9 +75,11 @@ function. _dos_type -_textframe -_textframexy +rebootafterexit +textframe +textframexy + @@ -106,8 +109,9 @@ function. - + + @@ -278,7 +282,8 @@ function. - + + @@ -378,6 +383,7 @@ It does not declare any functions.

+ @@ -406,15 +412,18 @@ It does not declare any functions. - + + + + @@ -429,7 +438,6 @@ It does not declare any functions. - @@ -451,7 +459,6 @@ It does not declare any functions. - @@ -487,7 +494,7 @@ It does not declare any functions. - + @@ -497,8 +504,47 @@ It does not declare any functions.

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

@@ -658,21 +704,21 @@ id="malloc" name="malloc"> may still return _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. @@ -1843,7 +1889,7 @@ extended memory that should be supported. There is no autodetect capability. memory and returns a pointer to the page frame. Depending on the hardware and driver, the data is either mapped into the address space or transfered into a buffer. If you don't need the actual contents of the page (for example -because you're going to overwrite it completely, it is better to call +because you're going to overwrite it completely), it is better to call / instead. @@ -2008,7 +2054,8 @@ will nearly double the speed compared to slow mode. , - +, + @@ -2274,9 +2321,9 @@ to undefined behaviour. / When compiling with / When compiling with / When compiling with / When compiling with / When compiling with / When compiling with / When compiling with / When compiling with / When compiling with / When compiling with / / When compiling with / When compiling with -mouse_box

+mouse_setbox

/ - The function does not check if the mouse cursor is currently within the @@ -3270,12 +3315,35 @@ 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

@@ -3475,13 +3543,14 @@ used in presence of a prototype. is visible, it is shown at the new position. The function does not check if the new position is within the bounding -box specified with /. +box specified with /. The function is only available as fastcall function, so it may only be used in presence of a prototype. +, + @@ -3902,8 +3971,10 @@ be used in presence of a prototype. , #include <stdio.h> #define FILENAME "helloworld" @@ -3913,6 +3984,44 @@ if (remove (FILENAME) == 0) { } 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); +} + @@ -4132,7 +4241,8 @@ will halve the speed compared to fast mode. , - +, + @@ -4762,209 +4872,1111 @@ be used in presence of a prototype. -time

+tgi_arc

-/ -/ + -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. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The function behaves unexpectedly or may crash if the angles are out +of range. -, +, +, +, + + +/* Draw the upper half of an ellipse */ +tgi_setcolor(TGI_COLOR_BLUE); +tgi_arc (50, 50, 40, 20, 0, 180); + -toggle_videomode

+tgi_bar

-/ -/ + -The function is specific to the C128. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. -, - - +tgi_setcolor(TGI_COLOR_GREEN); +tgi_bar(10, 10, 100, 60); + -tolower

+tgi_circle

-/ -/ + -The function is only available as fastcall function, so it may -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. -, -, - -, +, +, +, + + +tgi_setcolor(TGI_COLOR_BLACK); +tgi_circle(50, 40, 40); + -toupper

+tgi_clear

-/ -/ + -The function is only available as fastcall function, so it may -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. -, -, - + -ultoa

+tgi_done

-/ -/ + -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. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. , -, -, -, - + -unlink

+tgi_ellipse

-/ - -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. - -, +, +, +, + + +tgi_setcolor(TGI_COLOR_RED); +tgi_ellipse (50, 40, 40, 20); + + + -#define FILENAME "helloworld" -if (unlink (FILENAME) == 0) { - printf ("We deleted %s successfully\n", FILENAME); -} else { - printf ("There was a problem deleting %s\n", FILENAME); +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

-utoa

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

-/ -/ + -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. +The function is only available as fastcall function, so it may only +be used in presence of a prototype. , -, -, -, - + +tgi_geterrormsg

-vcprintf

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

-/ -/. --> +/ + -Like all other The function is only available as fastcall function, so it may 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. + + + + +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. +/ after + +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, (void*)(spr)) +#define tgi_flip() tgi_ioctl(1, (void*)0) +#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (void*)(bgcol)) +#define tgi_setframerate(rate) tgi_ioctl(3, (void*)(rate)) +#define tgi_busy() tgi_ioctl(4, (void*)0) +#define tgi_updatedisplay() tgi_ioctl(4, (void*)1) +if (!tgi_busy()) { + tgi_sprite(&background); + tgi_setcolor(TGI_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. + + + + + +tgi_load_driver

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

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

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

+ + + +/ + +The function is only available as fastcall function, so it may only +be used in presence of a prototype. +The function behaves unexpectedly or may crash if the angles are out +of range. + +, +, +, +, + + +/* Draw the closed upper half of an ellipse */ +tgi_setcolor(TGI_COLOR_BLUE); +tgi_pieslice (50, 50, 40, 20, 0, 180); + + + + + +tgi_setcolor

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

+ + + +/ + +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. + + + + +tgi_setpixel

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

+ + + +/ + +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_textheight

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

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

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

+ + + +/ + +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. + + + + + +toggle_videomode

+ + + +/ + +The function is specific to the C128. +This function is deprecated. Please use instead! + +, +, + + + + + +tolower

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

+ + + +/ + +The function is only available as fastcall function, so it may +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