mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-17 06:18:06 +11:00
apps/at28w: fix argument byte order
This commit is contained in:
parent
14cc2fb785
commit
e7c07cdd9a
@ -22,13 +22,15 @@ at28wMain:
|
|||||||
.db 0b111, 0b101, 0
|
.db 0b111, 0b101, 0
|
||||||
|
|
||||||
at28wInner:
|
at28wInner:
|
||||||
ld hl, (AT28W_MAXBYTES)
|
; Reminder: words in parseArgs aren't little endian. High byte is first.
|
||||||
ld b, h
|
ld a, (AT28W_MAXBYTES)
|
||||||
ld c, l
|
ld b, a
|
||||||
|
ld a, (AT28W_MAXBYTES+1)
|
||||||
|
ld c, a
|
||||||
ld hl, AT28W_MEMSTART
|
ld hl, AT28W_MEMSTART
|
||||||
call at28wBCZero
|
call at28wBCZero
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
; BC is zero, default to 0x2000 (8x, the size of the AT28)
|
; BC is zero, default to 0x2000 (8k, the size of the AT28)
|
||||||
ld bc, 0x2000
|
ld bc, 0x2000
|
||||||
.loop:
|
.loop:
|
||||||
call blkGetC
|
call blkGetC
|
||||||
|
@ -64,10 +64,10 @@ init:
|
|||||||
a28wCmd:
|
a28wCmd:
|
||||||
.db "a28w", 0b011, 0b001, 0
|
.db "a28w", 0b011, 0b001, 0
|
||||||
ld a, (hl)
|
ld a, (hl)
|
||||||
ld (AT28W_MAXBYTES+1), a
|
ld (AT28W_MAXBYTES), a
|
||||||
inc hl
|
inc hl
|
||||||
ld a, (hl)
|
ld a, (hl)
|
||||||
ld (AT28W_MAXBYTES), a
|
ld (AT28W_MAXBYTES+1), a
|
||||||
jp at28wInner
|
jp at28wInner
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user