Merge branch 'master' into fix-pr-2778

This commit is contained in:
Colin Leroy-Mira
2025-07-20 16:28:49 +02:00
97 changed files with 1245 additions and 561 deletions

View File

@@ -61,8 +61,8 @@ define CPUDETECT_template
$(WORKDIR)/$1-cpudetect.bin: cpudetect.s $1-cpudetect.ref $(ISEQUAL)
$(if $(QUIET),echo asm/$1-cpudetect.bin)
$(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< $(CATERR)
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib $(CATERR)
$(CA65) --no-utf8 -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< $(CATERR)
$(LD65) --no-utf8 -t none -o $$@ $$(@:.bin=.o) none.lib $(CATERR)
$(ISEQUAL) $1-cpudetect.ref $$@
endef # CPUDETECT_template
@@ -70,7 +70,7 @@ endef # CPUDETECT_template
$(foreach cpu,$(CPUDETECT_CPUS),$(eval $(call CPUDETECT_template,$(cpu))))
$(WORKDIR)/%.o: %.s | $(WORKDIR)
$(CA65) -l $(@:.o=.lst) -o $@ $< $(NULLOUT) $(CATERR)
$(CA65) --no-utf8 -l $(@:.o=.lst) -o $@ $< $(NULLOUT) $(CATERR)
clean:
@$(call RMDIR,$(WORKDIR))

View File

@@ -1,8 +1,4 @@
; just emit to bss for now, this way the output wont get checked, which is
; fine - we only want to see if the assembler accepts all the opcodes it
; should accept for the current CPU mode
.bss
.code
.if (.cpu .bitand CPU_ISET_6502)
.scope

View File

@@ -0,0 +1,11 @@
MEMORY {
ZP: file = "", start = $80, size = $001F;
MAIN: file = %O, start = %S, size = $1000;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = rw;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss;
}

View File

@@ -0,0 +1,6 @@
.code
.byte 5
.bss
.byte 3

View File

@@ -0,0 +1,11 @@
MEMORY {
ZP: file = "", start = $80, size = $001F;
MAIN: file = %O, start = %S, size = $100;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = rw;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss;
}

View File

@@ -0,0 +1,4 @@
.code
.res 256, 3
.byte $FF

View File

@@ -0,0 +1,6 @@
MEMORY {
MAIN: file = %O, start = %S, size = $1000;
}
SEGMENTS {
CODE: load = MAIN, type = rwx;
}

View File

@@ -0,0 +1,4 @@
.bss
.byte 3

View File

@@ -0,0 +1,28 @@
; #2208 - Current ca65 generates different code for msbasic
.setcpu "6502"
ZP_START2 = $04
INPUTBUFFERX = INPUTBUFFER & $FF00
;------------------------------------------------------------------------------
;.feature org_per_seg
.zeropage
; if not present, both 2.18 and head produce a absolute,x instruction
; if present, 2.18 produces a zp,x instruction - but head uses abs,x!
.org ZP_START2
INPUTBUFFER:
;------------------------------------------------------------------------------
.segment "CODE"
.byte $f0, $f1, $f2, $f3 ; just some data to search for
; BUG: this will wrongly assembly into a 3-byte instruction
; under certain conditions
lda INPUTBUFFERX,x

View File

@@ -73,21 +73,21 @@ $(WORKDIR)/$1.bin: $1.s $(ISEQUAL)
# compile without generating listing
ifeq ($(wildcard control/$1.err),)
$(CA65) -t none --no-utf8 -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2> $$(@:.bin=.err2)
$(CA65) --no-utf8 -t none --no-utf8 -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2> $$(@:.bin=.err2)
ifeq ($(wildcard control/$1.no-ld65),)
ifeq ($(wildcard $1.cfg),)
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) 2> $$(@:.bin=.ld65-err2)
$(LD65) --no-utf8 -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) 2> $$(@:.bin=.ld65-err2)
else
$(LD65) -C $$(<:.s=.cfg) -o $$@ $$(@:.bin=.o) > $$(@:.bin=.ld65-err) 2> $$(@:.bin=.ld65-err2)
$(LD65) --no-utf8 -C $$(<:.s=.cfg) -o $$@ $$(@:.bin=.o) > $$(@:.bin=.ld65-err) 2> $$(@:.bin=.ld65-err2)
endif
endif
else
$(CA65) -t none --no-utf8 -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2> $$(@:.bin=.err2) || $(TRUE)
$(CA65) --no-utf8 -t none --no-utf8 -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2> $$(@:.bin=.err2) || $(TRUE)
ifeq ($(wildcard control/$1.no-ld65),)
ifeq ($(wildcard $1.cfg),)
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) 2> $$(@:.bin=.ld65-err2) || $(TRUE)
$(LD65) --no-utf8 -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) 2> $$(@:.bin=.ld65-err2) || $(TRUE)
else
$(LD65) -C $$(<:.s=.cfg) -o $$@ $$(@:.bin=.o) > $$(@:.bin=.ld65-err) 2> $$(@:.bin=.ld65-err2) || $(TRUE)
$(LD65) --no-utf8 -C $$(<:.s=.cfg) -o $$@ $$(@:.bin=.o) > $$(@:.bin=.ld65-err) 2> $$(@:.bin=.ld65-err2) || $(TRUE)
endif
endif
endif
@@ -144,21 +144,21 @@ endif
# compile with listing file
ifeq ($(wildcard control/$1.err),)
$(CA65) -t none --no-utf8 -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2> $$(@:.bin=.list-err2)
$(CA65) --no-utf8 -t none --no-utf8 -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2> $$(@:.bin=.list-err2)
ifeq ($(wildcard control/$1.no-ld65),)
ifeq ($(wildcard $1.cfg),)
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) 2> $$(@:.bin=.list-ld65-err2)
$(LD65) --no-utf8 -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) 2> $$(@:.bin=.list-ld65-err2)
else
$(LD65) -C $$(<:.s=.cfg) -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) > $$(@:.bin=.list-ld65-err) 2> $$(@:.bin=.list-ld65-err2)
$(LD65) --no-utf8 -C $$(<:.s=.cfg) -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) > $$(@:.bin=.list-ld65-err) 2> $$(@:.bin=.list-ld65-err2)
endif
endif
else
$(CA65) -t none --no-utf8 -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2> $$(@:.bin=.list-err2) || $(TRUE)
$(CA65) --no-utf8 -t none --no-utf8 -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2> $$(@:.bin=.list-err2) || $(TRUE)
ifeq ($(wildcard control/$1.no-ld65),)
ifeq ($(wildcard $1.cfg),)
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) 2> $$(@:.bin=.list-ld65-err2) || $(TRUE)
$(LD65) --no-utf8 -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) 2> $$(@:.bin=.list-ld65-err2) || $(TRUE)
else
$(LD65) -C $$(<:.s=.cfg) -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) > $$(@:.bin=.list-ld65-err) 2> $$(@:.bin=.list-ld65-err2) || $(TRUE)
$(LD65) --no-utf8 -C $$(<:.s=.cfg) -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) > $$(@:.bin=.list-ld65-err) 2> $$(@:.bin=.list-ld65-err2) || $(TRUE)
endif
endif
endif
@@ -212,7 +212,7 @@ $(foreach listing,$(LISTING_TESTS),$(eval $(call LISTING_template,$(listing))))
$(WORKDIR)/%.o: %.s | $(WORKDIR)
$(CA65) -l $(@:.o=.lst) -o $@ $<
$(CA65) --no-utf8 -l $(@:.o=.lst) -o $@ $<
clean:
@$(call RMDIR,$(WORKDIR))

View File

@@ -1,40 +1,40 @@
ld65: Warning: 030-assert-success.s:3: Code not at $0000
ld65: Warning: 030-assert-success.s:4: Code not at $0000
ld65: Warning: 030-assert-success.s:6: Code not at $0001
ld65: Warning: 030-assert-success.s:7: Code not at $0001
ld65: Warning: 030-assert-success.s:12: Code not at $1001
ld65: Warning: 030-assert-success.s:13: Code not at $1001
ld65: Warning: 030-assert-success.s:15: Code not at $8000
ld65: Warning: 030-assert-success.s:16: Code not at $8000
ld65: Warning: 030-assert-success.s:18: Code not at $8001
ld65: Warning: 030-assert-success.s:19: Code not at $8001
ld65: Warning: 030-assert-success.s:23: Code not at $0000
ld65: Warning: 030-assert-success.s:24: Code not at $0000
ld65: Warning: 030-assert-success.s:26: Code not at $0001
ld65: Warning: 030-assert-success.s:27: Code not at $0001
ld65: Warning: 030-assert-success.s:29: Code not at $1000
ld65: Warning: 030-assert-success.s:30: Code not at $1000
ld65: Warning: 030-assert-success.s:35: Code not at $8000
ld65: Warning: 030-assert-success.s:36: Code not at $8000
ld65: Warning: 030-assert-success.s:38: Code not at $8001
ld65: Warning: 030-assert-success.s:39: Code not at $8001
ld65: Warning: 030-assert-success.s:45: Code not at $0000
ld65: Warning: 030-assert-success.s:46: Code not at $0000
ld65: Warning: 030-assert-success.s:48: Code not at $0001
ld65: Warning: 030-assert-success.s:49: Code not at $0001
ld65: Warning: 030-assert-success.s:51: Code not at $1000
ld65: Warning: 030-assert-success.s:52: Code not at $1000
ld65: Warning: 030-assert-success.s:54: Code not at $1001
ld65: Warning: 030-assert-success.s:55: Code not at $1001
ld65: Warning: 030-assert-success.s:60: Code not at $8001
ld65: Warning: 030-assert-success.s:61: Code not at $8001
ld65: Warning: 030-assert-success.s:65: Code not at $0000
ld65: Warning: 030-assert-success.s:66: Code not at $0000
ld65: Warning: 030-assert-success.s:68: Code not at $0001
ld65: Warning: 030-assert-success.s:69: Code not at $0001
ld65: Warning: 030-assert-success.s:71: Code not at $1000
ld65: Warning: 030-assert-success.s:72: Code not at $1000
ld65: Warning: 030-assert-success.s:74: Code not at $1001
ld65: Warning: 030-assert-success.s:75: Code not at $1001
ld65: Warning: 030-assert-success.s:77: Code not at $8000
ld65: Warning: 030-assert-success.s:78: Code not at $8000
030-assert-success.s:3: Warning: Assertion failed: Code not at $0000
030-assert-success.s:4: Warning: Assertion failed: Code not at $0000
030-assert-success.s:6: Warning: Assertion failed: Code not at $0001
030-assert-success.s:7: Warning: Assertion failed: Code not at $0001
030-assert-success.s:12: Warning: Assertion failed: Code not at $1001
030-assert-success.s:13: Warning: Assertion failed: Code not at $1001
030-assert-success.s:15: Warning: Assertion failed: Code not at $8000
030-assert-success.s:16: Warning: Assertion failed: Code not at $8000
030-assert-success.s:18: Warning: Assertion failed: Code not at $8001
030-assert-success.s:19: Warning: Assertion failed: Code not at $8001
030-assert-success.s:23: Warning: Assertion failed: Code not at $0000
030-assert-success.s:24: Warning: Assertion failed: Code not at $0000
030-assert-success.s:26: Warning: Assertion failed: Code not at $0001
030-assert-success.s:27: Warning: Assertion failed: Code not at $0001
030-assert-success.s:29: Warning: Assertion failed: Code not at $1000
030-assert-success.s:30: Warning: Assertion failed: Code not at $1000
030-assert-success.s:35: Warning: Assertion failed: Code not at $8000
030-assert-success.s:36: Warning: Assertion failed: Code not at $8000
030-assert-success.s:38: Warning: Assertion failed: Code not at $8001
030-assert-success.s:39: Warning: Assertion failed: Code not at $8001
030-assert-success.s:45: Warning: Assertion failed: Code not at $0000
030-assert-success.s:46: Warning: Assertion failed: Code not at $0000
030-assert-success.s:48: Warning: Assertion failed: Code not at $0001
030-assert-success.s:49: Warning: Assertion failed: Code not at $0001
030-assert-success.s:51: Warning: Assertion failed: Code not at $1000
030-assert-success.s:52: Warning: Assertion failed: Code not at $1000
030-assert-success.s:54: Warning: Assertion failed: Code not at $1001
030-assert-success.s:55: Warning: Assertion failed: Code not at $1001
030-assert-success.s:60: Warning: Assertion failed: Code not at $8001
030-assert-success.s:61: Warning: Assertion failed: Code not at $8001
030-assert-success.s:65: Warning: Assertion failed: Code not at $0000
030-assert-success.s:66: Warning: Assertion failed: Code not at $0000
030-assert-success.s:68: Warning: Assertion failed: Code not at $0001
030-assert-success.s:69: Warning: Assertion failed: Code not at $0001
030-assert-success.s:71: Warning: Assertion failed: Code not at $1000
030-assert-success.s:72: Warning: Assertion failed: Code not at $1000
030-assert-success.s:74: Warning: Assertion failed: Code not at $1001
030-assert-success.s:75: Warning: Assertion failed: Code not at $1001
030-assert-success.s:77: Warning: Assertion failed: Code not at $8000
030-assert-success.s:78: Warning: Assertion failed: Code not at $8000

