Giter VIP home page Giter VIP logo

yetal's Introduction

The data types supported by the machine consist only of variables in which natural numerals can be stored. The set of variables is partitioned into input variables x_1... x_n output variable y local variables: z_1 ... z_m Instructions Supported Inc v (increment variable v by 1, and then go to the next instruction in the program) Dec v (if non-zero, decrement the variable v by 1 else do nothing. Then go to next instruction in the program) Jnz v L (test if variable v has a non-zero value, and if so, jump to the instruction labelled L, otherwise go to next isntruction in the program) Nop (do nothing, go to next instruction in the program).

The end of the program is marked by a distinguished label, and contains a "pseudo instruction" Halt.
Program execution halts, and the value of the output variable is displayed.

Implemented a series of macros for unconditional jumps (GOTO L) copying a value from one variable to another; (V := V') initializing a variable to a constant. In particular to 0; (V := c) adding two variables V := V1+v2 multiplying two variables V:= V1 * V2 checking if one variable is greater than another V1 >= V2 Subtracting a variable from another, and looping if the second is larger than the first V := V1 - V2 implementing a general macro expansion of a known computation within another. w := f(v_1,...,v_n) Boolean tests and conditional jumps. If p(v1,...,vn) GOTO L

Parsing through lexer in A2.mll.

yetal's People

Watchers

James Cloos avatar Swapnil 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.