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

📄 getscore.c

📁 经典的老游戏digger的源代码.提起digger相信很多人会回忆起曾经为了它挑灯夜战的时光
💻 C
字号:
/* Digger Remastered
   Copyright (c) Andrew Jenner 1998-2004 */

/* GETSCORE.C - retrieve original Digger score table
   Compile with Turbo C 2.01 (http://community.borland.com/museum)
*/

#include <dos.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>

void main(int argc,char *argv[])
{
  int dr,r;
  char buffer[512];
  FILE *out;
  if (argc<2) {
    printf("Syntax: GETSCORE <floppy drive letter>\n");
    exit(1);
  }
  dr=toupper(argv[1][0])-'A';
  _DL=dr;
  _BX=(int)buffer;
  _ES=_DS;
  _DH=0;      /* Head 0 */
  _AX=0x201;  /* Interrupt 0x13 function 2 - Read sectors, AL=1 sector */
  _CX=0x2707; /* Track 0x27, sector 7 */
  geninterrupt(0x13);
  r=_AL;
  if (r!=0) {
    printf("Error: Could not read sector (0x%02x)\n",r);
    exit(1);
  }
  out=fopen("digger.sco","wb");
  if (out==NULL) {
    printf("Error: Could not open output file: %s\n",sys_errlist[errno]);
    exit(1);
  }
  fwrite(buffer,512,1,out);
  fclose(out);
}

⌨️ 快捷键说明

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