Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow TI$ relocation #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 20 additions & 25 deletions eval.s
Original file line number Diff line number Diff line change
Expand Up @@ -466,15 +466,15 @@ LCE3B:
.else
ldx #$00
stx STRNG1+1
bit FAC+4
bpl LCE53
bit FAC_LAST
bpl LCE53 ; XXX Assumes vars are <32K and C_ZERO lives above!
cmp #$54 ; T
bne LCE53
.endif
cpy #$C9 ; I$
bne LCE53
jsr LCE76
sty EXPON
jsr GETTIM
sty EXPON ; Y=0
dey
sty STRNG2
ldy #$06
Expand Down Expand Up @@ -512,49 +512,44 @@ L2DC2:
.byte $19
.endif
.ifdef CBM2
bit FAC+4
bpl LCE90
cmp #$54
bit FAC_LAST
bpl LCE90 ; XXX Assumes vars are <32K and C_ZERO lives above!
cmp #$54 ; T
bne LCE82
.endif
.ifndef CONFIG_CBM_ALL
jmp LOAD_FAC_FROM_YA
.endif
.ifdef CONFIG_CBM_ALL
LCE69:
cpy #$49
cpy #$49 ; I
.ifdef CBM1
bne LCE82
.else
bne LCE90
.endif
jsr LCE76
tya
ldx #$A0
jmp LDB21
LCE76:
.ifdef CBM1
lda #$FE
ldy #$01
.else
lda #$8B
ldy #$00
.endif
jsr GETTIM
tya ; FOR FLOAT3 (Y=0)
ldx #$A0 ; EXPONENT
jmp FLOAT3
GETTIM:
lda #<(TISTR-2)
ldy #>(TISTR-2)
sei
jsr LOAD_FAC_FROM_YA
cli
sty FAC+1
sty FAC+1 ; ZERO HIGHEST.
rts
LCE82:
cmp #$53
cmp #$53 ; S
bne LCE90
cpy #$54
cpy #$54 ; T
bne LCE90
lda Z96
jmp FLOAT
LCE90:
lda FAC+3
ldy FAC+4
lda FAC_LAST-1
ldy FAC_LAST
jmp LOAD_FAC_FROM_YA
.endif

Expand Down
16 changes: 8 additions & 8 deletions float.s
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ FLOAT2:
sta FAC+4
.endif
sta FAC+3
LDB21:
FLOAT3:
stx FAC
sta FACEXTENSION
sta FACSIGN
Expand Down Expand Up @@ -1644,10 +1644,13 @@ L3D94:

; ----------------------------------------------------------------------------
CON_HALF:
.ifdef CONFIG_SMALL
.byte $80,$00,$00,$00
.else
.byte $80,$00,$00,$00,$00
.byte $80,$00 ; 1/2
.ifdef CONFIG_2
C_ZERO: ; SIMULATED ZERO
.endif
.byte $00,$00
.ifndef CONFIG_SMALL
.byte $00
.endif

; ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1682,9 +1685,6 @@ DECTBL_END:
.byte $FF,$FF,$FD,$A8
.byte $00,$00,$00,$3C
.endif
.ifdef CONFIG_2
C_ZERO = CON_HALF + 2
.endif

; ----------------------------------------------------------------------------
; "SQR" FUNCTION
Expand Down
6 changes: 1 addition & 5 deletions misc1.s
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,7 @@ LETSTRING:
PUTSTR:
.ifdef CONFIG_CBM_ALL
ldy FORPNT+1
.ifdef CBM1
cpy #$D0 ; TI$
.else
cpy #$DE
.endif
cpy #>C_ZERO ; ONLY TI$ CAN BE THIS ON ASSIG.
bne LC92B
jsr FREFAC
cmp #$06
Expand Down
2 changes: 1 addition & 1 deletion program.s
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ L24DB:
; ---END OF LINE------------------
L24EA:
sta INPUTBUFFER-3,y
.ifdef CONFIG_NO_INPUTBUFFER_ZP
.if <INPUTBUFFER = 0
dec TXTPTR+1
.endif
lda #<INPUTBUFFER-1
Expand Down
14 changes: 7 additions & 7 deletions var.s
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ NAMENOTFOUND:
cmp #>FRM_VARIABLE_CALL
bne MAKENEWVARIABLE
.endif
LD015:
LDZR:
lda #<C_ZERO
ldy #>C_ZERO
rts
Expand All @@ -170,18 +170,18 @@ MAKENEWVARIABLE:
.ifdef CONFIG_CBM_ALL
lda VARNAM
ldy VARNAM+1
cmp #$54
cmp #$54 ; T
bne LD02F
cpy #$C9
beq LD015
cpy #$49
cpy #$C9 ; I$
beq LDZR
cpy #$49 ; I
bne LD02F
LD02C:
jmp SYNERR
LD02F:
cmp #$53
cmp #$53 ; S
bne LD037
cpy #$54
cpy #$54 ; T
beq LD02C
LD037:
.endif
Expand Down