Skip to content

Commit

Permalink
Merge pull request #10 from robalb/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
robalb authored Nov 10, 2024
2 parents 0256bcc + b347ca9 commit f5106e9
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 20 deletions.
15 changes: 15 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISC License

Copyright 2024 Alberto Ventafridda

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
10 changes: 6 additions & 4 deletions readme.md → README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# x86-64 playground

A browser-based x86-64 assembly playground, powered by a WebAssembly port of the lightweight Blink emulator.
An online assembly editor and debugger for the x86-64 architecture, powered by a Wasm port of the Blink x86-64-linux emulator.<br/> Online at https://x64.halb.it

Try a demo on https://x64.halb.it
The quickest way to run, debug, and share assembly snippets for a wide range of popular assemblers, including GNU binutils, Fasm, and Nasm.

# Screenshots

<img src="./docs/preview2.jpg" />

The project is composed of two elements:
- `emscripten_blink` a fork of the [blink](https://github.com/jart/blink/) x86-64 emulator, modified to expose a javascript api when compiled for webassembly.
- `svelte_blinkenweb` a svelte webapp implementing a mobile-friendly frontend for the blink wasm emulator.
- `emscripten_blink` a fork of the [blink](https://github.com/jart/blink/) x86-64 emulator, compiled to WebAssembly and modified to expose a typescript API
- `svelte_blinkenweb` a svelte web app implementing a mobile-friendly frontend for the blink Wasm emulator.

The assemblers provided by the app are traditional x86-64 ELFs, emulated client-side in the blink runtime.

Expand Down
12 changes: 11 additions & 1 deletion emscripten_blink/field_notes/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,33 @@ every example should be the combo codestring,Assemblers_key.
we can then create a custom webappstate serializer that takes this combo and
generates a webappstate, that is passed to setWebAppState

Open Source code:
- Blink: ISC https://github.com/jart/blink/blob/master/LICENSE
- Svelte: MIT https://github.com/sveltejs/svelte?tab=MIT-1-ov-file#readme
- vitejs: MIT https://github.com/vitejs/vite?tab=MIT-1-ov-file#readme
- Melt UI: MIT https://github.com/melt-ui/melt-ui?tab=MIT-1-ov-file#readme
Binaries:
- binutils: GNU V2 https://github.com/bminor/binutils-gdb?tab=License-1-ov-file#readme
- Fasm: https://github.com/tgrysztar/fasm?tab=License-1-ov-file#readme

actual Todo list:

- [x] uri manager and uri appstate serializers
- [x] define diagnosticparser interface, associated to an assemblerMode.
a diagnosticParse should parse the stout of a compiler when assembly fails,
generating a standardized diagnostic output that is used by the editor to render error lines
- add line error support to the editor.
- [x] add line error support to the editor.
this snippet shows how to tap in the editor renderer to add line highlights
https://stackblitz.com/edit/vitejs-vite-y5pwon?file=src%2Fmain.ts,readme.md
In the editor component, we'll need to listen to store.diagnostics, and when
they are not null, render them.
in store.notifyEditorContent we should add a line that resets the diagnostics



### backlog
- editor tooltip for asm guide, like in compiler explorer
https://github.com/compiler-explorer/compiler-explorer/blob/main/lib/asm-docs/generated/asm-docs-amd64.ts
https://stackblitz.com/edit/vitejs-vite-z2fgpu?file=src%2Fmain.ts
- invert taborder in the control rows. on desktop the current order is bad
- service worker. Understand: is github pages good enough for caching?
Expand Down
12 changes: 9 additions & 3 deletions svelte_blinkenweb/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,25 @@
<html lang="en">
<head>
<meta charset="UTF-8" />

<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="x64" />
<link rel="manifest" href="/site.webmanifest" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="mask-icon" href="/favicon.svg" color ="#fdb54a" />
<title>x86-64 playground</title>

<meta name="description" content="An online x86-64 Assembly playground. Run, learn, and debug Assembly code directly from your browser" />
<meta name="description" content="An online assembly editor and debugger for the x86-64 architecture. The quickest way to run, debug, and share assembly snippets for a wide range of amd64 assemblers - GNU binutils, Fasm, Nasm" />
<meta name="keywords" content="Gdb, x86-64, x64, CTF, assembly, debugger, Fasm, Binutils, webassembly, wasm binutils, wasm assembler" />
<meta name="author" content="https://halb.it" />
<link rel="canonical" href="https://x64.halb.it/" />
<meta name="robots" content="index, follow" />

<meta property="og:title" content="X86-64 playground" />
<meta property="og:description" content="An online x86-64 Assembly playground. Run, learn, and debug Assembly code directly from your browser" />
<meta property="og:description" content="An online assembly editor and debugger for the x86-64 architecture. The quickest way to run, debug, and share assembly snippets for a wide range of amd64 assemblers - GNU binutils, Fasm, Nasm" />
<meta property="og:image" content="https://x64.halb.it/card.jpg" />
<meta content="1762" property="og:image:width">
<meta content="1068" property="og:image:height">
Expand Down
Binary file added svelte_blinkenweb/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added svelte_blinkenweb/public/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added svelte_blinkenweb/public/favicon.ico
Binary file not shown.
28 changes: 16 additions & 12 deletions svelte_blinkenweb/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions svelte_blinkenweb/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
User-agent: *
Allow: /

32 changes: 32 additions & 0 deletions svelte_blinkenweb/public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"id": "playground/v1"
"name": "x64 playground",
"short_name": "x64",
"description": "An online assembly editor and debugger for the x86-64 architecture. The quickest way to run, debug, and share assembly snippets for a wide range of amd64 assemblers - GNU binutils, Fasm, Nasm",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"screenshots": [
{
"src": "/card.jpg",
"sizes": "1760x1070",
"label": "Screenshot showing a web app composed of multiple panes with a dark theme. The leftmost pane is a text editor showing an assembly code snippet. the other panes show debugger data like registers and a hexdump of the stack layout of a process."

}
],
"theme_color": "#343434",
"categories": ["education", "programming"],
"background_color": "#1c1e24",
"display": "standalone"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f5106e9

Please sign in to comment.