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