mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-09-08 06:54:24 +00:00
resolve conflicts with 'master'
This commit is contained in:
commit
9e3642c589
@ -228,7 +228,7 @@ telnet_main_entry:
|
|||||||
ldax #iac_response_buffer
|
ldax #iac_response_buffer
|
||||||
jsr tcp_send
|
jsr tcp_send
|
||||||
: jsr get_key_if_available
|
: jsr get_key_if_available
|
||||||
beq @check_timeout
|
bcc @check_timeout
|
||||||
ldx #0
|
ldx #0
|
||||||
stx tcp_send_data_len
|
stx tcp_send_data_len
|
||||||
stx tcp_send_data_len+1
|
stx tcp_send_data_len+1
|
||||||
|
@ -18,15 +18,17 @@ abort_key: .byte $9b ; ESC
|
|||||||
|
|
||||||
; use Apple 2 monitor ROM function to read from keyboard
|
; use Apple 2 monitor ROM function to read from keyboard
|
||||||
; inputs: none
|
; inputs: none
|
||||||
; outputs: A contains ASCII code of key pressed
|
; outputs: A contains ASCII value of key just pressed
|
||||||
get_key = $fd0c
|
get_key = $fd0c
|
||||||
|
|
||||||
; inputs: none
|
; inputs: none
|
||||||
; outputs: A contains ASCII value of key just pressed (0 if no key pressed)
|
; outputs: sec if key pressed, clear otherwise
|
||||||
|
; A contains ASCII value of key just pressed
|
||||||
get_key_if_available:
|
get_key_if_available:
|
||||||
|
sec
|
||||||
lda $c000 ; current key pressed
|
lda $c000 ; current key pressed
|
||||||
bmi got_key
|
bmi got_key
|
||||||
lda #0
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; process inbound ip packets while waiting for a keypress
|
; process inbound ip packets while waiting for a keypress
|
||||||
|
@ -879,6 +879,7 @@ aDDigE rts
|
|||||||
|
|
||||||
ProcOut
|
ProcOut
|
||||||
lda kta,y ; keyboard to ASCII
|
lda kta,y ; keyboard to ASCII
|
||||||
|
cmp #$ff
|
||||||
beq POrts ; ignore key
|
beq POrts ; ignore key
|
||||||
cmp #$fe
|
cmp #$fe
|
||||||
beq CmdKey ; command key
|
beq CmdKey ; command key
|
||||||
@ -1248,7 +1249,7 @@ DEL2 ; first col
|
|||||||
ldx CV
|
ldx CV
|
||||||
beq DELee ; odd: top left corner
|
beq DELee ; odd: top left corner
|
||||||
dex
|
dex
|
||||||
ldy #79
|
ldy #Cols-1
|
||||||
jsr Plot
|
jsr Plot
|
||||||
ldy CH
|
ldy CH
|
||||||
|
|
||||||
@ -1315,14 +1316,14 @@ US1 ; -- new line: --
|
|||||||
jsr SLV
|
jsr SLV
|
||||||
; -- copy even col chars --
|
; -- copy even col chars --
|
||||||
bit $c055
|
bit $c055
|
||||||
ldy #$27 ; even col 39
|
ldy #Cols/2-1 ; even col 39
|
||||||
US2 lda (xVector),y ; copy char
|
US2 lda (xVector),y ; copy char
|
||||||
sta (zVector),y
|
sta (zVector),y
|
||||||
dey
|
dey
|
||||||
bpl US2
|
bpl US2
|
||||||
; -- copy odd col chars --
|
; -- copy odd col chars --
|
||||||
bit $c054
|
bit $c054
|
||||||
ldy #$27 ; odd col 39
|
ldy #Cols/2-1 ; odd col 39
|
||||||
US3 lda (xVector),y ; copy char
|
US3 lda (xVector),y ; copy char
|
||||||
sta (zVector),y
|
sta (zVector),y
|
||||||
dey
|
dey
|
||||||
@ -1369,14 +1370,14 @@ DS1 ; -- new line: --
|
|||||||
jsr SLV
|
jsr SLV
|
||||||
; -- copy even col chars --
|
; -- copy even col chars --
|
||||||
bit $c055
|
bit $c055
|
||||||
ldy #$27 ; even col 39
|
ldy #Cols/2-1 ; even col 39
|
||||||
DS2 lda (xVector),y ; copy char
|
DS2 lda (xVector),y ; copy char
|
||||||
sta (zVector),y
|
sta (zVector),y
|
||||||
dey
|
dey
|
||||||
bpl DS2
|
bpl DS2
|
||||||
; -- copy odd col chars --
|
; -- copy odd col chars --
|
||||||
bit $c054
|
bit $c054
|
||||||
ldy #$27 ; odd col 39
|
ldy #Cols/2-1 ; odd col 39
|
||||||
DS3 lda (xVector),y ; copy char
|
DS3 lda (xVector),y ; copy char
|
||||||
sta (zVector),y
|
sta (zVector),y
|
||||||
dey
|
dey
|
||||||
@ -1450,7 +1451,7 @@ ErLn jsr SLV ; line start in xVector
|
|||||||
|
|
||||||
; -- erase even col chars --
|
; -- erase even col chars --
|
||||||
ErLn_ bit $c055
|
ErLn_ bit $c055
|
||||||
ldy #$27 ; even col 39
|
ldy #Cols/2-1 ; even col 39
|
||||||
lda #$20|$80 ; load space
|
lda #$20|$80 ; load space
|
||||||
EL1 sta (xVector),y ; clear char
|
EL1 sta (xVector),y ; clear char
|
||||||
dey
|
dey
|
||||||
@ -1458,7 +1459,7 @@ EL1 sta (xVector),y ; clear char
|
|||||||
|
|
||||||
; -- erase odd col chars --
|
; -- erase odd col chars --
|
||||||
bit $c054
|
bit $c054
|
||||||
ldy #$27 ; odd col 39
|
ldy #Cols/2-1 ; odd col 39
|
||||||
EL2 sta (xVector),y ; clear char
|
EL2 sta (xVector),y ; clear char
|
||||||
dey
|
dey
|
||||||
bpl EL2
|
bpl EL2
|
||||||
@ -1484,7 +1485,7 @@ ErEnLn
|
|||||||
bcs EEL2 ; odd crsr col
|
bcs EEL2 ; odd crsr col
|
||||||
EEL1 sta (BASL),y ; clear char
|
EEL1 sta (BASL),y ; clear char
|
||||||
EEL2 iny
|
EEL2 iny
|
||||||
cpy #$28 ; even pos 40?
|
cpy #Cols/2 ; even pos 40?
|
||||||
bne EEL1 ; next char
|
bne EEL1 ; next char
|
||||||
|
|
||||||
; -- erase odd col chars --
|
; -- erase odd col chars --
|
||||||
@ -1492,7 +1493,7 @@ EEL2 iny
|
|||||||
ldy tmp1 ; restore start
|
ldy tmp1 ; restore start
|
||||||
EEL3 sta (BASL),y ; clear char
|
EEL3 sta (BASL),y ; clear char
|
||||||
iny
|
iny
|
||||||
cpy #$28 ; odd pos 40?
|
cpy #Cols/2 ; odd pos 40?
|
||||||
bne EEL3 ; next char
|
bne EEL3 ; next char
|
||||||
|
|
||||||
sta sCrsrChar ; del char ..
|
sta sCrsrChar ; del char ..
|
||||||
@ -1710,7 +1711,7 @@ ltsc;_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
|
|||||||
; input for sending over the serial
|
; input for sending over the serial
|
||||||
; line.
|
; line.
|
||||||
;
|
;
|
||||||
; ascii = $00 means ignore key
|
; ascii = $ff means ignore key
|
||||||
; ascii = $fe means do something
|
; ascii = $fe means do something
|
||||||
; complicated (command key)
|
; complicated (command key)
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
@ -1719,7 +1720,7 @@ kta ;_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
|
|||||||
|
|
||||||
; --- Control chars ------------------------------------------------
|
; --- Control chars ------------------------------------------------
|
||||||
; {←} {↓} {↑}
|
; {←} {↓} {↑}
|
||||||
; ^A ^B ^C ^D ^E ^F ^G ^H ^I ^J ^K ^L ^M ^N ^O
|
; ^@ ^A ^B ^C ^D ^E ^F ^G ^H ^I ^J ^K ^L ^M ^N ^O
|
||||||
.byt $00,$01,$02,$03,$04,$05,$06,$07,$fe,$09,$fe,$fe,$0c,$0d,$0e,$0f ; 0_
|
.byt $00,$01,$02,$03,$04,$05,$06,$07,$fe,$09,$fe,$fe,$0c,$0d,$0e,$0f ; 0_
|
||||||
; {→}
|
; {→}
|
||||||
; ^P ^Q ^R ^S ^T ^U ^V ^W ^X ^Y ^Z ^[ ^\ ^] ^^ ^_
|
; ^P ^Q ^R ^S ^T ^U ^V ^W ^X ^Y ^Z ^[ ^\ ^] ^^ ^_
|
||||||
|
@ -76,11 +76,12 @@ special_key_table2:
|
|||||||
; outputs: A contains ASCII value of key just pressed
|
; outputs: A contains ASCII value of key just pressed
|
||||||
get_key:
|
get_key:
|
||||||
jsr get_key_if_available
|
jsr get_key_if_available
|
||||||
beq get_key
|
bcc get_key
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; inputs: none
|
; inputs: none
|
||||||
; outputs: A contains ASCII value of key just pressed (A=0 and ZF=1 if no key pressed, sometimes only ZF is tested by the caller)
|
; outputs: sec (CF=1) if key pressed, clear otherwise
|
||||||
|
; A contains ASCII value of key just pressed
|
||||||
get_key_if_available:
|
get_key_if_available:
|
||||||
lda BRKKEY
|
lda BRKKEY
|
||||||
bne @no_abort
|
bne @no_abort
|
||||||
@ -118,12 +119,11 @@ get_key_if_available:
|
|||||||
@done:
|
@done:
|
||||||
ldx #255 ; if K: handler hasn't been called, "consume" the key press
|
ldx #255 ; if K: handler hasn't been called, "consume" the key press
|
||||||
stx CH ; and clear the zero flag which is a return value
|
stx CH ; and clear the zero flag which is a return value
|
||||||
; php
|
|
||||||
; ldx CH_save ; for debugging purposes, return the scan code in X
|
; ldx CH_save ; for debugging purposes, return the scan code in X
|
||||||
; plp
|
sec
|
||||||
rts
|
rts
|
||||||
nokey:
|
nokey:
|
||||||
lda #0
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; inputs: A - keycode (CH)
|
; inputs: A - keycode (CH)
|
||||||
@ -154,7 +154,7 @@ get_key_ip65:
|
|||||||
; process inbound ip packets while waiting for a keypress
|
; process inbound ip packets while waiting for a keypress
|
||||||
jsr ip65_process
|
jsr ip65_process
|
||||||
jsr get_key_if_available
|
jsr get_key_if_available
|
||||||
beq get_key_ip65
|
bcc get_key_ip65
|
||||||
rts
|
rts
|
||||||
|
|
||||||
;check whether the abort key is being pressed
|
;check whether the abort key is being pressed
|
||||||
@ -162,15 +162,12 @@ get_key_ip65:
|
|||||||
;outputs: CF=1 if abort key pressed, clear otherwise
|
;outputs: CF=1 if abort key pressed, clear otherwise
|
||||||
check_for_abort_key:
|
check_for_abort_key:
|
||||||
lda abort_key ; is "abort" enabled?
|
lda abort_key ; is "abort" enabled?
|
||||||
beq @no_abort ; no
|
beq nokey ; no
|
||||||
lda BRKKEY
|
lda BRKKEY
|
||||||
bne @no_abort
|
bne nokey
|
||||||
dec BRKKEY
|
dec BRKKEY
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
@no_abort:
|
|
||||||
clc
|
|
||||||
rts
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,21 +24,26 @@ get_key:
|
|||||||
sty $cc ; cursor on
|
sty $cc ; cursor on
|
||||||
@loop:
|
@loop:
|
||||||
jsr get_key_if_available
|
jsr get_key_if_available
|
||||||
beq @loop
|
bcc @loop
|
||||||
ldy #1
|
ldy #1
|
||||||
sty $cc ; cursor off
|
sty $cc ; cursor off
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; use C64 Kernel ROM function to read a key
|
; use C64 Kernel ROM function to read a key
|
||||||
; inputs: none
|
; inputs: none
|
||||||
; outputs: A contains ASCII value of key just pressed (0 if no key pressed)
|
; outputs: sec if key pressed, clear otherwise
|
||||||
get_key_if_available = $f142 ; not officially documented - where F13E (GETIN) falls through to if device # is 0 (KEYBD)
|
; A contains ASCII value of key just pressed
|
||||||
|
get_key_if_available:
|
||||||
|
jsr $f142 ; not officially documented - where F13E (GETIN) falls through to if device # is 0 (KEYBD)
|
||||||
|
beq no_key
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
|
||||||
; process inbound ip packets while waiting for a keypress
|
; process inbound ip packets while waiting for a keypress
|
||||||
get_key_ip65:
|
get_key_ip65:
|
||||||
jsr ip65_process
|
jsr ip65_process
|
||||||
jsr get_key_if_available
|
jsr get_key_if_available
|
||||||
beq get_key_ip65
|
bcc get_key_ip65
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; check whether the abort key is being pressed
|
; check whether the abort key is being pressed
|
||||||
@ -47,16 +52,16 @@ get_key_ip65:
|
|||||||
check_for_abort_key:
|
check_for_abort_key:
|
||||||
lda $cb ; current key pressed
|
lda $cb ; current key pressed
|
||||||
cmp abort_key
|
cmp abort_key
|
||||||
bne @not_abort
|
bne no_key
|
||||||
@flush_loop:
|
@flush_loop:
|
||||||
jsr get_key_if_available
|
jsr get_key_if_available
|
||||||
bne @flush_loop
|
bcs @flush_loop
|
||||||
lda $cb ; current key pressed
|
lda $cb ; current key pressed
|
||||||
cmp abort_key
|
cmp abort_key
|
||||||
beq @flush_loop
|
beq @flush_loop
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
@not_abort:
|
no_key:
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ abort_key: .byte $18 ; RUN/STOP
|
|||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
||||||
; use Vic 20 Kernel ROM function to read a key
|
; use VIC 20 Kernel ROM function to read a key
|
||||||
; inputs: none
|
; inputs: none
|
||||||
; outputs: A contains ASCII value of key just pressed
|
; outputs: A contains ASCII value of key just pressed
|
||||||
get_key:
|
get_key:
|
||||||
@ -24,21 +24,26 @@ get_key:
|
|||||||
sty $cc ; cursor on
|
sty $cc ; cursor on
|
||||||
@loop:
|
@loop:
|
||||||
jsr get_key_if_available
|
jsr get_key_if_available
|
||||||
beq @loop
|
bcc @loop
|
||||||
ldy #1
|
ldy #1
|
||||||
sty $cc ; cursor off
|
sty $cc ; cursor off
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; use VIC 20 Kernel ROM function to read a key
|
; use VIC 20 Kernel ROM function to read a key
|
||||||
; inputs: none
|
; inputs: none
|
||||||
; outputs: A contains ASCII value of key just pressed (0 if no key pressed)
|
; outputs: sec if key pressed, clear otherwise
|
||||||
get_key_if_available = $f1f9 ; not officially documented - where F1f5 (GETIN) falls through to if device # is 0 (KEYBD)
|
; A contains ASCII value of key just pressed
|
||||||
|
get_key_if_available:
|
||||||
|
jsr $f1f9 ; not officially documented - where F1F5 (GETIN) falls through to if device # is 0 (KEYBD)
|
||||||
|
beq no_key
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
|
||||||
; process inbound ip packets while waiting for a keypress
|
; process inbound ip packets while waiting for a keypress
|
||||||
get_key_ip65:
|
get_key_ip65:
|
||||||
jsr ip65_process
|
jsr ip65_process
|
||||||
jsr get_key_if_available
|
jsr get_key_if_available
|
||||||
beq get_key_ip65
|
bcc get_key_ip65
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; check whether the abort key is being pressed
|
; check whether the abort key is being pressed
|
||||||
@ -47,16 +52,16 @@ get_key_ip65:
|
|||||||
check_for_abort_key:
|
check_for_abort_key:
|
||||||
lda $cb ; current key pressed
|
lda $cb ; current key pressed
|
||||||
cmp abort_key
|
cmp abort_key
|
||||||
bne @not_abort
|
bne no_key
|
||||||
@flush_loop:
|
@flush_loop:
|
||||||
jsr get_key_if_available
|
jsr get_key_if_available
|
||||||
bne @flush_loop
|
bcs @flush_loop
|
||||||
lda $cb ; current key pressed
|
lda $cb ; current key pressed
|
||||||
cmp abort_key
|
cmp abort_key
|
||||||
beq @flush_loop
|
beq @flush_loop
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
@not_abort:
|
no_key:
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
31
ip65/tcp.s
31
ip65/tcp.s
@ -185,7 +185,20 @@ tcp_listen:
|
|||||||
cmp tcp_state
|
cmp tcp_state
|
||||||
beq @listen_loop
|
beq @listen_loop
|
||||||
|
|
||||||
jmp tcp_connection_established
|
tcp_connection_established:
|
||||||
|
; inc the sequence number to cover the SYN we have sent
|
||||||
|
ldax #tcp_connect_sequence_number
|
||||||
|
stax acc32
|
||||||
|
ldax #$01
|
||||||
|
jsr add_16_32
|
||||||
|
|
||||||
|
set_expected_ack:
|
||||||
|
; set the expected ack number with current seq number
|
||||||
|
ldx #3
|
||||||
|
: lda tcp_connect_sequence_number,x
|
||||||
|
sta tcp_connect_expected_ack_number,x
|
||||||
|
dex
|
||||||
|
bpl :-
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; make outbound tcp connection
|
; make outbound tcp connection
|
||||||
@ -278,20 +291,6 @@ tcp_connect:
|
|||||||
sec ; if we got here, then the other side sent a RST or FIN, so signal an error to the caller
|
sec ; if we got here, then the other side sent a RST or FIN, so signal an error to the caller
|
||||||
rts
|
rts
|
||||||
@was_accepted:
|
@was_accepted:
|
||||||
tcp_connection_established:
|
|
||||||
; inc the sequence number to cover the SYN we have sent
|
|
||||||
ldax #tcp_connect_sequence_number
|
|
||||||
stax acc32
|
|
||||||
ldax #$01
|
|
||||||
jsr add_16_32
|
|
||||||
|
|
||||||
set_expected_ack:
|
|
||||||
; set the expected ack number with current seq number
|
|
||||||
ldx #3
|
|
||||||
: lda tcp_connect_sequence_number,x
|
|
||||||
sta tcp_connect_expected_ack_number,x
|
|
||||||
dex
|
|
||||||
bpl :-
|
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@ -726,6 +725,8 @@ tcp_process:
|
|||||||
ldax #$0001
|
ldax #$0001
|
||||||
jsr add_16_32 ; increment the ACK counter by 1, for the SYN we just received
|
jsr add_16_32 ; increment the ACK counter by 1, for the SYN we just received
|
||||||
|
|
||||||
|
jsr tcp_connection_established
|
||||||
|
|
||||||
lda #tcp_cxn_state_established
|
lda #tcp_cxn_state_established
|
||||||
sta tcp_state
|
sta tcp_state
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user