WorkbenchNP2 使い方WorkbenchNP2 Help

アプリを開くOpen the app

WorkbenchNP2 とはWhat is WorkbenchNP2?

WorkbenchNP2 は、ブラウザだけで PC-98 向けのアセンブラ/C を書き、実行し、 ソース行単位でデバッグできる実験的な開発環境です。インストールも会員登録も不要で、 このページを開けばすぐに使えます。

実行基盤には NP2kai(WebNP2 として wasm 化した Neko Project II 系エミュレータ)を 使い、アセンブラには NASM、C コンパイラには SmallerC、 動作させる OS には FreeDOS(98) を使っています。書いたコードはブラウザ内で その場でアセンブル/コンパイルされ、フロッピーディスクイメージに変換されて、 すぐ隣の PC-98 画面で実行されます。

WorkbenchNP2 is an experimental development environment that lets you write PC-98 assembly or C, run it, and debug it line by line — entirely in your browser. No install, no sign-up: open this page and you're ready to go.

It runs on NP2kai (the same Neko Project II-derived emulator core used by WebNP2, compiled to wasm), assembles with NASM, compiles C with SmallerC, and boots FreeDOS(98) as the guest OS. Your source is assembled or compiled on the spot in your browser, packaged into a floppy disk image, and run on the PC-98 screen right next to the editor.

WorkbenchNP2 起動直後。左にエクスプローラー、中央にエディタ、右にPC-98画面
起動直後の画面。左のエクスプローラーに作業ファイル(まだ0件)とサンプルの一覧、中央にエディタ、右にPC-98画面。 The screen right after launch: the Explorer on the left lists your work files (empty at first) and the bundled samples, the editor is in the middle, and the PC-98 screen is on the right.

使い方How to use it

  1. 左のエクスプローラーからサンプルhello.asm など)を開くか、 新規ファイルを作ります。
  2. エディタ下のツールバーの実行ボタン(▷)を押すと、ビルドして 右の PC-98 画面で実行します。
  3. 行番号の余白(gutter)をクリックすると、その行に ブレークポイントが付きます(付けられるのは実際にコードが生成される行だけです)。
  4. デバッグボタンを押すと、対象の1命令目の手前で止まった状態で デバッグを開始します。左のサイドバーにレジスタとブレークポイントの一覧が出ます。
  1. Open a sample (e.g. hello.asm) from the Explorer on the left, or create a new file.
  2. Press the Run button (▷) in the toolbar below the editor to build and run it on the PC-98 screen on the right.
  3. Click the gutter next to a line number to set a breakpoint there (only lines that actually generate code can take one).
  4. Press the Debug button to start debugging, stopped right before the target's first instruction. The sidebar on the left shows registers and your breakpoint list.
サンプルを実行し、PC-98画面に出力が表示されている状態
実行した直後。PC-98画面に実行結果が表示されている。 Right after running: the PC-98 screen shows the program's output.
ブレークポイントで停止し、レジスタとデバッグツールバーが見えている状態
デバッグ中。ブレークポイントで停止し、左にレジスタ、エディタ上部にフローティングのデバッグツールバーが出ている。 While debugging: stopped at a breakpoint, with registers on the left and the floating debug toolbar over the editor.

ファイルと保存Files and saving

エクスプローラーは 「作業ファイル」「サンプル」 の 2 グループに分かれています。

作業ファイルの保存先について: 「作業ファイル」はこのブラウザの中 (IndexedDB)にだけ保存されます。他の端末やブラウザからは見えず、ブラウザの データ(サイトデータ/キャッシュ)を消すと一緒に消えます。パソコンなど外へ持ち出したい 場合は、必ずダウンロードボタンでファイルとして保存してください。

「サンプル」は読み取り専用です。編集して保存すると、サンプル自体は 書き換わらず、同じ内容が「作業ファイル」側へ複製されます (例: samples/hello.asm を編集して保存すると hello.asm という 作業ファイルができます)。

The Explorer has two groups: "Work files" and "Samples."

Where work files live: work files are stored only inside this browser (IndexedDB). They are not visible from another device or browser, and they are deleted along with your browser's site data/cache. To take a file out to your computer, always use the Download button.

