Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jedeoric committed Feb 5, 2024
1 parent 381479c commit 794324b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/6502/_ch395_set_sour_port_sn.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.endif

.import popax

.importzp ptr1

.export _ch395_set_sour_port_sn
.export ch395_set_sour_port_sn
Expand Down
30 changes: 17 additions & 13 deletions src/6502/_ch395_write_send_buf_sn.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,13 @@
.endif

.import popax
.importzp ptr1,ptr2
.importzp ptr1, ptr2


.export _ch395_write_send_buf_sn
.export ch395_write_send_buf_sn

.proc _ch395_write_send_buf_sn
;;@proto void ch395_write_send_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET);
;;@brief Send data to socketid
;;@inputPARAM_socketid The socketid
jsr popax
sta length
stx length+1
jsr popax
sta ptr1
stx ptr1+1

.endproc

.proc ch395_write_send_buf_sn
;;@brief Send data to socketid
Expand All @@ -30,6 +19,8 @@
sty ptr2 ; Length
stx ptr2+1


entry_point_c:
ldy #CH395_WRITE_SEND_BUF_SN
sty CH395_COMMAND_PORT
sta CH395_DATA_PORT
Expand All @@ -43,7 +34,7 @@
@restart:
ldy #$00

loop:
@loop:
lda (ptr1),y
sta CH395_DATA_PORT
iny
Expand All @@ -58,3 +49,16 @@ loop:
jmp @exit
rts
.endproc

.proc _ch395_write_send_buf_sn
;;@proto void ch395_write_send_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET);
;;@brief Send data to socketid
;;@inputPARAM_socketid The socketid
jsr popax
sta ptr2
stx ptr2+1
jsr popax
sta ptr1
stx ptr1+1
jmp ch395_write_send_buf_sn::entry_point_c
.endproc

0 comments on commit 794324b

Please sign in to comment.