From f8e2b524f9667752039429f8b79b19fb43eaab3e Mon Sep 17 00:00:00 2001 From: Dawid Buchwald Date: Thu, 6 Aug 2020 23:02:03 +0200 Subject: [PATCH] Removed dependency on force_range feature Changed code so that force_range feature doesn't have to be enabled for more recent versions of CC65 --- float.s | 6 +++--- inline.s | 4 ++-- memory.s | 2 +- msbasic.s | 1 - program.s | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/float.s b/float.s index be3a23b..4ee4b60 100644 --- a/float.s +++ b/float.s @@ -774,7 +774,7 @@ FDIVT: jsr ADD_EXPONENTS inc FAC beq JOV - ldx #-MANTISSA_BYTES + ldx #<-MANTISSA_BYTES lda #$01 L39A1: ldy ARG+1 @@ -1452,9 +1452,9 @@ L3C8C: ldy #>CON_BILLION jsr FMULT .ifdef CONFIG_SMALL - lda #-6 ; exponent adjustment + lda #<-6 ; exponent adjustment .else - lda #-9 + lda #<-9 .endif L3C95: sta INDX diff --git a/inline.s b/inline.s index 78f0084..96f00fa 100644 --- a/inline.s +++ b/inline.s @@ -38,8 +38,8 @@ INLIN1: L0C32: lda #$00 sta INPUTBUFFER,x - ldx #INPUTBUFFER-1 + ldx #<(INPUTBUFFER-1) + ldy #>(INPUTBUFFER-1) rts .endif diff --git a/memory.s b/memory.s index c5e25cd..9d00aa9 100644 --- a/memory.s +++ b/memory.s @@ -136,7 +136,7 @@ L2300: dex bpl L2300 jsr GARBAG - ldx #TEMP1-FAC+1 + ldx #<(TEMP1-FAC+1) L230B: pla sta FAC,x diff --git a/msbasic.s b/msbasic.s index 7ef660f..bb7fd05 100644 --- a/msbasic.s +++ b/msbasic.s @@ -1,4 +1,3 @@ -.feature force_range .debuginfo + .setcpu "6502" diff --git a/program.s b/program.s index 39713ff..2fba3cb 100644 --- a/program.s +++ b/program.s @@ -440,7 +440,7 @@ L24EA: .ifdef CONFIG_NO_INPUTBUFFER_ZP dec TXTPTR+1 .endif - lda #