mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-09-12 02:54:54 +00:00
resolve conflicts with 'master'
This commit is contained in:
commit
7d78bedcd5
@ -228,7 +228,7 @@ telnet_main_entry:
|
||||
ldax #iac_response_buffer
|
||||
jsr tcp_send
|
||||
: jsr get_key_if_available
|
||||
beq @check_timeout
|
||||
bcc @check_timeout
|
||||
ldx #0
|
||||
stx tcp_send_data_len
|
||||
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
|
||||
; inputs: none
|
||||
; outputs: A contains ASCII code of key pressed
|
||||
; outputs: A contains ASCII value of key just pressed
|
||||
get_key = $fd0c
|
||||
|
||||
; 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:
|
||||
sec
|
||||
lda $c000 ; current key pressed
|
||||
bmi got_key
|
||||
lda #0
|
||||
clc
|
||||
rts
|
||||
|
||||
; process inbound ip packets while waiting for a keypress
|
||||
|
@ -879,6 +879,7 @@ aDDigE rts
|
||||
|
||||
ProcOut
|
||||
lda kta,y ; keyboard to ASCII
|
||||
cmp #$ff
|
||||
beq POrts ; ignore key
|
||||
cmp #$fe
|
||||
beq CmdKey ; command key
|
||||
@ -1248,7 +1249,7 @@ DEL2 ; first col
|
||||
ldx CV
|
||||
beq DELee ; odd: top left corner
|
||||
dex
|
||||
ldy #79
|
||||
ldy #Cols-1
|
||||
jsr Plot
|
||||
ldy CH
|
||||
|
||||
@ -1315,14 +1316,14 @@ US1 ; -- new line: --
|
||||
jsr SLV
|
||||
; -- copy even col chars --
|
||||
bit $c055
|
||||
ldy #$27 ; even col 39
|
||||
ldy #Cols/2-1 ; even col 39
|
||||
US2 lda (xVector),y ; copy char
|
||||
sta (zVector),y
|
||||
dey
|
||||
bpl US2
|
||||
; -- copy odd col chars --
|
||||
bit $c054
|
||||
ldy #$27 ; odd col 39
|
||||
ldy #Cols/2-1 ; odd col 39
|
||||
US3 lda (xVector),y ; copy char
|
||||
sta (zVector),y
|
||||
dey
|
||||
@ -1369,14 +1370,14 @@ DS1 ; -- new line: --
|
||||
jsr SLV
|
||||
; -- copy even col chars --
|
||||
bit $c055
|
||||
ldy #$27 ; even col 39
|
||||
ldy #Cols/2-1 ; even col 39
|
||||
DS2 lda (xVector),y ; copy char
|
||||
sta (zVector),y
|
||||
dey
|
||||
bpl DS2
|
||||
; -- copy odd col chars --
|
||||
bit $c054
|
||||
ldy #$27 ; odd col 39
|
||||
ldy #Cols/2-1 ; odd col 39
|
||||
DS3 lda (xVector),y ; copy char
|
||||
sta (zVector),y
|
||||
dey
|
||||
@ -1450,7 +1451,7 @@ ErLn jsr SLV ; line start in xVector
|
||||
|
||||
; -- erase even col chars --
|
||||
ErLn_ bit $c055
|
||||
ldy #$27 ; even col 39
|
||||
ldy #Cols/2-1 ; even col 39
|
||||
lda #$20|$80 ; load space
|
||||
EL1 sta (xVector),y ; clear char
|
||||
dey
|
||||
@ -1458,7 +1459,7 @@ EL1 sta (xVector),y ; clear char
|
||||
|
||||
; -- erase odd col chars --
|
||||
bit $c054
|
||||
ldy #$27 ; odd col 39
|
||||
ldy #Cols/2-1 ; odd col 39
|
||||
EL2 sta (xVector),y ; clear char
|
||||
dey
|
||||
bpl EL2
|
||||
@ -1484,7 +1485,7 @@ ErEnLn
|
||||
bcs EEL2 ; odd crsr col
|
||||
EEL1 sta (BASL),y ; clear char
|
||||
EEL2 iny
|
||||
cpy #$28 ; even pos 40?
|
||||
cpy #Cols/2 ; even pos 40?
|
||||
bne EEL1 ; next char
|
||||
|
||||
; -- erase odd col chars --
|
||||
@ -1492,7 +1493,7 @@ EEL2 iny
|
||||
ldy tmp1 ; restore start
|
||||
EEL3 sta (BASL),y ; clear char
|
||||
iny
|
||||
cpy #$28 ; odd pos 40?
|
||||
cpy #Cols/2 ; odd pos 40?
|
||||
bne EEL3 ; next 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
|
||||
; line.
|
||||
;
|
||||
; ascii = $00 means ignore key
|
||||
; ascii = $ff means ignore key
|
||||
; ascii = $fe means do something
|
||||
; 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 ------------------------------------------------
|
||||
; {←} {↓} {↑}
|
||||
; ^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_
|
||||
; {→}
|
||||
; ^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
|
||||
get_key:
|
||||
jsr get_key_if_available
|
||||
beq get_key
|
||||
bcc get_key
|
||||
rts
|
||||
|
||||
; 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:
|
||||
lda BRKKEY
|
||||
bne @no_abort
|
||||
@ -118,12 +119,11 @@ get_key_if_available:
|
||||
@done:
|
||||
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
|
||||
; php
|
||||
; ldx CH_save ; for debugging purposes, return the scan code in X
|
||||
; plp
|
||||
sec
|
||||
rts
|
||||
nokey:
|
||||
lda #0
|
||||
clc
|
||||
rts
|
||||
|
||||
; inputs: A - keycode (CH)
|
||||
@ -154,7 +154,7 @@ get_key_ip65:
|
||||
; process inbound ip packets while waiting for a keypress
|
||||
jsr ip65_process
|
||||
jsr get_key_if_available
|
||||
beq get_key_ip65
|
||||
bcc get_key_ip65
|
||||
rts
|
||||
|
||||
;check whether the abort key is being pressed
|
||||
@ -162,15 +162,12 @@ get_key_ip65:
|
||||
;outputs: CF=1 if abort key pressed, clear otherwise
|
||||
check_for_abort_key:
|
||||
lda abort_key ; is "abort" enabled?
|
||||
beq @no_abort ; no
|
||||
beq nokey ; no
|
||||
lda BRKKEY
|
||||
bne @no_abort
|
||||
bne nokey
|
||||
dec BRKKEY
|
||||
sec
|
||||
rts
|
||||
@no_abort:
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
@ -24,21 +24,26 @@ get_key:
|
||||
sty $cc ; cursor on
|
||||
@loop:
|
||||
jsr get_key_if_available
|
||||
beq @loop
|
||||
bcc @loop
|
||||
ldy #1
|
||||
sty $cc ; cursor off
|
||||
rts
|
||||
|
||||
; use C64 Kernel ROM function to read a key
|
||||
; inputs: none
|
||||
; outputs: A contains ASCII value of key just pressed (0 if no key pressed)
|
||||
get_key_if_available = $f142 ; not officially documented - where F13E (GETIN) falls through to if device # is 0 (KEYBD)
|
||||
; outputs: sec if key pressed, clear otherwise
|
||||
; 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
|
||||
get_key_ip65:
|
||||
jsr ip65_process
|
||||
jsr get_key_if_available
|
||||
beq get_key_ip65
|
||||
bcc get_key_ip65
|
||||
rts
|
||||
|
||||
; check whether the abort key is being pressed
|
||||
@ -47,16 +52,16 @@ get_key_ip65:
|
||||
check_for_abort_key:
|
||||
lda $cb ; current key pressed
|
||||
cmp abort_key
|
||||
bne @not_abort
|
||||
bne no_key
|
||||
@flush_loop:
|
||||
jsr get_key_if_available
|
||||
bne @flush_loop
|
||||
bcs @flush_loop
|
||||
lda $cb ; current key pressed
|
||||
cmp abort_key
|
||||
beq @flush_loop
|
||||
sec
|
||||
rts
|
||||
@not_abort:
|
||||
no_key:
|
||||
clc
|
||||
rts
|
||||
|
||||
|
@ -16,7 +16,7 @@ abort_key: .byte $18 ; RUN/STOP
|
||||
|
||||
.code
|
||||
|
||||
; use Vic 20 Kernel ROM function to read a key
|
||||
; use VIC 20 Kernel ROM function to read a key
|
||||
; inputs: none
|
||||
; outputs: A contains ASCII value of key just pressed
|
||||
get_key:
|
||||
@ -24,21 +24,26 @@ get_key:
|
||||
sty $cc ; cursor on
|
||||
@loop:
|
||||
jsr get_key_if_available
|
||||
beq @loop
|
||||
bcc @loop
|
||||
ldy #1
|
||||
sty $cc ; cursor off
|
||||
rts
|
||||
|
||||
; use VIC 20 Kernel ROM function to read a key
|
||||
; inputs: none
|
||||
; outputs: A contains ASCII value of key just pressed (0 if no key pressed)
|
||||
get_key_if_available = $f1f9 ; not officially documented - where F1f5 (GETIN) falls through to if device # is 0 (KEYBD)
|
||||
; outputs: sec if key pressed, clear otherwise
|
||||
; 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
|
||||
get_key_ip65:
|
||||
jsr ip65_process
|
||||
jsr get_key_if_available
|
||||
beq get_key_ip65
|
||||
bcc get_key_ip65
|
||||
rts
|
||||
|
||||
; check whether the abort key is being pressed
|
||||
@ -47,16 +52,16 @@ get_key_ip65:
|
||||
check_for_abort_key:
|
||||
lda $cb ; current key pressed
|
||||
cmp abort_key
|
||||
bne @not_abort
|
||||
bne no_key
|
||||
@flush_loop:
|
||||
jsr get_key_if_available
|
||||
bne @flush_loop
|
||||
bcs @flush_loop
|
||||
lda $cb ; current key pressed
|
||||
cmp abort_key
|
||||
beq @flush_loop
|
||||
sec
|
||||
rts
|
||||
@not_abort:
|
||||
no_key:
|
||||
clc
|
||||
rts
|
||||
|
||||
|
31
ip65/tcp.s
31
ip65/tcp.s
@ -185,7 +185,20 @@ tcp_listen:
|
||||
cmp tcp_state
|
||||
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
|
||||
|
||||
; 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
|
||||
rts
|
||||
@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
|
||||
rts
|
||||
|
||||
@ -726,6 +725,8 @@ tcp_process:
|
||||
ldax #$0001
|
||||
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
|
||||
sta tcp_state
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user