mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
prepend a "_" to clib runtime functions
git-svn-id: svn://svn.cc65.org/cc65/trunk@3076 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
2de3291ddb
commit
f6d59f6e17
@ -131,26 +131,40 @@
|
||||
#define COLOR_GRAY3 _gtia_mkcolor(HUE_GREY,5)
|
||||
|
||||
/* color register functions */
|
||||
extern void __fastcall__ setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
|
||||
extern void __fastcall__ setcolor_low (unsigned char color_reg, unsigned char color_value);
|
||||
extern unsigned char __fastcall__ getcolor (unsigned char color_reg);
|
||||
extern void __fastcall__ _setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
|
||||
extern void __fastcall__ _setcolor_low (unsigned char color_reg, unsigned char color_value);
|
||||
extern unsigned char __fastcall__ _getcolor (unsigned char color_reg);
|
||||
|
||||
/* other screen functions */
|
||||
extern int __fastcall__ graphics(unsigned char mode); /* mode value same as in BASIC */
|
||||
extern void __fastcall__ scroll (signed char numlines);
|
||||
extern int __fastcall__ _graphics (unsigned char mode); /* mode value same as in BASIC */
|
||||
extern void __fastcall__ _scroll (signed char numlines);
|
||||
/* numlines > 0 scrolls up */
|
||||
/* numlines < 0 scrolls down */
|
||||
|
||||
/* misc. functions */
|
||||
extern void save_vecs(void); /* save system vectors */
|
||||
extern void rest_vecs(void); /* restore system vectors */
|
||||
extern unsigned char get_ostype(void); /* get ROM version */
|
||||
extern unsigned char get_tv(void); /* get TV system */
|
||||
extern char *getdefdev(void); /* get default floppy device */
|
||||
extern void _save_vecs(void); /* save system vectors */
|
||||
extern void _rest_vecs(void); /* restore system vectors */
|
||||
extern unsigned char _get_ostype(void); /* get ROM version */
|
||||
extern unsigned char _get_tv(void); /* get TV system */
|
||||
extern char *_getdefdev(void); /* get default floppy device */
|
||||
|
||||
/* global variables */
|
||||
extern unsigned char _dos_type; /* the DOS flavour */
|
||||
|
||||
/* provide old names for backwards compatibility */
|
||||
#ifdef ATARI_COMPAT_PRE_2_10
|
||||
#define setcolor _setcolor
|
||||
#define setcolor_low _setcolor_low
|
||||
#define getcolor _getcolor
|
||||
#define graphics _graphics
|
||||
#define scroll _scroll
|
||||
#define save_vecs _save_vecs
|
||||
#define rest_vecs _rest_vecs
|
||||
#define get_ostype _get_ostype
|
||||
#define get_tv _get_tv
|
||||
#define getdefdev _getdefdev
|
||||
#endif /* #ifdef ATARI_COMPAT_PRE_2_10 */
|
||||
|
||||
/* get_ostype return value defines (for explanation, see ostype.s) */
|
||||
/* masks */
|
||||
#define AT_OS_TYPE_MAIN 7
|
||||
|
@ -1,7 +1,7 @@
|
||||
;
|
||||
; Freddy Offenga & Christian Groessler, August 2003
|
||||
; Freddy Offenga & Christian Groessler, June 2004
|
||||
;
|
||||
; function to get default device: char *getdefdev(void);
|
||||
; function to get default device: char *_getdefdev(void);
|
||||
;
|
||||
; SpartaDOS:
|
||||
; the ZCRNAME routine is only used to get the default drive because
|
||||
@ -16,11 +16,11 @@
|
||||
|
||||
.include "atari.inc"
|
||||
.import __dos_type
|
||||
.export _getdefdev ; get default device (e.g. "D1:")
|
||||
.export __getdefdev ; get default device (e.g. "D1:")
|
||||
|
||||
; Get default device (LBUF will be destroyed!!)
|
||||
|
||||
_getdefdev:
|
||||
__getdefdev:
|
||||
|
||||
lda __dos_type ; which DOS?
|
||||
cmp #ATARIDOS
|
||||
|
@ -1,13 +1,13 @@
|
||||
;
|
||||
; Christian Groessler, October 2001
|
||||
; Christian Groessler, June 2004
|
||||
;
|
||||
; this file provides an equivalent to the BASIC GRAPHICS function
|
||||
;
|
||||
; int __fastcall__ graphics(unsigned char mode);
|
||||
; int __fastcall__ _graphics(unsigned char mode);
|
||||
;
|
||||
;
|
||||
|
||||
.export _graphics
|
||||
.export __graphics
|
||||
.constructor initscrmem,28
|
||||
|
||||
.import findfreeiocb
|
||||
@ -29,7 +29,7 @@
|
||||
; returns handle or -1 on error
|
||||
; uses tmp1, tmp2, tmp3, tmp4 (in subroutines)
|
||||
|
||||
.proc _graphics
|
||||
.proc __graphics
|
||||
|
||||
; tax
|
||||
; and #15 ; get required graphics mode
|
||||
@ -103,7 +103,7 @@ doopen: txa
|
||||
cioerr: jsr fddecusage ; decrement usage counter of fd as open failed
|
||||
jmp __do_oserror
|
||||
|
||||
.endproc ; _graphics
|
||||
.endproc ; __graphics
|
||||
|
||||
|
||||
; calc. upper memory limit to use
|
||||
|
@ -1,8 +1,8 @@
|
||||
;
|
||||
; Christian Groessler, December 2000
|
||||
; Christian Groessler, June 2004
|
||||
; from Freddy Offenga's rominfo.c
|
||||
;
|
||||
; unsigned char get_ostype(void)
|
||||
; unsigned char _get_ostype(void)
|
||||
;
|
||||
; x x x x x x x x - 8 bit flag
|
||||
; | | | | | | | |
|
||||
@ -38,9 +38,9 @@
|
||||
; 101 - unassigned (up to 111)
|
||||
;
|
||||
|
||||
.export _get_ostype
|
||||
.export __get_ostype
|
||||
|
||||
.proc _get_ostype
|
||||
.proc __get_ostype
|
||||
|
||||
lda $fcd8
|
||||
cmp #$a2
|
||||
|
@ -2,11 +2,11 @@
|
||||
; save and restore system vectors
|
||||
; originally by Mark Keates
|
||||
;
|
||||
; void save_vecs(void);
|
||||
; void rest_vecs(void);
|
||||
; void _save_vecs(void);
|
||||
; void _rest_vecs(void);
|
||||
;
|
||||
|
||||
.export _save_vecs,_rest_vecs
|
||||
.export __save_vecs,__rest_vecs
|
||||
.include "atari.inc"
|
||||
|
||||
.bss
|
||||
@ -24,7 +24,7 @@ old_rmargin: .res 1 ; lmargin saved in startup code
|
||||
|
||||
.code
|
||||
|
||||
.proc _save_vecs
|
||||
.proc __save_vecs
|
||||
|
||||
lda VDSLST
|
||||
sta old_dli
|
||||
@ -63,7 +63,7 @@ SETUP1:
|
||||
|
||||
.endproc
|
||||
|
||||
.proc _rest_vecs
|
||||
.proc __rest_vecs
|
||||
|
||||
lda #6
|
||||
ldx old_vbi+1
|
||||
|
@ -1,7 +1,7 @@
|
||||
;
|
||||
; Christian Groessler, June 2000
|
||||
; Christian Groessler, June 2004
|
||||
;
|
||||
; void __fastcall__ scroll (signed char numlines);
|
||||
; void __fastcall__ _scroll (signed char numlines);
|
||||
; numlines > 0 scrolls up
|
||||
; numlines < 0 scrolls down
|
||||
;
|
||||
@ -9,9 +9,9 @@
|
||||
.include "atari.inc"
|
||||
.importzp tmp1,tmp4,ptr1,ptr2
|
||||
.import mul40,_clrscr
|
||||
.export _scroll
|
||||
.export __scroll
|
||||
|
||||
.proc _scroll
|
||||
.proc __scroll
|
||||
|
||||
cmp #0
|
||||
beq jmpfin
|
||||
|
@ -1,19 +1,19 @@
|
||||
;
|
||||
; Christian Groessler, June 2000
|
||||
; Christian Groessler, June 2004
|
||||
;
|
||||
; this file provides a setcolor() function similar to BASIC SETCOLOR
|
||||
; this file provides a color functions similar to BASIC
|
||||
;
|
||||
; void __fastcall__ setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
|
||||
; void __fastcall__ setcolor_low (unsigned char color_reg, unsigned char color_value);
|
||||
; unsigned char __fastcall__ getcolor (unsigned char color_reg);
|
||||
; void __fastcall__ _setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
|
||||
; void __fastcall__ _setcolor_low (unsigned char color_reg, unsigned char color_value);
|
||||
; unsigned char __fastcall__ _getcolor (unsigned char color_reg);
|
||||
;
|
||||
|
||||
|
||||
.export _setcolor, _setcolor_low, _getcolor
|
||||
.export __setcolor, __setcolor_low, __getcolor
|
||||
.import popa
|
||||
.include "atari.inc"
|
||||
|
||||
.proc _getcolor
|
||||
.proc __getcolor
|
||||
|
||||
tax
|
||||
lda COLOR0,x ; get current value
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
.endproc
|
||||
|
||||
.proc _setcolor
|
||||
.proc __setcolor
|
||||
|
||||
; asl a ; not -> BASIC compatible
|
||||
sta lum ; remember luminance
|
||||
@ -32,11 +32,11 @@
|
||||
asl a
|
||||
asl a
|
||||
ora lum
|
||||
; jmp _setcolor_low
|
||||
; jmp __setcolor_low
|
||||
|
||||
.endproc
|
||||
|
||||
.proc _setcolor_low
|
||||
.proc __setcolor_low
|
||||
|
||||
pha
|
||||
jsr popa
|
||||
|
@ -1,7 +1,7 @@
|
||||
;
|
||||
; Christian Groessler, November 2001
|
||||
; Christian Groessler, June 2004
|
||||
;
|
||||
; unsigned char get_tv(void)
|
||||
; unsigned char _get_tv(void)
|
||||
;
|
||||
; returns the TV system the machine is using
|
||||
; 0 - NTSC
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
|
||||
.include "atari.inc"
|
||||
.export _get_tv
|
||||
.export __get_tv
|
||||
|
||||
.proc _get_tv
|
||||
.proc __get_tv
|
||||
|
||||
lda PAL ; use hw register, PALNTS is only supported on XL/XE ROM
|
||||
ldx #0
|
||||
|
Loading…
x
Reference in New Issue
Block a user