FreeDOS(98) の使い方

Using FreeDOS(98)

はじめに

WebNP2 には FreeDOS(98) の起動フロッピーが同梱されています。 「FreeDOS(98) で起動」を選ぶと、何も用意しなくても PC-98 の DOS がそのまま立ち上がります。

DOS は、Windows が生まれる前に使われていた OS です。マウスもアイコンもなく、 キーボードから命令を打ち込んで動かします。 今の Windows の「コマンドプロンプト」は、この DOS の子孫です。 なので、あなたがコマンドプロンプトを少しでも触ったことがあるなら、 すでに半分は知っています。

このページは、同梱の起動ディスクで実際に何ができるのかを、 すべて WebNP2 上で実行して確かめた内容だけでまとめたものです。 一般的な FreeDOS の解説とは、使えるコマンドの顔ぶれが違う点に注意してください。

起動のしかたは3通りあります。どれも同じディスクが入ります。
  • 起動画面の「FreeDOS(98) で起動」ボタン
  • URL に ?freedos=1 を付ける
  • FDD1 の「FreeDOS(98) 挿入」ボタン

Introduction

WebNP2 bundles a FreeDOS(98) boot floppy. Choose "Start with FreeDOS(98)" and a PC-98 DOS boots right away, with nothing for you to prepare.

DOS is the operating system people used before Windows. There are no icons and no mouse: you type commands on the keyboard. The Windows Command Prompt is a descendant of this DOS, so if you have ever touched it, you already know half of what is here.

This page describes what the bundled boot disk can actually do. Everything here was run on WebNP2 and checked. Note that the set of available commands differs from a general FreeDOS installation.

There are three ways to start it, and all of them insert the same disk:
  • The "Start with FreeDOS(98)" button on the start screen
  • Adding ?freedos=1 to the URL
  • The "Insert FreeDOS(98)" button on the FDD1 slot

起動したら、まず画面の見かた

起動が終わると、画面の左下にこんな表示が出て点滅します。

A:\>_

これは 「A ドライブのいちばん上の場所にいます。命令をどうぞ」 という意味で、プロンプトと呼びます。ここに文字を打って Enter を押すと実行されます。Windows のコマンドプロンプトの C:\> とまったく同じ役割です。

ドライブの割り当て

A: FDD1(起動に使っている FreeDOS のディスク)
B: FDD2(もう一台のフロッピー)
C: HDD イメージを読み込んでいるときだけ存在します
Windows の癖で C: と打ちたくなりますが、 HDD を入れていなければ C ドライブはありません。 フロッピーだけで使っているときは A: と B: の2つだけです。

いちばん下の行

画面の最下行に C1 CU CA S1 SU … と並んでいるのは、 PC-98 のファンクションキーの割り当て表示です。DOS の一部ではなく、 常に出ているものなので気にしなくて大丈夫です。

Reading the screen

When the boot finishes, this appears at the bottom left and blinks.

A:\>_

It means "you are at the top of drive A, please give me a command." This is called the prompt. Type something, press Enter, and it runs. It plays exactly the same role as C:\> in the Windows Command Prompt.

Drive letters

A: FDD1 (the FreeDOS disk you booted from)
B: FDD2 (the second floppy drive)
C: Exists only while an HDD image is loaded
Windows habits make you want to type C:, but there is no drive C unless you loaded an HDD image. With floppies only, you have just A: and B:.

The bottom line of the screen

The C1 CU CA S1 SU … row at the very bottom is the PC-98 function key label line. It is not part of DOS and is always there, so you can ignore it.

まず打ってみる3つ

1. ? — 使えるコマンドを全部出す

DOS では help は使えません。 代わりに 半角のクエスチョンマーク1文字を打って Enter です。 使えるコマンドが日本語で一覧表示されます。

A:\>?
利用できるコマンド:
ALIAS     BEEP      BREAK     CALL      CD        CHDIR     CDD       CHCP
CLS       COPY      CTTY      DATE      DEL       DIR       DIRS      DOSKEY
...

