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_shell_console.h
File editor
#ifndef WP_SHELL_CONSOLE_H #define WP_SHELL_CONSOLE_H #include "wp_layout_shared.h" /* Overlay 0x45f2: one character per call (AL on hardware). `caller_code_segment` is 0x1000 * (core) or 0x4000 (shell/format cluster) at call sites. */ undefined2 __cdecl16near overlay_emit_streamed_char(undefined2 caller_code_segment); void __cdecl16near core_emit_single_char_via_overlay(void); /* Monolith uses implicit SI / globals; these _ex helpers are the threaded, reviewable ports. */ void __cdecl16near core_emit_overlay_char_if_dos_stream_inactive_ex(WpLayoutGlobals *wl); undefined2 __cdecl16near core_emit_cstring_via_dos_gated_overlay_ex(WpLayoutGlobals *wl, char *s); void __cdecl16near shell_emit_null_terminated_via_overlay_ex(char *s); /* Declarations for the monolith ABI (register SI / no args) — definitions in decompiled_wp_exe.c. */ undefined2 __cdecl16near core_emit_cstring_via_dos_gated_overlay(void); void __cdecl16near core_emit_overlay_char_if_dos_stream_inactive(void); void __cdecl16near shell_emit_null_terminated_via_overlay(void); void __cdecl16near shell_no_op_proxy(void); /* Compatibility alias retained for existing monolith naming expectations. */ void __cdecl16near shell_no_op_proxy_compat_alias(void); void __cdecl16near shell_video_driver_hook_no_op(void); void __cdecl16near shell_video_driver_hook_no_op_compat_alias(void); void __cdecl16near shell_video_driver_no_op_proxy(void); void __cdecl16near shell_video_driver_no_op_proxy_compat_alias(void); void __cdecl16near shell_video_driver_no_op_proxy_ex(void); void __cdecl16near shell_video_driver_no_op_proxy_ex_compat_alias(void); undefined2 __cdecl16near shell_map_ax_through_rom_glyph_table(uint ax); void __cdecl16near shell_copy_length_prefixed_prompt_block(void); undefined2 __cdecl16near shell_copy_shell_cli_line_to_buffer(void); void __cdecl16near shell_copy_len_prefixed_block_232e_to_4df9(void); undefined2 __cdecl16near shell_xor7_decode_status_string_inplace(void); undefined2 __cdecl16near shell_install_seven_video_words_from_rom_table_a(void); undefined2 __cdecl16near shell_install_seven_video_words_from_rom_table_b(void); undefined4 __cdecl16near shell_walk_video_mode_list_and_call_table(void); undefined * __cdecl16near shell_reset_layout_state_for_startup_path(void); undefined4 __cdecl16near shell_retry_dos_int21_and_clear_startup_flags(void); void __cdecl16near shell_mark_idle_flag_via_dos_int21(void); void __cdecl16near shell_decoder_halt_unreachable(void); void __cdecl16near shell_initialize_and_copy_secondary_state_tables(void); void __cdecl16near shell_blit_secondary_record_to_overlay_window(void); undefined2 __cdecl16near shell_expand_c0_escape_tokens_into_bx_buffer(void); void __cdecl16near shell_route_device_dos_environment_eb88(void); void __cdecl16near shell_route_dos_environment_chain(void); void __cdecl16near shell_copy_29_byte_glyph_template(byte *dst, const byte *src); void __cdecl16near shell_skip_cstring_then_video_chain_route(void); void __cdecl16near shell_route_after_video_glyph_chain(void); undefined2 __cdecl16near shell_decode_unreachable_guard_site_a(void); void __cdecl16near shell_decode_unreachable_guard_site_b(void); undefined2 * __cdecl16near shell_decode_unreachable_guard_site_c(uint *param_1); void __cdecl16near shell_decode_unreachable_guard_site_d(undefined2 param_1, int param_2); undefined2 __cdecl16near shell_slide_secondary_record_ring_by_2kb(undefined2 passthrough_dx); void __cdecl16near shell_shift_primary_record_window_by_2kb_carry_gated(undefined2 in_cf); uint __cdecl16near shell_chunked_video_copy_by_2kb_handler(void); void __cdecl16near shell_compact_primary_record_ring_by_2kb(void); uint __cdecl16near shell_wrap_segment_index_past_16k_boundary(uint bx); void __cdecl16near shell_read_dos_line_into_shell_buffer(void); void __cdecl16near shell_validate_or_fill_dos_tempname_slots(void); void __cdecl16near shell_merge_video_shadow_flags_into_bios_option(void); /* No-op compatibility hooks now intentionally delegate to shell_no_op_proxy() for explicit adapter call-through. `shell_no_op_proxy()` is retained as a compatibility alias. */ void __cdecl16near shell_cli_parse_phase_no_op(void); void __cdecl16near shell_cli_parse_phase_no_op_compat_alias(void); void __cdecl16near shell_decode_hardware_proxy_no_op(void); void __cdecl16near shell_decode_hardware_proxy_no_op_compat_alias(void); void __cdecl16near shell_decode_spin_yield_no_op(void); void __cdecl16near shell_decode_hardware_query_proxy_no_op(void); void __cdecl16near shell_decode_hardware_query_proxy_no_op_compat_alias(void); void __cdecl16near shell_hw_irq_proxy_no_op_return(void); void __cdecl16near shell_hw_irq_proxy_no_op_return_compat_alias(void); void __cdecl16near shell_hw_service_no_op_return(void); void __cdecl16near shell_hw_service_proxy_no_op_return_compat_alias(void); void __cdecl16near shell_compare_exec_state_then_patch_overlay(undefined2 in_bx); /* These map to the same no-op adapter sink as above. */ void __cdecl16near shell_ems_map_hook_no_op(void); void __cdecl16near shell_ems_map_hook_no_op_compat_alias(void); void __cdecl16near shell_overlay_no_op_return_immediate(void); void __cdecl16near shell_overlay_no_op_return_immediate_compat_alias(void); void __cdecl16near shell_copy_29_bytes_si_to_di(byte *dst, const byte *src); void __cdecl16near shell_adjust_byte_at_di_plus2_by_dh(char *di_base, char dh_delta); void __cdecl16near shell_copy_cx_bytes_si_to_di(byte *dst, const byte *src, uint byte_count); void __cdecl16near shell_copy_printable_chars_until_control(const byte *src, const byte *src_end, byte *dst); void __cdecl16near shell_assign_decode_flags_from_al(byte flags); int __cdecl16near shell_compute_al_times4_plus_bx_bucket_index(byte al_byte, uint bx); undefined2 __cdecl16near return_param2_passthrough(undefined2 param_1, undefined2 param_2); /* Video/BIOS coordination — large functions in decompiled_wp_exe.c. */ void __cdecl16near shell_video_bios_mode_coordinate(void); void __cdecl16near shell_video_bios_coordinate_from_core_segment(void); /* Small ports — explicit buffer / no register ABI (see .c). */ undefined2 __cdecl16near shell_xor7_decode_status_string_inplace_ex(byte *buffer); /* shell_copy_printable_chars_until_control — copy [src,src_end) to dst until control (<0x21), 0x8b, or end; NUL-terminate. */ void __cdecl16near shell_copy_printable_chars_until_control_ex(const byte *src, const byte *src_end, byte *dst); /* Byte-swap / pack word at *src into DOS-linear 0x5ad2 (overlay pack cell). */ void __cdecl16near shell_pack_overlay_word_from_di_to_5ad2_ex(const undefined2 *src_word); /* Same rule as shell_normalize_and_process_cli_token inner loop: 'a'..'z' -> upper. */ byte __cdecl16near shell_fold_cli_ascii_lowercase_ex(byte b); /* shell_set_error_flag_if_machine_video_bit5 — if `(machine_flags & 0x20)` set `*error_flag_out = 1` (firmware used 0x6774 / 0x9a4a). */ void __cdecl16near shell_set_error_flag_if_machine_video_bit5_ex(byte machine_flags_byte, byte *error_flag_out); /* shell_copy_cli_segment_until_semicolon — copy from *inout_src into dst until '\0' or ';' (then skip spaces); append `;\0`. */ undefined2 __cdecl16near shell_copy_cli_segment_until_semicolon_ex(char **inout_src, char *dst, undefined2 passthrough); /* shell_adjust_byte_at_di_plus2_by_dh / 1888 — explicit-pointer forms of register SI/DI/DH helpers. */ void __cdecl16near shell_adjust_byte_at_di_plus2_by_dh_ex(char *di_base, char dh_delta); void __cdecl16near shell_copy_cx_bytes_si_to_di_ex(byte *dst, const byte *src, uint byte_count); void __cdecl16near shell_copy_29_bytes_si_to_di_ex(byte *dst, const byte *src); /* Seven × (stride 0x14) writes: *(uint16_t*)(base + 4 + i*stride) = src[i] — firmware 0x6371 chain. */ void __cdecl16near shell_install_seven_video_mode_words_stride14_ex(const undefined2 *src, int chain_base_linear, uint slot_stride_bytes); /* shell_map_ax_through_rom_glyph_table — high byte of ax indexes table, low byte passes through (table at 0x2fe9 in firmware). */ undefined2 __cdecl16near shell_map_ax_through_rom_byte_table_ex(uint ax, const byte *table_base); /* shell_assign_decode_flags_from_al — transient decomp flag byte at layout +0xb (firmware passes AL at call sites). */ void __cdecl16near shell_assign_decode_flags_from_al_ex(WpLayoutGlobals *wl, byte flags); /* shell_wrap_segment_index_past_16k_boundary — fold linear page index past 0x3FFF using 0xC000 steps (16-bit paragraph math). */ uint __cdecl16near shell_wrap_bx_down_past_0x3fff_ex(uint bx); /* shell_compute_al_times4_plus_bx_bucket_index — (AL & 0xff)*4 plus one per 0x400 BX bucket (BX reduced mod 0x400). */ int __cdecl16near shell_index_al_times4_plus_bx_0x400_buckets_ex(byte al_byte, uint bx); /* shell_video_driver_hook_no_op — explicit empty hook in video/decomp paths for this host port. */ /* shell_video_driver_hook_no_op now routes through the shared no-op wrapper sink. */ void __cdecl16near shell_video_driver_hook_no_op_ex(void); /* shell_timer_irq_rotate_stack_refresh_cli_line — rotate *cell by (count & 7); mirrors IRQ path nibble shuffle before timer tick. */ void __cdecl16near shell_irq_stack_byte_rotate_right_by_count_mod8_ex(byte *cell, uint count); /* shell_timer_irq_rotate_stack_refresh_cli_line / 2acb — `g_layout_ivt_timer_ad0 += 1` in explicit form. */ void __cdecl16near shell_increment_ivt_timer_counter_ex(WpLayoutGlobals *wl); /* shell_copy_shell_cli_line_to_buffer — copy until '\\n' or '\\0', at most max_copy chars, then NUL-terminate (firmware max 0x13). */ void __cdecl16near shell_copy_shell_cli_line_to_buffer_4192_ex(const char *src, char *dst, int max_copy); /* shell_copy_length_prefixed_prompt_block — `out[0]=len`, copy `len` bytes from `src`, then trailing NUL (mirrors 0x232e/0x4df9 layout). */ void __cdecl16near shell_copy_len_prefixed_block_ex(byte len, const byte *src, byte *out); /* shell_validate_or_fill_dos_tempname_slots — three filename slots: fold lower ASCII, allow alnum + '_' + '{'; empty slots become 0x5f. */ void __cdecl16near shell_validate_or_fill_dos_tempname_bytes_81f2_ex(byte *three_byte_slots); /* shell_decode_find_page_run_matching_slots — fold linear `dx` into 0..0xFFF, incrementing `*cl_io` once per 0x1000 subtracted. */ void __cdecl16near shell_decode_fold_dx_into_page_with_cl_carry_ex(uint *dx_io, byte *cl_io); #endif #ifndef IN_MACRO_DEFINED #define IN_MACRO_DEFINED #define in(port) 0 #endif
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