Code Monkey home page Code Monkey logo

yasp's Introduction

yasp is a fully functional web-based assembler development environment, including a real assembler, emulator and debugger. The assembler dialect is a custom which is held very simple so as to keep the learning curve as shallow as possible. It also features some hardware-elements (LED, Potentiometer, Button, etc.). The main purpose of this project is to create an environment in which students can learn the assembly language so that they understand computers better. Furthermore it allows them to experiment without the fear of breaking something.

The original project team of yasp consists of Robert Fischer and Michael "luto" Lutonsky. For more information take a look at the about-section in the IDEs menu.

Online-Demo

A hosted version of yasp can be found on http://demo.yasp.me/.

License

yasp is licensed under the GPLv3-License, for details see LICENSE.txt.

Development

Setup

To develop on yasp you'll need nodejs.

$ npm install -g grunt-cli bower   # install grunt and bower (if needed)
$ git clone https://github.com/yasp/yasp.git
$ cd yasp
$ npm install      # download grunt-dependencies
$ bower install    # download web-dependecies
$ grunt commandsjs # build help and instructions
$ grunt http       # start development http-server

Setup on Windows

  1. get nodejs http://nodejs.org/
  2. get msysgit http://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git
  3. open CMD and and follow the linux-setup

Grunt-Tasks

  • deps download all client dependencies
  • commands build help and commands.js, see instructions.md
  • watchcommands watch-task for commands
  • http start a development http-server
  • doc builds jsdoc to /doc/jsdoc/
  • watchdoc watch-task for doc

Documentation

The documentation lives in the /doc/-directory. Additional documentation in the German language can be found on the project homepage.

If you think that something is lacking documentation please create an issue.

Hacking

yasp's People

Contributors

luto avatar metzzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yasp's Issues

Mobile-Mode

Debugger:

  • Hide debugger-tabs (=> 100% height of breadboard)
  • Remove margin of debugger-dialog
  • Resize buttons

Editor:

  • swipe for label-list
  • quickhelp

General:

  • see if we're fast enough

LED-matrix

Depends on #9.

Implement a LED-Matrix which can be controlled via an 2 or 3 pin bus.

Step over

        MOV     b0, 1
        CALL    someSub   ; stopped here
        MOV     w0, 5
  1. Debugger is stopped at CALL.
  2. "Step over"
  3. Temporary breakpoint is set at MOV w0, 5
  4. Continue emulation
  5. Remove breakpoint

Step out

CALL someSub
MOV w0, 1
BREAK

someSub:
MOV b0, 43  ; stopped here
MOV b1, 42
RET
  1. debugger is stopped at MOV b0, 43
  2. "Step out"
  3. emulation continues until RET, so it stops at MOV w0, 1

Indentation is not always forced

The indentation is not forced when pasting in code from the clipboard which can lead to inconsistent formatting which has to be fixed by hand.

Show values of registers on hover

When hovering a register in the source-listing of the debugger, the current value should be shown.

Class in CodeMirror: cm-variable

Conditional breakpoints

Implement the user-interface of conditional breakpoints. The backend-code in the emulator is already finished, tested and documented.

Allow step-back to step into code which has been run, not stepped

Currently step-back only works with previous states which have been executed by stepping. If the emulator runs, is stopped and then a step-back is attempted, nothing happens.
To achieve this, yasp must remember the state of the last 20 (?) ticks. Since this must happen in realtime, this state must be kept in the emulator or emulator_backend and cannot go through the communicator each tick.

Values that need to be saved:

  • rom
  • ram
  • pc
  • sp
  • pin states
  • pin pwm states
  • interrupt mask
  • tick counter
  • flags

See this for copying the typed arrays (ram, rom): http://stackoverflow.com/a/10101213/2486196

"Step to refresh" in ROM/RAM/registers is shown when stepping over jump

Go into single-stepping-mode (break or step).

  1. step over a normal instruction (e.g. MOV)
    • step refreshes ROM/RAM/registers view
    • no gray overlay is shown (expected)
  2. step over a jump-instruction (e.g. JMP)
    • step refreshes ROM/RAM/registers view
    • a gray overflow is shown for the duration of the jump (~50ms) (unexcepted)

The emulator probably reports a wrong state (e.g. not break) while jumping to the debugger which causes it to show the overlay.

don't clear the whole CommandCache in load()

For speed reasons the emulator.tick()-function caches all parsed instructions in emulator.commandCache. When the ROM is changed via emulator.writeROM() part of this cache is cleared. When a big part of the ROM is overwritten by the load()-function (invoked by LOAD-message), the whole commandCache is cleared. Instead only the overwritten parts should be cleared.

  • move command-cache-clearing-code into its own function: clearCommandCache(start, len). start is the first byte which has been changed, len the number of bytes which have been changed.
  • use clearCommandCache() in both writeRom() and load()
  • tests for load() which check for the cleared cache (writeRom() already has these)
  • tests for clearCommandCache()

Show w0 if b1 or b0 is used

The register w0 shares its bytes with b0 and b1, so the combined value w0 should be shown in the registers-list if either of the byte-registers is used. Same for using w0 (shows b0 and b1).

add offset parameter to bitutils.extractBits

yasp.disasm.getCommand currently builds up an array of bytes to hand over to extractBits. This is done for every attempt to disassemble an command from ROM. Instead extractBits should have an optional offset parameter, which defines the byte to start at. getCommand should then just hand over the whole ROM-array with the parsing offset.
This saves one array instance for every command in ROM.
Not critical since we cache disassembled commands, but would still give a speed boost for self-modifying code or disabled-cache mode.

Move Pin-Handling out of emulator.js

Move all IO-Code (including PWM) out of the emulator so that other classes, such as hardware, can use it. This also enables the code to be tested more easily.

Class: IOBank

{
  "pins": []
}

Class: Pin

{
  "nr":    0,    // pin number
  "type":  "",   // "adc" or "gpio"
  "mode":  "",   // "in" or "out"
  "state": 0,    // 0-255
  "pwm":   false // PWM simulation
}

Tests for PWM

The emulators PWM-implementation, updatePwm(), is currently untested.

Hardware with multiple pins

Depends on #8.

  • breadboard: backend-code (listening to and sending state changes to the emulator)
  • breadboard: UI-Code (showing pins on hover)
  • hardware: add description for each pin in hardware-definitions
  • hardware: rewrite state-handling in hardware

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.