Skip to content

Commit

Permalink
using a 65c02 instruction where it shouldn't be
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Oliver Moll <svolli@svolli.de>
  • Loading branch information
Sven Oliver Moll committed Nov 29, 2024
1 parent f1e10c7 commit c73bee8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions src/65c02/mon/interndrive.s
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

.importzp FORMAT

error:
jmp prterr
blockrw:
jsr skipspace
jsr uppercase
Expand All @@ -25,26 +27,25 @@ blockrw:
:
sta FORMAT
inx

jsr getaddr
bcc :+
jmp prterr
:
bcs error
sta ID_LBA+0
sty ID_LBA+1

jsr getaddr
bcc :+
jmp prterr
:
bcs error
sta ID_MEM+0
sty ID_MEM+1

lda FORMAT
cmp #'W'
lda #$00
rol
rol ; Y=0, unless A>='W' -> Y=1
tay
sta IDREAD,y ; with Y=1 it's IDWRIT
lda IDREAD,y
bne :+
bne :+ ; i/o error occured
rts
:
jsr PRINT
Expand Down
2 changes: 1 addition & 1 deletion src/65c02/native_rom/kernel.s
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ boota:

jsr PRINT
.byte "Go",10,0
bra execram
beq execram ; will be run using NMOS 6502

xgensine:
ldx #$02 ; tools bank starts with jmp ($e003,x)
Expand Down

0 comments on commit c73bee8

Please sign in to comment.