Code Monkey home page Code Monkey logo

asm-editor's Introduction

Asm editor

A webapp made with sveltekit and rust webassembly to learn, write and run m68k assembly code. Uses monaco-editor for the editor, and my WASM M68K interpreter to run the code.

Mainly made to help people approaching assembly by providing the tools necessary to write and debug code more easily. localImage

Features recap

  • Simple code completition and full syntax highlighting
  • Run the program or step through it
  • Code breakpoints, settings, input/output interrupts, undo, formatter and more
  • Inspect the value of each register and memory address to see which was changed with each instruction
  • Create new projects and manage them all in the webapp
  • Integrated IDE with semantic checks and useful errors to help you learn assembly
  • Integrated documentation and intellisense with addressing modes, descriptions and examples
  • Customisable settings and shortcuts, including theme customization

Code completion and syntax highlighting

The editor suggests you with the available instructions and the valid addressing modes for each operand, while also giving a simple description and example.

Step and undo

The code can be run completely or step by step, the changes to the state of the interpreter is kept in memory so that it can be undone. Breakpoints can be set to stop the execution at a specific line while running, to then proceed with stepping.

Documentation

The webapp comes with a built-in documentation, both available inside the editor and as a separate page. It explains brefly how each instruction works and the addressing modes, further documentation is coming in the future.

Settings and shortcuts

Settings to choose from to customise the editor and the interpreter, like how to view the registers, how many steps to keep in history, themes, etc. There are also some shortcuts to ease the use of the editor, which can be changed in the settings.

Projects

Projects are stored locally on your browser, and with the app also working offline, you can create and manage them all in the webapp. Export and import to come in the future.

Tools

Once running the program there are many tools to help you understand what instructions did and debug the code.

  • Values which changed between each instructions are highlighted and the old value is also visible. registers and memory have tooltips to show the decimal/hexadecimal value.
  • Follow the stack pointer with the dedicated tab, it's split in rows of 4 bytes to make it easier to see the changes
  • Whenever a jsr / bsr / rts instruction is executed, the callstack is saved so that it can be seen
  • A view of the changes to the state of the interpreter is visible to see what each instruction did, like register / memory writes and changes to the ccr, it is alsoo possible to jump back to a previous state
  • Full memory viewer to inspect a memory region, with also string conversion.

Assembler features

The assembler has a few directives and features to simplify writing code.

  • equ directive to define constants
  • dc, ds, dcb directives to define data regions
  • org directive to set the origin of the code
  • expressions (like $FF*10) and many immediate representations.

Benchmarks

The interpreter runs at round 3mhz on the browser and 11mhz natively, it will be improved in the future. You can benchmark your own code by running a loop and then read the js console, the total time of each execution is shown

asm-editor's People

Contributors

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