OSDN Git Service

bug bug bug...
[fast-forth/master.git] / MSP430_COND / Test.f
1 \ ------------------
2 \ BOOT.f
3 \ ------------------
4
5 \ must be preprocessed with yourtarget.pat file
6
7 \ REGISTERS USAGE
8 \ R4 to R7 must be saved before use and restored after
9 \ scratch registers Y to S are free for use
10 \ under interrupt, IP is free for use
11
12 \ PUSHM order : PSP,TOS, IP,  S,  T,  W,  X,  Y, R7, R6, R5, R4
13 \ example : PUSHM IP,Y
14 \
15 \ POPM  order :  R4, R5, R6, R7,  Y,  X,  W,  T,  S, IP,TOS,PSP
16 \ example : POPM Y,IP
17
18 \ ASSEMBLER conditionnal usage after IF UNTIL WHILE : S< S>= U< U>= 0= 0<> 0>=
19 \ ASSEMBLER conditionnal usage before GOTO ?GOTO     : S< S>= U< U>= 0= 0<> <0 
20
21 \ FORTH conditionnal usage before IF UNTIL WHILE : 0= 0< = < > U<
22
23 \ NOECHO      ; if an error occurs, comment this line before new download to find it.
24
25
26 \ This source is loaded when FastForth detects a SD_Card memory
27
28 \ =======================================================
29 \ then, start what you want FastForth to do
30 \ =======================================================
31
32 \ ECHO      ; if an error occurs during download, uncomment this line then download again
33
34 \ PWR_HERE  ; uncomment if you really want to preserve all previous and volatile applications
35
36
37
38 : BOOT
39         ECHO CR
40         ."    1 set RTC" CR
41         ."    2 add SD_TOOLS" CR
42         ."    3 Test ANS94" CR
43         ."    your choice : "
44     
45         KEY
46         $30 - 
47         DUP 1 = 
48         IF .
49             LOAD" RTC.4TH"  \ perform (reset to) PWR_STATE ==> remove BOOT 
50         ELSE DUP 2 =
51             IF .
52                 LOAD" SD_TOOLS.4th" \ performs PWR_HERE
53             ELSE DUP 3 =
54                 IF .
55                     LOAD" CORETEST.4TH"
56                 ELSE
57                     DROP 0 .
58                 THEN
59             THEN
60     THEN
61     CR
62 ;
63
64 BOOT