mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-01 22:50:35 +00:00
Minor fix for 24-bit MULTI_MASK
The test for max allowed value was assuming 16-bit addresses. We had no tests for 24-bit values, so this adds a 65816-specific version of 20170-external-symbols.
This commit is contained in:
parent
3ddf9d11c4
commit
9321f15052
@ -283,7 +283,7 @@ namespace SourceGen {
|
||||
out string badMaskMsg) {
|
||||
Debug.Assert(line.StartsWith(MULTI_MASK_CMD));
|
||||
const int MIN = 0;
|
||||
const int MAX = 0x00ffff;
|
||||
const int MAX = 0x00ffffff;
|
||||
|
||||
badMaskMsg = Res.Strings.ERR_INVALID_MULTI_MASK;
|
||||
multiMask = null;
|
||||
|
@ -1,7 +1,7 @@
|
||||
; Copyright 2019 faddenSoft. All Rights Reserved.
|
||||
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
||||
|
||||
*SYNOPSIS Symbol set 1 for test 2021-external-symbols
|
||||
*SYNOPSIS Symbol set 1 for test 20170-external-symbols
|
||||
|
||||
; Platform symbols aren't applied to file data.
|
||||
CodeWrap @ $0f00 $1000 ;encases program
|
||||
|
@ -1,7 +1,7 @@
|
||||
; Copyright 2019 faddenSoft. All Rights Reserved.
|
||||
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
||||
|
||||
*SYNOPSIS Symbol set 2 for test 2021-external-symbols
|
||||
*SYNOPSIS Symbol set 2 for test 20170-external-symbols
|
||||
|
||||
; override 2nd and 3rd
|
||||
SameName2 @ $2011
|
||||
|
@ -1,7 +1,7 @@
|
||||
; Copyright 2019 faddenSoft. All Rights Reserved.
|
||||
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
||||
|
||||
*SYNOPSIS Symbol set 3 for test 2021-external-symbols
|
||||
*SYNOPSIS Symbol set 3 for test 20170-external-symbols
|
||||
|
||||
; override 3rd
|
||||
SameName3 @ $2022
|
||||
|
BIN
SourceGen/SGTestData/20172-external-symbols
Normal file
BIN
SourceGen/SGTestData/20172-external-symbols
Normal file
Binary file not shown.
63
SourceGen/SGTestData/20172-external-symbols.dis65
Normal file
63
SourceGen/SGTestData/20172-external-symbols.dis65
Normal file
@ -0,0 +1,63 @@
|
||||
### 6502bench SourceGen dis65 v1.0 ###
|
||||
{
|
||||
"_ContentVersion":4,
|
||||
"FileDataLength":258,
|
||||
"FileDataCrc32":-1921102947,
|
||||
"ProjectProps":{
|
||||
"CpuName":"65816",
|
||||
"IncludeUndocumentedInstr":false,
|
||||
"TwoByteBrk":false,
|
||||
"EntryFlags":32702671,
|
||||
"AutoLabelStyle":"Simple",
|
||||
"AnalysisParams":{
|
||||
"AnalyzeUncategorizedData":true,
|
||||
"DefaultTextScanMode":"LowHighAscii",
|
||||
"MinCharsForString":4,
|
||||
"SeekNearbyTargets":true,
|
||||
"UseRelocData":false,
|
||||
"SmartPlpHandling":false,
|
||||
"SmartPlbHandling":true},
|
||||
|
||||
"PlatformSymbolFileIdentifiers":["PROJ:20172-external-symbols.sym65"],
|
||||
"ExtensionScriptFileIdentifiers":[],
|
||||
"ProjectSyms":{
|
||||
}},
|
||||
|
||||
"AddressMap":[{
|
||||
"Offset":0,
|
||||
"Addr":4096}],
|
||||
"TypeHints":[{
|
||||
"Low":0,
|
||||
"High":0,
|
||||
"Hint":"Code"}],
|
||||
"StatusFlagOverrides":{
|
||||
},
|
||||
|
||||
"Comments":{
|
||||
},
|
||||
|
||||
"LongComments":{
|
||||
},
|
||||
|
||||
"Notes":{
|
||||
},
|
||||
|
||||
"UserLabels":{
|
||||
},
|
||||
|
||||
"OperandFormats":{
|
||||
},
|
||||
|
||||
"LvTables":{
|
||||
},
|
||||
|
||||
"Visualizations":[],
|
||||
"VisualizationAnimations":[],
|
||||
"VisualizationSets":{
|
||||
},
|
||||
|
||||
"RelocList":{
|
||||
},
|
||||
|
||||
"DbrValues":{
|
||||
}}
|
30
SourceGen/SGTestData/20172-external-symbols.sym65
Normal file
30
SourceGen/SGTestData/20172-external-symbols.sym65
Normal file
@ -0,0 +1,30 @@
|
||||
; Copyright 2020 faddenSoft. All Rights Reserved.
|
||||
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
||||
|
||||
*SYNOPSIS Symbol set for test 20172-external-symbols
|
||||
|
||||
; map 00/Cxxx and 01/Cxxx to 00/Cxxx
|
||||
*MULTI_MASK $fef000 $00c000 $000fff
|
||||
|
||||
;addr_00 @ $00/c030
|
||||
;addr_01 @ $01/c030
|
||||
loaddr @ $c030
|
||||
|
||||
; map e0/Cxxx and e1/Cxxx to e0/Cxxx
|
||||
*MULTI_MASK $fef000 $e0c000 $000fff
|
||||
|
||||
;addr_e0 @ $e0/c030
|
||||
;addr_e1 @ $e1/c030
|
||||
hiaddr @ $e0c030
|
||||
|
||||
; clear multi-mask
|
||||
*MULTI_MASK
|
||||
|
||||
addr_02 @ $02/c030
|
||||
addr_03 @ $03/c030
|
||||
addr_e2 @ $e2/c030
|
||||
addr_e3 @ $e3/c030
|
||||
|
||||
oth_00 @ $00/1234
|
||||
oth_01 @ $01/1234
|
||||
oth_02 @ $02/1234
|
@ -0,0 +1,96 @@
|
||||
.cpu "65816"
|
||||
oth_00 = $1234
|
||||
loaddr = $c030
|
||||
oth_01 = $011234
|
||||
oth_02 = $021234
|
||||
addr_02 = $02c030
|
||||
addr_03 = $03c030
|
||||
hiaddr = $e0c030
|
||||
addr_e2 = $e2c030
|
||||
addr_e3 = $e3c030
|
||||
|
||||
* = $1000
|
||||
.as
|
||||
.xs
|
||||
clc
|
||||
xce
|
||||
sep #$30
|
||||
phk
|
||||
plb
|
||||
lda loaddr
|
||||
lda loaddr+$10000
|
||||
lda addr_02
|
||||
lda addr_03
|
||||
lda hiaddr
|
||||
lda hiaddr+$10000
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
lda oth_00
|
||||
lda oth_01
|
||||
lda oth_02
|
||||
lda #$01
|
||||
pha
|
||||
plb
|
||||
lda @lloaddr
|
||||
lda loaddr
|
||||
lda addr_02
|
||||
lda addr_03
|
||||
lda hiaddr
|
||||
lda hiaddr+$10000
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
lda @loth_00
|
||||
lda oth_01 & $ffff
|
||||
lda oth_02
|
||||
lda #$02
|
||||
pha
|
||||
plb
|
||||
lda @lloaddr
|
||||
lda loaddr+$10000
|
||||
lda addr_02 & $ffff
|
||||
lda addr_03
|
||||
lda hiaddr
|
||||
lda hiaddr+$10000
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
lda @loth_00
|
||||
lda oth_01
|
||||
lda oth_02 & $ffff
|
||||
lda #$03
|
||||
pha
|
||||
plb
|
||||
lda @lloaddr
|
||||
lda loaddr+$10000
|
||||
lda addr_02
|
||||
lda addr_03 & $ffff
|
||||
lda hiaddr
|
||||
lda hiaddr+$10000
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
lda @loth_00
|
||||
lda oth_01
|
||||
lda oth_02
|
||||
lda #$e0
|
||||
pha
|
||||
plb
|
||||
lda @lloaddr
|
||||
lda loaddr+$10000
|
||||
lda addr_02
|
||||
lda addr_03
|
||||
lda hiaddr & $ffff
|
||||
lda hiaddr+$10000
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
lda #$e1
|
||||
pha
|
||||
plb
|
||||
lda @lloaddr
|
||||
lda loaddr+$10000
|
||||
lda addr_02
|
||||
lda addr_03
|
||||
lda hiaddr
|
||||
lda hiaddr & $ffff
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
rts
|
||||
|
96
SourceGen/SGTestData/Expected/20172-external-symbols_acme.S
Normal file
96
SourceGen/SGTestData/Expected/20172-external-symbols_acme.S
Normal file
@ -0,0 +1,96 @@
|
||||
!cpu 65816
|
||||
oth_00 = $1234
|
||||
loaddr = $c030
|
||||
oth_01 = $011234
|
||||
oth_02 = $021234
|
||||
addr_02 = $02c030
|
||||
addr_03 = $03c030
|
||||
hiaddr = $e0c030
|
||||
addr_e2 = $e2c030
|
||||
addr_e3 = $e3c030
|
||||
|
||||
* = $1000
|
||||
!as
|
||||
!rs
|
||||
clc
|
||||
xce
|
||||
sep #$30
|
||||
phk
|
||||
plb
|
||||
lda loaddr
|
||||
lda+3 loaddr+$10000
|
||||
lda+3 addr_02
|
||||
lda+3 addr_03
|
||||
lda+3 hiaddr
|
||||
lda+3 hiaddr+$10000
|
||||
lda+3 addr_e2
|
||||
lda+3 addr_e3
|
||||
lda oth_00
|
||||
lda+3 oth_01
|
||||
lda+3 oth_02
|
||||
lda #$01
|
||||
pha
|
||||
plb
|
||||
lda+3 loaddr
|
||||
lda loaddr
|
||||
lda+3 addr_02
|
||||
lda+3 addr_03
|
||||
lda+3 hiaddr
|
||||
lda+3 hiaddr+$10000
|
||||
lda+3 addr_e2
|
||||
lda+3 addr_e3
|
||||
lda+3 oth_00
|
||||
lda oth_01 & $ffff
|
||||
lda+3 oth_02
|
||||
lda #$02
|
||||
pha
|
||||
plb
|
||||
lda+3 loaddr
|
||||
lda+3 loaddr+$10000
|
||||
lda addr_02 & $ffff
|
||||
lda+3 addr_03
|
||||
lda+3 hiaddr
|
||||
lda+3 hiaddr+$10000
|
||||
lda+3 addr_e2
|
||||
lda+3 addr_e3
|
||||
lda+3 oth_00
|
||||
lda+3 oth_01
|
||||
lda oth_02 & $ffff
|
||||
lda #$03
|
||||
pha
|
||||
plb
|
||||
lda+3 loaddr
|
||||
lda+3 loaddr+$10000
|
||||
lda+3 addr_02
|
||||
lda addr_03 & $ffff
|
||||
lda+3 hiaddr
|
||||
lda+3 hiaddr+$10000
|
||||
lda+3 addr_e2
|
||||
lda+3 addr_e3
|
||||
lda+3 oth_00
|
||||
lda+3 oth_01
|
||||
lda+3 oth_02
|
||||
lda #$e0
|
||||
pha
|
||||
plb
|
||||
lda+3 loaddr
|
||||
lda+3 loaddr+$10000
|
||||
lda+3 addr_02
|
||||
lda+3 addr_03
|
||||
lda hiaddr & $ffff
|
||||
lda+3 hiaddr+$10000
|
||||
lda+3 addr_e2
|
||||
lda+3 addr_e3
|
||||
lda #$e1
|
||||
pha
|
||||
plb
|
||||
lda+3 loaddr
|
||||
lda+3 loaddr+$10000
|
||||
lda+3 addr_02
|
||||
lda+3 addr_03
|
||||
lda+3 hiaddr
|
||||
lda hiaddr & $ffff
|
||||
lda+3 addr_e2
|
||||
lda+3 addr_e3
|
||||
rts
|
||||
|
97
SourceGen/SGTestData/Expected/20172-external-symbols_cc65.S
Normal file
97
SourceGen/SGTestData/Expected/20172-external-symbols_cc65.S
Normal file
@ -0,0 +1,97 @@
|
||||
.setcpu "65816"
|
||||
oth_00 = $1234
|
||||
loaddr = $c030
|
||||
oth_01 = $011234
|
||||
oth_02 = $021234
|
||||
addr_02 = $02c030
|
||||
addr_03 = $03c030
|
||||
hiaddr = $e0c030
|
||||
addr_e2 = $e2c030
|
||||
addr_e3 = $e3c030
|
||||
|
||||
; .segment "SEG000"
|
||||
.org $1000
|
||||
.a8
|
||||
.i8
|
||||
clc
|
||||
xce
|
||||
sep #$30
|
||||
phk
|
||||
plb
|
||||
lda loaddr
|
||||
lda loaddr+$10000
|
||||
lda addr_02
|
||||
lda addr_03
|
||||
lda hiaddr
|
||||
lda hiaddr+$10000
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
lda oth_00
|
||||
lda oth_01
|
||||
lda oth_02
|
||||
lda #$01
|
||||
pha
|
||||
plb
|
||||
lda f:loaddr
|
||||
lda loaddr
|
||||
lda addr_02
|
||||
lda addr_03
|
||||
lda hiaddr
|
||||
lda hiaddr+$10000
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
lda f:oth_00
|
||||
lda oth_01 & $ffff
|
||||
lda oth_02
|
||||
lda #$02
|
||||
pha
|
||||
plb
|
||||
lda f:loaddr
|
||||
lda loaddr+$10000
|
||||
lda addr_02 & $ffff
|
||||
lda addr_03
|
||||
lda hiaddr
|
||||
lda hiaddr+$10000
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
lda f:oth_00
|
||||
lda oth_01
|
||||
lda oth_02 & $ffff
|
||||
lda #$03
|
||||
pha
|
||||
plb
|
||||
lda f:loaddr
|
||||
lda loaddr+$10000
|
||||
lda addr_02
|
||||
lda addr_03 & $ffff
|
||||
lda hiaddr
|
||||
lda hiaddr+$10000
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
lda f:oth_00
|
||||
lda oth_01
|
||||
lda oth_02
|
||||
lda #$e0
|
||||
pha
|
||||
plb
|
||||
lda f:loaddr
|
||||
lda loaddr+$10000
|
||||
lda addr_02
|
||||
lda addr_03
|
||||
lda hiaddr & $ffff
|
||||
lda hiaddr+$10000
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
lda #$e1
|
||||
pha
|
||||
plb
|
||||
lda f:loaddr
|
||||
lda loaddr+$10000
|
||||
lda addr_02
|
||||
lda addr_03
|
||||
lda hiaddr
|
||||
lda hiaddr & $ffff
|
||||
lda addr_e2
|
||||
lda addr_e3
|
||||
rts
|
||||
|
@ -0,0 +1,11 @@
|
||||
# 6502bench SourceGen generated linker script for 20172-external-symbols
|
||||
MEMORY {
|
||||
MAIN: file=%O, start=%S, size=65536;
|
||||
# MEM000: file=%O, start=$1000, size=258;
|
||||
}
|
||||
SEGMENTS {
|
||||
CODE: load=MAIN, type=rw;
|
||||
# SEG000: load=MEM000, type=rw;
|
||||
}
|
||||
FEATURES {}
|
||||
SYMBOLS {}
|
@ -0,0 +1,93 @@
|
||||
oth_00 equ $1234
|
||||
loaddr equ $c030
|
||||
oth_01 equ $011234
|
||||
oth_02 equ $021234
|
||||
addr_02 equ $02c030
|
||||
addr_03 equ $03c030
|
||||
hiaddr equ $e0c030
|
||||
addr_e2 equ $e2c030
|
||||
addr_e3 equ $e3c030
|
||||
|
||||
org $1000
|
||||
clc
|
||||
xce
|
||||
sep #$30
|
||||
phk
|
||||
plb
|
||||
lda loaddr
|
||||
ldal loaddr+$10000
|
||||
ldal addr_02
|
||||
ldal addr_03
|
||||
ldal hiaddr
|
||||
ldal hiaddr+$10000
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
lda oth_00
|
||||
ldal oth_01
|
||||
ldal oth_02
|
||||
lda #$01
|
||||
pha
|
||||
plb
|
||||
ldal loaddr
|
||||
lda loaddr
|
||||
ldal addr_02
|
||||
ldal addr_03
|
||||
ldal hiaddr
|
||||
ldal hiaddr+$10000
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
ldal oth_00
|
||||
lda oth_01
|
||||
ldal oth_02
|
||||
lda #$02
|
||||
pha
|
||||
plb
|
||||
ldal loaddr
|
||||
ldal loaddr+$10000
|
||||
lda addr_02
|
||||
ldal addr_03
|
||||
ldal hiaddr
|
||||
ldal hiaddr+$10000
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
ldal oth_00
|
||||
ldal oth_01
|
||||
lda oth_02
|
||||
lda #$03
|
||||
pha
|
||||
plb
|
||||
ldal loaddr
|
||||
ldal loaddr+$10000
|
||||
ldal addr_02
|
||||
lda addr_03
|
||||
ldal hiaddr
|
||||
ldal hiaddr+$10000
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
ldal oth_00
|
||||
ldal oth_01
|
||||
ldal oth_02
|
||||
lda #$e0
|
||||
pha
|
||||
plb
|
||||
ldal loaddr
|
||||
ldal loaddr+$10000
|
||||
ldal addr_02
|
||||
ldal addr_03
|
||||
lda hiaddr
|
||||
ldal hiaddr+$10000
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
lda #$e1
|
||||
pha
|
||||
plb
|
||||
ldal loaddr
|
||||
ldal loaddr+$10000
|
||||
ldal addr_02
|
||||
ldal addr_03
|
||||
ldal hiaddr
|
||||
lda hiaddr
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
rts
|
||||
|
118
SourceGen/SGTestData/Source/20172-external-symbols.S
Normal file
118
SourceGen/SGTestData/Source/20172-external-symbols.S
Normal file
@ -0,0 +1,118 @@
|
||||
; Copyright 2020 faddenSoft. All Rights Reserved.
|
||||
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
||||
;
|
||||
; Assembler: Merlin 32
|
||||
|
||||
; EDIT: set up a pair of MULTI_MASKs for 00/01 and e0/e1
|
||||
|
||||
addr_00 equ $00c030
|
||||
addr_01 equ $01c030
|
||||
addr_02 equ $02c030
|
||||
addr_03 equ $03c030
|
||||
|
||||
addr_e0 equ $e0c030
|
||||
addr_e1 equ $e1c030
|
||||
addr_e2 equ $e2c030
|
||||
addr_e3 equ $e3c030
|
||||
|
||||
oth_00 equ $001234
|
||||
oth_01 equ $011234
|
||||
oth_02 equ $021234
|
||||
|
||||
org $1000
|
||||
|
||||
clc
|
||||
xce
|
||||
sep #$30
|
||||
mx %11
|
||||
|
||||
; bank 00
|
||||
phk
|
||||
plb
|
||||
lda: addr_00
|
||||
ldal addr_01
|
||||
ldal addr_02
|
||||
ldal addr_03
|
||||
ldal addr_e0
|
||||
ldal addr_e1
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
lda: oth_00
|
||||
ldal oth_01
|
||||
ldal oth_02
|
||||
|
||||
; bank 01
|
||||
lda #$01
|
||||
pha
|
||||
plb
|
||||
ldal addr_00
|
||||
lda: addr_01
|
||||
ldal addr_02
|
||||
ldal addr_03
|
||||
ldal addr_e0
|
||||
ldal addr_e1
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
ldal oth_00
|
||||
lda: oth_01
|
||||
ldal oth_02
|
||||
|
||||
; bank 02
|
||||
lda #$02
|
||||
pha
|
||||
plb
|
||||
ldal addr_00
|
||||
ldal addr_01
|
||||
lda: addr_02
|
||||
ldal addr_03
|
||||
ldal addr_e0
|
||||
ldal addr_e1
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
ldal oth_00
|
||||
ldal oth_01
|
||||
lda: oth_02
|
||||
|
||||
; bank 03
|
||||
lda #$03
|
||||
pha
|
||||
plb
|
||||
ldal addr_00
|
||||
ldal addr_01
|
||||
ldal addr_02
|
||||
lda: addr_03
|
||||
ldal addr_e0
|
||||
ldal addr_e1
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
ldal oth_00
|
||||
ldal oth_01
|
||||
ldal oth_02
|
||||
|
||||
; bank e0
|
||||
lda #$e0
|
||||
pha
|
||||
plb
|
||||
ldal addr_00
|
||||
ldal addr_01
|
||||
ldal addr_02
|
||||
ldal addr_03
|
||||
lda: addr_e0
|
||||
ldal addr_e1
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
|
||||
; bank e1
|
||||
lda #$e1
|
||||
pha
|
||||
plb
|
||||
ldal addr_00
|
||||
ldal addr_01
|
||||
ldal addr_02
|
||||
ldal addr_03
|
||||
ldal addr_e0
|
||||
lda: addr_e1
|
||||
ldal addr_e2
|
||||
ldal addr_e3
|
||||
|
||||
END rts
|
Loading…
Reference in New Issue
Block a user