<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/porting-an-assembler-debugger-and-more-to-webassembly-npwykdlho" -->

---
title: Porting an assembler, debugger, and more to WebAssembly
description: A walkthrough of porting the KnightOS toolchain (z80 assembler, filesystem generator, packaging tool, and calculator emulator) to WebAssembly using Emscripten,...
canonical: https://daily.dev/posts/porting-an-assembler-debugger-and-more-to-webassembly-npwykdlho
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Porting an assembler, debugger, and more to WebAssembly | daily.dev
og:description: A walkthrough of porting the KnightOS toolchain (z80 assembler, filesystem generator, packaging tool, and calculator emulator) to WebAssembly using Emscripten,...
og:url: https://daily.dev/posts/porting-an-assembler-debugger-and-more-to-webassembly-npwykdlho
og:image: https://api.daily.dev/og/posts/NpWyKdlhO.png
og:image:alt: Porting an assembler, debugger, and more to WebAssembly
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Porting an assembler, debugger, and more to WebAssembly

**[Drew DeVault](https://daily.dev/sources/drewdevault)** · 10 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of porting the KnightOS toolchain (z80 assembler, filesystem generator, packaging tool, and calculator emulator) to WebAssembly using Emscripten, enabling developers to try KnightOS programming directly in the browser. Key challenges included isolating multiple WASM modules on the same page using AMD loaders, sharing virtual filesystems between modules via custom JS copy utilities, and creating deep JavaScript bindings for the z80e emulator to map native C structs to JS objects and handle canvas rendering and keyboard input.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://drewdevault.com/2014/11/30/Porting-an-entire-toolchain-to-the-browser-with-emscripten.html>

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#c](https://daily.dev/tags/c), [#webassembly](https://daily.dev/tags/webassembly)

[View this post on daily.dev](https://daily.dev/posts/porting-an-assembler-debugger-and-more-to-webassembly-npwykdlho)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Porting an assembler, debugger, and more to WebAssembly","url":"https://daily.dev/posts/porting-an-assembler-debugger-and-more-to-webassembly-npwykdlho","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/porting-an-assembler-debugger-and-more-to-webassembly-npwykdlho"},"datePublished":"2026-03-31T12:27:58.185Z","dateModified":"2026-03-31T12:35:53.393Z","description":"A walkthrough of porting the KnightOS toolchain (z80 assembler, filesystem generator, packaging tool, and calculator emulator) to WebAssembly using Emscripten,...","image":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","thumbnailUrl":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","isAccessibleForFree":true,"articleSection":"Drew DeVault","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Drew DeVault","logo":"https://media.daily.dev/image/upload/s--BGhGBu0U--/f_auto,q_auto/v1774960025/logos/drewdevault?_a=BAMAMiWQ0","url":"https://daily.dev/sources/drewdevault"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/porting-an-assembler-debugger-and-more-to-webassembly-npwykdlho","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,c,webassembly","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Drew DeVault","item":"https://daily.dev/sources/drewdevault"},{"@type":"ListItem","position":3,"name":"Porting an assembler, debugger, and more to WebAssembly"}]}
```

