Skip to content

Commit 14b6f90

Browse files
committed
Fix cc65 cpu.mac multiple inclusion error
- Create common/inc/cpu.inc with include guard for cpu macros - Update apple2/apple2-6502/bus/sp_init.s to use guarded include - Prevents 'Symbol already defined' errors when cpu.mac is included multiple times This fixes the issue where ca65 was redefining CPU_ISET_* symbols during compilation of assembly files.
1 parent a6dccd3 commit 14b6f90

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

apple2/apple2-6502/bus/sp_init.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
.include "macros.inc"
1212
.include "zp.inc"
13-
.macpack cpu
13+
.include "cpu.inc"
1414

1515
; Find the SmartPort device that has a FujiNet NETWORK adapter on it.
1616
; Really we should search for the FUJI device on it, but historically that was

common/inc/cpu.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
; Guard to prevent multiple inclusion of cpu macros
2+
.ifndef __CPU_INC_INCLUDED__
3+
.define __CPU_INC_INCLUDED__
4+
5+
.macpack cpu
6+
7+
.endif

0 commit comments

Comments
 (0)