turboc2.0 c语言编译器

  • o6_992700
    了解作者
  • 933KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-02 11:33
    上传日期
新手专用的c语言编程器 turboc2.0 c语言编译器 大学初学者
TURBOC2.rar
  • TURBOC2
  • LIB
  • MATHC.LIB
    21KB
  • GRAPHICS.LIB
    28.6KB
  • CC.LIB
    105.4KB
  • C0T.OBJ
    2.1KB
  • MATHM.LIB
    21KB
  • C0S.OBJ
    2.1KB
  • CH.LIB
    105KB
  • CS.LIB
    102.4KB
  • CL.LIB
    108.4KB
  • CM.LIB
    105.4KB
  • MATHS.LIB
    20.5KB
  • MATHL.LIB
    21KB
  • C0H.OBJ
    1.9KB
  • C0L.OBJ
    2KB
  • INIT.OBJ
    1.6KB
  • C0M.OBJ
    2.2KB
  • FP87.LIB
    3.5KB
  • C0C.OBJ
    2KB
  • EMU.LIB
    15KB
  • MATHH.LIB
    20.3KB
  • INCLUDE
  • SYS
  • STAT.H
    1020B
  • TYPES.H
    193B
  • TIMEB.H
    425B
  • LIMITS.H
    762B
  • GRAPHICS.H
    12KB
  • STRING.H
    2.2KB
  • MATH.H
    3KB
  • IO.H
    2.4KB
  • CONIO.H
    2.2KB
  • ALLOC.H
    1.3KB
  • CTYPE.H
    1.3KB
  • DIR.H
    1.4KB
  • STDLIB.H
    4.1KB
  • TIME.H
    1KB
  • ASSERT.H
    414B
  • STDARG.H
    469B
  • SHARE.H
    439B
  • MALLOC.H
    1.3KB
  • STDDEF.H
    672B
  • ERRNO.H
    2.6KB
  • FCNTL.H
    1.3KB
  • MEM.H
    1.3KB
  • PROCESS.H
    1.8KB
  • FLOAT.H
    3.9KB
  • DOS.H
    7.6KB
  • SETJMP.H
    547B
  • VALUES.H
    996B
  • STDIO.H
    6.7KB
  • SIGNAL.H
    1.2KB
  • BIOS.H
    532B
  • BGIOBJ.EXE
    12KB
  • WORDCNT.C
    3.8KB
  • THELP.DOC
    12.4KB
  • TC.EXE
    283.4KB
  • CINSTXFR.EXE
    18KB
  • WILDARGS.OBJ
    145B
  • MCINPUT.C
    4.1KB
  • CGA.BGI
    6.1KB
  • CPP.EXE
    58.1KB
  • README.COM
    4.1KB
  • PC3270.BGI
    5.9KB
  • MCALC.PRJ
    115B
  • TLINK.EXE
    21.2KB
  • RULES.ASI
    11.2KB
  • SSIGNAL.C
    3.7KB
  • MCDISPLY.C
    6.6KB
  • PBAR.PRO
    2.6KB
  • C0.ASM
    21.4KB
  • BUILD-C0.BAT
    663B
  • MAKE.EXE
    26.5KB
  • TCCONFIG.EXE
    15.1KB
  • MCALC.H
    7.6KB
  • BGIDEMO.C
    39.3KB
  • TCINST.EXE
    77.8KB
  • TRIP.CHR
    7.1KB
  • CPASDEMO.PAS
    4.3KB
  • MATHERR.C
    4.5KB
  • GETOPT.C
    4.1KB
  • TCHELP.TCH
    217KB
  • MCOMMAND.C
    18.5KB
  • IBM8514.BGI
    6.5KB
  • ATT.BGI
    6.1KB
  • THELP.COM
    27.6KB
  • HERC.BGI
    6KB
  • CPASDEMO.C
    1.6KB
  • TCC.EXE
    175.7KB
  • HELPME!.DOC
    17.5KB
  • GREP.COM
    6.8KB
  • TLIB.EXE
    30.4KB
  • OBJXREF.COM
    29.7KB
  • SANS.CHR
    5.3KB
  • SETARGV.ASM
    16.1KB
  • HELLO.C
    104B
  • MCUTIL.C
    14.8KB
  • MCALC.DOC
    2.1KB
  • MCALC.C
    3.5KB