2. DIR /W — ファイルの一覧を見る

DIR だけでも一覧は出ますが、このディスクには24個ほどファイルがあり、 1画面に収まらず上へ流れていってしまいます。 横に詰めて表示する DIR /W か、1画面ずつ止める DIR /P を使ってください。

Windows でよく使う DIR | MORE はこのディスクでは使えません。 MORE というプログラムが入っていないためです。DIR /P を使います。

3. コマンド名 /? — 個別の説明を読む

コマンド名のうしろに /? を付けると、日本語の詳しい説明が出ます。 これが実質のマニュアルです。困ったらまずこれです。

A:\>DIR /?
DIR [drive:][path][filename] [/P] [/W] [/A[[:]attributes]]
 /P     一画面ごとに停止します.
 /W     ワイド形式 (ファイル名のみを横に詰める) で表示します.
...

Three commands to try first

1. ? — list every available command

There is no help command here. Instead, type a single question mark and press Enter. It prints the list of built-in commands.

A:\>?
利用できるコマンド:
ALIAS     BEEP      BREAK     CALL      CD        CHDIR     CDD       CHCP
CLS       COPY      CTTY      DATE      DEL       DIR       DIRS      DOSKEY
...

2. DIR /W — list the files

Plain DIR works, but this disk holds around 24 files, so the list scrolls off the top of the screen. Use DIR /W (packed into columns) or DIR /P (pause after each screen).

The familiar DIR | MORE does not work on this disk, because there is no MORE program on it. Use DIR /P.

3. COMMAND /? — read the details

Adding /? after a command name prints a detailed description (in Japanese). This is effectively the manual — reach for it first when stuck.

A:\>DIR /?
DIR [drive:][path][filename] [/P] [/W] [/A[[:]attributes]]
 /P     Pause after each screenful.
 /W     Wide format (file names only, packed into columns).
...

Windows のコマンドプロンプトとの対応

よく使うものは、ほとんどそのままの名前で通じます。 大文字・小文字はどちらでも構いません。

やりたいこと DOS 備考
ファイル一覧 DIR 同じ。流れるので /W /P を添える
フォルダ移動 CD 名前 同じ。1つ上は CD ..
ドライブ移動 B: ドライブ名だけを打つ。CD /D の代わりに CDD もある
ファイルの中身を見る TYPE 名前 type と同じ
コピー COPY 元 先 同じ。XCOPY はこのディスクには無い
削除 DEL 名前 ERASE も同じ意味
名前の変更 REN 元 新 RENAME も同じ
フォルダを作る/消す MD / RD MKDIR / RMDIR も同じ
画面を消す CLS 同じ
文字を表示する ECHO 文字 同じ
移動(ファイル) — MOVE は無い。COPY してから DEL
ページ送り — MORE は無い。DIR /P で代用

実は今と同じように便利です

  • Tab キーでファイル名が補完されます
  • ↑ キーで前に打ったコマンドが戻ってきます
  • > でファイルへ書き出せます(例: ECHO HELLO > TEST.TXT)

「DOS は不便」と身構えなくて大丈夫です。同梱の FreeCOM は、 補完も履歴も最初から効きます。

Mapping from the Windows Command Prompt

Most everyday commands keep the same name. Upper and lower case both work.

What you want DOS Notes
List files DIR Same. Add /W or /P so it does not scroll away
Change directory CD name Same. CD .. goes up one level
Change drive B: Type the drive letter alone. CDD replaces CD /D
Show a file TYPE name Same as type
Copy COPY src dst Same. There is no XCOPY on this disk
Delete DEL name ERASE means the same
Rename REN old new RENAME is the same
Make / remove directory MD / RD MKDIR / RMDIR are the same
Clear the screen CLS Same
Print text ECHO text Same
Move a file — No MOVE. COPY then DEL
Page through output — No MORE. Use DIR /P

It is more convenient than you expect

  • Tab completes file names
  • The up arrow recalls previous commands
  • > redirects to a file (e.g. ECHO HELLO > TEST.TXT)

No need to brace yourself for a primitive experience: the bundled FreeCOM has completion and history enabled from the start.

このディスクで使えるコマンド

コマンドには2種類あり、この違いを知っておくと 「なぜ動かないのか」がすぐ分かります。

いつでも使えるもの(内部コマンド・51個)

COMMAND.COM 自身が持っている機能です。 ディスクを入れ替えても使えます。

ファイルとフォルダ DIR CD CHDIR CDD MD MKDIR RD RMDIR COPY DEL ERASE REN RENAME TYPE VOL TRUENAME WHICH DIRS PUSHD POPD
画面と表示 CLS ECHO PROMPT TITLE BEEP PAUSE
設定と情報 SET PATH DATE TIME VER VERIFY BREAK CHCP CTTY MEMORY LFNFOR
入力の支援 ALIAS DOSKEY HISTORY
バッチファイル用 CALL FOR GOTO IF REM SHIFT EXIT
メモリ LH LOADHIGH LOADFIX
ヘルプ ?

このディスクが入っているときだけ使えるもの(外部コマンド・8個)

こちらはディスク上の1個のファイルです。 A ドライブのディスクを別のものに入れ替えると、使えなくなります。

MEM メモリの空き状況を表示する
EDLIN テキストを書く(行単位のエディタ)
SYS 別のディスクを起動できるようにする
FDFORMAT フロッピーを初期化する(WebNP2 では通常不要)
BTNPART ハードディスクの領域を確保する(同上)
DEBUG メモリを覗く・機械語を書く
HIMEMX / EMM386 メモリ管理(386 フォルダの中。既定では読み込まれない)
ネットで見かける FreeDOS の解説には EDIT XCOPY TREE ATTRIB FORMAT FDISK などが載っていますが、この起動ディスクには入っていません。 打つと「無効なコマンド, またはファイル名です.」になります。 入っていないだけなので、必要なら自分でディスクに入れれば動きます。

Commands available on this disk

There are two kinds of command, and knowing the difference explains most "why doesn't it work" moments.

Always available (51 built-in commands)

These live inside COMMAND.COM itself, so they keep working even after you swap disks.

Files and directories DIR CD CHDIR CDD MD MKDIR RD RMDIR COPY DEL ERASE REN RENAME TYPE VOL TRUENAME WHICH DIRS PUSHD POPD
Screen and output CLS ECHO PROMPT TITLE BEEP PAUSE
Settings and info SET PATH DATE TIME VER VERIFY BREAK CHCP CTTY MEMORY LFNFOR
Input helpers ALIAS DOSKEY HISTORY
For batch files CALL FOR GOTO IF REM SHIFT EXIT
Memory LH LOADHIGH LOADFIX
Help ?

Available only while this disk is inserted (8 external commands)

Each of these is a single file on the disk. Swap the disk in drive A for another one and they stop working.

MEM Show free memory
EDLIN Write text (a line-based editor)
SYS Make another disk bootable
FDFORMAT Format a floppy (rarely needed on WebNP2)
BTNPART Partition a hard disk (same)
DEBUG Inspect memory and write machine code
HIMEMX / EMM386 Memory managers (in the 386 folder; not loaded by default)
FreeDOS guides on the web mention EDIT, XCOPY, TREE, ATTRIB, FORMAT, FDISK and friends, but they are not on this boot disk. Typing one gives "無効なコマンド, またはファイル名です." (invalid command or file name). Nothing is disabled — put the program on a disk and it will run.

DOS ならではの作法

ファイル名は「8文字 + 拡張子3文字」

READMEJA.TXT のように、名前は最大8文字、拡張子は最大3文字です。 長い名前や日本語の名前は基本的に使えません。 DIR の表示では、名前と拡張子が離れて READMEJA TXT のように見えます。

区切りは \(円マーク/バックスラッシュ)

386\EMM386.EXE のように書きます。Windows と同じで、 / ではありません。

