Spotlight › Written in C
CWORD and the C toolchain
A SmallerC application using the os8088 package ABI, with menu handlers in an on-demand overlay.
- C source
- 8,350 lines
- Executable
- 54,450 bytes
- Target CPU
- 4.77 MHz 8088
01 / Compiler and ABI
Compiler and ABI
SmallerC emits assembly that is integrated into the NASM package build. CWORD uses the same loader and application API as assembly packages. The compiler is an optional host dependency installed by tools/setup-cc.sh.
The user interface follows Word for Windows 1.1a resources. Microsoft's source was released by the Computer History Museum in 2014 for non-commercial use; CWORD is a separate implementation, not that source recompiled.
02 / Editor captures
Editor captures
03 / C subset and segment rules
C subset and segment rules
Near pointers address the package data segment; stack storage is in a different segment. The build rejects taking addresses of automatic variables, struct copies and by-value struct passing/returns in this toolchain. Use static storage where an address must escape.
This configuration provides neither C floating-point nor 32-bit long arithmetic. That is a toolchain/runtime constraint, not an intrinsic 8086 restriction. Functions are checked against a 96-byte local-stack limit within the 256-byte task stack; the recorded CWORD maximum is 26 bytes.
04 / Resident code and overlay
Resident code and overlay
The package has a roughly 60KB resident budget under the current os8088 ABI. Its editor and redraw path remain resident; file dialogs, conversion, search, sorting and other menu commands occupy the recorded 18,564-byte CWORD.OVL.
A missing overlay leaves the resident editor available and makes affected commands report an error. Keep the two files together. The package budget is an OS/ABI limit, not the total memory an 8086 can address.
05 / Implemented features
Implemented features
CWORD supports character and paragraph formatting, selection, search/replace, sorting and RTF interchange. It is separate from the assembly WORD package, which writes binary Word documents. A TextEdit-generated RTF was included in interoperability testing.
Printing, spelling, thesaurus, macros, outlining, footnotes, tables, headers/footers and Undo are absent in the captured build. BIOS key aliases also prevent distinguishing Ctrl-H/I/M from Backspace/Tab/Enter through this input path; the corresponding commands remain in the UI.
06 / Run or build CWORD
Run or build CWORD
Use the dedicated CWORD image or its folder on the everything set. Keep CWORD.O88 and CWORD.OVL together; WELCOME.RTF exercises formatting and interchange.