View File

@@ -1 +1 @@
ld65: Error: 032-assert-error2.s:3: Code not at $0000
032-assert-error2.s:3: Error: Assertion failed: Code not at $0000

View File

@@ -1 +1 @@
ld65: Error: 032-assert-error3.s:3: Code not at $0000
032-assert-error3.s:3: Error: Assertion failed: Code not at $0000

View File

@@ -1 +1 @@
ld65: Error: 032-assert-error4.s:3: Code not at $0001
032-assert-error4.s:3: Error: Assertion failed: Code not at $0001

View File

@@ -1 +1 @@
ld65: Error: 032-assert-error6.s:3: Code not at $1001
032-assert-error6.s:3: Error: Assertion failed: Code not at $1001

View File

@@ -1 +1 @@
ld65: Error: 032-assert-error7.s:3: Code not at $8000
032-assert-error7.s:3: Error: Assertion failed: Code not at $8000

View File

@@ -1 +1 @@
ld65: Error: 032-assert-error8.s:3: Code not at $8001
032-assert-error8.s:3: Error: Assertion failed: Code not at $8001

View File

@@ -1,40 +1,40 @@
ld65: Warning: 033-assert-ldwarning-success.s:3: Code not at $0000
ld65: Warning: 033-assert-ldwarning-success.s:4: Code not at $0000
ld65: Warning: 033-assert-ldwarning-success.s:6: Code not at $0001
ld65: Warning: 033-assert-ldwarning-success.s:7: Code not at $0001
ld65: Warning: 033-assert-ldwarning-success.s:12: Code not at $1001
ld65: Warning: 033-assert-ldwarning-success.s:13: Code not at $1001
ld65: Warning: 033-assert-ldwarning-success.s:15: Code not at $8000
ld65: Warning: 033-assert-ldwarning-success.s:16: Code not at $8000
ld65: Warning: 033-assert-ldwarning-success.s:18: Code not at $8001
ld65: Warning: 033-assert-ldwarning-success.s:19: Code not at $8001
ld65: Warning: 033-assert-ldwarning-success.s:23: Code not at $0000
ld65: Warning: 033-assert-ldwarning-success.s:24: Code not at $0000
ld65: Warning: 033-assert-ldwarning-success.s:26: Code not at $0001
ld65: Warning: 033-assert-ldwarning-success.s:27: Code not at $0001
ld65: Warning: 033-assert-ldwarning-success.s:29: Code not at $1000
ld65: Warning: 033-assert-ldwarning-success.s:30: Code not at $1000
ld65: Warning: 033-assert-ldwarning-success.s:35: Code not at $8000
ld65: Warning: 033-assert-ldwarning-success.s:36: Code not at $8000
ld65: Warning: 033-assert-ldwarning-success.s:38: Code not at $8001
ld65: Warning: 033-assert-ldwarning-success.s:39: Code not at $8001
ld65: Warning: 033-assert-ldwarning-success.s:45: Code not at $0000
ld65: Warning: 033-assert-ldwarning-success.s:46: Code not at $0000
ld65: Warning: 033-assert-ldwarning-success.s:48: Code not at $0001
ld65: Warning: 033-assert-ldwarning-success.s:49: Code not at $0001
ld65: Warning: 033-assert-ldwarning-success.s:51: Code not at $1000
ld65: Warning: 033-assert-ldwarning-success.s:52: Code not at $1000
ld65: Warning: 033-assert-ldwarning-success.s:54: Code not at $1001
ld65: Warning: 033-assert-ldwarning-success.s:55: Code not at $1001
ld65: Warning: 033-assert-ldwarning-success.s:60: Code not at $8001
ld65: Warning: 033-assert-ldwarning-success.s:61: Code not at $8001
ld65: Warning: 033-assert-ldwarning-success.s:65: Code not at $0000
ld65: Warning: 033-assert-ldwarning-success.s:66: Code not at $0000
ld65: Warning: 033-assert-ldwarning-success.s:68: Code not at $0001
ld65: Warning: 033-assert-ldwarning-success.s:69: Code not at $0001
ld65: Warning: 033-assert-ldwarning-success.s:71: Code not at $1000
ld65: Warning: 033-assert-ldwarning-success.s:72: Code not at $1000
ld65: Warning: 033-assert-ldwarning-success.s:74: Code not at $1001
ld65: Warning: 033-assert-ldwarning-success.s:75: Code not at $1001
ld65: Warning: 033-assert-ldwarning-success.s:77: Code not at $8000
ld65: Warning: 033-assert-ldwarning-success.s:78: Code not at $8000
033-assert-ldwarning-success.s:3: Warning: Assertion failed: Code not at $0000
033-assert-ldwarning-success.s:4: Warning: Assertion failed: Code not at $0000
033-assert-ldwarning-success.s:6: Warning: Assertion failed: Code not at $0001
033-assert-ldwarning-success.s:7: Warning: Assertion failed: Code not at $0001
033-assert-ldwarning-success.s:12: Warning: Assertion failed: Code not at $1001
033-assert-ldwarning-success.s:13: Warning: Assertion failed: Code not at $1001
033-assert-ldwarning-success.s:15: Warning: Assertion failed: Code not at $8000
033-assert-ldwarning-success.s:16: Warning: Assertion failed: Code not at $8000
033-assert-ldwarning-success.s:18: Warning: Assertion failed: Code not at $8001
033-assert-ldwarning-success.s:19: Warning: Assertion failed: Code not at $8001
033-assert-ldwarning-success.s:23: Warning: Assertion failed: Code not at $0000
033-assert-ldwarning-success.s:24: Warning: Assertion failed: Code not at $0000
033-assert-ldwarning-success.s:26: Warning: Assertion failed: Code not at $0001
033-assert-ldwarning-success.s:27: Warning: Assertion failed: Code not at $0001
033-assert-ldwarning-success.s:29: Warning: Assertion failed: Code not at $1000
033-assert-ldwarning-success.s:30: Warning: Assertion failed: Code not at $1000
033-assert-ldwarning-success.s:35: Warning: Assertion failed: Code not at $8000
033-assert-ldwarning-success.s:36: Warning: Assertion failed: Code not at $8000
033-assert-ldwarning-success.s:38: Warning: Assertion failed: Code not at $8001
033-assert-ldwarning-success.s:39: Warning: Assertion failed: Code not at $8001
033-assert-ldwarning-success.s:45: Warning: Assertion failed: Code not at $0000
033-assert-ldwarning-success.s:46: Warning: Assertion failed: Code not at $0000
033-assert-ldwarning-success.s:48: Warning: Assertion failed: Code not at $0001
033-assert-ldwarning-success.s:49: Warning: Assertion failed: Code not at $0001
033-assert-ldwarning-success.s:51: Warning: Assertion failed: Code not at $1000
033-assert-ldwarning-success.s:52: Warning: Assertion failed: Code not at $1000
033-assert-ldwarning-success.s:54: Warning: Assertion failed: Code not at $1001
033-assert-ldwarning-success.s:55: Warning: Assertion failed: Code not at $1001
033-assert-ldwarning-success.s:60: Warning: Assertion failed: Code not at $8001
033-assert-ldwarning-success.s:61: Warning: Assertion failed: Code not at $8001
033-assert-ldwarning-success.s:65: Warning: Assertion failed: Code not at $0000
033-assert-ldwarning-success.s:66: Warning: Assertion failed: Code not at $0000
033-assert-ldwarning-success.s:68: Warning: Assertion failed: Code not at $0001
033-assert-ldwarning-success.s:69: Warning: Assertion failed: Code not at $0001
033-assert-ldwarning-success.s:71: Warning: Assertion failed: Code not at $1000
033-assert-ldwarning-success.s:72: Warning: Assertion failed: Code not at $1000
033-assert-ldwarning-success.s:74: Warning: Assertion failed: Code not at $1001
033-assert-ldwarning-success.s:75: Warning: Assertion failed: Code not at $1001
033-assert-ldwarning-success.s:77: Warning: Assertion failed: Code not at $8000
033-assert-ldwarning-success.s:78: Warning: Assertion failed: Code not at $8000

