Git Product home page Git Product logo

c-compiler's Introduction

c-compiler

学生项目,简易c语言编译器

使用Java编写,可将简单的c语言编译成8086汇编代码。

项目由三人完成,本人完成了词法分析和汇编代码生成的部分。

使用方法:

把你的c语言代码粘贴到main.c里面(下载后的main.c里面有示例代码),然后用IDEA运行Entry的main函数,生成的汇编代码就会出现在8086.asm里面,可以用masm编译运行观察结果。

可使用scani(),printi(int a),printlln三个内置函数进行简单输入输出,示例代码中有使用例子。

实现程度:

本程序可以实现简单输入输出,函数的递归调用,二维数组。可用的数据类型只有int一种类型。变量声明必须放在一个函数的开始部分。

运行效果:

提供一个示例代码如下:

编译后的代码就放入了8086.asm

使用8086的汇报运行工具运行就得到如下效果

c-compiler's People

Contributors

lotsofone avatar

Stargazers

0xpte4r6 avatar randomCode1234 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.