SCMASM.SYSTEM : BugFix with underscored _SYMBOLs (required for KERNEL 1.00)

This commit is contained in:
burniouf 2023-12-15 15:28:10 +01:00
parent f4f0f60da4
commit 1eaa2c98f1

View File

@ -10,13 +10,17 @@ STINIT LDA LO.MEM START OF SYMBOL TABLE
LDA LO.MEM+1 LDA LO.MEM+1
STA EOT+1 STA EOT+1
STA MACLBL+1 PRIVATE LABELS GO DOWN FROM THERE STA MACLBL+1 PRIVATE LABELS GO DOWN FROM THERE
LDX #56 # BYTES IN HASH POINTER TABLE
LDA #0 LDA #0
STA MACLBL STA MACLBL
STA CURRENT.MAJOR.LABEL+1 STA CURRENT.MAJOR.LABEL+1
LDX #58 # BYTES IN HASH POINTER TABLE
.1 STA HSHTBL-1,X .1 STA HSHTBL-1,X
DEX DEX
BNE .1 BNE .1
.DO AUXMEM .DO AUXMEM
LDA RDRAM LDA RDRAM
LDA RDRAM LDA RDRAM
@ -119,7 +123,9 @@ AUX.IMAGE.LEN .EQ *-AUX.IMAGE
* HSHTBL+$04: Chain for labels starting with "B" * HSHTBL+$04: Chain for labels starting with "B"
* - - - * - - -
* HSHTBL+$34: Chain for labels starting with "Z" * HSHTBL+$34: Chain for labels starting with "Z"
* HSHTBL+$36: Chain for Macro Names and Skeletons * HSHTBL+$36: Chain for labels starting with "_"
*
* HSHTBL+$38: Chain for Macro Names and Skeletons
* *
* Format of Target File Entry: * Format of Target File Entry:
* 0,1 -- Forward chain pointer (0=end of chain) * 0,1 -- Forward chain pointer (0=end of chain)
@ -233,16 +239,27 @@ STSRCH SEC CONVERT FIRST CHARACTER
LDA SYMBOL+7 OF SYMBOL TO HASH TABLE INDEX LDA SYMBOL+7 OF SYMBOL TO HASH TABLE INDEX
CMP #CHR.PERIOD SEE IF LOCAL SYMBOL CMP #CHR.PERIOD SEE IF LOCAL SYMBOL
BEQ .8 YES BEQ .8 YES
CMP #': COLON, THEN PRIVATE LABEL CMP #': COLON, THEN PRIVATE LABEL
BNE .12 NO, NORMAL LABEL BNE .12 NO, NORMAL LABEL
JMP SEARCH.PRIVATE.LABELS JMP SEARCH.PRIVATE.LABELS
.12 SBC #$40 AT-SIGN
.12 cmp #'_
bne .55
lda #'Z+1
.55 sec
sbc #'A
ASL DOUBLE INDEX, CLEAR CARRY ASL DOUBLE INDEX, CLEAR CARRY
ADC #HSHTBL ADC #HSHTBL
STA STPNTR STA STPNTR
LDA /HSHTBL LDA /HSHTBL
ADC #0 ADC #0
STA STPNTR+1 STA STPNTR+1
.1 LDY #0 .1 LDY #0
>SYM LDA,STPNTR GET POINTER FROM ENTRY >SYM LDA,STPNTR GET POINTER FROM ENTRY
STA TPTR STA TPTR