View File

@@ -1 +1 @@
ld65: Error: 034-assert-lderror2.s:3: Code not at $0000
034-assert-lderror2.s:3: Error: Assertion failed: Code not at $0000

View File

@@ -1 +1 @@
ld65: Error: 034-assert-lderror3.s:3: Code not at $0000
034-assert-lderror3.s:3: Error: Assertion failed: Code not at $0000

View File

@@ -1 +1 @@
ld65: Error: 034-assert-lderror4.s:3: Code not at $0001
034-assert-lderror4.s:3: Error: Assertion failed: Code not at $0001

View File

@@ -1 +1 @@
ld65: Error: 034-assert-lderror6.s:3: Code not at $1001
034-assert-lderror6.s:3: Error: Assertion failed: Code not at $1001

View File

@@ -1 +1 @@
ld65: Error: 034-assert-lderror7.s:3: Code not at $8000
034-assert-lderror7.s:3: Error: Assertion failed: Code not at $8000

View File

@@ -1 +1 @@
ld65: Error: 034-assert-lderror8.s:3: Code not at $8001
034-assert-lderror8.s:3: Error: Assertion failed: Code not at $8001

View File

@@ -1 +1 @@
ld65: Warning: <<<#PATH#>>>:<<<#INTEGER#>>>: Segment 'CODE' isn't aligned properly; the resulting executable might not be functional.
<<<#PATH#>>>:<<<#INTEGER#>>>: Warning: Segment 'CODE' isn't aligned properly; the resulting executable might not be functional.

View File

@@ -1 +1 @@
ld65: Warning: runtime/sp-compat.s:16: Symbol 'sp' is deprecated - please use 'c_sp' instead
runtime/sp-compat.s:16: Warning: Assertion failed: Symbol 'sp' is deprecated - please use 'c_sp' instead

View File

@@ -0,0 +1 @@


View File

@@ -0,0 +1,2 @@
170-ld-errormsg.cfg:10: Warning: Segment 'BSS' with type 'bss' contains initialized data
170-ld-errormsg.cfg:10: Note: Initialized data comes at least partially from '<<<#PATH#>>>'

View File

@@ -0,0 +1,2 @@
171-ld-errormsg.cfg:3: Warning: Segment 'CODE' overflows memory area 'MAIN' by 1 byte
ld65: Error: Cannot generate most of the files due to memory area overflow

View File

@@ -0,0 +1,2 @@
172-ld-errormsg.cfg:5: Error: Segment type expected but got 'RWX'
172-ld-errormsg.cfg:5: Note: You may use one of 'RO', 'RW', 'BSS', 'ZP' or 'OVERWRITE'

View File

@@ -1,3 +1,3 @@
ld65: Warning: 201-overwrite-overflow.cfg:3: Segment 'AO' overflows memory area 'A' by 1 byte
ld65: Warning: 201-overwrite-overflow.cfg:4: Segment 'BO' overflows memory area 'B' by 1 byte
201-overwrite-overflow.cfg:3: Warning: Segment 'AO' overflows memory area 'A' by 1 byte
201-overwrite-overflow.cfg:4: Warning: Segment 'BO' overflows memory area 'B' by 1 byte
ld65: Error: Cannot generate most of the files due to memory area overflows

Binary file not shown.

View File

@@ -63,15 +63,15 @@ define PRG_template
# sim65 ensure 64-bit wait time does not timeout
$(WORKDIR)/sim65-timein.$1.prg: sim65-timein.s | $(WORKDIR)
$(if $(QUIET),echo misc/sim65-timein.$1.prg)
$(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLERR)
$(LD65) -t sim$1 -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLERR)
$(CA65) --no-utf8 -t sim$1 -o $$(@:.prg=.o) $$< $(NULLERR)
$(LD65) --no-utf8 -t sim$1 -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLERR)
$(SIM65) -x 4400000000 -c $$@ $(NULLOUT) $(NULLERR)
# sim65 ensure 64-bit wait time does timeout
$(WORKDIR)/sim65-timeout.$1.prg: sim65-timeout.s | $(WORKDIR)
$(if $(QUIET),echo misc/sim65-timeout.$1.prg)
$(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLERR)
$(LD65) -t sim$1 -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLERR)
$(CA65) --no-utf8 -t sim$1 -o $$(@:.prg=.o) $$< $(NULLERR)
$(LD65) --no-utf8 -t sim$1 -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLERR)
$(NOT) $(SIM65) -x 4400000000 -c $$@ $(NULLOUT) $(NULLERR)
endef # PRG_template

