Os8088: A powerful Mac-like OS for the IBM XT, 286, 386

Os8088: A powerful Mac-like OS for the IBM XT, 286, 386

Os8088:一款为 IBM XT、286、386 打造的强大类 Mac 操作系统

os8088 1.0 A graphical operating system for the IBM PC/XT A Macintosh System 1-style desktop for the Intel 8086, written in real-mode assembly and booted from a floppy. Overlapping windows, pull-down menus, a serial mouse, loadable programs, and pre-emptive multitasking — which the 1984 Macintosh did not have. os8088 1.0 是一款专为 IBM PC/XT 设计的图形化操作系统。它为 Intel 8086 处理器提供了一种类似 Macintosh System 1 的桌面环境,完全使用实模式汇编语言编写,并可通过软盘启动。它具备重叠窗口、下拉菜单、串行鼠标支持、可加载程序以及抢占式多任务处理功能——这些都是 1984 年的 Macintosh 所不具备的。

in VGA, 16 colors640x480 in Hercules, mono720x348 in CGA, mono640x200 of RAM256K byte kernel80,486 pre-emption, 12 tasks18.2Hz Boot it in your browser Download the floppies 支持 VGA(16 色,640x480)、Hercules(单色,720x348)以及 CGA(单色,640x200)。系统内核占用 256KB 内存,支持 8086/80486 处理器,具备抢占式多任务处理能力(12 个任务,18.2Hz 频率)。你可以在浏览器中直接运行它,或下载软盘镜像。

Screenshots os8088 Five programs running at once. A Note Pad loaded off the software floppy, a ticking Clock, a bouncing ball, the Control Panel and the Task Manager, each a separate instance with its own dock tile. The Task Manager reports the machine at 70% busy and 147K of RAM in use. 截图展示了 os8088 同时运行五个程序的情景:一个从软件软盘加载的记事本、一个走时的时钟、一个弹跳球、控制面板和任务管理器,每个程序都是独立的实例,并拥有各自的 Dock 图标。任务管理器显示机器负载为 70%,内存占用为 147KB。

The desktop at rest, a few seconds after boot. The 512-byte boot sector has loaded the kernel and jumped to it. There is a floppy icon for each drive the machine reports through the BIOS, and the dock is empty because os8088 launches nothing at startup. 这是开机几秒后的桌面静止状态。512 字节的引导扇区已加载内核并跳转执行。BIOS 报告的每个驱动器都有一个对应的软盘图标,Dock 栏为空,因为 os8088 在启动时不会自动运行任何程序。

A menu is open only while the button is held. Press in the menu bar, drag through the items, release on the one you want. There is no spare copy of the screen to restore from, so the pixels behind the pull-down are copied into a block claimed off the heap for exactly as long as the menu is up. 菜单仅在按住鼠标按钮时保持打开。在菜单栏按下,拖动经过选项,在目标选项上松开即可。由于没有多余的屏幕缓冲区用于恢复,下拉菜单背后的像素会被复制到堆内存中,并在菜单显示期间一直占用该空间。

A title-bar drag, caught halfway through. The window has not moved yet. A hollow one-pixel outline tracks the pointer in XOR mode, so erasing it is the identical operation to drawing it — you can watch it invert the Disk window’s own title text where it crosses. 拖动标题栏的过程。窗口尚未移动,一个空心的单像素轮廓以 XOR 模式跟随指针移动。因此,擦除它与绘制它的操作完全相同——当它经过磁盘窗口的标题文字时,你可以看到文字被反色显示。

Several instances of the same program. A Disk window, two Clocks and two Bounces, each a separate record in the instance table, each cascaded sixteen pixels down and right from the previous copy of its kind. Every instance gets a dock tile, and the tile’s position is its table slot. 同一程序的多个实例。一个磁盘窗口、两个时钟和两个弹跳球,每个都在实例表中拥有独立记录,并相对于同类的前一个副本向右下方偏移 16 像素排列。每个实例都有一个 Dock 图标,图标的位置对应其在表中的槽位。