まとめて指定する * と ?

  • DIR *.TXT — 拡張子が TXT のものすべて
  • DIR F*.* — F で始まるものすべて
  • COPY *.TXT B: — TXT を全部 B ドライブへ

実行中のプログラムを止める

Ctrl + C です。文字が延々流れて止まらないときに使います。

覚えておくと得をするキー

  • Tab — 途中まで打ったファイル名を補完する
  • ↑ / ↓ — 前に打ったコマンドを呼び出す

DOS conventions

File names are "8 characters + 3 for the extension"

Like READMEJA.TXT: up to 8 characters for the name and 3 for the extension. Long names generally do not work. In a DIR listing the two parts are shown apart, as READMEJA TXT.

The path separator is \

You write 386\EMM386.EXE. Same as Windows — not /.

Wildcards * and ?

  • DIR *.TXT — everything with the TXT extension
  • DIR F*.* — everything starting with F
  • COPY *.TXT B: — copy all TXT files to drive B

Stopping a running program

Ctrl + C. Use it when output keeps scrolling and will not stop.

Keys worth knowing

  • Tab — complete a partially typed file name
  • Up / Down — recall previous commands

実践1: ファイルを持ち込む・持ち帰る

DOS の中で作ったものを手元に取り出したり、逆にファイルを DOS へ渡したりできます。 くわしい操作は 使い方ページの「ファイル転送」 を見てください。おおまかには次の流れです。

  1. FDD2 の「ブランク作成」で空のフロッピーを1枚作る
  2. ファイルマネージャで、そのディスクへ手元のファイルを入れる
  3. DOS 側から DIR B: で見える。COPY B:名前 A: で取り込める
  4. 持ち帰るときは FDD2 の「ダウンロード」
WebNP2 の「ブランク作成」で出てくるフロッピーは すでにフォーマット済みです。 そのまま DIR B: が通るので、FDFORMAT を実行する必要はありません。

Recipe 1: getting files in and out

You can take what you made inside DOS back to your machine, and hand files to DOS the same way. For the details see "File transfer" in the Help page. The rough flow is:

  1. Use "New Blank" on FDD2 to create an empty floppy
  2. Put your files onto that disk with the file manager
  3. From DOS, DIR B: shows them; COPY B:name A: brings one in
  4. To take files home, use "Download" on FDD2
The floppy created by "New Blank" in WebNP2 is already formatted. DIR B: works immediately, so you do not need to run FDFORMAT.

実践2: テキストを書く(EDLIN)

このディスクには、Windows のメモ帳のようなエディタは入っていません。 あるのは EDLIN という行単位のエディタだけです。 1行ずつ番号で指定して編集する、かなり古いスタイルの道具です。

短い文章なら、実は COPY CON より簡単に書けます。

A:\>EDLIN B:MEMO.TXT      ← ファイル名を指定して起動
*I                        ← I で入力モードに入る
 : HELLO                  ← 1行ずつ打つ
 : FROM EDLIN
 :                        ← Ctrl+Z を押して Enter で入力終了
*E                        ← E で保存
*Q                        ← Q で終了して DOS へ戻る
ここが最大の落とし穴です。 ヘルプには「e 終了 (保存後)」と書いてありますが、 E は保存するだけで EDLIN から抜けません。 続けて Q を打ってください。
そして Q は確認なしでいきなり終了します。 保存していない行があっても、警告なしに捨てられます。 必ず E → Q の順で覚えてください。

EDLIN の中で ? を打つと、サブコマンドの一覧が日本語で出ます (i 挿入 / l リスト / d 削除 / s 検索 / r 置換 など)。

書いたファイルは TYPE B:MEMO.TXT で確認できます。

Recipe 2: writing text (EDLIN)

There is no Notepad-style editor on this disk. What you get is EDLIN, a line editor — an old-fashioned tool where you address each line by number.

For short text it is actually easier than COPY CON.

