Git Product home page Git Product logo

assembly-atm's Introduction

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

ATM Program

ATM Program is an assembly script that simulates an ATM.
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Guidelines
  3. Initialization
  4. Contributing
  5. License

About The Project

This project is an ATM Program which as it sounds, it simulates an ATM (Automatic Teller Machine) that I've built with Assembly (Low-level programming language) using EasyCPU development environment.

The user will be allowed to perform the existing operations at the ATM when he provides a binary-code corresponding to the credit-card number format. At this stage, the existing operations at the ATM are:

  1. Cash deposits
  2. Cash withdrawals
  3. Checking balance

Cash Withdrawals and deposits can be made in local currency, NIS, and in foreign currencies, USD and EUR. There are three card types and each card type has different definitions, different fees, credit limit, etc, the types are: Young, Standard and Business.

At the beginning of the program, 6 credit-cards are initizlized with a certain balance.

(back to top)

Built With

  • Assembly
  • EasyCPU

(back to top)

Guidelines

Credit-Card format in binary-code: (CCF)

A credit-card number is represented by byte (8-bits) where the first 3 bits represent the card type and the remaining 5 bits represent the credit-card id code, according to the following definition:

  Young=001
  Standard=010
  Business=011

Account Balance format in binary-code: (ABF)

The account balance is represented by byte (8-bits) next to CCF byte, using the simplified and accepted binary base definition. The 8 bits together represent the amount accumulated in the account, according to that the max amount is:

(11111111)₂ = (1 × 2⁷) + (1 × 2⁶) + (1 × 2⁵) + (1 × 2⁴) 
              + (1 × 2³) + (1 × 2²) + (1 × 2¹) + (1 × 2⁰) = (255)₁₀

Operations

The operations is represented by byte (8-bits) where the first 3 bits represent the currency type and the remaining 5 bits represent the amount.

Cash withdrawal

At this stage, the user has to choose which currency he wants to withdraw, and the amount. Note: The withdrawal is made under the account types settings such as withdrawal fee & limit.

  Young={ limit: 50, fee: 5 }
  Standard={ limit: 100, fee: 4 }
  Business={ limit: none, fee: 1 }

Cash deposits:

At this stage, the user has to choose which currency he wants to withdraw, and the amount. Note: the deposits is made under the account types settings such as deposit fee. Note#2: All types of cards are allowed to deposit any amount of money as they wish.

  Young,Standard,Business={ fee: 2 }

(back to top)

Initialization

In the initialization process, the following program settings and credit-cards are loaded.

CC binary-code type id-code balance dec-val
00110001 00101000 Young 10001 40
01010010 01011010 Standard 10010 90
01110011 01100100 Business 10011 100
00110100 01010000 Young 10100 80
01010101 10001100 Standard 10101 140
01110110 11111111 Business 10110 255
binary-code definition dec-val
00110010 Withdrawal limit (Y) 50
01100100 Withdrawal limit (S) 100
11111111 Withdrawal limit (B) 255
00000010 Deposit fee 2

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

assembly-atm's People

Contributors

ladunjexa 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.