Keystrokes reach the front window only. Two lines typed on the emulated keyboard, wrapped in the window’s 258-pixel content area, with the caret after the last character. Each Note Pad instance gets its own 512-character buffer, and as many can be open at once as the heap has room for. 按键仅发送至最前端的窗口。在模拟键盘上输入的两行文字,在窗口 258 像素的内容区域内自动换行,光标位于最后一个字符之后。每个记事本实例都有独立的 512 字符缓冲区,只要堆内存空间允许,可以同时打开多个记事本。

The About box reads live kernel state. The word pre-emptive on the third line is rendered from the kernel’s scheduler byte every time the box paints, so the About box, the Control Panel and the Task Manager cannot disagree about which scheduler is running. “关于”对话框读取的是实时内核状态。第三行的“pre-emptive”(抢占式)字样在每次对话框重绘时都会从内核的调度器字节中读取,因此“关于”对话框、控制面板和任务管理器对于当前运行的调度器类型绝不会产生分歧。

The Task Manager, with its history graph filled. One sample every nine ticks into a 160-column ring, so a full sweep across the window is about eighty seconds of history. Apps with no task of their own get their window callbacks timed at the dispatch site and billed to them, so the rows still add up to one total. 任务管理器显示了已填满的历史记录图表。每 9 个时钟滴答采样一次,存入 160 列的环形缓冲区,因此窗口横向扫过一次大约代表 80 秒的历史记录。没有独立任务的应用程序,其窗口回调会在分发点进行计时并计入其账下,确保所有行加起来的总和保持一致。

The scheduler setting, read straight from the kernel. The settings pane keeps no copy of the scheduler mode: it reads the kernel’s mode byte every time it draws. Click Cooperative and the very next timer tick declines to switch tasks, with no restart and no handshake. 调度器设置直接从内核读取。设置面板不保存调度模式的副本:它在每次绘制时都会读取内核的模式字节。点击“协作式”(Cooperative),下一个时钟滴答就会停止切换任务,无需重启,也无需握手。

Two of these five programs are minimized. Clock and Bounce were sent to the dock with the minimize box in their title bars, and their tiles draw inverted so you can see at a glance what is hidden. Minimized is not stopped — the Clock is still counting, it only skips drawing. 这五个程序中有两个被最小化了。时钟和弹跳球通过标题栏的最小化按钮被发送到 Dock 栏,它们的图标以反色绘制,让你一眼就能看出哪些程序被隐藏了。最小化并不意味着停止——时钟仍在计时,只是跳过了绘制过程。

The file manager, reading the software floppy. The software disk mounted on drive B:, with each file’s name, size and its own icon. The icons come off the disk itself — the browser peek each file’s first sector, where a package carries its own 16x16 bitmap — so the list shows a real icon without loading it. 文件管理器正在读取软件软盘。软件磁盘挂载在 B 盘,显示每个文件的名称、大小及其图标。图标直接来自磁盘本身——浏览器会查看每个文件的第一个扇区,其中包含该程序自带的 16x16 位图,因此列表无需加载程序即可显示真实的图标。

Two loaded programs, each in its own segment. MINES and HELLO came off the same floppy into separate regions claimed off the heap — 2,048 bytes and 512 — and each runs at offset zero inside its own, so nothing had to be patched on the way in. 两个已加载的程序,每个都在各自的内存段中。MINES 和 HELLO 从同一张软盘加载到从堆中申请的独立区域(分别为 2048 字节和 512 字节),且每个程序都在各自区域的零偏移处运行,因此在加载过程中无需进行任何补丁修改。

Minesweeper: 1,510 bytes, loaded from the floppy. Double-clicking the MINES row read it into a segment of its own and opened its window; from then on its paint, key and click procs are plain near offsets the kernel calls exactly like a built-in’s. This board is the only place in the system that uses more than two colors. 扫雷游戏:1510 字节,从软盘加载。双击 MINES 行将其读入独立的内存段并打开窗口;此后,其绘制、按键和点击处理程序就是内核调用的普通近偏移地址,与内置程序完全一样。这个棋盘是系统中唯一使用超过两种颜色的地方。

ArtfulType, a Markdown writer. ActionRetro’s writing app for classic 68k Macintoshes, rebuilt for the 8086. Full-screen Writer mode with its own menu bar, styling as you type, and plain Markdown files that open anywhere else. ArtfulType,一款 Markdown 编辑器。这是 ActionRetro 为经典 68k Macintosh 开发的写作应用,现已为 8086 架构重构。它具备全屏写作模式、专属菜单栏、实时样式渲染,并生成可在任何地方打开的纯 Markdown 文件。

Tracker, a four-channel MOD player. Load an Amiga .MOD off the floppy and play it: the pattern scrolls under the playing row, four channel meters move with the music, and the desktop stays usable while it plays. Tracker,一款四声道 MOD 音乐播放器。从软盘加载 Amiga .MOD 文件并播放:乐谱在播放行下方滚动,四个声道电平表随音乐跳动,且在播放时桌面依然可以正常使用。

Paint, a bitmap editor. Pencil, eraser, fill, shapes, selection, eyedropper and text, with a resizable canvas, undo, a clipboard and sixteen colors. Reads and writes BMP and GIF. Paint,一款位图编辑器。具备铅笔、橡皮擦、填充、形状、选择、吸管和文本工具,支持可调整大小的画布、撤销、剪贴板和 16 色显示。支持读写 BMP 和 GIF 格式。

Fractal, a Mandelbrot explorer. Zoom in, pick a color scheme, and watch the picture sharpen through three passes. It draws in the background, so the rest of the desktop keeps working while it renders. Fractal,一款曼德博集合探索器。支持缩放、选择配色方案,并观察图像通过三轮渲染逐渐清晰的过程。它在后台绘制,因此在渲染时桌面其他部分仍可正常工作。

Piano, a two-octave keyboard. Play it with the mouse or the computer keys. Notes appear on the staff above as you play, and the staff plays back. Three built-in songs, and FM synthesis on a machine with a sound card. Piano,一个双八度键盘。可以用鼠标或电脑键盘演奏。演奏时音符会出现在上方的五线谱上,并支持回放。内置三首歌曲,若机器配有声卡,还支持 FM 合成音效。

Recorder, for sampled sound. Record, stop and play, with a waveform display and a built-in demo tone. It uses a Sound Blaster where the machine has one and the PC speaker where it does not; the status line says which. Recorder,用于采样录音。支持录制、停止和播放,带有波形显示和内置演示音。如果机器配有 Sound Blaster 声卡,它会优先使用,否则使用 PC 扬声器;状态栏会显示当前使用的设备。

Solitaire: Klondike. Deal from the stock, drag cards and runs between the seven columns, build the four foundations up from the aces. Cards drag with an outline, the same way windows do. 纸牌游戏:Klondike。从牌堆发牌,在七列之间拖动纸牌,从 A 开始构建四个基座。纸牌拖动时带有轮廓,与窗口拖动方式相同。

Arkanoid, a brick-breaker. Move the paddle with the arrow keys, clear six rows of bricks, keep the score across levels. The ball runs on its own timer, so it keeps a steady speed whatever else is happening. Arkanoid,一款打砖块游戏。使用方向键移动挡板,清除六行砖块,并跨关卡记录分数。球体运行在独立的定时器上,因此无论系统其他部分在做什么,它都能保持稳定的速度。

Minesweeper, on a 9x9 board with ten mines. Click a cell to open it, F for flag mode, N for a new game. Empty regions open in one click, and the first click is always safe — the mines are laid af 扫雷游戏,9x9 棋盘,包含 10 个地雷。点击单元格打开,F 键切换标记模式,N 键开始新游戏。空白区域可一键打开,且第一次点击永远安全——地雷是在第一次点击后才布置的。