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 🙏

© 2024 – Pkg Stats / Ryan Hefner

asm.ts

v0.0.5

Published

A X86_64 assember written in TypeScript. Chaining API. Supports macros. Advanced instruction support.

Downloads

2

Readme

asm.ts

X86_64 assember with a chaining API and auto-complete support.

Motivation

Learning assembly for real. Having fun while doing so. Feel free to join me in this; keep calm and PR! :)

Install

npm install asm.ts

# or

yarn add asm.ts

Usage

Example in asm.ts:

import { asm } from 'asm.ts'

// standard-compliant x86_64 machine code
// this code creates a 512 byte bootloader which ends up
// in an infinite loop; can be loaded e.g. via QEmu, VMWare, v86, etc.
const machineCode = asm()
  .code()
  .label('hang') // declare label
  .jmp('hang') // jump to iself; initinite loop
  .macro((asm) => {
    // pad until 510 bytes are reached
    for (let i = 0; i < 510 - asm.$; i++) {
      asm.code().db(0x0)
    }
  })
  // this data is put at the end, packed in the data section
  .data()
  // internal big endian to little endian conversion
  .dw(0xaa55)
  // returns a Buffer (native in Node.js, polyfilled in browser)
  .assemble()

The same code in Netwide Assembler (NASM):

loop:
  jmp loop
times 510 -( $ - $$ ) db 0
dw 0xaa55

To assemple using NASM:

nasm boot_sect.asm -f bin -o boot_sect.bin

Learning Resources

Beginner course on assembler

https://www.youtube.com/playlist?list=PL9C96j-WSJzIGSzImXyK2Yec2Z0cbPZ5p

X86 Cheat sheets

OpCode table for x86_64: http://ref.x86asm.net/coder.html

Instruction set reference: https://www.felixcloutier.com/x86/

Low Level from 0 to hero

Low level from zero to hero (MIT OpenCourseWare) MIT 6.004 Computation Structures, Spring 2017 by Chris Terman https://www.youtube.com/watch?v=qyBuzeUYs2M&list=PLUl4u3cNGP62WVs95MNq3dQBqY2vGOtQ2&index=1

Complete course: https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/

Performance - and Assembly deep dive

MIT 6.172 Performance Engineering of Software Systems, Fall 2018 by Charles Leiserson https://www.youtube.com/watch?v=o7h_sYMk_oc&list=PLUl4u3cNGP63VIBQVWguXxZZi0566y7Wf

Complete course: https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/

Own Operating System course

A course on how to write your own operating system by Daedalus Community. https://www.youtube.com/watch?v=MwPjvJ9ulSc

Another course on writing your own operating system

Writing a Simple Operating System — from Scratch by Nick Blundell https://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf