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

📄 write.cpp

📁 C++编写的一个测试电子盘或CF卡及所有存储设备的程序
💻 CPP
字号:

/* absread example */

#include <stdio.h>
#include <conio.h>
#include <process.h>
#include <dos.h>

int main(void)
{
  int i, strt, ch_out, sector;
  char buf[512];
  for(int j=3;j<515;j++)
  {
	buf[j-3]=j;
  }

  printf("Insert a diskette into drive A and press any key\n");
  getch();
  sector = 0;
  if (abswrite(0, 1, sector, &buf) != 0)
  {
     perror("Disk problem");
     exit(1);
  }
  printf("write OK\n");
  strt = 3;
  for (i=0; i<80; i++)
  {
     ch_out = buf[strt+i];
     putchar(ch_out);
  }
  printf("\n");
  return(0);
}

⌨️ 快捷键说明

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