1 ; -*- coding: utf-8 -*-
2 ; http://patorjk.com/software/taag/#p=display&f=Banner&t=Fast Forth
4 ; Fast Forth For Texas Instrument MSP430FRxxxx FRAM devices
5 ; Copyright (C) <2015> <J.M. THOORENS>
7 ; This program is free software: you can redistribute it and/or modify
8 ; it under the terms of the GNU General Public License as published by
9 ; the Free Software Foundation, either version 3 of the License, or
10 ; (at your option) any later version.
12 ; This program is distributed in the hope that it will be useful,
13 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ; GNU General Public License for more details.
17 ; You should have received a copy of the GNU General Public License
18 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
22 ; read logical sector and dump it
23 ; ----------------------------------;
24 FORTHWORD "SECT_D" ; sector. -- don't forget to add decimal point to your sector number (if < 65536)
25 ; ----------------------------------;
27 MOV TOS,X ; X = SectorH
28 MOV @PSP,W ; W = sectorL
29 CALL #readSectorWX ; W = SectorLO X = SectorHI
32 .word UDDOT ; ud -- display the double number
33 .word lit,BUFFER,lit,200h,DUMP;
35 ; ----------------------------------;
37 ; TIP : How to identify FAT16 or FAT32 SD_Card ?
38 ; 1 CLUSTER <==> FAT16 RootDIR
39 ; 2 CLUSTER <==> FAT32 RootDIR
40 ; ----------------------------------;
41 ; read first sector of Cluster and dump it
42 ; ----------------------------------;
43 FORTHWORD "CLUST_D" ; cluster. -- don't forget to add decimal point to your sector number (if < 65536)
44 ; ----------------------------------;
48 CALL #ComputeClusFrstSect ;
52 ; ----------------------------------;
54 ; dump FAT1 sector of last entry
55 ; ----------------------------------;
56 FORTHWORD "FAT_D" ;VWXY Display first FATsector
57 ; ----------------------------------;
61 MOV #0,TOS ; FATsectorHI = 0
63 ; ----------------------------------;
65 ;; dump FAT1 sector of last entry
66 ;; ----------------------------------;
67 ; FORTHWORD "FAT1_D" ; Display FATsector
68 ;; ----------------------------------;
72 ; MOV TOS,2(PSP) ; save TOS
74 ; MOV #0,TOS ; FATsectorHI = 0
76 ;; ----------------------------------;
78 ;; dump FAT1 sector of last entry
79 ;; ----------------------------------;
80 ; FORTHWORD "FAT2_D" ; Display FATsector
81 ;; ----------------------------------;
84 ;; ----------------------------------;
88 ; dump DIR sector of opened file or first sector of current DIR by default
89 ; ----------------------------------;
90 FORTHWORD "DIR_D" ; Display DIR sector of CurrentHdl or CurrentDir sector by default
91 ; ----------------------------------;
93 MOV TOS,2(PSP) ; save TOS
94 MOV &DIRClusterL,&ClusterL ;
95 MOV &DIRClusterH,&ClusterH ;
96 JMP Clust_ClustProcess ;
97 ; ----------------------------------;