Skip to content

Commit 6a84372

Browse files
committed
fix bug
1 parent 69e38ec commit 6a84372

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/6502/ch395_read_recv_buf_sn.s

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
;;@inputA Socket id
99
;;@inputY Length low
1010
;;@inputX length high
11-
;;@inputMEM_RES tr to fill
11+
;;@inputMEM_RES ptr to fill
1212
;;@modifyMEM_RESB tmp value
1313
sty RESB ; Save length
1414
stx RESB+1
@@ -18,8 +18,8 @@
1818
sta CH395_DATA_PORT
1919

2020
lda RESB
21-
sta CH395_DATA_PORT ; set ptr2
22-
stx CH395_DATA_PORT ; set ptr2
21+
sta CH395_DATA_PORT ; set length
22+
stx CH395_DATA_PORT ; set length to receive
2323

2424
lda RESB+1
2525
beq @decrement
@@ -33,6 +33,7 @@
3333
sta (RES),y
3434
iny
3535
bne @loop2
36+
inc RES+1
3637
inx
3738
cpx RESB+1
3839
bne @loop2

0 commit comments

Comments
 (0)