⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pcconst.c

📁 ertfs文件系统里面既有完整ucos程序
💻 C
字号:
/*
* EBS - RTFS (Real Time File Manager)
*
* Copyright EBS inc, 1996
* All rights reserved.
* This code may not be redistributed in source or linkable object form
* without the consent of its author.
*/
/*
 * Constant declarations 
 */

#define BUILDING_CONST 1


#include "pcdisk.h"


KS_CONSTANT char *upper_string = "0123456789ABCDEF";
KS_CONSTANT char *lower_string = "0123456789abcdef";


#if (VFAT)

//DM: 3/14/99: added space char to list. Made it first, since probably
//    most likely special character people will use.
KS_CONSTANT char KS_FAR _bad_alias_chars[17]=" ,;=+[]*?<>|\":/\\";
KS_CONSTANT char KS_FAR _bad_lfn_chars[10]="\\/:*?\"<>|";
KS_CONSTANT char KS_FAR * _reserved_names[13] = 
{
    "CON","PRN","NUL","AUX",
    "LPT1","LPT2","LPT3","LPT4",     
    "COM1","COM2","COM3","COM4", 0 };
#endif /* VFAT */



/* String constants */
KS_CONSTANT char string_star[2] = "*";
KS_CONSTANT char string_padded_dot_dot[9] = "..      ";
KS_CONSTANT char string_3_spaces[4] = "   ";
KS_CONSTANT char string_dot[2] = ".";
KS_CONSTANT char string_dot_dot[3] = "..";
KS_CONSTANT char string_fat_12[6] = "FAT12";
KS_CONSTANT char string_fat_16[6] = "FAT16";

KS_CONSTANT char string_null[1] = "";
// Changing to '/' and "//" should give unix style path separators. This
//  is not tested but it should work 
KS_CONSTANT char string_backslash[3] = "\\";
KS_CONSTANT char char_backslash = '\\';

/* Volume label for formatting */
KS_CONSTANT char volume_label[12] = "VOLUMELABEL";  /* 11 chars max (12th is NUL) */ 


#if (USE_FLOPPY)

/* Table of device paramters, The first field specifies the drive itself
   the second specifies the media installed, the rest are operating 
   parameters. Note: the order of the table is important. When trynig to 
   determine media type we find the drive type and then try each media
   type for that drive type in ascending order until one works. */

KS_CONSTANT _FL_DEVPARMS fl_devparms[7] = {
{360,  DT_360, DT_360, SP_1, SP_2, DR_250,  9, 40,  GPL_2A, GPF_50},
{1200, DT_12 , DT_12 , SP_1, SP_2, DR_500, 15, 80,  GPL_1B, GPF_54},
{360,  DT_12 , DT_360, SP_1, SP_2, DR_300,  9, 40,  GPL_2A, GPF_50},
{720,  DT_720, DT_720, SP_1, SP_2, DR_250,  9, 80,  GPL_2A, GPF_50},
{1440, DT_144, DT_144, SP_1, SP_2, DR_500, 18, 80,  GPL_1B, GPF_6C},
{720,  DT_144, DT_720, SP_1, SP_2, DR_250,  9, 80,  GPL_2A, GPF_50},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
};

#endif