View File

@@ -61,8 +61,8 @@ define OPCODE_template
$(WORKDIR)/$1-opcodes.bin: $1-opcodes.s $(ISEQUAL)
$(if $(QUIET),echo asm/$1-opcodes.bin)
$(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$<
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib
$(CA65) --no-utf8 -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$<
$(LD65) --no-utf8 -t none -o $$@ $$(@:.bin=.o) none.lib
$(ISEQUAL) $1-opcodes.ref $$@
endef # OPCODE_template
@@ -70,7 +70,7 @@ endef # OPCODE_template
$(foreach cpu,$(OPCODE_CPUS),$(eval $(call OPCODE_template,$(cpu))))
$(WORKDIR)/%.o: %.s | $(WORKDIR)
$(CA65) -l $(@:.o=.lst) -o $@ $<
$(CA65) --no-utf8 -l $(@:.o=.lst) -o $@ $<
clean:
@$(call RMDIR,$(WORKDIR))

View File

@@ -55,8 +55,8 @@ define PRG_template
$(WORKDIR)/%.$1.prg: %.s | $(WORKDIR)
$(if $(QUIET),echo asm/val/$$*.$1.prg)
$(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLOUT) $(NULLERR)
$(LD65) -C sim6502-asmtest.cfg -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLOUT) $(NULLERR)
$(CA65) --no-utf8 -t sim$1 -o $$(@:.prg=.o) $$< $(NULLOUT) $(NULLERR)
$(LD65) --no-utf8 -C sim6502-asmtest.cfg -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLOUT) $(NULLERR)
$(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT)
endef # PRG_template

43
test/asm/val/charmap.s Normal file
View File

@@ -0,0 +1,43 @@
.setcpu "6502"
.import _exit
.export _main
.charmap $41, 0
.charmap $42, 1
.charmap $43, 2
mapped:
.byte "ABC"
.include "ascii_charmap.inc"
ascii:
.byte "ABC"
_main:
ldx #$01
lda mapped+0
cmp #0
bne error
lda mapped+1
cmp #1
bne error
lda mapped+2
cmp #2
bne error
lda ascii+0
cmp #$41
bne error
lda ascii+1
cmp #$42
bne error
lda ascii+2
cmp #$43
bne error
ldx #$00
error:
txa
jmp _exit