Samples are read-only. Editing and saving one does not change the sample itself — it copies the content into a work file instead (e.g. editing and saving samples/hello.asm creates a work file named hello.asm).

制約Limitations

  • 1 ファイル=1 プログラムです。複数のファイルをまとめて 1 つのプログラムとしてビルドすることはできません。
  • #include できるのは同梱の標準ヘッダのみです。 利用者が作成した別ファイルをヘッダとして読み込むことはできません。
  • 扱えるファイルの拡張子は .asm.c の 2 種類だけです。
  • One file equals one program. You cannot combine several files into a single build.
  • #include only works for the bundled standard headers. A header file you write yourself cannot be included.
  • Only two file extensions are supported: .asm and .c.

キーボードショートカットKeyboard shortcuts

次のキーが登録されています。

The following keys are registered:

キーKey 動作Action
F5 続行 — ブレークポイントまで実行する(デバッグ中のみ)Continue — run until the next breakpoint (while debugging only)
F10 ステップオーバー — 次のソース行まで実行する。call は飛び越える(デバッグ中のみ)Step over — run to the next source line, stepping over calls (while debugging only)
F11 ステップイン — call なら呼び先へ入る(デバッグ中のみ)Step into — enters a call's target (while debugging only)
Enter 新規ファイルのポップアップで、入力した名前でファイルを作成するIn the new-file popup, creates the file with the entered name
Esc 新規ファイルのポップアップを閉じるCloses the new-file popup
/ エディタとPC-98画面の境界(スプリッタ)にフォーカスがあるとき、幅を16pxずつ調整するWith the editor/PC-98 splitter focused, adjusts the width by 16px per press
Home スプリッタまたはデバッグツールバーのつまみにフォーカスがあるとき、既定の位置へ戻すWith the splitter or the debug toolbar's grip focused, resets it to its default position

クレジットと権利についてCredits and rights

WorkbenchNP2 は次のソフトウェアを利用・同梱しています。

  • NP2kai(Neko Project II 系)— MIT
  • WebNP2 — NP2kai を wasm 化し、ブラウザ向けにホストする姉妹プロジェクト
  • FreeDOS(98) — ゲスト OS として同梱
  • CodeMirror — エディタ(MIT)
  • NASM — アセンブラ(BSD 2-Clause)
  • SmallerC — C コンパイラ(BSD 2-Clause)

WorkbenchNP2 自身のコード(このリポジトリで書かれた部分)はリポジトリ直下の LICENSE ファイルのとおり MIT License です。 上記の同梱ソフトウェアはそれぞれの配布元のライセンスに従い、WorkbenchNP2 の MIT License によって上書きされるものではありません。

各ライセンスの詳細は、アプリ画面下部のステータスバーにあるリンクから参照できます。

PC-9801、PC-9821 は日本電気株式会社(NEC)の商標です。 本プロジェクトは NEC とは関係がなく、NEC による承認・提携・協賛を受けたものでもありません。

本プロジェクトは実行基盤として NP2kai(Neko Project II 系)を ビルドし同梱しています。NP2kai および Neko Project II の作者とも関係がなく、 公認を受けたものではありません。

WorkbenchNP2 uses and bundles the following software.

  • NP2kai (a Neko Project II derivative) — MIT
  • WebNP2 — the sister project that compiles NP2kai to wasm and hosts it in the browser
  • FreeDOS(98) — bundled as the guest OS
  • CodeMirror — the editor (MIT)
  • NASM — the assembler (BSD 2-Clause)
  • SmallerC — the C compiler (BSD 2-Clause)

WorkbenchNP2's own code (the parts written in this repository) is licensed under the MIT License, as stated in the LICENSE file at the repository root. Each bundled piece of software above remains under its own distributor's license and is not overridden by WorkbenchNP2's MIT License.

Full license texts are linked from the status bar at the bottom of the app.

PC-9801 and PC-9821 are trademarks of NEC Corporation. This project has no relationship with NEC, and is not approved, affiliated with, or sponsored by NEC.

This project builds and bundles NP2kai (a Neko Project II derivative) as its execution engine. It has no relationship with the authors of NP2kai or Neko Project II, and is not an officially endorsed derivative.