#if (RTFS_WRITE)
/* Boot code in the sandisk partition block */
KS_CONSTANT byte part_boot[218] = {
0xFA, 0x33, 0xC0, 0x8E, 0xD0, 0xBC, 0x00, 0x7C, 0x8B, 0xF4, 0x50, 0x07, 0x50, 0x1F, 0xFB, 0xFC, 
0xBF, 0x00, 0x06, 0xB9, 0x00, 0x01, 0xF2, 0xA5, 0xEA, 0x1D, 0x06, 0x00, 0x00, 0xBE, 0xBE, 0x07, 
0xB3, 0x04, 0x80, 0x3C, 0x80, 0x74, 0x0E, 0x80, 0x3C, 0x00, 0x75, 0x1C, 0x83, 0xC6, 0x10, 0xFE, 
0xCB, 0x75, 0xEF, 0xCD, 0x18, 0x8B, 0x14, 0x8B, 0x4C, 0x02, 0x8B, 0xEE, 0x83, 0xC6, 0x10, 0xFE, 
0xCB, 0x74, 0x1A, 0x80, 0x3C, 0x00, 0x74, 0xF4, 0xBE, 0x8B, 0x06, 0xAC, 0x3C, 0x00, 0x74, 0x0B, 
0x56, 0xBB, 0x07, 0x00, 0xB4, 0x0E, 0xCD, 0x10, 0x5E, 0xEB, 0xF0, 0xEB, 0xFE, 0xBF, 0x05, 0x00, 
0xBB, 0x00, 0x7C, 0xB8, 0x01, 0x02, 0x57, 0xCD, 0x13, 0x5F, 0x73, 0x0C, 0x33, 0xC0, 0xCD, 0x13, 
0x4F, 0x75, 0xED, 0xBE, 0xA3, 0x06, 0xEB, 0xD3, 0xBE, 0xC2, 0x06, 0xBF, 0xFE, 0x7D, 0x81, 0x3D, 
0x55, 0xAA, 0x75, 0xC7, 0x8B, 0xF5, 0xEA, 0x00, 0x7C, 0x00, 0x00, 0x49, 0x6E, 0x76, 0x61, 0x6C, 
0x69, 0x64, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x74, 0x61, 0x62, 
0x6C, 0x65, 0x00, 0x45, 0x72, 0x72, 0x6F, 0x72, 0x20, 0x6C, 0x6F, 0x61, 0x64, 0x69, 0x6E, 0x67, 
0x20, 0x6F, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6E, 0x67, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 
0x6D, 0x00, 0x4D, 0x69, 0x73, 0x73, 0x69, 0x6E, 0x67, 0x20, 0x6F, 0x70, 0x65, 0x72, 0x61, 0x74, 
0x69, 0x6E, 0x67, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6D};


/* Boot code in the sandisk boot block */
KS_CONSTANT byte bootcode[201] = {
0xEB, 0x34, 0x90,  'M',  'S',  'D',  'O',  'S',  '5',  '.',  '0', 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFA, 0xB8, 0x00, 0x00, 0x8E, 0xD0, 0xBC, 0x00, 0x7C, 0x8E,
0xC0, 0x8E, 0xD8, 0xFB, 0xFC, 0xBE, 0x6A, 0x00, 0x81, 0xC6, 0x00, 0x7C, 0xAC, 0x0A, 0xC0, 0x74,
0x0A, 0xB4, 0x0E, 0xB7, 0x00, 0xB3, 0x07, 0xCD, 0x10, 0xEB, 0xF1, 0x33, 0xC0, 0xCD, 0x16, 0xCD,
0x19, 0xBE, 0xB3, 0x00, 0x81, 0xC6, 0x00, 0x7C, 0xEB, 0xE2, 0x0D, 0x0A, 0x4E, 0x6F, 0x6E, 0x2D,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x20, 0x64, 0x69, 0x73, 0x6B, 0x20, 0x6F, 0x72, 0x20, 0x64,
0x69, 0x73, 0x6B, 0x20, 0x65, 0x72, 0x72, 0x6F, 0x72, 0x0D, 0x0A, 0x52, 0x65, 0x70, 0x6C, 0x61,
0x63, 0x65, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6B, 0x65, 0x20, 0x61, 0x6E,
0x79, 0x20, 0x6B, 0x65, 0x79, 0x20, 0x77, 0x68, 0x65, 0x6E, 0x20, 0x72, 0x65, 0x61, 0x64, 0x79,
0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x44, 0x69, 0x73, 0x6B, 0x20, 0x42, 0x6F, 0x6F, 0x74, 0x20, 0x66,
0x61, 0x69, 0x6C, 0x75, 0x72, 0x65, 0x0D, 0x0A, 0x00};



KS_CONSTANT FORMAT_DEC_TREE f_d_c[7] = 
{
{1, 32, (dword) (512000ul/512)},    /* 1 sec per cluster for 0 to .5 M */
{8, 512, (dword) (5242880ul/512)},    /* 8 sec per cluster for 0 to 5 M */
{4, 512, (dword) (16777216ul/512)},   /* 8 sec per cluster for 0 to 16M */
{4, 512, (dword) (134217728ul/512)},  /* 4 sec per cluster for 16M to 128M */
{8, 512, (dword) (268435456ul/512)},  /* 8 sec per cluster for 128M to 256M */
{16,512, (dword) (536870912ul/512)},  /* ;16 sec per cluster for 128M to 256M */
{64,512, 0}                /* ;64 sec per cluster for > 256M */
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -