1/* 2 * Copyright (c) 2011, ETH Zurich. All rights reserved. 3 * 4 * This file is distributed under the terms in the attached LICENSE file. 5 * If you do not find this file, copies can be found by writing to: 6 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 7 */ 8 9/* 10 * fat16_direntry.dev 11 * 12 * DESCRIPTION: FAT16 file system directory entry. 13 * 14 */ 15 16device fat_direntry msbfirst (addr b) "FAT 16 Directory Entry" { 17 18 regarray fn rw addr(b,0x00) [8] "Filename" type(uint8); 19 20 regarray ext rw addr(b,0x08) [3] "Filename extension" type(uint8); 21 22 register attr rw addr(b,0x0b) "File Attributes" { 23 _ 2 rsvd; 24 ar 1 "Archive"; 25 dir 1 "Directory"; 26 vlb 1 "Volume label"; 27 sys 1 "System file"; 28 hid 1 "Hidden"; 29 ro 1 "Read only"; 30 }; 31 32 register lwr rw addr(b,0x0c) "Base and extension case" { 33 _ 3 rsvd; 34 el 1 "Extension is lowercase"; 35 bl 1 "Base is lowercase"; 36 _ 3 rsvd; 37 }; 38 39 regtype time "Time" { 40 hour 5 "Hour"; 41 min 6 "Minutes"; 42 dsec 5 "Double seconds (0-29)"; 43 }; 44 45 regtype date "Date" { 46 yr 7 "Years from 1980"; 47 mnth 4 "Month of year"; 48 day 5 "Day of month"; 49 }; 50 51 register ctms rw addr(b,0x0d) "Creation deca-milliseconds (0-199)" type(uint8); 52 register ctime rw addr(b,0x0e) "Creation time" type(time); 53 register cdate rw addr(b,0x10) "Create date" type(date); 54 55 register adate rw addr(b,0x12) "Last access date" type(date); 56 57 // register eaind rw addr(b,0x14) "EA-Index (?)" type(uint16); 58 register starth rw addr(b,0x14) "Start cluster high bits (FAT32)" type(uint16); 59 60 register wtime rw addr(b,0x16) "Last write time" type(time); 61 register wdate rw addr(b,0x18) "Last write date" type(date); 62 63 register start rw addr(b,0x1a) "Starting cluster" type(uint16); 64 register size rw addr(b,0x1c) "File size" type(uint32); 65 66}; 67