Skip to content

Commit ea96ab3

Browse files
committed
fix: LOADB/SAVEB could change device. relates to #357
1 parent 1cfb174 commit ea96ab3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Fixed
10+
- LOADB/SAVEB could change active device.
11+
912
## [3.0.0] - 2021-05-14
1013

1114
### Changed

disk.asm

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,10 @@ load_binary_laddr_hi = *+1
145145

146146
.disk_io_setnamsetlfs ;reused by both loadb and saveb
147147
jsr SETNAM
148-
lda $ba ;last used device number
149-
and #3 ;Make 0-3 possible numbers
150-
ora #8 ;Transform to 8-B
151-
tax
152-
lda #1
153-
ldy #0 ;if load: 0 = load to new address, if save: 0 = dunno, but okay...
154-
jmp SETLFS ;End with JMP instead of jsr/rts to save a jsr/rts pair...
148+
ldx $ba ; keep current device
149+
lda #1 ; logical file #
150+
ldy #0 ; if load: 0 = load to new address, if save: 0 = dunno, but okay...
151+
jmp SETLFS
155152

156153
.disk_io_error
157154
; Accumulator contains BASIC error code

0 commit comments

Comments
 (0)