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.c
File editor
#include "wp_shell_console.h" #include "wp_layout_legacy_macros.h" #include "wp_dos_runtime_adapter.h" void __cdecl16near shell_compare_exec_state_then_patch_overlay(undefined2 in_bx); undefined4 __cdecl16near shell_walk_video_mode_list_and_call_table(void); void __cdecl16near shell_mark_idle_flag_via_dos_int21(void); void __cdecl16near shell_copy_29_byte_glyph_template(byte *dst, const byte *src); void __cdecl16near shell_route_dos_environment_chain(void); void __cdecl16near shell_skip_cstring_then_video_chain_route(void); void __cdecl16near shell_route_after_video_glyph_chain(void); void __cdecl16near shell_decoder_halt_unreachable(void); undefined2 shell_decode_unreachable_guard_site_a(void); void shell_decode_unreachable_guard_site_b(void); undefined2 * shell_decode_unreachable_guard_site_c(uint *param_1); void shell_decode_unreachable_guard_site_d(undefined2 param_1, int param_2); undefined2 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 shell_chunked_video_copy_by_2kb_handler(void); void __cdecl16near shell_compact_primary_record_ring_by_2kb(void); void __cdecl16near shell_read_dos_line_into_shell_buffer(void); void __cdecl16near shell_validate_or_fill_dos_tempname_slots(void); undefined2 shell_map_ax_through_rom_glyph_table(uint ax); /* External bridge helpers expected from the engine/overlay host layer. */ void __cdecl16near engine_far_call_7dd6(undefined2 arg); void __cdecl16near engine_far_call_0656(undefined2 arg); void __cdecl16near engine_far_call_323e(undefined2 arg); void __cdecl16near engine_far_call_33b4(void); void __cdecl16near engine_far_call_7e66(undefined2 arg); void __cdecl16near engine_far_call_83a8(undefined2 arg); void __cdecl16near shell_init_glyph_tables_and_exec_overlay_probe(void); void shell_indirect_call_table(undefined2 table_selector); void __cdecl16near overlay_adjust_record_stream_cursor(undefined2 segment); void __cdecl16near overlay_merge_layout_state_word(undefined2 segment); void __cdecl16near shell_ems_assign_page_frames_for_decode_slots(void); void __cdecl16near layout_video_int10_repeat_cx_update_mode_slots(void); undefined __cdecl16far firmware_io_port_input_proxy(void); void __cdecl16near firmware_io_word_transfer_step(void); void halt_baddata(void); /* Shared no-op adapter sink for compatibility hookpoints that remain inert on this host port. */ void __cdecl16near shell_no_op_proxy(void) { return; } /* Compatibility alias retained for legacy monolith naming, forwarding to the canonical adapter sink. */ void __cdecl16near shell_no_op_proxy_compat_alias(void) { shell_no_op_proxy(); } void __cdecl16near shell_video_driver_no_op_proxy_ex(void) { /* explicit adapter call-through */ shell_no_op_proxy(); } void __cdecl16near shell_video_driver_no_op_proxy_ex_compat_alias(void) { /* compatibility alias retained for decompiled naming */ shell_video_driver_no_op_proxy_ex(); } /* Extracted, explicit-parameter ports of the small TUI/text-output helpers. Monolith symbols * use the same base names without _ex / without WpLayoutGlobals* (see wp_shell_console.h). */ void __cdecl16near core_emit_single_char_via_overlay(void) { overlay_emit_streamed_char(0x1000); return; } void __cdecl16near core_emit_overlay_char_if_dos_stream_inactive_ex(WpLayoutGlobals *wl) { if (wl->dos_char_01f5 < '\x01') { core_emit_single_char_via_overlay(); } return; } undefined2 __cdecl16near core_emit_cstring_via_dos_gated_overlay_ex(WpLayoutGlobals *wl, char *s) { char *pcVar1; char *unaff_SI; undefined2 in_AX; unaff_SI = s; in_AX = 0; while (pcVar1 = unaff_SI, unaff_SI = unaff_SI + 1, *pcVar1 != '\0') { core_emit_overlay_char_if_dos_stream_inactive_ex(wl); } return in_AX; } void __cdecl16near shell_emit_null_terminated_via_overlay_ex(char *s) { char *pcVar1; char *unaff_SI; unaff_SI = s; while (pcVar1 = unaff_SI, unaff_SI = unaff_SI + 1, *pcVar1 != '\0') { overlay_emit_streamed_char(0x4000); } return; } void __cdecl16near shell_pack_overlay_word_from_di_to_5ad2_ex(const undefined2 *src_word) { undefined2 w; w = *src_word; *(undefined2 *)0x5ad2 = CONCAT11((char)w, (char)((uint)(uint16_t)w >> 8)); return; } byte __cdecl16near shell_fold_cli_ascii_lowercase_ex(byte b) { if ((0x60 < b) && (b < 0x7b)) { return (byte)(b & 0xdf); } return b; } void __cdecl16near shell_set_error_flag_if_machine_video_bit5_ex(byte machine_flags_byte, byte *error_flag_out) { if ((machine_flags_byte & 0x20) != 0) { *error_flag_out = 1; } return; } undefined2 __cdecl16near shell_copy_cli_segment_until_semicolon_ex(char **inout_src, char *dst, undefined2 passthrough) { char *unaff_SI; char *unaff_DI; char *pcVar1; char cVar2; unaff_SI = *inout_src; unaff_DI = dst; while (true) { pcVar1 = unaff_SI; unaff_SI = unaff_SI + 1; cVar2 = *pcVar1; if (cVar2 == '\0') { break; } if (cVar2 == ';') { do { pcVar1 = unaff_SI; unaff_SI = unaff_SI + 1; } while (*pcVar1 == ' '); goto finish_segment; } pcVar1 = unaff_DI; unaff_DI = unaff_DI + 1; *pcVar1 = cVar2; } finish_segment: *unaff_DI = ';'; unaff_DI[1] = '\0'; *inout_src = unaff_SI + -1; return passthrough; } void __cdecl16near shell_adjust_byte_at_di_plus2_by_dh_ex(char *di_base, char dh_delta) { di_base[2] = (char)(di_base[2] + dh_delta); return; } void __cdecl16near shell_copy_cx_bytes_si_to_di_ex(byte *dst, const byte *src, uint byte_count) { uint word_count; byte *unaff_DI; const byte *unaff_SI; unaff_DI = dst; unaff_SI = src; word_count = byte_count >> 1; if ((byte_count & 1) != 0) { *unaff_DI = *unaff_SI; unaff_DI = unaff_DI + 1; unaff_SI = unaff_SI + 1; } while (word_count != 0) { *(undefined2 *)unaff_DI = *(const undefined2 *)unaff_SI; unaff_DI = unaff_DI + 2; unaff_SI = unaff_SI + 2; word_count = word_count - 1; } return; } void __cdecl16near shell_copy_29_bytes_si_to_di_ex(byte *dst, const byte *src) { shell_copy_cx_bytes_si_to_di_ex(dst, src, 0x1d); return; } void __cdecl16near shell_copy_29_bytes_si_to_di(byte *dst, const byte *src) { shell_copy_29_bytes_si_to_di_ex(dst, src); return; } void __cdecl16near shell_copy_29_byte_glyph_template(byte *dst, const byte *src) { shell_copy_29_bytes_si_to_di_ex(dst, src); } void __cdecl16near shell_install_seven_video_mode_words_stride14_ex(const undefined2 *src, int chain_base_linear, uint slot_stride_bytes) { int iVar4; int iVar2; const undefined2 *puVar3; const undefined2 *puVar1; puVar3 = src; iVar2 = 7; iVar4 = chain_base_linear; do { puVar1 = puVar3; puVar3 = puVar3 + 1; *(undefined2 *)(iVar4 + 4) = *puVar1; iVar4 = iVar4 + (int)slot_stride_bytes; iVar2 = iVar2 + -1; } while (iVar2 != 0); return; } undefined2 __cdecl16near shell_map_ax_through_rom_byte_table_ex(uint ax, const byte *table_base) { uint idx; idx = (ax >> 8) & 0xffU; return CONCAT11(*(undefined *)(table_base + idx), (char)ax); } undefined2 __cdecl16near shell_map_ax_through_rom_glyph_table(uint ax) { return shell_map_ax_through_rom_byte_table_ex(ax, (byte *)0x2fe9); } void __cdecl16near shell_copy_printable_chars_until_control_ex(const byte *src, const byte *src_end, byte *dst) { const byte *unaff_SI; byte *unaff_DI; const byte *pbVar1; byte bVar2; unaff_SI = src; unaff_DI = dst; while (unaff_SI < src_end) { pbVar1 = unaff_SI; unaff_SI = unaff_SI + 1; bVar2 = *pbVar1; if ((bVar2 < 0x21) || (bVar2 == 0x8b)) { break; } *unaff_DI = bVar2; unaff_DI = unaff_DI + 1; } *unaff_DI = 0; return; } void __cdecl16near shell_copy_printable_chars_until_control(const byte *src, const byte *src_end, byte *dst) { shell_copy_printable_chars_until_control_ex(src, src_end, dst); } undefined2 __cdecl16near shell_xor7_decode_status_string_inplace_ex(byte *buffer) { byte *pbVar1; byte *pbVar2; byte *pbVar4; byte *pbVar3; undefined2 in_AX; pbVar4 = buffer; pbVar3 = buffer; in_AX = 0; while (true) { pbVar1 = pbVar3; pbVar3 = pbVar3 + 1; if (*pbVar1 == 0) { break; } pbVar2 = pbVar4; pbVar4 = pbVar4 + 1; *pbVar2 = *pbVar1 ^ 7; } return in_AX; } void __cdecl16near shell_assign_decode_flags_from_al_ex(WpLayoutGlobals *wl, byte flags) { wl->decode_flags_byte_000b = flags; return; } void __cdecl16near shell_assign_decode_flags_from_al(byte flags) { g_layout_decode_flags_byte_000b = flags; return; } uint __cdecl16near shell_wrap_bx_down_past_0x3fff_ex(uint bx) { while (0x3fffU < bx) { bx = bx + 0xc000U; } return bx; } int __cdecl16near shell_index_al_times4_plus_bx_0x400_buckets_ex(byte al_byte, uint bx) { int idx; uint u; idx = (int)((uint)al_byte << 2); u = bx; while (0x3ffU < u) { u = u - 0x400U; idx = idx + 1; } return idx; } int __cdecl16near shell_compute_al_times4_plus_bx_bucket_index(byte al_byte, uint bx) { return shell_index_al_times4_plus_bx_0x400_buckets_ex(al_byte, bx); } undefined2 __cdecl16near return_param2_passthrough(undefined2 param_1, undefined2 param_2) { (void)param_1; return param_2; } void __cdecl16near shell_adjust_byte_at_di_plus2_by_dh(char *di_base, char dh_delta) { shell_adjust_byte_at_di_plus2_by_dh_ex(di_base, dh_delta); return; } void __cdecl16near shell_copy_cx_bytes_si_to_di(byte *dst, const byte *src, uint byte_count) { shell_copy_cx_bytes_si_to_di_ex(dst, src, byte_count); return; } void __cdecl16near shell_irq_stack_byte_rotate_right_by_count_mod8_ex(byte *cell, uint count) { byte sh; sh = (byte)count & 7; *cell = (byte)(*cell >> sh | *cell << (8 - sh)); return; } void __cdecl16near shell_increment_ivt_timer_counter_ex(WpLayoutGlobals *wl) { wl->ivt_timer_ad0 = wl->ivt_timer_ad0 + 1; return; } void __cdecl16near shell_copy_shell_cli_line_to_buffer_4192_ex(const char *src, char *dst, int max_copy) { char c; while (max_copy != 0) { c = *src; if (c == '\n' || c == '\0') { break; } *dst = c; dst = dst + 1; src = src + 1; max_copy = max_copy + -1; } *dst = '\0'; return; } void __cdecl16near shell_copy_len_prefixed_block_ex(byte len, const byte *src, byte *out) { uint u; byte *pd; const byte *ps; out[0] = len; pd = out + 1; ps = src; u = (uint)len; while (u != 0) { *pd = *ps; pd = pd + 1; ps = ps + 1; u = u - 1; } *pd = 0; return; } void __cdecl16near shell_validate_or_fill_dos_tempname_bytes_81f2_ex(byte *three_byte_slots) { byte *pb; int left; byte b; pb = three_byte_slots; left = 3; while (true) { b = *pb; if (b == 0) { do { *pb = 0x5f; pb = pb + 1; left = left + -1; } while (left != 0); return; } if ((0x60 < b) && (b < 0x7b)) { b = (byte)(b & 0xdf); *pb = b; } if (((((b < 0x30) || (0x5a < b)) || ((0x39 < b) && (b < 0x41)))) && ((b != 0x7b) && (b != 0x5f))) { return; } pb = pb + 1; left = left + -1; if (left == 0) { return; } } } void __cdecl16near shell_decode_fold_dx_into_page_with_cl_carry_ex(uint *dx_io, byte *cl_io) { uint dx; byte cl; dx = *dx_io; cl = *cl_io; while (0xfffU < dx) { dx = dx - 0x1000U; cl = (byte)(cl + 1); } *dx_io = dx; *cl_io = cl; return; } /* Graphical/TUI helpers that do not depend on live registers in this cluster. */ void __cdecl16near shell_video_driver_hook_no_op_ex(void) { /* explicit adapter call-through */ shell_no_op_proxy(); } void __cdecl16near shell_video_driver_hook_no_op_compat_alias(void) { /* compatibility alias: delegate to explicit adapter helper */ shell_video_driver_hook_no_op_ex(); } void __cdecl16near shell_video_driver_no_op_proxy_compat_alias(void) { /* compatibility alias: delegate to explicit adapter helper */ shell_video_driver_no_op_proxy(); } void __cdecl16near shell_video_driver_no_op_proxy_from_ex_compat_alias(void) { /* canonical wrapper form */ shell_video_driver_no_op_proxy_ex(); } void __cdecl16near shell_cli_parse_phase_no_op_compat_alias(void) { /* compatibility no-op adapter hook */ shell_cli_parse_phase_no_op(); } undefined2 __cdecl16near shell_copy_shell_cli_line_to_buffer(void) { char *src; char *dst; int count; char c; src = *(char **)(0x1d67 + (uint)(*(byte *)0x418c) * 2); dst = (char *)0x4192; count = 0x13; while (count != 0) { c = *src; if ((c == '\n') || (c == '\0')) { break; } *dst = c; src = src + 1; dst = dst + 1; count = count + -1; } *dst = '\0'; return 0; } void __cdecl16near shell_copy_length_prefixed_prompt_block(void) { byte *src; byte *dst; uint len; src = (byte *)0x232f; dst = (byte *)0x4df9; len = (uint)(byte)*(uint8_t *)0x232e; *dst = (byte)len; dst = dst + 1; while (len != 0) { *dst = *src; dst = dst + 1; src = src + 1; len = len - 1; } *dst = 0; return; } undefined2 __cdecl16near shell_xor7_decode_status_string_inplace(void) { return shell_xor7_decode_status_string_inplace_ex((byte *)0x4e); } undefined2 __cdecl16near shell_install_seven_video_words_from_rom_table_a(void) { shell_install_seven_video_mode_words_stride14_ex((undefined2 *)0x63d5, 0x6371, 0xe); return 0; } undefined2 __cdecl16near shell_install_seven_video_words_from_rom_table_b(void) { shell_install_seven_video_mode_words_stride14_ex((undefined2 *)0x63e3, 0x6371, 0xe); return 0; } undefined * __cdecl16near shell_reset_layout_state_for_startup_path(void) { undefined *puVar1; undefined *puVar2; int in_CX; undefined2 unaff_DS; undefined in_CF; layout_video_int10_repeat_cx_update_mode_slots(); if ((!(bool)in_CF) && (in_CX != 3)) { *(undefined *)(in_CX + 0x47a9) = 0; } puVar2 = (undefined *)*(undefined2 *)&g_wp_layout.near_word_65e1.word; if (puVar2 != (undefined *)0x0) { if ((*(int *)&g_wp_layout.near_word_65e1.word) != 3) { puVar2[0x65e2] = 0; } puVar1 = (undefined *)firmware_io_port_input_proxy(); puVar2 = puVar1; if ((*(int *)&g_wp_layout.near_word_65e1.word) != 3) { puVar2 = (undefined *)0x65e3; *puVar1 = 0x5c; } } return puVar2; } undefined4 __cdecl16near shell_retry_dos_int21_and_clear_startup_flags(void) { undefined2 in_AX; int iVar2; undefined2 in_DX; int flush_rc; /* * Port note: * Original DOS path issued INT 21h retries directly. In the host port we * route this through OpenWatcom's runtime I/O sync primitive * (wp_dos_runtime_flush_all_streams()) * so filesystem/device flush logic comes from the toolchain libraries rather * than hand-emitted interrupt stubs. */ iVar2 = 0xc; do { flush_rc = wp_dos_runtime_flush_all_streams(); if (flush_rc != 0) { shell_emit_null_terminated_via_overlay(); engine_far_call_7e66(0x1000); goto LAB_4000_22ea; } iVar2 = iVar2 + -1; } while (iVar2 != 0); iVar2 = 0xc; do { (void)wp_dos_runtime_flush_all_streams(); iVar2 = iVar2 + -1; } while (iVar2 != 0); LAB_4000_22ea: *(undefined *)0x436f = 0; return CONCAT22(in_DX,in_AX); } void __cdecl16near shell_decode_hardware_proxy_no_op(void) { shell_no_op_proxy(); } void __cdecl16near shell_decode_hardware_proxy_no_op_compat_alias(void) { shell_decode_hardware_proxy_no_op(); } void __cdecl16near shell_decode_spin_yield_no_op(void) { shell_no_op_proxy(); } void __cdecl16near shell_decode_hardware_query_proxy_no_op(void) { shell_no_op_proxy(); } void __cdecl16near shell_decode_hardware_query_proxy_no_op_compat_alias(void) { shell_decode_hardware_query_proxy_no_op(); } void __cdecl16near shell_hw_irq_proxy_no_op_return(void) { shell_no_op_proxy(); } void __cdecl16near shell_hw_irq_proxy_no_op_return_compat_alias(void) { shell_hw_irq_proxy_no_op_return(); } void __cdecl16near shell_hw_service_no_op_return(void) { shell_no_op_proxy(); } void __cdecl16near shell_hw_service_proxy_no_op_return_compat_alias(void) { shell_hw_service_no_op_return(); } void __cdecl16near shell_ems_map_hook_no_op(void) { shell_no_op_proxy(); } void __cdecl16near shell_ems_map_hook_no_op_compat_alias(void) { shell_ems_map_hook_no_op(); } void __cdecl16near shell_overlay_no_op_return_immediate(void) { shell_no_op_proxy(); } void __cdecl16near shell_overlay_no_op_return_immediate_compat_alias(void) { shell_overlay_no_op_return_immediate(); } void __cdecl16near shell_video_driver_hook_no_op(void) { shell_no_op_proxy(); } void __cdecl16near shell_video_driver_no_op_proxy(void) { shell_no_op_proxy(); } void shell_initialize_and_copy_secondary_state_tables(void) { undefined *puVar1; undefined *puVar2; code *pcVar3; int iVar4; undefined *puVar5; undefined *puVar6; undefined2 unaff_ES; undefined2 uVar7; undefined2 uVar8; undefined2 unaff_DS; char in_stack_0000fffe; if (g_layout_overlay_gate_char_5ad0 == '\x01') { pcVar3 = (code *)swi(0x1a); (*pcVar3)(); pcVar3 = (code *)swi(0x1a); (*pcVar3)(); pcVar3 = (code *)swi(0x1a); (*pcVar3)(); if ((in_stack_0000fffe == '\x02') || (in_stack_0000fffe == '\x03')) { halt_baddata(); } } uVar7 = 0x4aa4; overlay_merge_layout_state_word(0x1000); if (*(char *)0x68c9 == '\0') { uVar7 = 0x3adb; firmware_io_word_transfer_step(); shell_expand_c0_escape_tokens_into_bx_buffer(); unaff_ES = 0x4aa4; } uVar8 = uVar7; if (*(char *)0x66c8 == '\0') { uVar8 = 0; engine_far_call_83a8(uVar7); } engine_far_call_83a8(uVar8); engine_far_call_83a8(0); engine_far_call_83a8(0); engine_far_call_83a8(0); engine_far_call_83a8(0); engine_far_call_83a8(0); engine_far_call_83a8(0); engine_far_call_83a8(0); engine_far_call_83a8(0); puVar5 = ((undefined *)&g_wp_layout.secondary_record); puVar6 = (undefined *)0x54b1; for (iVar4 = 0x5ae; iVar4 != 0; iVar4 = iVar4 + -1) { puVar2 = puVar6; puVar6 = puVar6 + 1; puVar1 = puVar5; puVar5 = puVar5 + 1; *puVar2 = *puVar1; } *(undefined2 *)0x41a6 = *(undefined2 *)0x66ba; return; } void __cdecl16near shell_blit_secondary_record_to_overlay_window(void) { undefined *puVar1; undefined *puVar2; int iVar3; undefined *puVar4; undefined *puVar5; undefined2 unaff_ES; undefined2 unaff_DS; engine_far_call_83a8(0x1000); engine_far_call_83a8(0); engine_far_call_83a8(0); engine_far_call_83a8(0); engine_far_call_83a8(0); puVar4 = ((undefined *)&g_wp_layout.secondary_record); puVar5 = (undefined *)0x54b1; for (iVar3 = 0x5ae; iVar3 != 0; iVar3 = iVar3 + -1) { puVar2 = puVar5; puVar5 = puVar5 + 1; puVar1 = puVar4; puVar4 = puVar4 + 1; *puVar2 = *puVar1; } *(undefined2 *)0x41a6 = *(undefined2 *)0x66ba; return; } undefined2 __cdecl16near shell_expand_c0_escape_tokens_into_bx_buffer(void) { byte bVar1; undefined2 uVar2; undefined2 in_AX; byte *in_BX; undefined2 *unaff_SI; undefined2 unaff_ES; undefined2 unaff_DS; do { while( true ) { bVar1 = *(byte *)unaff_SI; if ((bVar1 < 0x80) || (bVar1 != 0xc0)) break; uVar2 = *(undefined2 *)((int)unaff_SI + 1); *in_BX = 0xc0; *(undefined2 *)(in_BX + 1) = uVar2; in_BX[3] = 0xc0; in_BX = in_BX + 4; unaff_SI = unaff_SI + 2; } *in_BX = bVar1; in_BX = in_BX + 1; unaff_SI = (undefined2 *)((int)unaff_SI + 1); } while (bVar1 != 0); return in_AX; } void __cdecl16near shell_merge_video_shadow_flags_into_bios_option(void) { byte shadow_flags; /* Propagate optional video-driver BIOS hook before shadow-bit handoff. */ if ((g_layout_video_flags_66c7 & 8) != 0) { shell_video_driver_hook_no_op(); } /* Merge only the shadow bit into BIOS option LSB and clear consumed shadows. */ shadow_flags = g_layout_variant_shadow_flags_66b8; g_layout_variant_shadow_flags_66b8 = g_layout_variant_shadow_flags_66b8 & 1; g_layout_video_bios_option_4512 = (g_layout_video_bios_option_4512 & 0xfe) | shadow_flags; return; } void __cdecl16near shell_copy_len_prefixed_block_232e_to_4df9(void) { shell_copy_length_prefixed_prompt_block(); } /* Canonicalized shell no-op/legacy hooks preserved for this port. */ void __cdecl16near shell_compare_exec_state_then_patch_overlay(undefined2 in_bx) { char *pcVar1; char *pcVar2; char *pcVar5; char *pcVar6; byte bVar7; int iVar4; int in_BX; in_BX = (int)in_bx; pcVar6 = (char *)(in_BX + 2); bVar7 = 1; pcVar5 = (char *)0x19bc; iVar4 = 8; do { if (iVar4 == 0) { break; } iVar4 = iVar4 + -1; pcVar2 = pcVar6; pcVar6 = pcVar6 + 1; pcVar1 = pcVar5; pcVar5 = pcVar5 + 1; bVar7 = (byte)(*pcVar1 == *pcVar2); } while (bVar7 != 0); if (bVar7 != 0) { shell_pack_overlay_word_from_di_to_5ad2_ex((undefined2 *)0x5ad0); } else { shell_mark_idle_flag_via_dos_int21(); pcVar6 = (char *)(in_BX + 2); bVar7 = 1; pcVar5 = (char *)0x19bc; iVar4 = 8; do { if (iVar4 == 0) { break; } iVar4 = iVar4 + -1; pcVar2 = pcVar6; pcVar6 = pcVar6 + 1; pcVar1 = pcVar5; pcVar5 = pcVar5 + 1; bVar7 = (byte)(*pcVar1 == *pcVar2); } while (bVar7 != 0); if (bVar7 != 0) { shell_pack_overlay_word_from_di_to_5ad2_ex((undefined2 *)0x5ad0); } } return; } undefined4 __cdecl16near shell_walk_video_mode_list_and_call_table(void) { int iVar1; int iVar2; int iVar7; undefined2 in_AX; undefined2 in_DX; int *piVar3; undefined2 uVar4; undefined2 uVar5; byte bVar6; in_AX = 0; in_DX = 0; engine_far_call_7dd6(0x1000); uVar4 = 0; engine_far_call_0656(0); shell_init_glyph_tables_and_exec_overlay_probe(); bVar6 = 0; if (bVar6) { LAB_4000_2968: engine_far_call_323e(uVar4); } else { uVar5 = uVar4; for (piVar3 = (int *)0x6371; bVar6 = 0, *piVar3 != 0; piVar3 = piVar3 + 7) { iVar1 = piVar3[2]; iVar2 = piVar3[6]; iVar7 = piVar3[3]; uVar4 = 0x42ee; shell_indirect_call_table(uVar5); piVar3[3] = iVar7; piVar3[6] = iVar2; piVar3[2] = iVar1; if (bVar6 != 0) { goto LAB_4000_2968; } uVar5 = uVar4; } } return CONCAT22(in_DX, in_AX); } void __cdecl16near shell_mark_idle_flag_via_dos_int21(void) { *(byte *)0xa79 = 0xff; } void __cdecl16near shell_decoder_halt_unreachable(void) { return; } void __cdecl16near shell_route_dos_environment_chain(void) { wp_dos_runtime_touch_environment(); } void __cdecl16near shell_route_device_dos_environment_eb88(void) { shell_route_dos_environment_chain(); } void __cdecl16near shell_skip_cstring_then_video_chain_route(void) { char *pcVar1; char *unaff_DI; unaff_DI = *(char **)0x69c1; do { pcVar1 = unaff_DI; unaff_DI = unaff_DI + 1; } while (*pcVar1 != '\0'); engine_far_call_33b4(); return; } void __cdecl16near shell_route_after_video_glyph_chain(void) { engine_far_call_33b4(); return; } undefined2 __cdecl16near shell_decode_unreachable_guard_site_a(void) { return 0x417; } void __cdecl16near shell_decode_unreachable_guard_site_b(void) { return; } undefined2 * __cdecl16near shell_decode_unreachable_guard_site_c(uint *param_1) { return param_1; } void __cdecl16near shell_decode_unreachable_guard_site_d(undefined2 param_1, int param_2) { (void)param_1; (void)param_2; } undefined2 __cdecl16near shell_slide_secondary_record_ring_by_2kb(undefined2 passthrough_dx) { return passthrough_dx; } void __cdecl16near shell_shift_primary_record_window_by_2kb_carry_gated(undefined2 in_cf) { undefined2 *puVar1; undefined2 *puVar2; undefined2 *puVar3; uint uVar4; uint uVar5; undefined2 *puVar6; undefined2 *puVar7; byte bVar8; bVar8 = (byte)in_cf; if (!bVar8) { puVar3 = (undefined2 *)*(undefined2 *)0x48f0; puVar6 = puVar3 + 0x400; uVar4 = g_layout_record_used_bytes - 0x800; (*(uint *)&g_wp_layout.record_used_bytes) = uVar4; uVar5 = uVar4 >> 1; puVar7 = puVar3; if ((uVar4 & 1) != 0) { puVar7 = (undefined2 *)((int)puVar3 + 1); puVar1 = puVar6; puVar6 = (undefined2 *)((int)puVar3 + 0x801); *(undefined *)puVar3 = *(undefined *)puVar1; } for (; uVar5 != 0; uVar5 = uVar5 - 1) { puVar2 = puVar7; puVar7 = puVar7 + 1; puVar1 = puVar6; puVar6 = puVar6 + 1; *puVar2 = *puVar1; } g_layout_primary_record_word_as_int = g_layout_primary_record_word_as_int + -0x800; (*(int *)&g_wp_layout.record_buffer_space) = (*(int *)&g_wp_layout.record_buffer_space) + 0x800; } return; } uint __cdecl16near shell_chunked_video_copy_by_2kb_handler(void) { uint uVar1; uint uVar2; uint uVar3; uint in_BX; code *unaff_SI; undefined2 uVar4; byte bVar5; undefined4 uVar6; bVar5 = 0; uVar1 = 0; uVar4 = 0; in_BX = 0; unaff_SI = (code *)0x0; do { uVar2 = 0x800; if (unaff_SI == (code *)0x0) { return uVar1; } do { uVar6 = ((undefined4 (*)(void))unaff_SI)(); uVar1 = (uint)((ulong)uVar6 >> 0x10); uVar3 = (uint)uVar6; if (bVar5) { return uVar1; } bVar5 = (byte)(uVar3 < uVar2); if (uVar3 != 0) { uVar2 = uVar2 - uVar3; uVar1 = 0; } bVar5 = (byte)(in_BX < uVar2); if (bVar5 != 0) { uVar2 = in_BX; } shell_video_driver_hook_no_op(); if (!bVar5) { shell_ems_assign_page_frames_for_decode_slots(); } shell_copy_cx_bytes_si_to_di((byte *)0x0, (const byte *)0x0, uVar2); bVar5 = (byte)(in_BX < uVar2); in_BX = in_BX - uVar2; } while ((bVar5 == 0) && (in_BX != 0)); } while (0); return uVar1; } void __cdecl16near shell_compact_primary_record_ring_by_2kb(void) { undefined2 *puVar1; undefined2 *puVar2; undefined2 *puVar3; uint uVar4; uint uVar5; undefined2 *puVar6; undefined2 *puVar7; byte bVar8; bVar8 = (byte)(g_layout_record_used_bytes < 0x800); if (!bVar8) { overlay_adjust_record_stream_cursor(0x1000); if (!bVar8) { puVar3 = (undefined2 *)*(undefined2 *)0x48f0; puVar6 = puVar3 + 0x400; uVar4 = g_layout_record_used_bytes - 0x800; (*(uint *)&g_wp_layout.record_used_bytes) = uVar4; uVar5 = uVar4 >> 1; puVar7 = puVar3; if ((uVar4 & 1) != 0) { puVar7 = (undefined2 *)((int)puVar3 + 1); puVar1 = puVar6; puVar6 = (undefined2 *)((int)puVar3 + 0x801); *(undefined *)puVar3 = *(undefined *)puVar1; } for (; uVar5 != 0; uVar5 = uVar5 - 1) { puVar2 = puVar7; puVar7 = puVar7 + 1; puVar1 = puVar6; puVar6 = puVar6 + 1; *puVar2 = *puVar1; } g_layout_primary_record_word_as_int = g_layout_primary_record_word_as_int + -0x800; (*(int *)&g_wp_layout.record_buffer_space) = (*(int *)&g_wp_layout.record_buffer_space) + 0x800; } } return; } void __cdecl16near shell_read_dos_line_into_shell_buffer(void) { (void)shell_copy_shell_cli_line_to_buffer(); } void __cdecl16near shell_validate_or_fill_dos_tempname_slots(void) { shell_validate_or_fill_dos_tempname_bytes_81f2_ex((byte *)0x81f2); } uint __cdecl16near shell_wrap_segment_index_past_16k_boundary(uint bx) { return shell_wrap_bx_down_past_0x3fff_ex(bx); }
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