内容介绍
/* GRAPHICS DEMO FOR TURBO C 2.0 Copyright (c) 1987,88 Borland International. All rights reserved. From the command line, use: tcc bgidemo graphics.lib */ #ifdef __TINY__ #error BGIDEMO will not run in the tiny model. #endif #include <dos.h> #include <math.h> #include <conio.h> #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <graphics.h> #define ESC 0x1b /* Define the escape key */ #define TRUE 1 /* Define some handy constants */ #define FALSE 0 /* Define some handy constants */ #define PI 3.14159 /* Define a value for PI */ #define ON 1 /* Define some handy constants */ #define OFF 0 /* Define some handy constants */ char *Fonts[] = { "DefaultFont", "TriplexFont", "SmallFont", "SansSerifFont", "GothicFont" }; char *LineStyles[] = { "SolidLn", "DottedLn", "CenterLn", "DashedLn", "UserBitLn" }; char *FillStyles[] = { "EmptyFill", "SolidFill", "LineFill", "LtSlashFill", "SlashFill", "BkSlashFill", "LtBkSlashFill", "HatchFill", "XHatchFill", "InterleaveFill", "WideDotFill", "CloseDotFill" }; char *TextDirect[] = { "HorizDir", "VertDir" }; char *HorizJust[] = { "LeftText", "CenterText", "RightText" }; char *VertJust[] = { "BottomText", "CenterText", "TopText" }; struct PTS { int x, y; }; /* Structure to hold vertex points */ int GraphDriver; /* The Graphics device driver */ int GraphMode; /* The Graphics mode value */ double AspectRatio; /* Aspect ratio of a pixel on the screen*/ int MaxX, MaxY; /* The maximum resolution of the screen */ int MaxColors; /* The maximum # of colors available */ int ErrorCode; /* Reports any graphics errors */ struct palettetype palette; /* Used to read palette info */ /* */ /* Function prototypes */ /* */ void Initialize(void); void ReportStatus(void); void TextDump(void); void Bar3DDemo(void); void RandomBars(void); void TextDemo(void); void ColorDemo(void); void ArcDemo(void); void CircleDemo(void); void PieDemo(void); void BarDemo(void); void LineRelDemo(void); void PutPixelDemo(void); void PutImageDemo(void); void LineToDemo(void); void LineStyleDemo(void); void CRTModeDemo(void); void UserLineStyleDemo(void); void FillStyleDemo(void); void FillPatternDemo(void); void PaletteDemo(void); void PolyDemo(void); void SayGoodbye(void); void Pause(void); void MainWindow(char *header); void StatusLine(char *msg); void DrawBorder(void); void changetextstyle(int font, int direction, int charsize); int gprintf(int *xloc, int *yloc, char *fmt, ... ); /* */ /* Begin main function */ /* */ int main() { Initialize(); /* Set system into Graphics mode */ ReportStatus(); /* Report results of the initialization */ ColorDemo(); /* Begin actual demonstration */ if( GraphDriver==EGA || GraphDriver==EGALO || GraphDriver==VGA ) PaletteDemo(); PutPixelDemo(); PutImageDemo(); Bar3DDemo(); BarDemo(); RandomBars(); ArcDemo(); CircleDemo(); PieDemo(); LineRelDemo(); LineToDemo(); LineStyleDemo(); UserLineStyleDemo(); TextDump(); TextDemo(); CRTModeDemo(); FillStyleDemo(); FillPatternDemo(); PolyDemo(); SayGoodbye(); /* Give user the closing screen */ closegraph(); /* Return the system to text mode */ return(0); } /* */ /* INITIALIZE: Initializes the graphics system and reports */ /* any errors which occured. */ /* */ void Initialize(void) { int xasp, yasp; /* Used to read the aspect ratio*/ GraphDriver = DETECT; /* Request auto-detection */ initgraph( &GraphDriver, &GraphMode, "" ); ErrorCode = graphresult(); /* Read result of initialization*/ if( ErrorCode != grOk ){ /* Error occured during init */ printf(" Graphics System Error: %s\n", grapherrormsg( ErrorCode ) ); exit( 1 ); } getpalette( &palette ); /* Read the palette from board */ MaxColors = getmaxcolor() + 1; /* Read maximum number of colors*/ MaxX = getmaxx(); MaxY = getmaxy(); /* Read size of screen */ getaspectratio( &xasp, &yasp ); /* read the hardware aspect */ AspectRatio = (double)xasp / (double)yasp; /* Get correction factor */ } /* */ /* REPORTSTATUS: Report the current configuration of the system */ /* after the auto-detect initialization. */ /* */ void ReportStatus(void) { struct viewporttype viewinfo; /* Params for inquiry procedures*/ struct linesettingstype lineinfo; struct fillsettingstype fillinfo; struct textsettingstype textinfo; struct palettetype palette; char *driver, *mode; /* Strings for driver and mode */ int x, y; getviewsettings( &viewinfo ); getlinesettings( &lineinfo ); getfillsettings( &fillinfo ); gettextsettings( &textinfo ); getpalette( &palette ); x = 10; y = 4; MainWindow( "Status report after InitGraph" ); settextjustify( LEFT_TEXT, TOP_TEXT ); driver = getdrivername(); mode = getmodename(GraphMode); /* get current setting */ gprintf( &x, &y, "Graphics device : %-20s (%d)", driver, GraphDriver ); gprintf( &x, &y, "Graphics mode : %-20s (%d)", mode, GraphMode ); gprintf( &x, &y, "Screen resolution : ( 0, 0, %d, %d )", getmaxx(), getmaxy() ); gprintf( &x, &y, "Current view port : ( %d, %d, %d, %d )", viewinfo.left, viewinfo.top, viewinfo.right, viewinfo.bottom ); gprintf( &x, &y, "Clipping : %s", viewinfo.clip ? "ON" : "OFF" ); gprintf( &x, &y, "Current position : ( %d, %d )", getx(), gety() ); gprintf( &x, &y, "Colors available : %d", MaxColors ); gprintf( &x, &y, "Current color : %d", getcolor() ); gprintf( &x, &y, "Line style : %s", LineStyles[ lineinfo.linestyle ] ); gprintf( &x, &y, "Line thickness : %d", lineinfo.thickness ); gprintf( &x, &y, "Current fill style : %s", FillStyles[ fillinfo.pattern ] ); gprintf( &x, &y, "Current fill color : %d", fillinfo.color ); gprintf( &x, &y, "Current font : %s", Fonts[ textinfo.font ] ); gprintf( &x, &y, "Text direction : %s", TextDirect[ textinfo.direction ] ); gprintf( &x, &y, "Character size : %d", textinfo.charsize ); gprintf( &x, &y, "Horizontal justify : %s", HorizJust[ textinfo.horiz ] ); gprintf( &x, &y, "Vertical justify : %s", VertJust[ textinfo.vert ] ); Pause(); /* Pause for user to read screen*/ } /* */ /* TEXTDUMP: Display the all the characters in each of the */ /* available fonts. */ /* */ void TextDump() { static int CGASizes[] = { 1, 3, 7, 3, 3 }; static int NormSizes[] = { 1, 4, 7, 4, 4 }; char buffer[80]; int font, ch, wwidth, lwidth, size; struct viewporttype vp; for( font=0 ; font<5 ; ++font ){ /* For each available font */ sprintf( buffer, "%s Character Set", Fonts[font] ); MainWindow( buffer ); /* Display fontname as banner */ getviewsettings( &vp ); /* read current viewport */ settextjustify( LEFT_TEXT, TOP_TEXT ); moveto( 2, 3 ); buffer[1] = '\0'; /* Terminate string */ wwidth = vp.right - vp.left; /* Determine the window width */ lwidth = textwidth( "H" ); /* Get average letter width */ if( font == DEFAULT_FONT ){ changetextstyle( font, HORIZ_DIR, 1 ); ch = 0; while( ch < 256 ){ /* For each possible character */ buffer[0] = ch; /* Put character into a string */ outtext( buffer ); /* send string to screen */ if( (getx() + lwidth) > wwidth ) moveto( 2, gety() + textheight("H") + 3 ); ++ch; /* Goto the next character */ } } else{ size = (MaxY < 200) ? CGASizes[font] : NormSizes[font]; changetextstyle( font, HORIZ_DIR, size ); ch = '!';
评论
    相关推荐
    • 谭浩强C语言
      这是谭浩强C语言的新版,有兴趣想学C语言的童鞋们可以下载来看看啊!
    • 谭浩强c语言
      谭浩强c语言,国内最权威的c语言学习宝典,从零基础开始,成为c语言高手。
    • Makefile c语言
      Makefile c语言Makefile c语言Makefile c语言Makefile c语言 四本资料!自己学习的时候整理的!
    • c语言教程
      c语言教程,优秀的c语言教程,简单基础,是学习c语言的好教程
    • C语言 实现
      C语言 项目实现 《计算方法》课件 俄罗斯方块游戏 C语言实训 综合案例-学生成绩管理程序 C语言程序设计学习与实践指导(源代码)
    • c语言
      c语言
    • C语言库函数
      C语言函数库,里面包括C语言的函数库,方便直接调用,还可以了解很多C语言一些函数模板
    • C语言
      C语言
    • 谭浩强C语言
      谭浩强C语言word版,学习C语言的,经典教材。 使用的编译工具有些老旧,建议是使用visual stdio 2008。
    • 水滴石穿C语言
      学习C语言的有用文档 水滴石穿C语言C语言的底层操作 水滴石穿C语言之extern声明辨析 水滴石穿C语言之static辨析 水滴石穿C语言之typedef的问题 水滴石穿C语言之编译器引出的问题 水滴石穿C语言之代码检查工具 ...