mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 04:28:05 +11:00
blockdev: fix bug recently introduced in load cmd
It would always load one byte less than told... This time it's right on the money :)
This commit is contained in:
parent
4b423a9dc6
commit
00778f73e1
@ -64,13 +64,14 @@ blkLoad:
|
|||||||
ld hl, (SHELL_MEM_PTR)
|
ld hl, (SHELL_MEM_PTR)
|
||||||
call blkGetC
|
call blkGetC
|
||||||
jr nz, .ioError
|
jr nz, .ioError
|
||||||
jr .intoLoop ; properly dec B + check on first iteration.
|
jr .intoLoop ; we'v already called blkGetC. don't call it
|
||||||
|
; again.
|
||||||
.loop:
|
.loop:
|
||||||
|
call blkGetC
|
||||||
|
.intoLoop:
|
||||||
ld (hl), a
|
ld (hl), a
|
||||||
inc hl
|
inc hl
|
||||||
call blkGetC
|
|
||||||
jr nz, .loopend
|
jr nz, .loopend
|
||||||
.intoLoop:
|
|
||||||
djnz .loop
|
djnz .loop
|
||||||
.loopend:
|
.loopend:
|
||||||
; success
|
; success
|
||||||
|
Loading…
Reference in New Issue
Block a user