OSDN Git Service

d36673963e95a97939c8caba087dffc93b328d39
[fast-forth/master.git] / config / scite / AS_MSP430 / SendToSD.ttl
1
2 ; param1 = this macro filename
3 ; param2 = pathname of file to write in SD_CARD
4 ; param3 = /C = default COM saved in TERATERM.INI with all its parameters.
5
6 basename fname param2       ; fname = file.ext of param2
7 strinsert fname 1 '\'       ; fname = \file.ext, to force absolute path
8
9 testlink
10 if result=0 connect  param3
11
12 sendln '     $0A BASE ! ECHO STOP' ; blanks are added to pass LPMx wake up time...
13
14 inputbox 'here you can add a path to the file: ' 'Send a File to SD_CARD target' fname
15
16 sendln 'TERM2SD" ' inputstr '"'    ; send to FastForth the command TERM2SD" \file.ext" ...with optionnal path added in inputbox
17
18 sendfile param2 0       ; binary flag = 0 to send text file
19
20 sendln #4               ; send ETX to ask FastForth to close file
21
22 showtt 0
23
24 ; end