npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

6502web

v0.1.9

Published

6502 runtime for the web!

Readme

6502 Assembly on the web!

I really love 6502 assembly, and for most of my life I've been working with web technologies, so one day after two sleepless nights I came up with an idea..

what if... 6502 but... on the web?

And I don't mean a simple emulator/simulator. There's a bunch of them everywhere. What I want to achieve is being able to write simple websites and web applications using 6502 assembly

Your immediate question probably is: (and should be) why??

The answer might shock you:

i just think it's really funny ok

This is still in EARLY WIP, and I'm not sure I'll be able to do everything I want with this project. I'm mostly doing it for the bit, but at the same time I want to use it to write my own website.

somebody please stop me i have suffered enough already

(also yes the borzoi in front of the trans flag IS the logo and i'm not changing it.)

How to use:

By this CDN!

https://cdn.jsdelivr.net/npm/6502web/dist/6502web.js

Loading your .bin file

Your assembled 6502 binary can be loaded like this:

LOAD_6502("file.bin").then(res => res.run({ log: true, sharedMemory: [] }));

The empty array we're passing is your shared memory.

Shared memory

This dubious piece of technology supports shared memory between 6502 and JS. You pass the shared memory while running the program, like such:

LOAD_6502("file.bin").then(res => res.run({ log: true, sharedMemory: [ "Hi i'm in memory!", "Please let me out", () => "I don't want to be here!" ] }));

Then those fields can be loaded into the accumulator. Shared memory has only 10 fields, so use them as best as you can!

They range from $32 to $3C.

If a field you're trying to load is a function, that function will be immediately called.

Built-in functions

Calling those functions requires STA to its address.

Documentation format:

$<address> [<arguments>]

"..." means any number of arguments

$0 [$46]

Create HTML Element

Create an HTML Element and saves it as the recently created one

$46 should store numerical ID of the element you want to create, refer to this list:

  1. <p>
  2. <b>
  3. <i>
  4. <span>
  5. <button>
  6. <div>
  7. <h1>
  8. <h2>
  9. <h3>
  10. <h4>
  11. <h5>
  12. <h6>
  13. <a>
  14. <img>

$1 [$46, ...]

Change text content

Changes text content of the recently created HTML file

$46 should store length of the string you want to put inside the recently created HTML element.

Rest of the arguments should be ASCII codes for characters that will be read based on the value stored in $46

If your accumulator has a loaded string (for example, from shared memory) it shall be used as the text content of your recently created HTML element. This WILL ignore all of your passed arguments.


$2 [$46, $47]

Add event listener

$46 should store numerical ID of the JS event you want to listen for, refer to this list:

  1. click
  2. mousedown
  3. mouseup
  4. dblckick
  5. mousemove
  6. mouseover
  7. mouseout
  8. mouseenter
  9. mouseleave

$47 should store INDEX of the function from shared memory that should be called upon event detection.


$3

Move to element's parent


$4 [$46, ...]

Add class name

$46 should store length of the string you want to set as the className of the recently created element

Rest of the arguments should be ASCII codes for characters that will be read based on the value stored in $46

If your accumulator has a loaded string (for example, from shared memory) it shall be used as the className of your recently created HTML element. This WILL ignore all of your passed arguments.


$5

Bind X to recently created element


$6

Bind Y to recently created element


$7 [$46]

Multiply value at $46 by value stored in the accumulator (result is saved to accumulator)


$8 [$46]

Divide value at $46 by value stored in the accumulator (result is saved to accumulator)


9 [$46]

Set attribute on HTML element