Git Product home page Git Product logo

shiny.calculator's Introduction

Shiny Calculator

anim2

A REPL calculator that helps developers with everyday tasks that require different types of calculations.

This project aims to provide a handy tool to learn binary, prototype different bit hacking solutions, learn assembly and how the CPU works, and have a tool that can solve problems from different domains.

Shiny Calculator is written in C# and targets .net 5.0

Features

  • Number calculations
  • Bit manipulation (with explain mode)
  • Assembly code execution (the engine features an x86 assembly simulator)
  • Text manipulation and parsing
  • Blocks that enable the user to write programs that mix all high-level expressions with low-level assembly
  • User-friendly error messages
  • Tests and diagnostics that are integrated into the tool
  • Others

Assembly code execution is currently limited to a handful of instructions, but it will support most of the instructions that current compilers use to generate code.

Installation

Clone the project and build it using .net 5 by running:

dotnet build -c Release

The executable should be located in:

..\Shiny.Calculator\src\bin\Release\net5.0\Shiny.Calculator.exe

The calculator uses VT-100 mode, which means you should run in a terminal that supports this mode like Windows Terminal.

obraz

Feature Notes

  • Commands

The calculator has many commands that are useful like:

help
Displays the help screen
explain
Enables the explain mode where each sub-expression is displayed as a binary result
cls
Clears the screen
vars
Displays the declared variables
regs
Displays the x86 registers
mem
Displays the x86 memory
  • Blocks

Blocks allow writing programs in the calculator; a block will execute all of the commands sequentially.

anim3

A block starts with { and ends with }. Each time a start block symbol is used, the REPL will switch from single-line mode to multi-line mode.

  • X86 assembly emulation

You can write X86 assembly code and mix it with calulation expresions.

anim4

  • Error Messages

anim5

Copyright

Copyright © 2021 Bartosz Adamczewski

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.