A:\>EDLIN B:MEMO.TXT      <- start it with a file name
*I                        <- I enters insert mode
 : HELLO                  <- type one line at a time
 : FROM EDLIN
 :                        <- press Ctrl+Z then Enter to finish
*E                        <- E saves
*Q                        <- Q quits back to DOS
This is the big trap. The built-in help says "e quit (after saving)", but E only saves — it does not leave EDLIN. Follow it with Q.
And Q quits immediately with no confirmation. Unsaved lines are discarded without a warning. Remember the order: E then Q.

Typing ? inside EDLIN lists its subcommands (i insert, l list, d delete, s search, r replace, and so on).

Check the result from DOS with TYPE B:MEMO.TXT.

実践3: 自分だけの起動ディスクを作る

SYS を使うと、空のフロッピーを それ単体で起動できるディスクに変えられます。 自分のプログラムを入れた「オリジナルの起動ディスク」が作れます。

  1. FDD2 の「ブランク作成」で空のフロッピーを入れる
  2. SYS B: を実行する
  3. 「System transferred.」と出れば成功
  4. FDD2 の「ダウンロード」で持ち帰り、次回それを FDD1 に入れて起動する
A:\>SYS B:
49938 Bytes transferred
Writing boot sector...
...
Copying COMMAND.COM...
69638 Bytes transferred
System transferred.
作った起動ディスクは、起動時に 「現在の日付は … / 新しい日付を入力してください」 と日付と時刻を聞いてきます。壊れているわけではありません。 Enter を2回押せば先に進みます。
毎回聞かれるのが煩わしければ、そのディスクに AUTOEXEC.BAT という名前のファイルを置いてください(中身は空でも構いません)。 同梱の FreeDOS ディスクにこれが入っているので、あちらでは聞かれないのです。

Recipe 3: build your own boot disk

SYS turns a blank floppy into a disk that boots on its own, so you can ship your own programs on an original boot disk.

  1. Insert a blank floppy with "New Blank" on FDD2
  2. Run SYS B:
  3. "System transferred." means it worked
  4. Download it from FDD2; next time, put it in FDD1 and boot from it
A:\>SYS B:
49938 Bytes transferred
Writing boot sector...
...
Copying COMMAND.COM...
69638 Bytes transferred
System transferred.
A disk you built this way asks for the date and time while booting: "現在の日付は … / 新しい日付を入力してください". Nothing is broken — press Enter twice to continue.
To stop it asking, put a file named AUTOEXEC.BAT on that disk (an empty one is fine). The bundled FreeDOS disk has one, which is why it never asks.

うまくいかないとき

画面に出るもの 意味と対処
無効なコマンド, またはファイル名です. そのコマンドが無い、または綴りが違います。? で一覧を確認してください。 外部コマンドの場合は、そのファイルが入ったディスクが刺さっているか確認します。
ファイルが見つかりません. 指定した名前のファイルがありません。DIR で綴りを確認します。
エラー ドライブの準備ができていません
中止(A), 無視(I), 再試行(R), 失敗(F)?
ディスクの入っていないドライブを読もうとしています。 固まったように見えますが入力待ちです。 A を押せば元に戻ります。 ディスクを入れてから R でやり直すこともできます。
文字が流れて止まらない Ctrl + C で止めます。/P を付けて実行し直すのも手です。
打った文字が画面に出ない エミュレータ画面がクリックされていない可能性があります。 画面を一度クリックしてから打ってください。
ERROR: 入力異常です。 EDLIN の中にいます。DOS のコマンドは使えません。 Q で抜けてください。

日本語を打ちたいときは、 使い方ページの「テキスト送信」 を使うと、手元で書いた文章をそのまま送り込めます。

When something goes wrong

