gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit b1e1dc04a24ea1e8f981c6c8b220d2372bff850e parent aba6d064e2813b5ce5d298371ff0a3d23df90620 Author: Michel Iwaniec <46843052+michel-iwaniec@users.noreply.github.com> Date: Mon, 5 May 2025 23:53:09 +0100 NES: Merge all temp registers into one file, to ensure a continuous section of ZP (#773) - Merge _dptr.s and _ret*.s into _temp.s - Add ALL_REGTEMPS_BEGIN / ALL_REGTEMPS_END labels so interrupts can easily push / pop temps Diffstat:
| M | gbdk-lib/libc/asm/mos6502/Makefile | 2 | +- |
| D | gbdk-lib/libc/asm/mos6502/_dptr.s | 4 | ---- |
| D | gbdk-lib/libc/asm/mos6502/_ret01.s | 10 | ---------- |
| D | gbdk-lib/libc/asm/mos6502/_ret23.s | 10 | ---------- |
| D | gbdk-lib/libc/asm/mos6502/_ret4567.s | 14 | -------------- |
| M | gbdk-lib/libc/asm/mos6502/_temp.s | 24 | +++++++++++++++++++++++- |
6 files changed, 24 insertions(+), 40 deletions(-)
diff --git a/gbdk-lib/libc/asm/mos6502/Makefile b/gbdk-lib/libc/asm/mos6502/Makefile @@ -14,7 +14,7 @@ ASSRC = __sdcc_indirect_jsr.s _memcpy.s _strcpy.s _strcmp.s _memset.s \ _muluchar.s _mulschar.s \ bcd.s \ _setjmp.s \ - _dptr.s _ret01.s _ret23.s _ret4567.s _temp.s + _temp.s CSRC = _memmove.c _memset.c abs.c \ _rrulonglong.c _rrslonglong.c \ diff --git a/gbdk-lib/libc/asm/mos6502/_dptr.s b/gbdk-lib/libc/asm/mos6502/_dptr.s @@ -1,4 +0,0 @@ -; data pointer used by SDCC for indirect indexed memory access - - .area _ZP (PAG) -DPTR:: .ds 2 diff --git a/gbdk-lib/libc/asm/mos6502/_ret01.s b/gbdk-lib/libc/asm/mos6502/_ret01.s @@ -1,10 +0,0 @@ - .module _ret01 - -;-------------------------------------------------------- -; ZP ram data -;-------------------------------------------------------- - .area _ZP (PAG) -___SDCC_m6502_ret0:: - .ds 1 -___SDCC_m6502_ret1:: - .ds 1 diff --git a/gbdk-lib/libc/asm/mos6502/_ret23.s b/gbdk-lib/libc/asm/mos6502/_ret23.s @@ -1,10 +0,0 @@ - .module _ret23 - -;-------------------------------------------------------- -; ZP ram data -;-------------------------------------------------------- - .area _ZP (PAG) -___SDCC_m6502_ret2:: - .ds 1 -___SDCC_m6502_ret3:: - .ds 1 diff --git a/gbdk-lib/libc/asm/mos6502/_ret4567.s b/gbdk-lib/libc/asm/mos6502/_ret4567.s @@ -1,14 +0,0 @@ - .module _ret4567 - -;-------------------------------------------------------- -; ZP ram data -;-------------------------------------------------------- - .area _ZP (PAG) -___SDCC_m6502_ret4:: - .ds 1 -___SDCC_m6502_ret5:: - .ds 1 -___SDCC_m6502_ret6:: - .ds 1 -___SDCC_m6502_ret7:: - .ds 1 diff --git a/gbdk-lib/libc/asm/mos6502/_temp.s b/gbdk-lib/libc/asm/mos6502/_temp.s @@ -1,5 +1,27 @@ ; REGTEMP stack for temporaries used by SDCC ; Keep this in sync with NUM_TEMP_REGS in mos6502/gen.c - +; +; Note: This has been patched by GBDK, to include variables in _ret01.s, _ret23.s, _ret4567.s +; This is to ensure a continuous section of temporaries to simplify interrupt handling. +; .area _ZP (PAG) +ALL_REGTEMPS_BEGIN:: +DPTR:: .ds 2 REGTEMP:: .ds 8 +___SDCC_m6502_ret0:: + .ds 1 +___SDCC_m6502_ret1:: + .ds 1 +___SDCC_m6502_ret2:: + .ds 1 +___SDCC_m6502_ret3:: + .ds 1 +___SDCC_m6502_ret4:: + .ds 1 +___SDCC_m6502_ret5:: + .ds 1 +___SDCC_m6502_ret6:: + .ds 1 +___SDCC_m6502_ret7:: + .ds 1 +ALL_REGTEMPS_END::
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.