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

jinzd-debug

v0.9.1

Published

DOS DEBUG.EXE 的完全复刻 — 8086 汇编器/反汇编器/调试器 CLI,Windows 11 原生运行

Readme

jinzd-debug

DOS DEBUG.EXE 的完全复刻 — 8086 汇编器/反汇编器/调试器 CLI,Windows 11 原生运行。

敲 A 100,写汇编,G 全速执行,W 导出 .COM 文件——和 1981 年的体验一模一样,但跑在今天最新的 Windows 上。

npm version License: MIT


安装

npm install -g jinzd-debug

或者不安装,直接跑:

npx jinzd-debug

30 秒快速演示

C:\> jinzd-debug
- A 100
0B73:0100 MOV AH, 09
0B73:0102 MOV DX, 0109
0B73:0105 INT 21
0B73:0107 INT 20
0B73:0109 DB "Hello, World!$"
0B73:0117
- G =100
Hello, World!
Program terminated normally
- N HELLO.COM
- R CX
CX 0000
: 17
- W
Writing 00017 bytes
- Q

C:\> dosbox HELLO.COM
Hello, World!

上面的步骤:进入汇编模式 → 写一个打印 "Hello, World!" 的程序 → G 全速执行验证 → 命名 → 设文件大小 → 写盘。然后用 DOSBox 验证——23 字节的 .COM 文件,能跑!


19 个命令速查

| 命令 | 语法 | 功能 | |---|---|---| | A | A [addr] | 汇编输入——逐行写 8086 指令,即时转机器码 | | U | U [addr] | 反汇编——把内存里的机器码翻回汇编 | | D | D [addr] | 显示内存——hex dump + ASCII | | E | E addr [byte...] | 编辑内存——逐字节修改,或交互式修改 | | F | F range byte... | 填充内存——用指定字节填满一段区域 | | R | R [reg] | 查看/修改寄存器 | | T | T [=addr] [n] | 单步执行 n 条指令 | | P | P [=addr] [n] | 跳过 CALL/INT 的单步 | | G | G [=addr] [bps] | 运行到断点 | | Q | Q | 退出 | | N | N filename | 指定文件名(给 L/W 用) | | L | L [addr] | 读文件到内存 | | W | W [addr] | 写内存到文件(导出 .COM) | | C | C range addr | 比较两段内存 | | S | S range byte... | 在内存中搜索字节序列 | | M | M range addr | 移动内存块 | | H | H val1 val2 | 十六进制加减 | | I | I port | 读 I/O 端口 | | O | O port val | 写 I/O 端口 |

原版 DEBUG 的全部命令,一个不落。


为什么做这个

这是 《1KB 看懂 PE 文件格式》 的进阶配套工具。

那篇文章里提到 DOS 时代的 DEBUG.EXE——它不需要编译器、不需要链接器,开机就有,敲几行就生成可执行文件。但 64 位 Windows 彻底移除了它。

这个项目就是让它复活。 用 TypeScript 在 Node.js 上完整复刻,Windows 11 原生运行,还能写真实的 .COM 文件。


和 hello-asm 的关系

hello-asm/
├── 1KB看懂PE文件格式.md    ← 理论:PE 文件格式教学
├── gen-hello.js            ← 实验:用 Node.js 拼出 PE
├── debug/                  ← 实验:复刻 DEBUG.EXE(本目录)
│   └── ...

三件套:理论 → 拼 PE 实验 → 模拟 DEBUG 实验,覆盖从 DOS .COM 到 PE .EXE 的完整底层链路。


技术栈

  • TypeScript — 全静态类型,可维护
  • Node.js — REPL(readline)、文件 I/O(fs)
  • 零依赖 GUI — 纯命令行,原汁原味

开发状态

✅ 全部 19 个命令已实现 — 6 个 Phase 全部完成:

Phase 0  ████████████████████  REPL + D/E/R/Q
Phase 1  ████████████████████  汇编器 + 反汇编器 (A/U)
Phase 2  ████████████████████  8086 CPU (50+指令) + T/P/G
Phase 3  ████████████████████  文件 I/O (N/L/W) ★ 可导出 .COM
Phase 4  ████████████████████  扩展指令集 (150+条) + I/O
Phase 5  ████████████████████  剩余命令 (F/C/S/M/H)

技术栈:TypeScript (strict) + Node.js,零第三方运行时依赖。拿过来就能用,npx jinzd-debug 即启即用。

详见 ROADMAP 和 ARCHITECTURE。


许可

MIT