#include #include "aplinks.h" #include "disp_ctr.h" int set_mode(int mode, FAT_RANGE *fat_range, DIR_RANGE *dir_range, DATA_RANGE *data_range) { switch(mode){ case 1: fat_range->start = 0; fat_range->end = (FAT_SIZE_128 - 1); /* 11 */ dir_range->start = FAT_SIZE_128; /* 12 */ dir_range->end = (FAT_SIZE_128 + DIR_SIZE_128 - 1); /* 43 */ data_range->start = (FAT_SIZE_128 + DIR_SIZE_128); /* 44 */ data_range->end = (FAT_SIZE_128 + DIR_SIZE_128 + DATA_SIZE_128 - 1); /* 1023 */ break; case 5: fat_range->start = 0; fat_range->end = (FAT_SIZE_512 - 1); /* 47 */ dir_range->start = FAT_SIZE_512; /* 48 */ dir_range->end = (FAT_SIZE_512 + DIR_SIZE_512 - 1); /* 79 */ data_range->start = (FAT_SIZE_512 + DIR_SIZE_512); /* 80 */ data_range->end = (FAT_SIZE_512 + DIR_SIZE_512 + DATA_SIZE_512 - 1); /* 4095 */ break; default: xyc_printf(1, CAPA_Y, 2, "無効な mode 指定です"); break; } return 0; }