repo_id
string
size
int64
file_path
string
content
string
wagiminator/C64-Collection
3,472
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm510/cbm510-stdjoy.s
; ; Standard joystick driver for the Commodore 510 (aka P500). May be used ; multiple times when linked to the statically application. ; ; Ullrich von Bassewitz, 2003-02-16 ; .include "zeropage.inc" .include "extzp.inc" .include "joy-kernel.inc" .include "joy-error.inc" ...
wagiminator/C64-Collection
3,366
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm510/cgetc.s
; ; Ullrich von Bassewitz, 16.09.2001 ; ; char cgetc (void); ; .export _cgetc .condes k_blncur, 2 .import cursor .include "cbm510.inc" .include "extzp.inc" ; ------------------------------------------------------------------------ .proc _cgetc lda keyidx ; Characters...
wagiminator/C64-Collection
3,048
C64_xu1541/software/tools/cc65-2.13.2/libsrc/joystick/joy_load.s
; ; Ullrich von Bassewitz, 2006-06-05 ; ; unsigned char __fastcall__ joy_load_driver (const char* driver); ; /* Load and install a joystick driver. Return an error code. */ .include "joy-kernel.inc" .include "joy-error.inc" .include "modload.inc" .include "f...
wagiminator/C64-Collection
3,298
C64_xu1541/software/tools/cc65-2.13.2/libsrc/joystick/joy-kernel.s
; ; Ullrich von Bassewitz, 2002-12-20 ; ; Common functions of the joystick API. ; .importzp ptr1 .interruptor joy_irq ; Export as IRQ handler .include "joy-kernel.inc" .include "joy-error.inc" ;------------------------------------------------------------------...
wagiminator/C64-Collection
1,480
C64_xu1541/software/tools/cc65-2.13.2/libsrc/dbg/asmtab.s
; ; Ullrich von Bassewitz, 07.08.1998 ; ; Tables needed for the line assembler/disassembler. ; .export OffsetTab .export AdrFlagTab .export SymbolTab1, SymbolTab2 .export MnemoTab1, MnemoTab2 ; ------------------------------------------------------------------------- ; Assembler tables .rodata OffsetTab: ...
wagiminator/C64-Collection
5,679
C64_xu1541/software/tools/cc65-2.13.2/libsrc/dbg/dbgdasm.s
; ; Ullrich von Bassewitz, 07.08.1998 ; ; unsigned DbgDisAsm (char* buf, unsigned addr); ; unsigned DbgDisAsm (unsigned addr); ; ; ; Part of this code is taken from the Plus/4 machine language monitor ; (TEDMon). ; .import popax .import __hextab, OffsetTab, AdrFlagTab .import SymbolTab1, SymbolTab2, MnemoTab1, M...
wagiminator/C64-Collection
1,254
C64_xu1541/software/tools/cc65-2.13.2/libsrc/dbg/dbgdump.s
; ; Ullrich von Bassewitz, 11.08.1998 ; ; char* DbgMemDump (unsigend Addr, char* Buf, unsigned char Length); ; .export _DbgMemDump .import addysp1 .import __hextab .importzp sp, tmp2, tmp3, tmp4, ptr3, ptr4 _DbgMemDump: ldy #0 lda (sp),y ; Get length sta tmp4 iny lda (sp),...
wagiminator/C64-Collection
4,050
C64_xu1541/software/tools/cc65-2.13.2/libsrc/dbg/dbgsupp.s
; ; Ullrich von Bassewitz, 08.08.1998 ; ; Support routines for the debugger ; .export _DbgInit .export _DbgSP, _DbgCS, _DbgHI .import popax, return0, _DbgEntry, _set_brk, _end_brk .import _DbgBreaks .import _brk_pc .import __ZP_START__ ; Linker g...
wagiminator/C64-Collection
3,085
C64_xu1541/software/tools/cc65-2.13.2/libsrc/conio/vcscanf.s
; ; int fastcall vcscanf(const char* format, va_list ap); ; ; 2005-01-02, Greg King ; .export _vcscanf .import _cgetc, _cputc .import popax, pushax, swapstk .include "../common/_scanf.inc" ; static bool pushed; ; static char back; ; .bss pushed: .res 1 back: .res 1 ...
wagiminator/C64-Collection
1,183
C64_xu1541/software/tools/cc65-2.13.2/libsrc/conio/cscanf.s
; ; int cscanf(const char* format, ...); ; ; 2000-12-01, Ullrich von Bassewitz ; 2005-01-01, Greg King ; .export _cscanf .import pushax, addysp, _vcscanf .macpack generic .include "zeropage.inc" ; ---------------------------------------------------------------------------- ; Code ;...
wagiminator/C64-Collection
2,959
C64_xu1541/software/tools/cc65-2.13.2/libsrc/conio/vcprintf.s
; ; int vcprintf (const char* Format, va_list ap); ; ; Ullrich von Bassewitz, 2.12.2000 ; .export _vcprintf .import pushax, popax .import __printf, _cputc .importzp sp, ptr1, ptr2, ptr3, tmp1 .macpack generic .data ; ----------------------------------------------------------...
wagiminator/C64-Collection
13,898
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-swlink.s
; ; Serial driver for the C128 using a Swiftlink or Turbo-232 cartridge. ; ; Ullrich von Bassewitz, 2003-04-18 ; ; The driver is based on the cc65 rs232 module, which in turn is based on ; Craig Bruce device driver for the Switftlink/Turbo-232. ; ; SwiftLink/Turbo-232 v0.90 device driver, by Craig Bruce, 14-Apr-1998. ;...
wagiminator/C64-Collection
6,564
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-ramcart.s
; ; Extended memory driver for the RamCart 64/128KB cartridge. Driver works ; without problems when statically linked. ; Code is based on GEORAM code by Ullrich von Bassewitz. ; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> ; 06,22.12.2002 ; .include "zeropage.inc" .include "em-kernel.inc" .include...
wagiminator/C64-Collection
8,471
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-potmouse.s
; ; Driver for a potentiometer "mouse" e.g. Koala Pad ; ; Ullrich von Bassewitz, 2004-03-29, 2009-09-26 ; Stefan Haubenthal, 2006-08-20 ; .include "zeropage.inc" .include "mouse-kernel.inc" .include "c128.inc" .macpack generic ; ------------------------------------------------------------------------ ; Header. I...
wagiminator/C64-Collection
2,023
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/color.s
; ; Ullrich von Bassewitz, 06.08.1998 ; ; unsigned char __fastcall__ textcolor (unsigned char color); ; unsigned char __fastcall__ bgcolor (unsigned char color); ; unsigned char __fastcall__ bordercolor (unsigned char color); ; .export _textcolor, _bgcolor, _bordercolor .import return0 .include "c...
wagiminator/C64-Collection
11,372
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-1351.s
; ; Driver for the 1351 proportional mouse. Parts of the code are from ; the Commodore 1351 mouse users guide. ; ; Ullrich von Bassewitz, 2003-12-29, 2009-09-26 ; .include "zeropage.inc" .include "mouse-kernel.inc" .include "c128.inc" .macpack generic ; -----------------...
wagiminator/C64-Collection
6,848
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-reu.s
; ; Extended memory driver for the Commodore REU. Driver works without ; problems when statically linked. ; ; Ullrich von Bassewitz, 2002-11-29 ; .include "zeropage.inc" .include "em-kernel.inc" .include "em-error.inc" .include "c128.inc" .macpack generic ; ---------------...
wagiminator/C64-Collection
4,571
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/crt0.s
; ; Startup code for cc65 (C128 version) ; .export _exit .export __STARTUP__ : absolute = 1 ; Mark as startup .import callirq, initlib, donelib .import zerobss .import push0, callmain .import RESTOR, BSOUT, CLRCH .import __INTERRUPTOR...
wagiminator/C64-Collection
6,632
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-georam.s
; ; Extended memory driver for the GEORAM cartridge. Driver works without ; problems when statically linked. ; ; Ullrich von Bassewitz, 2002-11-29 ; .include "zeropage.inc" .include "em-kernel.inc" .include "em-error.inc" .macpack generic ; ---------------------------------...
wagiminator/C64-Collection
2,774
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-stdjoy.s
; ; Standard joystick driver for the C128. May be used multiple times when linked ; to the statically application. ; ; Ullrich von Bassewitz, 2002-12-21 ; .include "zeropage.inc" .include "joy-kernel.inc" .include "joy-error.inc" .include "c128.inc" .macpack ge...
wagiminator/C64-Collection
1,940
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/systime.s
; ; Stefan Haubenthal, 27.7.2009 ; ; time_t _systime (void); ; /* Similar to time(), but: ; * - Is not ISO C ; * - Does not take the additional pointer ; * - Does not set errno when returning -1 ; */ ; .include "time.inc" .include "c128.inc" .constructor initsystime ...
wagiminator/C64-Collection
7,750
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-vdc.s
; ; Extended memory driver for the VDC RAM available on all C128 machines ; (based on code by Ullrich von Bassewitz) ; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> ; 06,20.12.2002 .include "zeropage.inc" .include "em-kernel.inc" .include "em-error.inc" .macpack generic ; --------...
wagiminator/C64-Collection
2,158
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/kernal.s
; ; Ullrich von Bassewitz, 19.11.2002 ; ; C128 kernal functions ; .export C64MODE .export SWAPPER .export SETBNK .export CINT .export IOINIT .export RAMTAS .export RESTOR .export VECTOR ...
wagiminator/C64-Collection
23,391
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-640-480-2.s
; ; Graphics driver for the 640x480x2 mode on the C128 VDC 64k ; (values for this mode based on Fred Bowen's document) ; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> ; 23.12.2002 ; 2004-04-04, Greg King ; ; NOTES: ; For any smart monkey that will try to optimize this: PLEASE do tests on ; real VDC, not only VICE. ; ...
wagiminator/C64-Collection
2,902
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/mcbdefault.s
; ; Default mouse callbacks for the C64 ; ; Ullrich von Bassewitz, 2004-03-20 ; ; All functions in this module should be interrupt safe, because they may ; be called from an interrupt handler ; .export _mouse_def_callbacks .include "mouse-kernel.inc" .include "c128.inc" ...
wagiminator/C64-Collection
4,023
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/mainargs.s
; mainargs.s ; ; Ullrich von Bassewitz, 2003-03-07 ; Based on code from Stefan A. Haubenthal, <polluks@web.de> ; 2003-05-18, Greg King ; 2004-04-28, 2005-02-26, Ullrich von Bassewitz ; ; Scan a group of arguments that are in BASIC's input-buffer. ; Build an array that points to the beginning of each argument. ; Send, t...
wagiminator/C64-Collection
1,954
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/cputc.s
; ; Ullrich von Bassewitz, 2000-08-06, 2002-12-21 ; Using lots of code from MagerValp, MagerValp@cling.gu.se ; ; void cputcxy (unsigned char x, unsigned char y, char c); ; void cputc (char c); ; .export _cputcxy, _cputc, cputdirect, putchar .export newline, plot .constructor initcputc ...
wagiminator/C64-Collection
3,796
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-ptvjoy.s
; ; PTV-4 Player joystick driver for the C128 ; ; Ullrich von Bassewitz, 2003-09-28, using the C64 driver from ; Groepaz/Hitmen, 2002-12-23, which is ; obviously based on Ullrichs driver :) ; .include "zeropage.inc" .include "joy-kernel.inc" .include "joy-error.inc" .include "c128.inc"...
wagiminator/C64-Collection
23,225
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-640-200-2.s
; ; Graphics driver for the 640x200x2 mode on the C128 VDC ; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> ; 23.12.2002 ; 2004-04-04, Greg King ; ; NOTES: ; For any smart monkey that will try to optimize this: PLEASE do tests on ; real VDC, not only VICE. ; ; Only DONE routine contains C128-mode specific stuff, every...
wagiminator/C64-Collection
2,259
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/break.s
; ; Ullrich von Bassewitz, 27.09.1998 ; ; void set_brk (unsigned Addr); ; void reset_brk (void); ; .export _set_brk, _reset_brk .destructor _reset_brk .export _brk_a, _brk_x, _brk_y, _brk_sr, _brk_pc .importzp ptr1 .include "c128.inc" .bss _brk_a: .res 1 _brk_x: .res 1 _brk_y: ...
wagiminator/C64-Collection
6,797
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-ram.s
; ; Extended memory driver for the C128 RAM in bank #1. Driver works without ; problems when statically linked. ; ; Ullrich von Bassewitz, 2002-12-04 ; .include "zeropage.inc" .include "em-kernel.inc" .include "em-error.inc" .include "c128.inc" .macpack gener...
wagiminator/C64-Collection
1,548
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/cgetc.s
; ; Ullrich von Bassewitz, 06.08.1998 ; ; char cgetc (void); ; .export _cgetc .constructor initcgetc .destructor donecgetc .import cursor .include "c128.inc" ;-------------------------------------------------------------------------- _cgetc: lda KEY_COUNT ; Get number of characters ...
wagiminator/C64-Collection
11,035
C64_xu1541/software/tools/cc65-2.13.2/libsrc/c128/c128-joymouse.s
; ; Driver for a "joystick mouse". ; ; Ullrich von Bassewitz, 2004-04-05, 2009-09-26 ; .include "zeropage.inc" .include "mouse-kernel.inc" .include "c128.inc" .macpack generic ; ------------------------------------------------------------------------ ; Header. Includes j...
wagiminator/C64-Collection
1,580
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/strncpy.s
; ; Ullrich von Bassewitz, 2003-05-04 ; ; char* __fastcall__ strncpy (char* dest, const char* src, unsigned size); ; .export _strncpy .import popax .importzp ptr1, ptr2, tmp1, tmp2, tmp3 .proc _strncpy eor #$FF sta tmp1 txa eor #$FF sta tmp2 ...
wagiminator/C64-Collection
1,416
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/atexit.s
; ; Ullrich von Bassewitz, 06.06.1998 ; ; int atexit (void (*f) (void)); ; .export _atexit .destructor doatexit, 5 .import callax .include "errno.inc" .macpack cpu ; --------------------------------------------------------------------------- .proc _atexit ldy exitfunc_index ...
wagiminator/C64-Collection
1,215
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/_sys.s
; ; void __fastcall__ _sys (struct regs* r); ; ; Ullrich von Bassewitz, 16.12.1998 ; .export __sys .import jmpvec .importzp ptr1 __sys: sta ptr1 stx ptr1+1 ; Save the pointer to r ; Fetch the PC and store it into the jump vector ldy #5 lda (ptr1),y sta jmpvec+2 dey lda (ptr1),y sta jmpvec+1 ;...
wagiminator/C64-Collection
2,381
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/strnicmp.s
; ; Christian Groessler, 10.02.2009 ; derived from strncmp.s and stricmp.s ; ; int __fastcall__ strnicmp (const char* s1, const char* s2, size_t count); ; int __fastcall__ strncasecmp (const char* s1, const char* s2, size_t count); ; .export _strnicmp, _strncasecmp .import popax, __ctype .importzp ptr1, ptr2, ptr...
wagiminator/C64-Collection
16,448
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/modload.s
;*****************************************************************************/ ;* */ ;* modload.s */ ;* */ ...
wagiminator/C64-Collection
1,495
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/getcwd.s
; ; Ullrich von Bassewitz, 2003-08-12 ; ; char* __fastcall__ getcwd (char* buf, size_t size); ; .export _getcwd .import popax .import __cwd .importzp ptr1, ptr2 .include "errno.inc" ;-------------------------------------------------------...
wagiminator/C64-Collection
1,472
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/fprintf.s
; ; int fprintf (FILE* f, const char* Format, ...); ; ; Ullrich von Bassewitz, 1.12.2000 ; .export _fprintf .import addysp, decsp4, _vfprintf .importzp sp, ptr1 .macpack generic ; ---------------------------------------------------------------------------- ; Data .bss ParamSize: .res 1 ; Numb...
wagiminator/C64-Collection
1,559
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/stroserr.s
; ; Ullrich von Bassewitz, 17.07.2002 ; ; const char* __fastcall__ _stroserror (unsigned char errcode); ; /* Map an operating system error number to an error message. */ ; .export __stroserror .import __sys_oserrlist .importzp ptr1, tmp1 .macpack generic ; The table is ...
wagiminator/C64-Collection
1,476
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/snprintf.s
; ; int snprintf (char* buf, size_t size, const char* Format, ...); ; ; Ullrich von Bassewitz, 2009-09-26 ; .export _snprintf .import pushax, addysp, decsp6, _vsnprintf .importzp sp, ptr1 .macpack generic ; ---------------------------------------------------------------------------- ; Data .bss ...
wagiminator/C64-Collection
1,474
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/_heapmaxavail.s
; ; Ullrich von Bassewitz, 2003-02-01 ; ; Return the size of the largest free block on the heap. ; ; size_t __fastcall__ _heapmaxavail (void); ; ; .importzp ptr1, ptr2 .export __heapmaxavail .include "_heap.inc" .macpack generic ;----------------...
wagiminator/C64-Collection
2,070
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/atoi.s
; ; Ullrich von Bassewitz, 05.06.1998 ; ; int atoi (const char* s); ; long atol (const char* s); ; .export _atoi, _atol .import negeax, __ctype .importzp sreg, ptr1, ptr2, tmp1 .include "ctype.inc" ; ; Conversion routine (32 bit) ; _atoi: _atol: sta ptr1 ; Store s stx ptr1+1 ...
wagiminator/C64-Collection
1,665
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/scanf.s
; ; int scanf(const char* Format, ...); ; ; 2000-12-01, Ullrich von Bassewitz ; 2004-12-31, Greg King ; .export _scanf .import _stdin, pushax, addysp, _vfscanf .import sp:zp, ptr1:zp .macpack generic ; ---------------------------------------------------------------------------- ; ...
wagiminator/C64-Collection
1,294
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/rand.s
; ; Randum number generator ; ; Written and donated by Sidney Cadot - sidney@ch.twi.tudelft.nl ; ; May be distributed with the cc65 runtime using the same license. ; ; ; int rand (void); ; void srand (unsigned seed); ; ; Uses 4-byte state. ; Multiplier must be 1 (mod 4) ; Added value must be 1 (mod 2) ; This guaran...
wagiminator/C64-Collection
16,381
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/_printf.s
; ; _printf: Basic layer for all printf type functions. ; ; Ullrich von Bassewitz, 21.10.2000 ; .export __printf .import popax, pushax, pusheax, decsp6, push1, axlong, axulong .import _ltoa, _ultoa .import _strlower, _strlen .importzp sp, ptr1, ptr2, tmp1, regbank, sreg .macpack generic ; ----------...
wagiminator/C64-Collection
1,317
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/stricmp.s
; ; Ullrich von Bassewitz, 03.06.1998 ; ; int stricmp (const char* s1, const char* s2); /* DOS way */ ; int strcasecmp (const char* s1, const char* s2); /* UNIX way */ ; .export _stricmp, _strcasecmp .import popax .import __ctype .importzp ptr1, ptr2, tmp1 .include "ctype.inc" _stricmp: _strc...
wagiminator/C64-Collection
2,655
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/modfree.s
;*****************************************************************************/ ;* */ ;* modfree.s */ ;* */ ...
wagiminator/C64-Collection
4,221
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/vsscanf.s
; ; int __fastcall__ vsscanf (const char* str, const char* format, va_list ap); ; /* Standard C function */ ; ; 2004-11-28, Ullrich von Bassewitz ; 2004-12-21, Greg King ; .export _vsscanf .import popax, __scanf .importzp sp, ptr1, ptr2 .macpack generic ; ------------------------------------------...
wagiminator/C64-Collection
1,131
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/_heapadd.s
; ; Ullrich von Bassewitz, 21.7.2000 ; ; Add a block to the heap free list ; ; void __fastcall__ _heapadd (void* mem, size_t size); ; ; .importzp ptr1, ptr2 .import popax .import heapadd .export __heapadd .include "_heap.inc" .macpack generic ;-------------------...
wagiminator/C64-Collection
1,832
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/fscanf.s
; ; int fscanf (FILE* f, const char* format, ...); ; ; Ullrich von Bassewitz, 2004-11-28 ; .export _fscanf .import addysp, decsp4, _vfscanf .importzp sp, ptr1 .macpack generic ; ---------------------------------------------------------------------------- ; Data .bss ParamSize: .res 1 ...
wagiminator/C64-Collection
1,444
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/_heapmemavail.s
; ; Ullrich von Bassewitz, 2003-02-01 ; ; Return the amount of free memory on the heap. ; ; size_t __fastcall__ _heapmemavail (void); ; ; .importzp ptr1, ptr2 .export __heapmemavail .include "_heap.inc" .macpack generic ;-----------------------------------------------------...
wagiminator/C64-Collection
2,506
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/vfscanf.s
; ; int __fastcall__ vfscanf (FILE* f, const char* format, va_list ap); ; ; 2004-11-27, Ullrich von Bassewitz ; 2004-12-21, Greg King ; .export _vfscanf .import _fgetc, _ungetc, _ferror .include "zeropage.inc" .include "_scanf.inc" .include "stdio...
wagiminator/C64-Collection
1,217
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/raise.s
; ; Ullrich von Bassewitz, 2003-03-14 ; ; int __fastcall__ raise (int sig); ; .import jmpvec .include "signal.inc" ;---------------------------------------------------------------------------- ; int __fastcall__ raise (int sig); _raise: cpx #0 bne invalidsig ...
wagiminator/C64-Collection
2,143
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/memcpy.s
; ; Ullrich von Bassewitz, 2003-08-20 ; Performance increase (about 20%) by ; Christian Krueger, 2009-09-13 ; ; void* __fastcall__ memcpy (void* dest, const void* src, size_t n); ; ; NOTE: This function contains entry points for memmove, which will ressort ; to memcpy for an upwards copy. Don't change this module witho...
wagiminator/C64-Collection
1,894
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/utscopy.s
; ; Ullrich von Bassewitz, 2003-08-12 ; ; This module contains a utility function for the machine dependent parts ; of uname (__sysuname): It copies a packed struct utsname (just the strings ; without padding) into a struct utsname. The source of the data is an ; external symbol named "utsdata", the target is passed in...
wagiminator/C64-Collection
2,953
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/_fopen.s
; ; Ullrich von Bassewitz, 22.11.2002 ; ; FILE* __fastcall__ _fopen (const char* name, const char* mode, FILE* f); ; /* Open the specified file and fill the descriptor values into f */ ; .export __fopen .import _open .import pushax, incsp4, return0 .importzp ...
wagiminator/C64-Collection
2,993
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/fwrite.s
; ; Ullrich von Bassewitz, 22.11.2002 ; ; size_t __fastcall__ fwrite (const void* buf, size_t size, size_t count, FILE* file); ; /* Write to a file */ ; .export _fwrite .import _write .import pushax, incsp6, addysp, ldaxysp, pushwysp, return0 .import tos...
wagiminator/C64-Collection
1,098
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/calloc.s
; ; Ullrich von Bassewitz, 15.11.2001 ; ; Allocate a block and zero it. ; ; void* __fastcall__ calloc (size_t count, size_t size); ; .export _calloc .import _malloc, _memset .import tosumulax, pushax, push0 ; ------------------------------------------------------------------------- .proc _calloc ; We have the...
wagiminator/C64-Collection
1,169
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/vscanf.s
; ; int __fastcall__ vscanf (const char* format, va_list ap); ; ; Ullrich von Bassewitz, 2004-11-27 ; .export _vscanf .import _vfscanf .import _stdin .import decsp2 .include "zeropage.inc" ; ----------------------------------------------------...
wagiminator/C64-Collection
1,720
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/signal.s
; ; Ullrich von Bassewitz, 2002-12-16 ; ; __sigfunc __fastcall__ signal (int sig, __sigfunc func); ; .import popax .importzp ptr1 .include "signal.inc" .include "errno.inc" ; Default signal functions: The standard specifies explicitly that the values ; for SIG_IGN and SIG_DFL must b...
wagiminator/C64-Collection
1,769
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/sscanf.s
; ; int sscanf (const char* str, const char* format, ...); ; ; Ullrich von Bassewitz, 2004-11-28 ; .export _sscanf .import addysp, decsp4, _vsscanf .importzp sp, ptr1 .macpack generic ; ---------------------------------------------------------------------------- ; Data .bss ParamSize: .res 1 ...
wagiminator/C64-Collection
5,491
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/fread.s
; ; Ullrich von Bassewitz, 2002-11-22, 2004-05-14 ; ; size_t __fastcall__ fread (void* buf, size_t size, size_t count, FILE* file); ; /* Read from a file */ ; .export _fread .import _read .import pusha0, pushax .import incsp4, incsp6 .import ...
wagiminator/C64-Collection
2,041
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/strstr.s
; ; Ullrich von Bassewitz, 11.12.1998 ; ; char* strstr (const char* haystack, const char* needle); ; .export _strstr .import popax .importzp ptr1, ptr2, ptr3, ptr4, tmp1 _strstr: sta ptr2 ; Save needle stx ptr2+1 sta ptr4 ; Setup temp copy for later jsr popax ; Get haystack sta ptr1 ...
wagiminator/C64-Collection
1,363
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/ungetc.s
; ; Ullrich von Bassewitz, 2004-05-12 ; ; int __fastcall__ ungetc (int c, FILE* f); ; /* Push back a character into a file stream. */ ; .export _ungetc .import popax .import ptr1: zp, tmp1: zp .include "_file.inc" .include "errno.inc" ; ...
wagiminator/C64-Collection
1,142
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/getenv.s
; ; Ullrich von Bassewitz, 2005-04-21 ; ; char* __fastcall__ getenv (const char* name); ; ; Beware: putenv() knows about zero page usage in this module! ; .export _getenv .import __environ, __envcount .import searchenv .import return0 .import ptr1:zp, ptr3:zp, tmp1:zp .code ;-...
wagiminator/C64-Collection
1,786
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/_heapblocksize.s
; ; Ullrich von Bassewitz, 2004-07-17 ; ; size_t __fastcall__ _heapblocksize (const void* ptr); ; ; Return the size of an allocated block. ; .importzp ptr1, ptr2 .export __heapblocksize .include "_heap.inc" .macpack generic .macpack cpu ;--------------...
wagiminator/C64-Collection
9,363
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/malloc.s
; ; Ullrich von Bassewitz, 17.7.2000 ; ; Allocate a block from the heap. ; ; void* __fastcall__ malloc (size_t size); ; ; ; C implementation was: ; ; void* malloc (size_t size) ; /* Allocate memory from the given heap. The function returns a pointer to the ; * allocated memory block or a NULL pointer if not enough mem...
wagiminator/C64-Collection
4,503
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/putenv.s
; ; Ullrich von Bassewitz, 2005-04-21 ; ; int putenv (char* s); ; ; Note: The function will place s into the environment, *not* a copy! ; .export _putenv .import _malloc, _free .import searchenv, copyenvptr .import __environ, __envcount, __envsize .import __seterrno, return0 ...
wagiminator/C64-Collection
1,138
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/strncat.s
; ; Ullrich von Bassewitz, 31.05.1998 ; ; char* strncat (char* dest, const char* src, size_t n); ; .export _strncat .import popax .importzp ptr1, ptr2, ptr3, tmp1, tmp2 _strncat: eor #$FF ; one's complement to count upwards sta tmp1 txa eor #$FF sta tmp2 jsr popax ; get src sta p...
wagiminator/C64-Collection
2,049
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/itoa.s
; ; Ullrich von Bassewitz, 31.05.1998 ; ; char* itoa (int value, char* s, int radix); ; char* utoa (unsigned value, char* s, int radix); ; .export _itoa, _utoa .import addysp1 .import __hextab .importzp sp, sreg, ptr2, ptr3, tmp1 .rodata specval: .byte '-', '3', '2', '7', '6', '8'...
wagiminator/C64-Collection
2,476
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/ltoa.s
; ; Ullrich von Bassewitz, 11.06.1998 ; ; char* ltoa (long value, char* s, int radix); ; char* ultoa (unsigned long value, char* s, int radix); ; .export _ltoa, _ultoa .import popax .import __hextab .importzp sreg, ptr1, ptr2, ptr3, tmp1 .rodata specval: .byte '-', '2', '1', '4', '7', '4', '8'...
wagiminator/C64-Collection
13,983
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/free.s
; ; Ullrich von Bassewitz, 19.03.2000 ; ; Free a block on the heap. ; ; void __fastcall__ free (void* block); ; ; ; C implementation was: ; ; void free (void* block) ; /* Release an allocated memory block. The function will accept NULL pointers ; * (and do nothing in this case). ; */ ; { ; unsigned* b; ; unsi...
wagiminator/C64-Collection
3,263
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/vfprintf.s
; vfprintf.s ; ; int fastcall vfprintf(FILE* f, const char* Format, va_list ap); ; ; 2005-02-08, Ullrich von Bassewitz ; 2005-02-11, Greg King .export _vfprintf .import push1, pushwysp, incsp6 .import _fwrite, __printf .importzp sp, ptr1 .macpack ...
wagiminator/C64-Collection
2,448
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/memset.s
; ; void* __fastcall__ memset (void* ptr, int c, size_t n); ; void* __fastcall__ _bzero (void* ptr, size_t n); ; void __fastcall__ bzero (void* ptr, size_t n); ; ; Ullrich von Bassewitz, 29.05.1998 ; Performance increase (about 20%) by ; Christian Krueger, 12.09.2009 ; ; NOTE: bzero will return it's first argument as m...
wagiminator/C64-Collection
1,590
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/strncmp.s
; ; Ullrich von Bassewitz, 25.05.2000 ; ; int strncmp (const char* s1, const char* s2, unsigned n); ; .export _strncmp .import popax .importzp ptr1, ptr2, ptr3 _strncmp: ; Convert the given counter value in a/x from a downward counter into an ; upward counter, so we can increment the counter in the loop below ...
wagiminator/C64-Collection
1,347
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/memcmp.s
; ; Ullrich von Bassewitz, 15.09.2000 ; ; int memcmp (const void* p1, const void* p2, size_t count); ; .export _memcmp .import popax, return0 .importzp ptr1, ptr2, ptr3 _memcmp: ; Calculate (-count-1) and store it into ptr3. This is some overhead here but ; saves time in the compare loop eor #$FF sta ptr3 t...
wagiminator/C64-Collection
1,402
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/sprintf.s
; ; int sprintf (char* buf, const char* Format, ...); ; ; Ullrich von Bassewitz, 1.12.2000 ; .export _sprintf .import pushax, addysp, decsp4, _vsprintf .importzp sp, ptr1 .macpack generic ; ---------------------------------------------------------------------------- ; Data .bss ParamSize: .res 1 ;...
wagiminator/C64-Collection
1,463
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/printf.s
; ; int printf (const char* Format, ...); ; ; Ullrich von Bassewitz, 1.12.2000 ; .export _printf .import _stdout, pushax, addysp, _vfprintf .importzp sp, ptr1 .macpack generic ; ---------------------------------------------------------------------------- ; Data .bss ParamSize: .res 1 ; Number of pa...
wagiminator/C64-Collection
4,324
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/vsnprintf.s
; ; int vsnprintf (char* Buf, size_t size, const char* Format, va_list ap); ; ; Ullrich von Bassewitz, 2009-09-26 ; .export _vsnprintf, vsnprintf .import ldaxysp, popax, incsp2, incsp6 .import _memcpy, __printf .importzp sp, ptr1 .macpack generic .data ; --------------------...
wagiminator/C64-Collection
2,122
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/searchenv.s
; ; Ullrich von Bassewitz, 2005-04-21 ; ; Search the environment for a string. ; .export searchenv, copyenvptr .import __environ, __envcount .import ptr1:zp, ptr2:zp, ptr3:zp .code ;---------------------------------------------------------------------------- ; searchenv: ; ; ptr1 must contain...
wagiminator/C64-Collection
1,640
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/strdup.s
; ; Ullrich von Bassewitz, 18.07.2000 ; ; char* __fastcall__ strdup (const char* S); ; ; Note: The code knowns which zero page locations are used by malloc. ; .importzp sp, tmp1, ptr4 .import pushax, decsp4, incsp4 .import _strlen, _malloc, _memcpy .export _strdup .macpack ...
wagiminator/C64-Collection
2,097
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/memmove.s
; ; Ullrich von Bassewitz, 2003-08-20 ; Performance increase (about 20%) by ; Christian Krueger, 2009-09-13 ; ; void* __fastcall__ memmove (void* dest, const void* src, size_t size); ; ; NOTE: This function uses entry points from memcpy! ; .export _memmove .import memcpy_getparams, memcpy_...
wagiminator/C64-Collection
1,223
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/time.s
; ; Ullrich von Bassewitz, 12.11.2002 ; ; time_t __fastcall__ time (time_t* timep); ; .export _time .import __systime .importzp ptr1, sreg, tmp1 .include "errno.inc" .code .proc _time pha txa pha ; Save timep js...
wagiminator/C64-Collection
1,030
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/getcpu.s
; ; Ullrich von Bassewitz, 02.04.1999 ; ; unsigned char getcpu (void); ; .export _getcpu ; --------------------------------------------------------------------------- ; Subroutine to detect an 816. Returns ; ; - carry clear and 0 in A for a NMOS 6502 CPU ; - carry set and 1 in A for some CMOS 6502 CPU ; - car...
wagiminator/C64-Collection
1,054
C64_xu1541/software/tools/cc65-2.13.2/libsrc/common/memchr.s
; ; Ullrich von Bassewitz, 2003-05-05 ; ; void* __fastcall__ memchr (const void* p, int c, size_t n); ; .export _memchr .import popax, return0 .importzp ptr1, ptr2 .proc _memchr eor #$FF sta ptr2 txa eor #$FF sta ptr2+1 ; Save ones complement of n...
wagiminator/C64-Collection
2,427
C64_xu1541/software/tools/cc65-2.13.2/libsrc/atmos/crt0.s
; ; Startup code for cc65 (Oric version) ; ; By Debrune Jrme <jede@oric.org> and Ullrich von Bassewitz <uz@cc65.org> ; .export _exit .export __STARTUP__ : absolute = 1 ; Mark as startup .import initlib, donelib .import callmain, zerobss .import __RAM_START__, __RAM_SIZE_...
wagiminator/C64-Collection
9,524
C64_xu1541/software/tools/cc65-2.13.2/libsrc/atmos/atmos-240-200-2.s
; ; Graphics driver for the 240x200x2 mode on the Atmos ; ; Stefan Haubenthal <polluks@sdf.lonestar.org> ; .include "zeropage.inc" .include "tgi-kernel.inc" .include "tgi-mode.inc" .include "tgi-error.inc" .include "atmos.inc" .macpack generic ; ----------------------------------------------------------------...
wagiminator/C64-Collection
1,181
C64_xu1541/software/tools/cc65-2.13.2/libsrc/atmos/chline.s
; ; Ullrich von Bassewitz, 08.08.1998 ; ; void chlinexy (unsigned char x, unsigned char y, unsigned char length); ; void chline (unsigned char length); ; .export _chlinexy, _chline .import setscrptr .import rvs .import popax .importzp ptr2 .include ...
wagiminator/C64-Collection
2,138
C64_xu1541/software/tools/cc65-2.13.2/libsrc/atmos/cputc.s
; ; Ullrich von Bassewitz, 2003-04-13 ; ; void cputcxy (unsigned char x, unsigned char y, char c); ; void cputc (char c); ; .export _cputcxy, _cputc .export setscrptr, putchar .import rvs .import popax .importzp ptr2 .include "atmos.inc" _cputcxy: pha ; Save C ...
wagiminator/C64-Collection
1,438
C64_xu1541/software/tools/cc65-2.13.2/libsrc/atmos/cgetc.s
; ; Ullrich von Bassewitz, 2003-04-13 ; ; char cgetc (void); ; .export _cgetc .constructor initcgetc .import cursor .include "atmos.inc" ; ------------------------------------------------------------------------ ; .proc _cgetc lda KEYBUF ; Do we have a character? bm...
wagiminator/C64-Collection
2,752
C64_xu1541/software/tools/cc65-2.13.2/libsrc/atmos/oserrlist.s
; ; Stefan Haubenthal, 2004-05-25 ; Ullrich von Bassewitz, 18.07.2002 ; ; Defines the platform specific error list. ; ; The table is built as a list of entries ; ; .byte entrylen ; .byte errorcode ; .asciiz errormsg ; ; and terminated by an entry with length zero that is returned if the ; error co...
wagiminator/C64-Collection
11,953
C64_xu1541/software/tools/cc65-2.13.2/libsrc/atmos/ctype.s
; ; Ullrich von Bassewitz, 2003-04-13 ; ; Character specification table. ; ; The tables are readonly, put them into the rodata segment .rodata ; The following 256 byte wide table specifies attributes for the isxxx type ; of functions. Doing it by a table means some overhead in space, but it ; has major advantages: ;...
wagiminator/C64-Collection
26,341
C64_xu1541/software/tools/cc65-2.13.2/libsrc/lynx/lynx-160-102-16.s
; ; Graphics driver for the 160x102x16 mode on the Lynx. ; ; All the drawing functions are simply done by sprites as the sprite ; engine is the only way to do fast graphics on a Lynx. ; ; So the code is not really based on any algorithms done by somebody. ; I have looked at other routines in the cc65 libs to see what k...
wagiminator/C64-Collection
3,506
C64_xu1541/software/tools/cc65-2.13.2/libsrc/lynx/crt0.s
; *** ; CC65 Lynx Library ; ; Originally by Bastian Schick ; http://www.geocities.com/SiliconValley/Byte/4242/lynx/ ; ; Ported to cc65 (http://www.cc65.org) by ; Shawn Jefferson, June 2004 ; ; *** ; ; Startup code for cc65 (Lynx version). Based on Atari 8-bit startup ; code structure. The C stack is located at the en...
wagiminator/C64-Collection
2,692
C64_xu1541/software/tools/cc65-2.13.2/libsrc/lynx/lynx-stdjoy.s
; ; Standard joystick driver for the Atari Lynx. ; The Lynx has two fire buttons. So it is not quite "standard". ; ; Modified by Karri Kaksonen, 2004-09-16 ; Ullrich von Bassewitz, 2002-12-20 ; Using code from Steve Schmidtke ; .include "zeropage.inc" .include "joy-kernel.inc" .include "joy-e...
wagiminator/C64-Collection
5,752
C64_xu1541/software/tools/cc65-2.13.2/libsrc/lynx/eeprom.s
;**************** ; CC65 Lynx Library ; ; Originally by Bastian Schick ; http://www.geocities.com/SiliconValley/Byte/4242/lynx/ ; ; Ported to cc65 (http://www.cc65.org) by ; Shawn Jefferson, June 2004 ; ; Several changes, ; Ullrich von Bassewitz, 1004-10-14 ; ; ;**************** ;* EEPROM-routs ;* for 93C46 (1024bit =>...
wagiminator/C64-Collection
1,025
C64_xu1541/software/tools/cc65-2.13.2/libsrc/lynx/extzp.s
; ; Ullrich von Bassewitz, 2004-11-06 ; ; zeropage locations for exclusive use by the library ; .include "extzp.inc" .segment "EXTZP" : zeropage ; ------------------------------------------------------------------------ ; mikey and suzy shadow registers __iodat: .res 1 __iodir: .res 1 __...
wagiminator/C64-Collection
1,147
C64_xu1541/software/tools/cc65-2.13.2/libsrc/lynx/kbhit.s
; ; Karri Kaksonen, Harry Dodgson 2006-01-06 ; ; unsigned char kbhit (void); ; .export _kbhit .export KBEDG .export KBSTL .import return0, return1 ; -------------------------------------------------------------------------- ; The Atari Lynx has a very small keyboard - only 3 keys ; Opt1, Opt2 and Pause. ; But...