Having found the send speed setting, I got a bit interested in the file sending process itself. Tracing back a reference to "Sending....Press any key to stop. " text, I find sub_F013:
F013 ; XXX prepare to send (flags and prompt)
F013 sub_F013:
F013 FE 01 28 ldx thisFileRgnFirst_128 ; this file; file region start addr
F016 DF 67 stx word_67 ; XXX file sending related? ptr to next char to send?
F018 14 6D FF bset byte_6D $FF ; XXX flag? is file sending???
F01B 13 8B 01 05 brclr byte_8B 1 loc_F024 ; XXX flag?
F01F 14 8C FF bset byte_8C $FF ; XXX flag?
F022 20 03 bra loc_F027
F024 loc_F024:
F024 14 58 FF bset byte_58 $FF ; XXX flag?
F027 loc_F027:
F027 7F 00 A2 clr byte_A2 ; XXX flag? cleared in file sending???
F02A BD F7 4E jsr setcpLine1_F74E ; set cursor Line 1
F02D CE FE F9 ldx #aSending____pressAnyKeyToStop_ ; "Sending....Press any key to stop. "
F030 BD F6 69 jsr showText_F669 ; show nts text @ X
F033 39 rts
This sets up flags in a currently unknown manner prior to presenting the 'sending' prompt. The most interesting thing I found at this point is word_67 which seemed to be a 'current pointer in file' for the sending process.
F460 ; XXX get next char to send in A; V set if no more chars to send, clear if valid
F460 getNextCharToSend_F460:
F460 DE 67 ldx word_67 ; XXX file sending related? ptr to next char to send?
F462 BC 01 24 cpx curfileEnd_124 ; XXX file related (current file ptr end char (one past last)???) .4
F465 27 15 beq leaveDone_F47C ; finished
F467 BD EC 80 jsr selectRAMpageForFile_EC80 ; select in the relevant RAM page based on file number (byte_15D)
F46A A6 00 ldaa 0,x ; get char for file
F46C BD EC 79 jsr selectRAMPage0_EC79 ; select 32 KiB RAM page 0
F46F 08 inx
F470 DF 67 stx word_67 ; update send pointer
F472 81 09 cmpa #9 ; ascii < 9 translates to '?'
F474 2D 08 blt translateUnusual_F47E
F476 85 80 bita #$80 ; high ascii translates to '?'
F478 26 04 bne translateUnusual_F47E
F47A leaveValid_F47A:
F47A 0A clv
F47B 39 rts
F47C leaveDone_F47C:
F47C 0B sev
F47D 39 rts
F47E translateUnusual_F47E:
F47E 86 3F ldaa #'?'
F480 20 F8 bra leaveValid_F47A
This appears to be relatively straight-forward: verify not out-of-bounds, then get a character at the current 'send' location @ word_67, translate any weird ones (I don't think this should happen normally), and return. Overflow V is used to indicate failure (this is a common convention in these routines).
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.