Merge pull request #2760 from kugelfuhr/kugelfuhr/fix-2753

Add ".CAPABILITY" to ca65, remove ".MACPACK cpu"
This commit is contained in:
Bob Andrews
2025-07-03 18:43:05 +02:00
committed by GitHub
84 changed files with 717 additions and 361 deletions

View File

@@ -0,0 +1,39 @@
; Error: Arguments to .CAPABILITY must be identifiers
.if .cap()
.endif
; Error: Arguments to .CAPABILITY must be identifiers
; Error: ')' expected
.if .cap(
.endif
; Error: Not a valid capability name: CPU_HAS_BR
.if .cap(cpu_has_br)
.endif
; Error: ')' expected
; Error: Unexpected trailing garbage characters
.if .cap(cpu_has_bra8 cpu_has_bra8)
.endif
; Ok
.if .cap(cpu_has_bra8, CPU_HAS_PUSHXY, CPU_HAS_STZ, CPU_HAS_INA)
.endif
.setcpu "65SC02"
.if !.cap(cpu_has_bra8)
.error "Assembler says 65SC02 has no 8 bit bra"
.endif
.if !.cap(cpu_has_PUSHXY)
.error "Assembler says 65SC02 has no phx"
.endif
.if !.cap(cpu_has_STZ)
.error "Assembler says 65SC02 has no stz"
.endif
.if !.cap(cpu_has_INA)
.error "Assembler says 65SC02 has no ina"
.endif

View File

@@ -0,0 +1,6 @@
110-capabilities.s:3: Error: Arguments to .CAPABILITY must be identifiers
110-capabilities.s:8: Error: Arguments to .CAPABILITY must be identifiers
110-capabilities.s:8: Error: ')' expected
110-capabilities.s:12: Error: Not a valid capability name: CPU_HAS_BR
110-capabilities.s:17: Error: ')' expected
110-capabilities.s:17: Error: Unexpected trailing garbage characters