📄 bootinst.c
字号:
/*
* Boot installator.
* Author: Serge Vakulenko, <vak@kiae.su>
*/
#include <stdio.h>
#include <fcntl.h>
#include <dos.h>
#define BOOTFILE "boot.bin"
#define SAVEFILE "bootsav.bin"
#define SAVE2FILE "boot2sav.bin"
#define PartAddr 0x1be /* Offset to partition table */
#define ValidationAddr 0x1fe /* Offset to validation bytes */
#define MAGIC 0xaa55 /* Validation tag */
#define DISK1 0
#define DISK2 1
#define READ 0
#define WRITE 1
typedef struct PartitionEntry {
unsigned char bootIndicator;
unsigned char beginHead;
unsigned char beginSector;
unsigned char beginCyl;
unsigned char systemId;
unsigned char endHead;
unsigned char endSector;
unsigned char endCyl;
unsigned short relSectorLow;
unsigned short relSectorHigh;
unsigned short numSectorsLow;
unsigned short numSectorsHigh;
} PartitionEntry;
unsigned char bootRecord [512];
unsigned char bootProg [512];
char head1 [] = "谀履哪哪哪哪履哪穆哪哪履哪哪哪哪哪哪哪履哪哪哪哪哪哪哪履哪哪哪哪履哪哪哪哪縗n";
char head2 [] = "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -