fl { PropForth3.4 2010.9.24 } : address ." Input Address(hex) > " 0 tmp W! begin begin \ key dup 30 < if d if drop 1 else drop 0 then key dup 30 < if d = if tmp W@ 0> if 1 else 0 then else 0 then else dup 3a 3f between if drop 0 else dup 47 60 between if drop 0 else dup 66 > if drop 0 else dup emit tmp W@ 8 = if 9 0 do drop loop 0 tmp W! ." incorect input" cr ." Input Address(hex) > " 0 else todigit tmp dup W@ 1+ swap W! 0 then then then then then until tmp W@ 1 > if tmp W@ 1- 0 do swap i 1+ 4 * lshift or loop then \ convert data dup 200 u/mod drop if drop 0 tmp W! ." incorect input" cr ." Input Address(hex) > " 0 else 1 then until cr cr Block ; : MBR ." MBR(Master Boot Record)" ." Sector:0 " ." Address:0x0" cr cr 0 Block ; : BTB ." BTB(BIOS Parameter Block)" ." Sector:" first_sector W@ . ." Address:0x" BTB_addr L@ dup . cr cr Block ; : FAT ." FAT(File Allocation Table)" ." Sector:" first_sector W@ reserve_sector W@ + . ." Address:0x" FAT_addr L@ dup . cr cr Block ; : RDE ." RDE(Root Directory Entry)" ." Sector:" first_sector W@ reserve_sector W@ + num_fat W@ sector/fat W@ * + . ." Address:0x" RDE_addr L@ . cr cr RDE_addr L@ Block ; : info ." SDSC Information" cr ." firstSEctorNumbers 0x" first_sector W@ . cr ." bytePerSector 0x" byte/sector W@ . cr ." sectorsPerCluster 0x" sector/cluster W@ . cr ." reservedSectors 0x" reserve_sector W@ . cr ." numberOfFATS 0x" num_fat W@ . cr ." rootEntries 0x" root_entry W@ . cr ." sectorsPerFAT 0x" sector/fat W@ . cr ." bigTotalSectors 0x" total_sector L@ . cr ; : viewer sd_init ." Finished SD-card initialization" cr collect_info menu cr ." >" begin key dup emit cr dup 6a = if drop csd 0 cr cr else dup 6b = if drop cid 0 cr cr else dup 68 = if drop cr menu 0 cr cr else dup 73 = if drop cr address 0 cr cr else dup 6d = if drop cr MBR 0 cr cr else dup 62 = if drop cr BTB 0 cr cr else dup 66 = if drop cr FAT 0 cr cr else dup 72 = if drop cr RDE 0 cr cr else dup 6c = if drop cr info 0 cr cr else dup 71 = if drop 1 else drop 0 then then then then then then then then then then ." >" until ;