repo_id
string
size
int64
file_path
string
content
string
wagiminator/C64-Collection
8,313
C64_xu1541/software/tools/cc65-2.13.2/libsrc/lynx/lynx-comlynx.s
; ; Serial driver for the Atari Lynx ComLynx port. ; ; Karri Kaksonen, 17.09.2009 ; .include "lynx.inc" .include "zeropage.inc" .include "ser-kernel.inc" .include "ser-error.inc" ; ------------------------------------------------------------------------ ; Header. Includes jump table .segment "JUMPTABLE" ; Dri...
wagiminator/C64-Collection
1,403
C64_xu1541/software/tools/cc65-2.13.2/libsrc/lynx/cgetc.s
; ; Karri Kaksonen, Harry Dodgson 2006-01-07 ; ; char cgetc (void); ; .export _cgetc .import _kbhit .import KBEDG .import KBSTL ; -------------------------------------------------------------------------- ; The Atari Lynx has a very small keyboard - only 3 keys ; Opt1, Opt2 and Pause. ; But the ...
wagiminator/C64-Collection
6,268
C64_xu1541/software/tools/cc65-2.13.2/libsrc/lynx/ctype.s
; ; Ullrich von Bassewitz, 02.06.1998 ; ; 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
1,610
C64_xu1541/software/tools/cc65-2.13.2/libsrc/tgi/tgi_textsize.s
; ; Ullrich von Bassewitz, 22.06.2002 ; .include "tgi-kernel.inc" .import _strlen, pushax, tosumulax ;----------------------------------------------------------------------------- ; unsigned __fastcall__ tgi_textwidth (const char* s); ; /* Calculate the width of the text in pixels acc...
wagiminator/C64-Collection
3,034
C64_xu1541/software/tools/cc65-2.13.2/libsrc/tgi/tgi_bar.s
; ; Ullrich von Bassewitz, 21.06.2002 ; ; void __fastcall__ tgi_bar (int x1, int y1, int x2, int y2); ; /* Draw a bar (a filled rectangle) using the current color */ .include "tgi-kernel.inc" .importzp ptr1, ptr2, ptr3, ptr4 .import popax .proc _tgi_bar sta ...
wagiminator/C64-Collection
1,647
C64_xu1541/software/tools/cc65-2.13.2/libsrc/tgi/tgi_init.s
; ; Ullrich von Bassewitz, 21.06.2002 ; ; void __fastcall__ tgi_init (void); ; /* Initialize the already loaded graphics driver */ .include "tgi-kernel.inc" .include "tgi-error.inc" .importzp ptr1 .proc _tgi_init jsr _tgi_done ; Switch off gra...
wagiminator/C64-Collection
1,269
C64_xu1541/software/tools/cc65-2.13.2/libsrc/tgi/tgi_map_mode.s
; ; Ullrich von Bassewitz, 31.05.2002 ; ; const char* __fastcall__ tgi_map_mode (unsigned char mode); ; /* Map tgi mode codes to driver names */ ; .export _tgi_map_mode .import _tgi_mode_table .import return0 .importzp tmp1 ;-------------------------------------...
wagiminator/C64-Collection
5,462
C64_xu1541/software/tools/cc65-2.13.2/libsrc/tgi/tgi-kernel.s
; ; Ullrich von Bassewitz, 21.06.2002 ; ; Common functions of the tgi graphics kernel. ; .include "tgi-kernel.inc" .include "tgi-error.inc" .importzp ptr1 .interruptor tgi_irq ; Export as IRQ handler ;----------------------------------------------------...
wagiminator/C64-Collection
1,318
C64_xu1541/software/tools/cc65-2.13.2/libsrc/tgi/tgi_geterrormsg.s
; ; Ullrich von Bassewitz, 2004-06-15 ; ; const char* __fastcall__ tgi_geterrormsg (unsigned char code); ; /* Get an error message describing the error in code. */ ; .include "tgi-kernel.inc" .include "tgi-error.inc" .proc _tgi_geterrormsg cmp #TGI_ERR_COUNT bcc ...
wagiminator/C64-Collection
1,054
C64_xu1541/software/tools/cc65-2.13.2/libsrc/tgi/tgi_textstyle.s
; ; Ullrich von Bassewitz, 22.06.2002 ; ; void __fastcall__ tgi_textstyle (unsigned char magx, unsigned char magy, ; unsigned char dir); ; /* Set the style for text output. */ .include "tgi-kernel.inc" .import popax, incsp2 .proc _tgi_textstyle ...
wagiminator/C64-Collection
1,112
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/cbm_open.s
; ; Ullrich von Bassewitz, 22.06.2002 ; ; Original C code by Marc 'BlackJack' Rintsch, 18.03.2001 ; ; unsigned char __fastcall__ cbm_open (unsigned char lfn, ; unsigned char device, ; unsigned char sec_addr, ; ...
wagiminator/C64-Collection
2,161
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/close.s
; ; Ullrich von Bassewitz, 16.11.2002 ; ; int __fastcall__ close (int fd); ; .export _close .import CLOSE .import readdiskerror, closecmdchannel .import __oserror .importzp tmp2 .include "errno.inc" .include "...
wagiminator/C64-Collection
1,174
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/sysrename.s
; ; Ullrich von Bassewitz, 2009-02-22 ; ; unsigned char __fastcall__ _sysrename (const char *oldpath, const char *newpath); ; .export __sysrename .import fnparse, fnadd, fnparsename .import opencmdchannel, closecmdchannel .import writefndiskcmd, readdisk...
wagiminator/C64-Collection
1,304
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/rwcommon.s
; ; Ullrich von Bassewitz, 17.11.2002 ; ; Common stuff for the read/write routines ; .export rwcommon .import popax .importzp ptr1, ptr2, ptr3, tmp2 .include "errno.inc" .include "filedes.inc" ;---------------------------------------------...
wagiminator/C64-Collection
2,118
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/cbm_write.s
; ; Ullrich von Bassewitz, 15.11.2002 ; ; Original C code by Marc 'BlackJack' Rintsch, 25.03.2001 ; ; int __fastcall__ cbm_write(unsigned char lfn, void* buffer, unsigned int size) ; { ; ; static unsigned int byteswritten; ; ; /* if we can't change to the outputchannel #lfn then return an error */ ; if (_os...
wagiminator/C64-Collection
2,205
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/oserror.s
; ; Ullrich von Bassewitz, 17.05.2000 ; ; int __fastcall__ _osmaperrno (unsigned char oserror); ; /* Map a system specific error into a system independent code */ ; .export __osmaperrno .include "errno.inc" .code __osmaperrno: ldx #ErrTabSize @L1: cmp ErrTab-2,x ; Search for the error code beq @L2 ; Jump i...
wagiminator/C64-Collection
4,734
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/filename.s
; ; Ullrich von Bassewitz, 16.11.2002 ; ; File name handling for CBM file I/O ; .export fnparse, fnparsename, fnset .export fnadd, fnaddmode, fncomplete, fndefunit .export fnunit, fnlen, fncmd, fnbuf .import SETNAM .import __curunit, __fi...
wagiminator/C64-Collection
2,704
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/cbm_read.s
; ; Ullrich von Bassewitz, 22.06.2002 ; ; Original C code by Marc 'BlackJack' Rintsch, 19.03.2001 ; ; int __fastcall__ cbm_read (unsigned char lfn, void* buffer, unsigned int size) ; /* Reads up to "size" bytes from a file to "buffer". ; * Returns the number of actually read bytes, 0 if there are no bytes left ; * (E...
wagiminator/C64-Collection
3,297
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/read.s
; ; Ullrich von Bassewitz, 16.11.2002 ; ; int read (int fd, void* buf, unsigned count); ; .export _read .constructor initstdin .import SETLFS, OPEN, CHKIN, BASIN, CLRCH, READST .import rwcommon .import popax .import __oserror ...
wagiminator/C64-Collection
6,345
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/diskcmd.s
; ; Ullrich von Bassewitz, 2002-11-17, 2009-02-22 ; ; Handle disk command channels ; .export isdisk .export opencmdchannel .export closecmdchannel .export readdiskerror .export writediskcmd .export writefndiskcmd ....
wagiminator/C64-Collection
3,267
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/oserrlist.s
; ; 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 code could not be found. ; ...
wagiminator/C64-Collection
2,651
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/write.s
; ; Ullrich von Bassewitz, 16.11.2002 ; ; int write (int fd, const void* buf, unsigned count); ; .export _write .constructor initstdout .import SETLFS, OPEN, CKOUT, BSOUT, CLRCH .import rwcommon .import __oserror .importzp sp, pt...
wagiminator/C64-Collection
10,987
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/ctype.s
; ; Character specification table. ; ; Ullrich von Bassewitz, 02.06.1998 ; 2003-05-02, Greg King ; ; 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: ; ; * It is fast. If it weren't for the slo...
wagiminator/C64-Collection
4,936
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm/open.s
; ; Ullrich von Bassewitz, 16.11.2002 ; ; int open (const char* name, int flags, ...); /* May take a mode argument */ ; ; Be sure to keep the value priority of closeallfiles lower than that of ; closeallstreams (which is the high level C file I/O counterpart and must be ; called before closeallfiles). .export...
wagiminator/C64-Collection
3,546
C64_xu1541/software/tools/cc65-2.13.2/libsrc/vic20/vic20-stdjoy.s
; ; Standard joystick driver for the VIC20. May be used multiple times when linked ; to the statically application. ; ; Ullrich von Bassewitz, 2002-12-20 ; Using code from Steve Schmidtke ; .include "zeropage.inc" .include "joy-kernel.inc" .include "joy-error.inc" .include "vic...
wagiminator/C64-Collection
3,149
C64_xu1541/software/tools/cc65-2.13.2/libsrc/vic20/crt0.s
; ; Startup code for cc65 (Vic20 version) ; .export _exit .export __STARTUP__ : absolute = 1 ; Mark as startup .import initlib, donelib, callirq .import zerobss, push0 .import callmain .import RESTOR, BSOUT, CLRCH .import __INTERRUPTOR_COUNT__ ...
wagiminator/C64-Collection
1,936
C64_xu1541/software/tools/cc65-2.13.2/libsrc/vic20/kernal.s
; ; Ullrich von Bassewitz, 19.11.2002 ; ; VIC20 kernal functions ; .export CINT .export IOINIT .export RAMTAS .export RESTOR .export VECTOR .export SETMSG .export SECOND .export TKSA ...
wagiminator/C64-Collection
3,287
C64_xu1541/software/tools/cc65-2.13.2/libsrc/vic20/vic20-ptvjoy.s
; ; PTV-3 Player joystick driver for the VIC20 ; ; Stefan Haubenthal, 2005-05-25 ; Groepaz/Hitmen, 2002-12-23 ; obviously based on Ullrichs driver :) ; Using code from Steve Schmidtke ; .include "zeropage.inc" .include "joy-kernel.inc" .include "joy-error.inc" .include "vic20.inc" ; -----------------------------...
wagiminator/C64-Collection
3,838
C64_xu1541/software/tools/cc65-2.13.2/libsrc/vic20/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,780
C64_xu1541/software/tools/cc65-2.13.2/libsrc/vic20/cputc.s
; ; Ullrich von Bassewitz, 06.08.1998 ; ; void cputcxy (unsigned char x, unsigned char y, char c); ; void cputc (char c); ; .export _cputcxy, _cputc, cputdirect, putchar .export newline, plot .import popa, _gotoxy .import PLOT .include "vic20.inc" _cputcxy: pha ; Save C jsr...
wagiminator/C64-Collection
1,615
C64_xu1541/software/tools/cc65-2.13.2/libsrc/vic20/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 .include "vic20.inc" .bss _brk_a: .res 1 _brk_x: .res 1 _brk_y: ...
wagiminator/C64-Collection
1,144
C64_xu1541/software/tools/cc65-2.13.2/libsrc/vic20/cgetc.s
; ; Ullrich von Bassewitz, 06.08.1998 ; ; char cgetc (void); ; .export _cgetc .import cursor .include "vic20.inc" _cgetc: lda KEY_COUNT ; Get number of characters bne L3 ; Jump if there are already chars waiting ; Switch on the cursor if needed lda CURS_FLAG pha lda cursor jsr setcurs...
wagiminator/C64-Collection
3,031
C64_xu1541/software/tools/cc65-2.13.2/libsrc/serial/ser_load.s
; ; Ullrich von Bassewitz, 2006-06-05 ; ; unsigned char __fastcall__ ser_load_driver (const char* name) ; /* Load a serial driver and return an error code */ .include "ser-kernel.inc" .include "ser-error.inc" .include "modload.inc" .include "fcntl.inc" ...
wagiminator/C64-Collection
2,905
C64_xu1541/software/tools/cc65-2.13.2/libsrc/serial/ser-kernel.s
; ; Ullrich von Bassewitz, 2003-04-15 ; ; Common functions of the serial drivers ; .import return0 .importzp ptr1 .interruptor ser_irq, 29 ; Export as high priority IRQ handler .include "ser-kernel.inc" .include "ser-error.inc" ;------------...
wagiminator/C64-Collection
1,291
C64_xu1541/software/tools/cc65-2.13.2/libsrc/nes/color.s
; ; Written by Groepaz/Hitmen <groepaz@gmx.net> ; Cleanup by Ullrich von Bassewitz <uz@cc65.org> ; ; unsigned char __fastcall__ textcolor (unsigned char color); ; unsigned char __fastcall__ bgcolor (unsigned char color); ; unsigned char __fastcall__ bordercolor (unsigned char color); ; .export _textcolor, _...
wagiminator/C64-Collection
5,387
C64_xu1541/software/tools/cc65-2.13.2/libsrc/nes/crt0.s
; ; Startup code for cc65 (NES version) ; ; by Groepaz/Hitmen <groepaz@gmx.net> ; based on code by Ullrich von Bassewitz <uz@cc65.org> ; .export _exit .export __STARTUP__ : absolute = 1 ; Mark as startup .import initlib, donelib, callmain .import push0, _main, zerobss, c...
wagiminator/C64-Collection
2,113
C64_xu1541/software/tools/cc65-2.13.2/libsrc/nes/ppubuf.s
; ; Written by Groepaz/Hitmen <groepaz@gmx.net> ; Cleanup by Ullrich von Bassewitz <uz@cc65.org> ; .export ppubuf_waitempty .export ppubuf_wait .export ppubuf_put .export ppubuf_flush .include "nes.inc" .code ; --------------------------...
wagiminator/C64-Collection
5,964
C64_xu1541/software/tools/cc65-2.13.2/libsrc/nes/ppu.s
; ; Written by Groepaz/Hitmen <groepaz@gmx.net> ; Cleanup by Ullrich von Bassewitz <uz@cc65.org> ; .export ppuinit .export paletteinit .include "nes.inc" ;+---------+----------------------------------------------------------+ ;| $2000 | PPU Control Register #1 (W) | ;|...
wagiminator/C64-Collection
1,951
C64_xu1541/software/tools/cc65-2.13.2/libsrc/nes/cputc.s
; ; Written by Groepaz/Hitmen <groepaz@gmx.net> ; Cleanup by Ullrich von Bassewitz <uz@cc65.org> ; ; void cputcxy (unsigned char x, unsigned char y, char c); ; void cputc (char c); ; .export _cputcxy, _cputc, cputdirect, putchar .export newline .constructor conioinit .import popa, _gotoxy ...
wagiminator/C64-Collection
1,365
C64_xu1541/software/tools/cc65-2.13.2/libsrc/nes/clrscr.s
; ; Written by Groepaz/Hitmen <groepaz@gmx.net> ; Cleanup by Ullrich von Bassewitz <uz@cc65.org> ; ; void clrscr (void); ; .export _clrscr .import ppubuf_waitempty .include "nes.inc" .proc _clrscr ; wait until all console data has been written jsr ppubuf_waitempty ;...
wagiminator/C64-Collection
2,442
C64_xu1541/software/tools/cc65-2.13.2/libsrc/nes/nes-stdjoy.s
; ; Standard joypad driver for the NES. May be used multiple times when ; linked to the statically application. ; ; Ullrich von Bassewitz, 2003-05-02 ; Stefan Haubenthal, 2004-10-05 ; .include "zeropage.inc" .include "joy-kernel.inc" .include "joy-error.inc" .include "nes.inc" ; ----...
wagiminator/C64-Collection
6,268
C64_xu1541/software/tools/cc65-2.13.2/libsrc/nes/ctype.s
; ; Ullrich von Bassewitz, 02.06.1998 ; ; 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
1,518
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/asr.s
; ; Ullrich von Bassewitz, 2004-06-30 ; ; CC65 runtime: right shift support for ints ; ; Note: The standard declares a shift count that is negative or >= the ; bitcount of the shifted type for undefined behaviour. ; ; Note^2: The compiler knowns about the register/zero page usage of this ; function, so you need to chan...
wagiminator/C64-Collection
2,951
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/stkchk.s
; ; Ullrich von Bassewitz, 19.03.2001 ; ; Stack checking code. These are actually two routines, one to check the C ; stack, and the other one to check the 6502 hardware stack. ; For performance reasons (to avoid having to pass a parameter), the compiler ; calls the cstkchk routine *after* allocating space on the stack....
wagiminator/C64-Collection
2,095
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/condes.s
; ; Ullrich von Bassewitz, 20.11.2000 ; ; CC65 runtime: Support for calling module constructors/destructors ; ; The condes routine must be called with the table address in a/x and the ; size of the table (which must not be zero!) in y. The current implementation ; limits the table size to 254 bytes (127 vectors) but th...
wagiminator/C64-Collection
1,069
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/lshl.s
; ; Ullrich von Bassewitz, 2004-06-30 ; ; CC65 runtime: left shift support for long and unsigned long ; ; Note: The standard declares a shift count that is negative or >= the ; bitcount of the shifted type for undefined behaviour. ; ; Note^2: The compiler knowns about the register/zero page usage of this ; function, so...
wagiminator/C64-Collection
1,734
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/ludiv.s
; ; Ullrich von Bassewitz, 17.08.1998 ; ; CC65 runtime: division for long unsigned ints ; .export tosudiv0ax, tosudiveax, getlop, udiv32 .import addysp1 .importzp sp, sreg, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4 tosudiv0ax: ldy #$00 sty sreg sty sreg+1 tosudiveax: ...
wagiminator/C64-Collection
1,509
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/mul8.s
; ; Ullrich von Bassewitz, 2009-08-17 ; ; CC65 runtime: multiplication for ints. Short versions. ; .export tosumula0, tosmula0 .export mul8x16, mul8x16a .import popsreg .importzp sreg, ptr4 ;--------------------------------------------------------------------------- ; 8x16 routine...
wagiminator/C64-Collection
1,045
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/toslong.s
; ; Ullrich von Bassewitz, 25.10.2000 ; ; CC65 runtime: Convert tos from int to long ; .export tosulong, toslong .import decsp2 .importzp sp .macpack cpu ; Convert TOS from int to long tosulong: pha jsr decsp2 ; Make room ldy #2 lda (sp),y .if (....
wagiminator/C64-Collection
1,270
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/udiv.s
; ; Ullrich von Bassewitz, 07.08.1998 ; ; CC65 runtime: division for unsigned ints ; .export tosudiva0, tosudivax, udiv16 .import popsreg .importzp sreg, ptr1, ptr4 tosudiva0: ldx #$00 ; Clear high byte tosudivax: sta ptr4 stx ptr4+1 ; Save right operand ...
wagiminator/C64-Collection
1,054
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/lshr.s
; ; Ullrich von Bassewitz, 2004-06-30 ; ; CC65 runtime: right shift support for unsigned longs ; ; Note: The standard declares a shift count that is negative or >= the ; bitcount of the shifted type for undefined behaviour. ; ; Note^2: The compiler knowns about the register/zero page usage of this ; function, so you ne...
wagiminator/C64-Collection
1,382
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/shr.s
; ; Ullrich von Bassewitz, 2004-06-30 ; ; CC65 runtime: right shift support for unsigneds ; ; Note: The standard declares a shift count that is negative or >= the ; bitcount of the shifted type for undefined behaviour. ; ; Note^2: The compiler knowns about the register/zero page usage of this ; function, so you need to...
wagiminator/C64-Collection
1,040
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/lmod.s
; ; Ullrich von Bassewitz, 07.08.1998 ; ; CC65 runtime: modulo operation for long signed ints ; ; When negating values, we will ignore the possibility here, that one of the ; values if $8000, in which case the negate will fail. .export tosmod0ax, tosmodeax .import poplsargs, udiv32, negeax .importzp s...
wagiminator/C64-Collection
1,158
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/lasr.s
; ; Ullrich von Bassewitz, 2004-06-30 ; ; CC65 runtime: right shift support for longs ; ; Note: The standard declares a shift count that is negative or >= the ; bitcount of the shifted type for undefined behaviour. ; ; Note^2: The compiler knowns about the register/zero page usage of this ; function, so you need to cha...
wagiminator/C64-Collection
2,386
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/callirq.s
; ; Ullrich von Bassewitz, 2004-04-04 ; ; CC65 runtime: Support for calling special irq routines declared as condes ; type 2. ; ; There are two reasons, why this is a separate routine, and the generic ; condes routine in condes.s is not used: ; ; 1. Speed. Having several things hardcoded makes it faster. This is ; ...
wagiminator/C64-Collection
1,792
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/mul.s
; ; Ullrich von Bassewitz, 2009-08-17 ; ; CC65 runtime: multiplication for ints ; .export tosumulax, tosmulax .import mul8x16, mul8x16a ; in mul8.s .import popsreg .importzp sreg, tmp1, ptr4 ;--------------------------------------------------------------------------- ; 16x16...
wagiminator/C64-Collection
1,173
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/lshelp.s
; ; Ullrich von Bassewitz, 13.08.1998 ; ; CC65 runtime: helper stuff for mod/div/mul with long signed ints ; ; When negating values, we will ignore the possibility here, that one of the ; values if $80000000, in which case the negate will fail. .export poplsargs .import getlop .importzp sreg, tmp1, tmp2, ...
wagiminator/C64-Collection
1,074
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/lmul.s
; ; Ullrich von Bassewitz, 13.08.1998 ; ; CC65 runtime: multiplication for long (unsigned) ints ; .export tosumul0ax, tosumuleax, tosmul0ax, tosmuleax .import addysp1 .importzp sp, sreg, tmp1, tmp2, tmp3, tmp4, ptr1, ptr3, ptr4 tosmul0ax: tosumul0ax: ldy #$00 sty sreg s...
wagiminator/C64-Collection
1,313
C64_xu1541/software/tools/cc65-2.13.2/libsrc/runtime/shl.s
; ; Ullrich von Bassewitz, 1998-08-05, 2004-06-25 ; ; CC65 runtime: left shift support for ints and unsigneds ; ; Note: The standard declares a shift count that is negative or >= the ; bitcount of the shifted type for undefined behaviour. ; ; Note^2: The compiler knowns about the register/zero page usage of this ; func...
wagiminator/C64-Collection
1,776
C64_xu1541/software/tools/cc65-2.13.2/libsrc/zlib/crc32.s
; ; Piotr Fusik, 14.11.2001 ; ; unsigned long __fastcall__ crc32 (unsigned long crc, unsigned char* buf, ; unsigned len); ; .export _crc32 .import compleax, incsp2, incsp4, popax, popeax .importzp sreg, ptr1, ptr2, tmp1, tmp2 POLYNOMIAL = $EDB88320 make_table: ldx #0 @L1: lda ...
wagiminator/C64-Collection
14,431
C64_xu1541/software/tools/cc65-2.13.2/libsrc/zlib/inflatemem.s
; ; Piotr Fusik, 21.09.2003 ; ; unsigned __fastcall__ inflatemem (char* dest, const char* source); ; .export _inflatemem .import incsp2 .importzp sp, sreg, ptr1, ptr2, ptr3, ptr4, tmp1 ; -------------------------------------------------------------------------- ; ; Constants ; ; Maximum length of a Huffman cod...
wagiminator/C64-Collection
1,312
C64_xu1541/software/tools/cc65-2.13.2/libsrc/zlib/adler32.s
; ; Piotr Fusik, 18.11.2001 ; ; unsigned long __fastcall__ adler32 (unsigned long adler, unsigned char* buf, ; unsigned len); ; .export _adler32 .import incsp2, incsp4, popax, popeax .importzp sreg, ptr1, ptr2, tmp1 BASE = 65521 ; largest prime smaller than 65536 _adler32: ; ...
wagiminator/C64-Collection
2,507
C64_xu1541/software/tools/cc65-2.13.2/libsrc/em/em-kernel.s
; ; Ullrich von Bassewitz, 2002-11-29 ; ; Common functions of the extended memory API. ; .export em_clear_ptr .import return0 .importzp ptr1 .include "em-kernel.inc" .include "em-error.inc" ;-------------------------------------------------...
wagiminator/C64-Collection
7,097
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm610/cbm610-ram.s
; ; Extended memory driver for the CBM610 additional RAM banks. Driver works ; without problems when linked statically. ; ; Ullrich von Bassewitz, 2002-12-09, 2003-12-20 ; .include "zeropage.inc" .include "em-kernel.inc" .include "em-error.inc" .include "cbm610.inc" .m...
wagiminator/C64-Collection
12,018
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm610/crt0.s
; ; Startup code for cc65 (CBM 600/700 version) ; .export _exit, BRKVec .export __STARTUP__ : absolute = 1 ; Mark as startup .import callirq_y, initlib, donelib .import push0, callmain .import __BSS_RUN__, __BSS_SIZE__, __EXTZP_RUN__ .import __INTERRUPTOR_COUNT__...
wagiminator/C64-Collection
1,894
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm610/systime.s
; ; Stefan Haubenthal, 2009-07-27 ; Ullrich von Bassewitz, 2009-09-24 ; ; 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 "cbm610.inc...
wagiminator/C64-Collection
1,857
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm610/kernal.s
; ; Ullrich von Bassewitz, 2003-12-20 ; ; CBM610 kernal functions ; .export CINT .export IOINIT .export RAMTAS .export RESTOR .export VECTOR .export SETMSG .export SECOND .export TKSA ...
wagiminator/C64-Collection
2,687
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm610/kscnkey.s
; ; Ullrich von Bassewitz, 28.09.1998 ; ; Keyboard polling stuff for the 610. ; .export scnkey .importzp tpi2, ktab1, ktab2, ktab3, ktab4 .importzp keyidx, keybuf, keyscanbuf, keysave, modkey, norkey .importzp graphmode, lastidx, rptdelay, rptcount .include ...
wagiminator/C64-Collection
1,670
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm610/extzp.s
; ; Ullrich von Bassewitz, 2003-12-20 ; ; Additional zero page locations for the CBM610. ; NOTE: This file is actually linked to an application with its full contents, ; so the program comes up with the values given in this file. ; ; ------------------------------------------------------------------------ .in...
wagiminator/C64-Collection
3,131
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm610/cputc.s
; ; Ullrich von Bassewitz, 06.08.1998 ; ; void cputcxy (unsigned char x, unsigned char y, char c); ; void cputc (char c); ; .export _cputcxy, _cputc, cputdirect, putchar .export newline, plot .destructor setsyscursor .import _gotoxy .import popa .import PLOT .import ...
wagiminator/C64-Collection
1,646
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm610/break.s
; ; Ullrich von Bassewitz, 27.09.1998 ; ; void set_brk (unsigned Addr); ; void reset_brk (void); ; .export _set_brk, _reset_brk .export _brk_a, _brk_x, _brk_y, _brk_sr, _brk_pc .import _atexit, BRKVec .include "cbm610.inc" .bss _brk_a: .res 1 _brk_x: .res 1 _brk_y: .res...
wagiminator/C64-Collection
1,029
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm610/cgetc.s
; ; Ullrich von Bassewitz, 06.08.1998 ; ; char cgetc (void); ; .export _cgetc .import plot, write_crtc .import cursor .import keyidx: zp, keybuf: zp, config: zp _cgetc: lda keyidx ; Get number of characters bne L2 ; Jump if there are already chars waiting ; Swit...
wagiminator/C64-Collection
11,858
C64_xu1541/software/tools/cc65-2.13.2/libsrc/cbm610/cbm610-stdser.s
; ; Serial driver for the builtin 6551 ACIA of the Commodore 610. ; ; Ullrich von Bassewitz, 2003-12-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. ; ; This...
wagiminator/C64-Collection
2,585
C64_xu1541/software/tools/cc65-2.13.2/libsrc/pet/pet-ptvjoy.s
; ; PTV-2 Player joystick driver for the PET ; ; Stefan Haubenthal, 2005-05-25 ; Groepaz/Hitmen, 2002-12-23 ; obviously based on Ullrichs driver :) ; .include "zeropage.inc" .include "joy-kernel.inc" .include "joy-error.inc" ; .include "pet.inc" VIA_PRA := $E841 ; Port register A VIA_DDRA := $E843 ; Data direct...
wagiminator/C64-Collection
3,179
C64_xu1541/software/tools/cc65-2.13.2/libsrc/pet/crt0.s
; ; Startup code for cc65 (PET version) ; .export _exit .export __STARTUP__ : absolute = 1 ; Mark as startup .import initlib, donelib, callirq .import zerobss, push0 .import callmain .import CLRCH, BSOUT .import __INTERRUPTOR_COUNT__ .include ...
wagiminator/C64-Collection
2,880
C64_xu1541/software/tools/cc65-2.13.2/libsrc/pet/mainargs.s
; ; Ullrich von Bassewitz, 2003-03-07 ; Stefan Haubenthal, 2008-08-11 ; ; Setup arguments for main ; .constructor initmainargs, 24 .import __argc, __argv .include "pet.inc" MAXARGS = 10 ; Maximum number of arguments allowed REM = $8f ; BASIC token-code NAME_LEN = 16 ; maximum length of command-name BASIC...
wagiminator/C64-Collection
2,332
C64_xu1541/software/tools/cc65-2.13.2/libsrc/pet/cputc.s
; ; Ullrich von Bassewitz, 06.08.1998 ; ; void cputcxy (unsigned char x, unsigned char y, char c); ; void cputc (char c); ; .export _cputcxy, _cputc, cputdirect, putchar .export newline, plot .import popa, _gotoxy .include "pet.inc" _cputcxy: pha ; Save C jsr popa ; Get Y jsr _got...
wagiminator/C64-Collection
1,621
C64_xu1541/software/tools/cc65-2.13.2/libsrc/pet/break.s
; ; Ullrich von Bassewitz, 26.11.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 .include "pet.inc" .bss _brk_a: .res 1 _brk_x: .res 1 _brk_y: .res 1 _brk_...
wagiminator/C64-Collection
1,236
C64_xu1541/software/tools/cc65-2.13.2/libsrc/pet/cgetc.s
; ; Ullrich von Bassewitz, 06.08.1998 ; ; char cgetc (void); ; .export _cgetc .import cursor .include "pet.inc" _cgetc: lda KEY_COUNT ; Get number of characters bne L3 ; Jump if there are already chars waiting ; Switch on the cursor if needed lda CURS_FLAG pha lda cursor jsr se...
wagiminator/C64-Collection
1,459
C64_xu1541/software/tools/cc65-2.13.2/libsrc/supervision/crt0.s
; ; Startup code for cc65 (supervision version) ; .export _exit .export __STARTUP__ : absolute = 1 ; Mark as startup .import _main .import initlib, donelib, copydata .import zerobss .import __RAM_START__, __RAM_SIZE__ ; Linker generated ...
wagiminator/C64-Collection
6,747
C64_xu1541/software/tools/cc65-2.13.2/libsrc/supervision/ctype.s
; ; Ullrich von Bassewitz, 2003-10-10 ; ; Character specification table. ; .include "ctype.inc" ; 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 ; ...
wagiminator/C64-Collection
1,809
C64_xu1541/software/tools/cc65-2.13.2/libsrc/apple2/extra/iobuf-0800.s
; ; Oliver Schmidt, 15.09.2009 ; ; ProDOS 8 I/O buffer management for memory between ; location $0800 and the cc65 program start address ; .constructor initiobuf .export iobuf_alloc, iobuf_free .import __RAM_START__ .import incsp2, popax .include "zeropage.inc" ...
wagiminator/C64-Collection
1,382
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/disk/dio_openclose.s
; ; Maciej 'YTM/Elysium' Witkowiak ; ; based on Atari version by Christian Groessler ; 2.7.2001 ; ; dhandle_t __fastcall__ dio_open (driveid_t drive_id); ; unsigned char __fastcall__ dio_close (dhandle_t handle); ; ; dio_open sets given device as current and initializes disk ; dio_close does nothing special .exp...
wagiminator/C64-Collection
3,202
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/disk/dio_cts.s
; ; Maciej 'YTM/Elysium' Witkowiak ; 2.7.2001 ; ; ; unsigned char __fastcall__ dio_phys_to_log(dhandle_t handle, ; dio_phys_pos *physpos, /* input */ ; sectnum_t *sectnum); /* output */ ; ; dhandle_t - 16bit (ptr) ; sectnum_t - 16bit ; .export _dio_phys_to_log .export sectab_1541_l, sectab_1541_h...
wagiminator/C64-Collection
2,680
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/disk/dio_stc.s
; ; Maciej 'YTM/Elysium' Witkowiak ; 2.7.2001 ; ; unsigned char __fastcall__ dio_log_to_phys(dhandle_t handle, ; sectnum_t *sectnum, /* input */ ; dio_phys_pos *physpos); /* output */ ; ; dhandle_t - 16bit (ptr) ; sectnum_t - 16bit ; .export _dio_log_to_phys .importzp ptr1,ptr2,ptr3,tmp1,tmp2 .im...
wagiminator/C64-Collection
3,563
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/mousesprite/mouse.s
; ; Maciej 'YTM/Elysium' Witkowiak ; ; 2.7.2001 ; ; Wrapper for GEOS standard input device interface ; .export _mouse_init, _mouse_done .export _mouse_hide, _mouse_show .export _mouse_box .export _mouse_pos, _mouse_info .export _mouse_move, _mouse_buttons .import...
wagiminator/C64-Collection
1,951
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/conio/cputc.s
; ; Maciej 'YTM/Elysium' Witkowiak ; ; 27.10.2001 ; 06.03.2002 ; 25.07.2005 ; void cputcxy (unsigned char x, unsigned char y, char c); ; void cputc (char c); ; TODO: ; TAB (should be implemented) ; other special characters directly from keyboard are unsafe, though some might be ; implemented: ; HOME, UPLINE, ULINEON...
wagiminator/C64-Collection
18,273
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/devel/geos-tgi.s
; ; Graphics driver for the 320x200x2 or 640x200x2 mode on GEOS 64/128 ; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> ; 28-31.12.2002 .include "zeropage.inc" .include "tgi-kernel.inc" .include "tgi-mode.inc" .include "tgi-error.inc" .include "../inc/const.inc" .include "....
wagiminator/C64-Collection
3,447
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/devel/fio_module.s
; ; Low level file I/O routines, ONLY for module loading OR sth similar ; ; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> ; 25.12.2002 ; ; only ONE opened file at a time, only O_RDONLY flag ; int open (const char* name, int flags, ...); /* May take a mode argument */ ; int __fastcall__ close (int fd); ; int __fastca...
wagiminator/C64-Collection
1,582
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/devel/mainargs.s
; ; Ullrich von Bassewitz, 2003-03-07 ; Maciej Witkowiak, 2003-05-02 ; ; Setup arguments for main ; ; There is always either 1 or 3 arguments: ; <program name>,0 ; or ; <program name>, <data file name>, <data disk name>, 0 ; the 2nd case is when using DeskTop user drags an icon of a file and drops it ; on icon of your ...
wagiminator/C64-Collection
8,098
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/devel/geos-vdc.s
; ; Extended memory driver for the VDC RAM available on all C128 machines ; version for GEOS enters safe I/O config on C64 (transparent on C128) ; ; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> ; 06,20,25.12.2002 .include "zeropage.inc" .include "em-kernel.inc" .include "em-error.inc" .ma...
wagiminator/C64-Collection
2,521
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/devel/oserror.s
; ; Ullrich von Bassewitz, 17.05.2000 ; GEOS port: Maciej 'YTM/Elysium' Witkowiak ; 2.7.2001 ; ; int __fastcall__ _osmaperrno (unsigned char oserror); ; /* Map a system specific error into a system independent code */ ; .export __osmaperrno .include "errno.inc" .include "../inc/const.inc" .code __osmaperrno: ld...
wagiminator/C64-Collection
2,793
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/devel/geos-stdjoy.s
; ; Standard joystick driver for the C64. May be used multiple times when linked ; to the statically application. ; ; Ullrich von Bassewitz, 2002-12-20 ; .include "zeropage.inc" .include "joy-kernel.inc" .include "joy-error.inc" .include "../inc/geossym.inc" .macpack generic ...
wagiminator/C64-Collection
3,763
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/devel/oserrlist.s
; ; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl> ; 25.12.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 code co...
wagiminator/C64-Collection
1,438
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/system/get_ostype.s
; ; Maciej 'YTM/Elysium' Witkowiak ; ; 10.09.2001 ; unsigned char get_ostype (void); ; unsigned char get_tv (void); .export _get_ostype .export _get_tv .importzp tmp1 .include "../inc/const.inc" .include "../inc/geossym.inc" .include "../inc/geossym2.inc" _get_ostype: ldx #0 ...
wagiminator/C64-Collection
9,657
C64_xu1541/software/tools/cc65-2.13.2/libsrc/geos/system/ctype.s
; ; Ullrich von Bassewitz, 02.06.1998 ; Maciej Witkowiak, 06.04.2002 ; ; Character specification table. ; ; The tables are readonly, put them into the rodata segment .rodata ; Value that must be added to a lower case char to make it an upper case ; char (example: for ASCII, this must be $E0). .export __cdi...
wagiminator/C64-Collection
1,145
C64_xu1541/software/tools/cc65-2.13.2/samples/geos/ca65-vlir/vlir1.s
; Maciej 'YTM/Elysium' Witkowiak ; 06.06.2002 ; This is source for loadable VLIR-structured program part ; include some GEOS defines .include "../../../libsrc/geos/inc/const.inc" .include "../../../libsrc/geos/inc/jumptab.inc" .include "../../../libsrc/geos/inc/geossym.inc" .include "../../....
wagiminator/C64-Collection
2,236
C64_xu1541/software/tools/cc65-2.13.2/samples/geos/ca65-vlir/vlir0.s
; Maciej 'YTM/Elysium' Witkowiak ; 06.06.2002 ; This is source for main VLIR-structured program part ; include some GEOS defines .include "../../../libsrc/geos/inc/const.inc" .include "../../../libsrc/geos/inc/jumptab.inc" .include "../../../libsrc/geos/inc/geossym.inc" .include "../../../li...
wagiminator/C64-Collection
2,832
C64_xu1541/software/tools/opencbm-0.4.99.99/xu1541/firmware/memcpy.S
/* Copyright (c) 2002, 2007 Marek Michalkiewicz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of con...
wagiminator/C64-Collection
5,298
C64_xu1541/software/tools/opencbm-0.4.99.99/xu1541/firmware/gcrt1.S
/* Copyright (c) 2002, Marek Michalkiewicz <marekm@amelek.gda.pl> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice...