version 1.1, 2004/11/05 14:27:33
|
version 1.2, 2005/11/03 19:08:47
|
Line 17
|
Line 17
|
\ added Send File function KM |
\ added Send File function KM |
\ 2004-09-17 Ported to gforth from kForth; use WRITE-FILE instead |
\ 2004-09-17 Ported to gforth from kForth; use WRITE-FILE instead |
\ of "write" to store data in capture file KM |
\ of "write" to store data in capture file KM |
|
\ 2005-09-28 Fixed problem associated with read-line KM |
|
\ |
include strings.fs |
include strings.fs |
include ansi.fs |
include ansi.fs |
include syscalls386.fs |
include syscalls386.fs |
Line 205 FALSE VALUE ?sending
|
Line 206 FALSE VALUE ?sending
|
|
|
?sending ms@ last-send-time @ - LINE-DELAY >= AND IF |
?sending ms@ last-send-time @ - LINE-DELAY >= AND IF |
ms@ last-send-time ! |
ms@ last-send-time ! |
send-line-buffer 256 txfid @ read-line nip 0= IF |
send-line-buffer 256 txfid @ read-line IF |
com @ swap send-line-buffer swap serial_write drop |
\ error reading file |
ELSE |
2drop txfid @ close-file drop FALSE to ?sending |
txfid @ close-file drop |
|
FALSE to ?sending |
|
save_cursor |
save_cursor |
HELP_ROW HELP_BACK_COLOR clear-line |
HELP_ROW HELP_BACK_COLOR clear-line |
HELP_TEXT_COLOR foreground |
HELP_TEXT_COLOR foreground |
." <<Terminal: Send Completed!>>" |
." Error reading file!" |
restore_cursor set-terminal-colors |
restore_cursor set-terminal-colors |
|
ELSE |
|
FALSE = IF |
|
\ reached EOF |
|
drop txfid @ close-file drop |
|
FALSE to ?sending |
|
save_cursor |
|
HELP_ROW HELP_BACK_COLOR clear-line |
|
HELP_TEXT_COLOR foreground |
|
." <<Terminal: Send Completed!>>" |
|
restore_cursor set-terminal-colors |
|
ELSE |
|
com @ swap send-line-buffer swap serial_write drop |
|
THEN |
THEN |
THEN |
THEN |
THEN |
|
|