What you see What it means
無効なコマンド, またはファイル名です. Invalid command or file name: it does not exist, or is misspelled. Check the list with ?. For an external command, check that the disk holding it is inserted.
ファイルが見つかりません. File not found. Check the spelling with DIR.
エラー ドライブの準備ができていません
中止(A), 無視(I), 再試行(R), 失敗(F)?
You tried to read a drive with no disk in it. It looks frozen, but it is waiting for input. Press A to abort and get back. You can also insert a disk and press R to retry.
Output scrolls forever Stop it with Ctrl + C, or rerun with /P.
Typing does nothing The emulator screen may not have focus. Click the screen once, then type.
ERROR: 入力異常です。 You are still inside EDLIN, where DOS commands do not work. Leave with Q.

To type Japanese, use "Sending text" in the Help page — it pushes text you wrote on your own machine straight into the guest.

おまけ: DEBUG でプログラムを書いてみる

ここから先は開発寄りのおまけです。読み飛ばして構いません。

同梱の DEBUG は、メモリを覗いたり、 その場で機械語のプログラムを書いて動かしたりできる道具です。 コンパイラを何も用意しなくても、この起動ディスクだけでプログラムが書けます。

画面に HELLO と出すだけのプログラムです。

A:\>DEBUG
-A 100            ← 100番地から書き始める
MOV AH,9
MOV DX,110
INT 21
INT 20
                  ← 何も打たずに Enter で終わり
-E 110 "HELLO$"   ← 110番地に文字を置く
-G               ← 実行
HELLO
Program terminated normally (0000)
-Q               ← 終了

? でコマンド一覧(英語)が出ます。 D でメモリを覗く、U で逆アセンブル、 L / W でディスクのセクタを直接読み書き、といったことができます。

DEBUG の中では DOS のコマンド(CLS など)は使えません。 打つと ^ Error になります。Q で DOS へ戻ってください。

PC-98 そのもののプログラミング(画面への文字の書き方、キー入力、割り込みなど)に 興味が出たら、 WebNP2 Wiki に実測ベースのハードウェアリファレンスがあります。

Bonus: writing a program with DEBUG

From here on it is a bonus for the development-minded. Feel free to skip it.

The bundled DEBUG lets you inspect memory and write and run machine code on the spot. No compiler needed — this boot disk alone is enough to write a program.

Here is one that just prints HELLO.

A:\>DEBUG
-A 100            <- start assembling at address 100
MOV AH,9
MOV DX,110
INT 21
INT 20
                  <- press Enter on an empty line to finish
-E 110 "HELLO$"   <- place the text at address 110
-G               <- run it
HELLO
Program terminated normally (0000)
-Q               <- quit

? lists its commands. D dumps memory, U disassembles, and L / W read and write raw disk sectors.

DOS commands (such as CLS) do not work inside DEBUG; they give ^ Error. Use Q to return to DOS.

If programming the PC-98 itself starts to interest you — writing to the text screen, reading the keyboard, hooking interrupts — the WebNP2 Wiki holds a hardware reference built entirely from measurements.

同梱しているものについて

同梱の起動ディスクは、MS-DOS 互換 OS「FreeDOS」を PC-9801/9821 向けに移植した FreeDOS(98) です。カーネルは lpproj/fdkernel、 コマンドインタプリタは lpproj/freecom_dbcs2 によるもので、いずれも GPLv2+ のフリーソフトウェアです。

PC-98 実機の ROM データや市販ソフトウェアは一切含まれていません。 エミュレータを試すのに OS を別途用意しなくて済むよう、利便性のために同梱しています。

このページの内容は、WebNP2 上で同梱ディスクを実際に起動し、 各コマンドを実行して確認したものです(2026-08-25 / FreeCom 0.85a_DBCS)。

About what is bundled

The bundled boot disk is FreeDOS(98), a port of the MS-DOS compatible OS FreeDOS to the PC-9801/9821. The kernel comes from lpproj/fdkernel and the command interpreter from lpproj/freecom_dbcs2; both are free software under GPLv2+.

No PC-98 ROM data and no commercial software are included. It is bundled purely so that you can try the emulator without having to obtain an OS disk image yourself.

Everything on this page was verified by booting the bundled disk on WebNP2 and running the commands (2026-08-25 / FreeCom 0.85a_DBCS).