Word Unperfect
public
Read
Owner: themaster
Branch: main
Commits: 0
Git CLI clone URL
git clone https://www.xt-emporium.com/git/word-unperfect.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
word-unperfect
/
rev
/
WP_CODE_SEGMENTS.md
File editor
# WordPerfect EXE code segments (DOS near model) Ghidra names functions as `FUN_<segment>_<offset>`. The **segment prefix is not a subsystem by itself**, but in this build it clusters responsibilities: | CS (hex) | Typical role | Examples after rename | |----------|----------------|----------------------| | **0x1000** | Core engine: **parser**, **layout state**, **record/secondary buffers**, metrics, most `g_wp_layout` users | `parse_next_command_or_word`, `parser_dispatch_input_sequence`, `layout_emit_or_measure_line_window`, buffer helpers (`append_byte_to_buffer`, …) | | **0x2000** | Large secondary logic — table-driven **format / graphics / math** kernels | Renamed batch: `format_math_raster_kernel_main`, `format_main_hypervisor_table_loop`, `format_run_stream_table_main_loop`, `format_bresenham_line_step_core`, … | | **0x3000** | **Device / I/O / control-flow** paths: BIOS `out`, decompiler “register cells” at low linear addresses, scanner-style state machines | Partially renamed: DOS/overlay stream (`layout_overlay_word_if_dos_stream_idle_else_busy_threshold`, `layout_overlay_table_call_or_drain_dos_stream_state`, `layout_flip_dos_char_sign_and_dos_service_hooks`), video BIOS (`layout_video_int10_repeat_cx_update_mode_slots`, `layout_video_int10_or_ceea_when_dos_stream_idle`), mode-table fill (`layout_fill_seven_video_words_from_overlay_poll`), many `FUN_3000_*` still raw at low addresses (Ghidra noise) | | **0x4000** | **Shell / screen / formatting** cluster (most `FUN_4000_*` in the manifest are now `shell_*`; a few tail symbols remain raw where Ghidra control-flow is unusable: `FUN_4000_58e0`, `FUN_4000_59ce`, `FUN_4000_5bca`, `FUN_4000_5c4f`). Topics: string emit, **CLI** (`shell_normalize_and_process_cli_token`, `shell_scan_cli_tokens_*`, `shell_process_cli_token_tail`), glyph tables / bytecode, env/config scan, drive/path formatting in overlay scratch, INT 10/21, PIT bootstrap, keyboard/DOS shell, EMS paging, timer/IRQ housekeeping, and record-buffer flows. Representative names now use the canonical decode/route wording (`shell_decode_hardware_service_poll_chain`, `shell_decode_program_segment_prefix_swap_overlay_expanded_memory_pack`, `shell_decode_source_index_handler_overlay_pack`, `shell_decode_bootstrap_state_slots_from_extra_segment_bx`, `shell_retry_dos_int21_and_clear_startup_flags`, `shell_blit_secondary_record_to_overlay_window`). | `shell_xor7_decode_status_string_inplace`, `shell_bootstrap_and_run_ui_state_loop`, `shell_compare_exec_state_then_patch_overlay`, … | | **0x45f2**, **0x5ad2**, … | **Overlays** invoked from 0x1000 with a segment argument | **Record/control bridges** now use canonical overlay naming (`overlay_invoke_primary_record_service`, `overlay_probe_secondary_record_buffer`, `overlay_dispatch_layout_control_word`, `overlay_invoke_after_secondary_record_slide`, `overlay_finalize_record_window_state`). **TUI** remains centered on `overlay_emit_streamed_char`; low-level I/O helpers use normalized names like `overlay_low_level_io_route_noise`. | ## Renaming policy - **“Original” names** (Microsoft / WordPerfect debug symbols) are **not present** in this artifact; names are **hypothesis-level** and should be revised when string xrefs or manuals contradict them. - High-traffic parser/layout hubs are renamed in `apply_wp_function_renames.py` so the monolith and extracted `wp_*.c` slices stay in sync. - Keep **Ghidra address comments** (`@ 1000:0afd`) on function definitions so you can round-trip to the database.
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
main
Visibility
public
Your access
Read
Remote
None
File activity
View file history