mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-10-14 05:24:07 +00:00
fixed bug whereby telnet packs larger than 256 bytes not completely processed
git-svn-id: http://svn.code.sf.net/p/netboot65/code@220 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
a2afcacc01
commit
2eca851609
@ -241,11 +241,6 @@ telnet_callback:
|
|||||||
lda tcp_inbound_data_length+1
|
lda tcp_inbound_data_length+1
|
||||||
sta buffer_length+1
|
sta buffer_length+1
|
||||||
|
|
||||||
;since we don't check the buffer length till the end of the loop, set 'buffer length' to be 1 less than the actual number of bytes
|
|
||||||
dec buffer_length
|
|
||||||
bpl :+
|
|
||||||
dec buffer_length+1
|
|
||||||
:
|
|
||||||
@next_byte:
|
@next_byte:
|
||||||
ldy #0
|
ldy #0
|
||||||
lda (buffer_ptr),y
|
lda (buffer_ptr),y
|
||||||
@ -358,11 +353,14 @@ telnet_callback:
|
|||||||
|
|
||||||
|
|
||||||
lda telnet_option
|
lda telnet_option
|
||||||
|
|
||||||
cmp #$18 ;terminal type
|
cmp #$18 ;terminal type
|
||||||
beq @do_terminaltype
|
beq @do_terminaltype
|
||||||
|
|
||||||
cmp #$1f
|
cmp #$1f
|
||||||
beq @do_naws
|
beq @do_naws
|
||||||
|
|
||||||
|
|
||||||
;if we get here, then it's a "do" command we don't honour
|
;if we get here, then it's a "do" command we don't honour
|
||||||
|
|
||||||
@iac_dont:
|
@iac_dont:
|
||||||
@ -418,9 +416,7 @@ telnet_callback:
|
|||||||
bne :-
|
bne :-
|
||||||
|
|
||||||
|
|
||||||
lda #$fb ;WILL
|
;fall through to send back 'will'
|
||||||
jmp @add_iac_response
|
|
||||||
|
|
||||||
|
|
||||||
@do_terminaltype:
|
@do_terminaltype:
|
||||||
lda #$fb ;WILL
|
lda #$fb ;WILL
|
||||||
@ -440,16 +436,20 @@ telnet_callback:
|
|||||||
bne :+
|
bne :+
|
||||||
inc buffer_ptr+1
|
inc buffer_ptr+1
|
||||||
:
|
:
|
||||||
dec buffer_length
|
lda buffer_length+1
|
||||||
lda #$ff
|
beq @last_page
|
||||||
cmp buffer_length
|
lda buffer_length
|
||||||
beq :+
|
bne @not_end_of_page
|
||||||
jmp @next_byte
|
|
||||||
:
|
|
||||||
|
|
||||||
dec buffer_length+1
|
dec buffer_length+1
|
||||||
bmi @finished
|
@not_end_of_page:
|
||||||
|
dec buffer_length
|
||||||
jmp @next_byte
|
jmp @next_byte
|
||||||
|
@last_page:
|
||||||
|
dec buffer_length
|
||||||
|
beq @finished
|
||||||
|
|
||||||
|
jmp @next_byte
|
||||||
|
|
||||||
@finished:
|
@finished:
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
Loading…
Reference in New Issue
Block a user