Giter Site home page Giter Site logo

no-compiler's Introduction

NO-COMPILER

an arm based compiler (in python for now) for custom language with .no extension

INSTALLING

"This is the project webpage for the Netwide Assembler (NASM), an asssembler for the x86 CPU architecture portable to nearly every modern platform, and with code generation for many platforms old and new."

on Windows

winget install nasm -i

make sure you add the installed folder to your path

on mac TODO

on linux TODO

Syntax Highlighting for VSCode

I use the following extension however looking for better ones

  • 13xforever.language-x86-64-assembly

HOW A COMPILER WORKS

Compiler's use Abstract Syntax Trees to respresent the source code. The AST is then used to generate the machine code.

Compiler's also use something called Lexical Analysis to convert the source code into tokens. These tokens are then used to generate the AST. Tokens shouldn't be confused with AST nodes. Tokens are the smallest unit of the language. For example, in the following code:

int main() {
    return 0;
}

The tokens would be:

int, main, (, ), {, return, 0, ;, }

or something similar.

DEV WORKFLOW

Windows

using build_win.bat to compile the asm file into an exe file

build_win.bat test_win 
test_win.exe
echo %ERRORLEVEL%

Mac TODO

Linux TODO

TODO

  • get familiar with NASM
  • simple return 0 program in windows using elf64 and gcc
  • get familiar with arm compiler
  • get familiar with arm assembly
  • what language to use? (python for now, move to C then Rust)
  • .no language return 0
  • .no language hello world
  • develop syntax further

no-compiler's People

Contributors

npolgado avatar

Watchers

 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.