=== Trace listing source: apisupt.lst 1 ; File: 2 ; apisupt.asm 3 ; Description: 4 ; Assembly support routines for stack manipulation, etc. 5 ; 6 ; Copyright (c) 1995, 1998 7 ; Pasquale J. Villani 8 ; All Rights Reserved 9 ; 10 ; This file is part of DOS-C. 11 ; 12 ; DOS-C is free software; you can redistribute it and/or 13 ; modify it under the terms of the GNU General Public License 14 ; as published by the Free Software Foundation; either version 15 ; 2, or (at your option) any later version. 16 ; 17 ; DOS-C is distributed in the hope that it will be useful, but 18 ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 ; the GNU General Public License for more details. 21 ; 22 ; You should have received a copy of the GNU General Public 23 ; License along with DOS-C; see the file COPYING. If not, 24 ; write to the Free Software Foundation, 675 Mass Ave, 25 ; Cambridge, MA 02139, USA. 26 ; 27 ; $Id: apisupt.asm 538 2003-03-12 22:43:53Z bartoldeman $ 28 ; 29 30 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 31 === Switch to base=002270h -> "HMA_TEXT" 32 segment HMA_TEXT 33 %if 0 34 35 extern _api_sp:wrt DGROUP ; api stacks - for context 36 extern _api_ss:wrt DGROUP ; switching 37 extern _usr_sp:wrt DGROUP ; user stacks 38 extern _usr_ss:wrt DGROUP 39 40 global _set_stack 41 ; 42 ; void set_stack(void) - 43 ; save current stack and setup our local stack 44 ; 45 _set_stack: 46 47 ; save foreground stack 48 49 ; we need to get the return values from the stack 50 ; since the current stack will change 51 pop ax ;get return offset 52 53 ; Save the flags so that we can restore correct interrupt 54 ; state later. We need to disable interrupts so that we 55 ; don't trash memory with new sp-old ss combination 56 pushf 57 pop dx 58 cli 59 60 ; save bp 61 push bp 62 63 mov cx, sp 64 neg cx 65 66 ; save away foreground process' stack 67 push word [_usr_ss] 68 push word [_usr_sp] 69 70 mov word [_usr_ss],ss 71 mov word [_usr_sp],sp 72 73 ; setup our local stack 74 mov ss,word [_api_ss] 75 mov sp,word [_api_sp] 76 77 add cx, sp 78 add bp, cx 79 80 ; setup for ret 81 push ax 82 83 ; now restore interrupt state 84 push dx 85 popf 86 87 ret 88 89 ; 90 ; void restore_stack(void) - 91 ; restore foreground stack, throw ours away 92 ; 93 global _restore_stack 94 _restore_stack: 95 96 ; we need to get the return values from the stack 97 ; since the current stack will change 98 pop cx ;get return offset 99 100 ; Save the flags so that we can restore correct interrupt 101 ; state later. We need to disable interrupts so that we 102 ; don't trash memory with new sp-old ss combination 103 pushf 104 pop dx 105 cli 106 107 ; save background stack 108 mov word [_api_ss],ss 109 mov word [_api_sp],sp 110 111 ; restore foreground stack here 112 mov ss,word [_usr_ss] 113 mov sp,word [_usr_sp] 114 115 pop word [_usr_sp] 116 pop word [_usr_ss] 117 118 ; make bp relative to our stack frame 119 pop bp 120 ;mov bp,sp 121 122 ; setup for ret 123 push cx 124 125 ; now restore interrupt state 126 push dx 127 popf 128 129 ret 130 %endif === Trace listing source: asmsupt.lst 1 ; File: 2 ; asmsupt.asm 3 ; Description: 4 ; Assembly support routines for miscellaneous functions 5 ; 6 ; Copyright (c) 1995, 1998 7 ; Pasquale J. Villani 8 ; All Rights Reserved 9 ; 10 ; This file is part of DOS-C. 11 ; 12 ; DOS-C is free software; you can redistribute it and/or 13 ; modify it under the terms of the GNU General Public License 14 ; as published by the Free Software Foundation; either version 15 ; 2, or (at your option) any later version. 16 ; 17 ; DOS-C is distributed in the hope that it will be useful, but 18 ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 ; the GNU General Public License for more details. 21 ; 22 ; You should have received a copy of the GNU General Public 23 ; License along with DOS-C; see the file COPYING. If not, 24 ; write to the Free Software Foundation, 675 Mass Ave, 25 ; Cambridge, MA 02139, USA. 26 ; 27 ; version 1.4 by tom.ehlert@ginko.de 28 ; added some more functions 29 ; changed bcopy, scopy, sncopy,... 30 ; to memcpy, strcpy, strncpy 31 ; Bart Oldeman: optimized a bit: see /usr/include/bits/string.h from 32 ; glibc 2.2 33 ; 34 ; $Id: asmsupt.asm 1568 2011-04-09 02:42:51Z bartoldeman $ 35 ; 36 37 ; for OW on Linux: 38 %ifdef owlinux 39 %define WATCOM 40 %endif 41 42 %ifdef WATCOM 43 %ifdef _INIT 44 %define WATCOM_INIT ; no seperate init segment for watcom. 45 %endif 46 %endif 47 48 %ifndef WATCOM_INIT 49 50 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 51 %include "stacks.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; stacks.inc 4 <1> ; Description: 5 <1> ; Macro support for register stack frame 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Id: stacks.inc 1591 2011-05-06 01:46:55Z bartoldeman $ 29 <1> ; 30 <1> 31 <1> ; 32 <1> ; Standard stack frame used throughout DOS-C 33 <1> ; 34 <1> ; MS-DOS specific 35 <1> ; 36 <1> ; +---------------+ 37 <1> ; | irp hi | 26 38 <1> ; +---------------+ 39 <1> ; | irp low | 24 40 <1> ; +---------------+ 41 <1> ; | flags | 22 42 <1> ; +---------------+ 43 <1> ; | cs | 20 44 <1> ; +---------------+ 45 <1> ; | ip | 18 46 <1> ; +---------------+ 47 <1> ; | es | 16 48 <1> ; +---------------+ 49 <1> ; | ds | 14 50 <1> ; +---------------+ 51 <1> ; | bp | 12 52 <1> ; +---------------+ 53 <1> ; | di | 10 54 <1> ; +---------------+ 55 <1> ; | si | 8 56 <1> ; +---------------+ 57 <1> ; | dx | 6 58 <1> ; +---------------+ 59 <1> ; | cx | 4 60 <1> ; +---------------+ 61 <1> ; | bx | 2 62 <1> ; +---------------+ 63 <1> ; | ax | 0 64 <1> ; +---------------+ 65 <1> ; 66 <1> 67 <1> ;; Note: The order of the pushed registers _must_ match with the definition 68 <1> ;; of the "iregs" structure within PCB.H, because a pointer to the last 69 <1> ;; pushed register is used as a pointer to a "iregs" structure within the 70 <1> ;; called C sources! -- 2000/03/22 ska 71 <1> 72 <1> ; Don't use `struc RegFrame' etc. here because it interferes with segment 73 <1> ; definitions. 74 <1> reg_ax equ 0 75 <1> reg_bx equ 2 76 <1> reg_cx equ 4 77 <1> reg_dx equ 6 78 <1> reg_si equ 8 79 <1> reg_di equ 10 80 <1> reg_bp equ 12 81 <1> reg_ds equ 14 82 <1> reg_es equ 16 83 <1> reg_ip equ 18 84 <1> reg_cs equ 20 85 <1> reg_flags equ 22 86 <1> irp_low equ 24 87 <1> irp_hi equ 26 88 <1> 89 <1> %macro PUSH$ALL 0 90 <1> push es 91 <1> push ds 92 <1> push bp 93 <1> push di 94 <1> push si 95 <1> push dx 96 <1> push cx 97 <1> push bx 98 <1> push ax 99 <1> %endmacro 100 <1> 101 <1> %macro POP$ALL 0 102 <1> pop ax 103 <1> pop bx 104 <1> pop cx 105 <1> pop dx 106 <1> pop si 107 <1> pop di 108 <1> pop bp 109 <1> pop ds 110 <1> pop es 111 <1> %endmacro 112 <1> 113 <1> ; I386.inc - 10/25/01 by tom ehlert 114 <1> ; 115 <1> ; compiling the kernel for 386 will (sometimes) change the 116 <1> ; high part of (some) registers, which will be (sometimes) be used 117 <1> ; later 118 <1> ; 119 <1> ; assumption: 120 <1> ; we have never seen MSVC to use anything but eax, ecx, edx, 121 <1> ; nor have we seen Borland C to use anything but eax, ebx, edx, 122 <1> ; so we only protect eax, ebx or ecx, edx to conserve stack space 123 <1> ; 124 <1> ; to save even more stack space, we save only HIGH part of regs 125 <1> ; at some expense of slower execution. it's easier anyway :-) 126 <1> ; 127 <1> ; WATCOM only uses FS: and GS: (using -zff and -zgf) and never 128 <1> ; any high part of the 386 registers 129 <1> ; 130 <1> 131 <1> 132 <1> %IF XCPU < 386 133 <1> ; no need to save/restore anything 134 <1> 135 <1> ; error 1 2 3 136 <1> %macro Protect386Registers 0 137 <1> %endmacro 138 <1> 139 <1> %assign Size386Registers 0 140 <1> 141 <1> %macro RestoreSP 0 142 <1> mov sp, bp 143 <1> %endmacro 144 <1> 145 <1> %macro Restore386Registers 0 146 <1> %endmacro 147 <1> 148 <1> %ELSE 149 <1> %ifdef WATCOM 150 <1> 151 <1> %macro Protect386Registers 0 152 <1> push fs 153 <1> push gs 154 <1> %endmacro 155 <1> 156 <1> %assign Size386Registers 4 157 <1> 158 <1> %macro RestoreSP 0 159 <1> lea sp, [bp - Size386Registers] 160 <1> %endmacro 161 <1> 162 <1> %macro Restore386Registers 0 163 <1> pop gs 164 <1> pop fs 165 <1> %endmacro 166 <1> 167 <1> %else 168 <1> 169 <1> %macro Protect386Registers 0 170 <1> push eax 171 <1> pop ax 172 <1> %ifdef MSCL8 173 <1> push ecx 174 <1> pop cx 175 <1> %else ;BC5 176 <1> push ebx 177 <1> pop bx 178 <1> %endif 179 <1> push edx 180 <1> pop dx 181 <1> %endmacro 182 <1> 183 <1> %assign Size386Registers 6 184 <1> 185 <1> %macro RestoreSP 0 186 <1> lea sp, [bp - Size386Registers] 187 <1> %endmacro 188 <1> 189 <1> %macro Restore386Registers 0 190 <1> push dx 191 <1> pop edx 192 <1> %ifdef MSCL8 193 <1> push cx 194 <1> pop ecx 195 <1> %else ;BC5 196 <1> push bx 197 <1> pop ebx 198 <1> %endif 199 <1> push ax 200 <1> pop eax 201 <1> %endmacro 202 <1> 203 <1> %endif 204 <1> %ENDIF 205 <1> 206 <1> ; macros to define stack arguments 207 <1> ; arg a, {b,4}, c 208 <1> ; defines a and c as "word" arguments and b as a "dword" argument 209 <1> ; for STDCALL defines .a as [bp+4], .b as [bp+6] and .c as [bp+10] 210 <1> ; for PASCAL defines .a as [bp+10], .b as [bp+6] and .c as [bp+4] 211 <1> ; 212 <1> ; popargs bx, {dx,ax}, cx pops these arguments of the stack (for PASCAL 213 <1> ; in reverse order). Here dx,ax is a dword argument dx:ax where dx is 214 <1> ; the high word. The caller is responsible for dealing with instruction 215 <1> ; pointer (ip) on the stack. 216 <1> 217 <1> %ifdef gcc 218 <1> %define STDCALL 219 <1> %else 220 <1> %define PASCAL 221 <1> %endif 222 <1> 223 <1> %macro definearg 1-2 2 224 <1> %xdefine .%1 bp+.argloc 225 <1> %assign .argloc .argloc+%2 226 <1> %endmacro 227 <1> 228 <1> %macro arg 1-* 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 239 <1> %endmacro 240 <1> 241 <1> %macro multipop 1-* 242 <1> %rep %0 243 <1> %rotate -1 244 <1> pop %1 245 <1> %endrep 246 <1> %endmacro 247 <1> 248 <1> %macro popargs 1-* 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 258 <1> %endmacro 52 53 %ifdef _INIT 54 === Switch to base=00E0E0h -> "INIT_TEXT" 55 segment INIT_TEXT 56 %define FMEMCPYBACK INIT_FMEMCPYBACK 57 %define MEMCPY INIT_MEMCPY 58 %define FMEMCPY INIT_FMEMCPY 59 %define MEMSET INIT_MEMSET 60 %define FMEMSET INIT_FMEMSET 61 %define STRCPY INIT_STRCPY 62 %define FSTRCPY INIT_FSTRCPY 63 %define STRLEN INIT_STRLEN 64 %define FSTRLEN INIT_FSTRLEN 65 %define FMEMCHR INIT_FMEMCHR 66 %define FSTRCHR INIT_FSTRCHR 67 %define STRCHR INIT_STRCHR 68 %define FSTRCMP INIT_FSTRCMP 69 %define STRCMP INIT_STRCMP 70 %define FSTRNCMP INIT_FSTRNCMP 71 %define STRNCMP INIT_STRNCMP 72 %define FMEMCMP INIT_FMEMCMP 73 %define MEMCMP INIT_MEMCMP 74 75 %else 76 === Switch to base=002270h -> "HMA_TEXT" 77 segment HMA_TEXT 78 79 %endif 80 81 ;********************************************************************* 82 ; this implements some of the common string handling functions 83 ; 84 ; every function has 1 entry 85 ; 86 ; NEAR FUNC() 87 ; 88 ; currently done: 89 ; 90 ; fmemcpyBack(void FAR *dest, void FAR *src, int count) 91 ; memcpy(void *dest, void *src, int count) 92 ; fmemcpy(void FAR *dest, void FAR *src, int count) 93 ; memset(void *dest, int ch, int count); 94 ; fmemset(void FAR *dest, int ch, int count); 95 ; strcpy (void *dest, void *src); 96 ; fstrcpy (void FAR*dest, void FAR *src); 97 ; strlen (void *dest); 98 ; fstrlen (void FAR*dest); 99 ; fmemchr (BYTE FAR *src , int ch); 100 ; fstrchr (BYTE FAR *src , int ch); 101 ; strchr (BYTE *src , int ch); 102 ; fstrcmp (BYTE FAR *s1 , BYTE FAR *s2); 103 ; strcmp (BYTE *s1 , BYTE *s2); 104 ; fstrncmp(BYTE FAR *s1 , BYTE FAR *s2, int count); 105 ; strncmp(BYTE *s1 , BYTE *s2, int count); 106 ; fmemcmp(BYTE FAR *s1 , BYTE FAR *s2, int count); 107 ; memcmp(BYTE *s1 , BYTE *s2, int count); 108 109 ;*********************************************** 110 ; pascal_setup - set up the standard calling frame for C-functions 111 ; and save registers needed later 112 ; also preload the args for the near functions 113 ; di=arg1 114 ; si=arg2 115 ; cx=arg3 116 ; 117 pascal_setup: 0 000003BB 58 pop ax ; get return address 119 0 000003BC 55 push bp ; Standard C entry 0 000003BD 89E5 mov bp,sp 122 %ifdef WATCOM 123 push bx 124 push cx 125 push es 126 %endif 0 000003BF 56 push si 0 000003C0 57 push di 0 000003C1 1E push ds 130 ; Set both ds and es to same segment (for near copy) 0 000003C2 1E push ds 0 000003C3 07 pop es 133 134 ; Set direction to autoincrement 0 000003C4 FC cld 136 0 000003C5 B306 mov bl,6 ; majority (4) wants that 138 arg arg1, arg2, arg3 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 0 000003C7 8B4E08 mov cx,[.arg3] ; majority (8) wants that (near and far) 0 000003CA 8B7606 mov si,[.arg2] ; majority (3) wants that (near) 0 000003CD 8B7E04 mov di,[.arg1] ; majority (3) wants that (near) 142 0 000003D0 FFE0 jmp ax 144 145 146 147 148 ;*********************************************** 149 ; 150 ; VOID memcpy(REG BYTE *s, REG BYTE *d, REG COUNT n); 151 ; 152 global MEMCPY 153 MEMCPY: 0 000003D2 E8E6FF call pascal_setup 155 156 ;mov cx,[4+bp] - preset above 157 ;mov si,[6+bp] - preset above 158 ;mov di,[8+bp] - preset above 159 160 ;mov bl,6 - preset above 161 162 163 domemcpy: 164 ; And do the built-in byte copy, but do a 16-bit transfer 165 ; whenever possible. 0 000003D5 D1E9 shr cx,1 0 000003D7 F3A5 rep movsw 0 000003D9 7301 jnc memcpy_return 0 000003DB A4 movsb 170 memcpy_return: 171 %if 0 ; only needed for fmemcpyback 172 cld 173 %endif 174 175 ; 176 ; pascal_return - pop saved registers and do return 177 ; 178 0 000003DC EB31 jmp short pascal_return 180 181 182 183 ;************************************************************ 184 ; 185 ; VOID fmemcpy(REG BYTE FAR *d, REG BYTE FAR *s,REG COUNT n); 186 ; VOID fmemcpyBack(REG BYTE FAR *d, REG BYTE FAR *s,REG COUNT n); 187 ; 188 global FMEMCPY 189 %if 0 190 global FMEMCPYBACK 191 FMEMCPYBACK: 192 std ; force to copy the string in reverse order 193 %endif 194 FMEMCPY: 0 000003DE E8DAFF call pascal_setup 196 197 arg {d,4}, {s,4}, n 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 198 ; Get the repetition count, n preset above 199 %ifdef STDCALL 0 000003E1 8B4E0C mov cx,[.n] 201 %endif 202 203 ; Get the far source pointer, s 0 000003E4 C57608 lds si,[.s] 205 206 ; Get the far destination pointer d 0 000003E7 C47E04 les di,[.d] 0 000003EA B30A mov bl,10 209 0 000003EC EBE7 jmp short domemcpy 211 212 ;*************************************************************** 213 ; 214 ; VOID fmemset(REG VOID FAR *d, REG BYTE ch, REG COUNT n); 215 ; 216 global FMEMSET 217 FMEMSET: 0 000003EE E8CAFF call pascal_setup 219 220 arg {d,4}, ch, n 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 221 ; Get the repetition count, n - preset above 222 %ifdef STDCALL 0 000003F1 8B4E0A mov cx,[.n] 224 %endif 225 226 ; Get the fill byte ch 0 000003F4 8B4608 mov ax,[.ch] 228 229 ; Get the far source pointer, s 0 000003F7 C47E04 les di,[.d] 0 000003FA B308 mov bl,8 232 233 domemset: 0 000003FC 88C4 mov ah, al 235 0 000003FE D1E9 shr cx,1 0 00000400 F3AB rep stosw 0 00000402 730B jnc pascal_return 0 00000404 AA stosb 240 0 00000405 EB08 jmp short pascal_return 242 243 ;*************************************************************** 244 ; 245 ; VOID memset(REG VOID *d, REG BYTE ch, REG COUNT n); 246 ; 247 global MEMSET 248 MEMSET: 0 00000407 E8B1FF call pascal_setup 250 251 arg d, ch, n 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 252 ; Get the repitition count, n - preset above 253 ; mov cx,[bp+4] 254 255 ; Get the char ch 0 0000040A 8B4606 mov ax, [.ch] 257 258 ; Get the far source pointer, d - preset above 259 ; mov di,[bp+8] 260 261 ;mov bl, 6 ; preset above 262 0 0000040D EBED jmp short domemset 264 265 ;***** 266 pascal_return: 0 0000040F C57E00 lds di, [bp] ; return address in ds, saved bp in di 0 00000412 B700 mov bh, 0 0 00000414 01DD add bp, bx ; point bp to "as if there were 0 args" 0 00000416 8C5E02 mov [bp+2], ds ; put return address at first arg 0 00000419 897E00 mov [bp], di ; saved bp below that one 272 0 0000041C 1F pop ds 0 0000041D 5F pop di 0 0000041E 5E pop si 276 %ifdef WATCOM 277 pop es 278 pop cx 279 pop bx 280 %endif 0 0000041F 89EC mov sp,bp 0 00000421 5D pop bp 0 00000422 C3 ret 284 285 ;***************************************************************** 286 287 ; fstrcpy (void FAR*dest, void FAR *src); 288 289 global FSTRCPY 290 FSTRCPY: 0 00000423 E895FF call pascal_setup 292 293 arg {dest,4}, {src,4} 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 294 ; Get the source pointer, ss 0 00000426 C57608 lds si,[.src] 296 297 ; and the destination pointer, d 0 00000429 C47E04 les di,[.dest] 299 0 0000042C B308 mov bl,8 301 0 0000042E EB05 jmp short dostrcpy 303 304 ;****** 305 global STRCPY 306 STRCPY: 0 00000430 E888FF call pascal_setup 308 309 310 %ifdef PASCAL 311 ; Get the source pointer, ss 312 mov si,[bp+4] 313 314 ; and the destination pointer, d 315 mov di,[bp+6] 316 %endif 0 00000433 B304 mov bl,4 318 319 dostrcpy: 320 321 strcpy_loop: 0 00000435 AC lodsb 0 00000436 AA stosb 0 00000437 84C0 test al,al 0 00000439 75FA jne strcpy_loop 326 0 0000043B EBD2 jmp short pascal_return 328 329 ;****************************************************************** 330 global FSTRLEN 331 FSTRLEN: 0 0000043D E87BFF call pascal_setup 333 334 ; Get the source pointer, ss 0 00000440 C47E04 les di,[bp+4] 0 00000443 B304 mov bl,4 337 0 00000445 EB05 jmp short dostrlen 339 340 ;********************************************** 341 global STRLEN 342 STRLEN: 0 00000447 E871FF call pascal_setup 344 ; Get the source pointer, ss 345 %ifdef PASCAL 346 mov di,[bp+4] 347 %endif 0 0000044A B302 mov bl,2 349 350 dostrlen: 0 0000044C B000 mov al,0 0 0000044E B9FFFF mov cx,0xffff 0 00000451 F2AE repne scasb 354 0 00000453 89C8 mov ax,cx 0 00000455 F7D0 not ax 0 00000457 48 dec ax 358 0 00000458 EBB5 jmp short pascal_return 360 361 ;************************************************************ 362 ; strchr (BYTE *src , int ch); 363 364 global STRCHR 365 STRCHR: 0 0000045A E85EFF call pascal_setup 367 368 ; Get the source pointer, ss 369 arg src, ch 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 370 %ifdef STDCALL ; preset above for PASCAL 0 0000045D 8B4E06 mov cx,[.ch] 0 00000460 8B7604 mov si,[.src] 373 %endif 0 00000463 B304 mov bl,4 375 376 strchr_loop: 0 00000465 AC lodsb 0 00000466 38C8 cmp al,cl 0 00000468 740A je strchr_found 0 0000046A 84C0 test al,al 0 0000046C 75F7 jne strchr_loop 382 383 strchr_retzero: 0 0000046E 31C0 xor ax, ax ; return NULL if not found 0 00000470 89C2 mov dx, ax ; for fstrchr() 0 00000472 EB9B jmp short pascal_return 387 388 strchr_found: 0 00000474 89F0 mov ax, si 0 00000476 8CDA mov dx, ds ; for fstrchr() 391 strchr_found1: 0 00000478 48 dec ax 393 0 00000479 EB94 jmp short pascal_return 395 396 %ifndef _INIT 397 398 ;***** 399 ; fstrchr (BYTE far *src , int ch); 400 global FSTRCHR 401 FSTRCHR: 0 0000047B E83DFF call pascal_setup 403 404 arg {src,4}, ch 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 405 ; Get ch (preset above) 406 ;mov cx, [bp+4] 407 408 ;and the source pointer, src 0 0000047E C57604 lds si, [.src] 410 411 ;mov bl, 6 - preset above 412 0 00000481 EBE2 jmp short strchr_loop 414 415 ;****** 416 global FMEMCHR 417 FMEMCHR: 0 00000483 E835FF call pascal_setup 419 420 arg {src,4}, ch, n 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 421 ; Get the length - preset above 422 %ifdef STDCALL 0 00000486 8B4E0A mov cx, [.n] 424 %endif 425 426 ; and the search value 0 00000489 8B4608 mov ax, [.ch] 428 429 ; and the source pointer, ss 0 0000048C C47E04 les di, [.src] 431 0 0000048F B308 mov bl, 8 433 0 00000491 E3DB jcxz strchr_retzero 0 00000493 F2AE repne scasb 0 00000495 75D7 jne strchr_retzero 0 00000497 8CC2 mov dx, es 0 00000499 89F8 mov ax, di 0 0000049B EBDB jmp short strchr_found1 440 441 ;********************************************************************** 442 global FSTRCMP 443 FSTRCMP: 0 0000049D E81BFF call pascal_setup 445 446 arg {dest,4}, {src,4} 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 447 ; Get the source pointer, ss 0 000004A0 C57608 lds si,[.src] 449 450 ; and the destination pointer, d 0 000004A3 C47E04 les di,[.dest] 452 0 000004A6 B308 mov bl,8 454 455 %if 0 456 jmp short dostrcmp 457 458 ;****** 459 global STRCMP 460 STRCMP: 461 call pascal_setup 462 463 mov bl,4 464 465 ; Get the source pointer, ss 466 ; mov si,[bp+4] 467 468 ; and the destination pointer, d 469 ; mov di,[bp+6] 470 xchg si,di 471 472 dostrcmp: 473 %endif 474 ; replace strncmp(s1,s2)--> 475 ; strncmp(s1,s2,0xffff) 0 000004A8 B9FFFF mov cx,0xffff 477 %if 0 478 jmp short dostrncmp 479 480 481 ;********************************************************************** 482 global FSTRNCMP 483 FSTRNCMP: 484 call pascal_setup 485 486 ; Get the source pointer, ss 487 lds si,[bp+4] 488 489 ; and the destination pointer, d 490 les di,[bp+8] 491 mov cx,[bp+12] 492 mov bl,10 493 494 jmp short dostrncmp 495 496 ;****** 497 global _strncmp 498 _strncmp: 499 call pascal_setup 500 501 ; Get the source pointer, ss 502 ;mov si,[bp+4] 503 504 ; and the destination pointer, d 505 ;mov di,[bp+6] 506 ;mov cx,[bp+8] 507 xchg si,di 508 509 dostrncmp: 510 %endif 0 000004AB E325 jcxz strncmp_retzero 512 513 strncmp_loop: 0 000004AD AC lodsb 0 000004AE AE scasb 0 000004AF 7525 jne strncmp_done 0 000004B1 84C0 test al,al 0 000004B3 E0F8 loopne strncmp_loop 0 000004B5 EB1B jmp short strncmp_retzero 520 %endif 521 522 ;********************************************************************** 523 ; fmemcmp(BYTE FAR *s1 , BYTE FAR *s2, int count); 524 global FMEMCMP 525 FMEMCMP: 0 000004B7 E801FF call pascal_setup 527 528 arg {dest,4}, {src,4}, n 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 529 ; the length - preset above 530 %ifdef STDCALL 0 000004BA 8B4E0C mov cx, [.n] 532 %endif 533 534 ; Get the source pointer, ss 0 000004BD C47E08 les di,[.src] 536 537 ; and the destination pointer, d 0 000004C0 C57604 lds si,[.dest] 539 0 000004C3 B30A mov bl,10 541 0 000004C5 EB05 jmp short domemcmp 543 544 ;****** 545 ; memcmp(BYTE *s1 , BYTE *s2, int count); 546 global MEMCMP 547 MEMCMP: 0 000004C7 E8F1FE call pascal_setup 549 550 ; all preset: Get the source pointer, ss 551 ;mov si,[bp+6] 552 553 ; and the destination pointer, d 554 ;mov di,[bp+8] 555 ;mov cx,[bp+4] 556 ;mov bl,6 0 000004CA 87F7 xchg si,di 558 559 domemcmp: 0 000004CC E304 jcxz strncmp_retzero 0 000004CE F3A6 repe cmpsb 0 000004D0 7504 jne strncmp_done 563 strncmp_retzero: 0 000004D2 31C0 xor ax, ax 0 000004D4 EB03 jmp short strncmp_done2 566 strncmp_done: 0 000004D6 9F lahf 0 000004D7 D0CC ror ah,1 0 000004D9 E933FF strncmp_done2: jmp pascal_return 570 571 %endif === Trace listing source: blockio.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=blockio.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccdtfBXG.s output file : blockio.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:21.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _move_buffer, @function 7 _move_buffer: 0 00001BC5 56 push si 0 00001BC6 57 push di 0 00001BC7 55 push bp 0 00001BC8 89E5 mov bp, sp 0 00001BCA 1E push ds 0 00001BCB 8B5E08 mov bx, word ptr [bp+8] 0 00001BCE 8B460A mov ax, word ptr [bp+10] 0 00001BD1 8B760C mov si, word ptr [bp+12] 0 00001BD4 8EC0 mov es, ax 0 00001BD6 268B5702 mov dx, word ptr es:[bx+2] 0 00001BDA 268B3F mov di, word ptr es:[bx] 0 00001BDD 26895502 mov word ptr es:[di+2], dx 0 00001BE1 268B17 mov dx, word ptr es:[bx] 0 00001BE4 268B4F02 mov cx, word ptr es:[bx+2] 0 00001BE8 894EFE mov word ptr [bp-2], cx 0 00001BEB 89CF mov di, cx 0 00001BED 268915 mov word ptr es:[di], dx 0 00001BF0 268B5402 mov dx, word ptr es:[si+2] 0 00001BF4 26895702 mov word ptr es:[bx+2], dx 0 00001BF8 268937 mov word ptr es:[bx], si 0 00001BFB 26895C02 mov word ptr es:[si+2], bx 0 00001BFF 268B5702 mov dx, word ptr es:[bx+2] 0 00001C03 89D7 mov di, dx 0 00001C05 26891D mov word ptr es:[di], bx 0 00001C08 89EC mov sp, bp 0 00001C0A 5D pop bp 0 00001C0B 5F pop di 0 00001C0C 5E pop si 0 00001C0D C20600 ret 6 37 .size _move_buffer, .-_move_buffer 38 .global _setinvld 39 .type _setinvld, @function 40 _setinvld: 0 00001C10 55 push bp 0 00001C11 89E5 mov bp, sp 0 00001C13 8B1E[0000] mov bx, word ptr [_firstbuf] 0 00001C17 8B16[0200] mov dx, word ptr [_firstbuf+2] 0 00001C1B 89D9 mov cx, bx 46 _.L5: 0 00001C1D 8EC2 mov es, dx 0 00001C1F 268A4704 mov al, byte ptr es:[bx+4] 0 00001C23 98 cbw 0 00001C24 3B4604 cmp ax, word ptr [bp+4] 0 00001C27 7505 jne _.L4 0 00001C29 26C6470500 mov byte ptr es:[bx+5], 0 53 _.L4: 0 00001C2E 8EC2 mov es, dx 0 00001C30 268B1F mov bx, word ptr es:[bx] 0 00001C33 39CB cmp bx, cx 0 00001C35 75E6 jne _.L5 0 00001C37 5D pop bp 0 00001C38 C20200 ret 2 60 .size _setinvld, .-_setinvld 61 .global _dirty_buffers 62 .type _dirty_buffers, @function 63 _dirty_buffers: 0 00001C3B 55 push bp 0 00001C3C 89E5 mov bp, sp 0 00001C3E 1E push ds 0 00001C3F 8B0E[0000] mov cx, word ptr [_firstbuf] 0 00001C43 8B16[0200] mov dx, word ptr [_firstbuf+2] 0 00001C47 89CB mov bx, cx 70 _.L11: 0 00001C49 8EC2 mov es, dx 0 00001C4B 268A4704 mov al, byte ptr es:[bx+4] 0 00001C4F 98 cbw 0 00001C50 3B4604 cmp ax, word ptr [bp+4] 0 00001C53 750D jne _.L9 0 00001C55 268A4705 mov al, byte ptr es:[bx+5] 0 00001C59 8846FF mov byte ptr [bp-1], al 0 00001C5C 2460 and al, 96 0 00001C5E 3C60 cmp al, 96 0 00001C60 7411 je _.L12 81 _.L9: 0 00001C62 8EC2 mov es, dx 0 00001C64 268B1F mov bx, word ptr es:[bx] 0 00001C67 39CB cmp bx, cx 0 00001C69 75DE jne _.L11 0 00001C6B 31C0 xor ax, ax 87 _.L8: 0 00001C6D 89EC mov sp, bp 0 00001C6F 5D pop bp 0 00001C70 C20200 ret 2 91 _.L12: 0 00001C73 B80100 mov ax, 1 0 00001C76 EBF5 jmp _.L8 94 .size _dirty_buffers, .-_dirty_buffers 95 .global _dskxfer 96 .type _dskxfer, @function 97 _dskxfer: 0 00001C78 56 push si 0 00001C79 57 push di 0 00001C7A 55 push bp 0 00001C7B 89E5 mov bp, sp 0 00001C7D 83EC0E sub sp, 14 0 00001C80 C4460A les ax, dword ptr [bp+10] 0 00001C83 8946FA mov word ptr [bp-6], ax 0 00001C86 8C46F6 mov word ptr [bp-10], es 0 00001C89 C4460E les ax, dword ptr [bp+14] 0 00001C8C 8946F8 mov word ptr [bp-8], ax 0 00001C8F 8C46FC mov word ptr [bp-4], es 0 00001C92 FF7608 push word ptr [bp+8] 0 00001C95 E8[FEFF] call _get_dpb 0 00001C98 89C6 mov si, ax 0 00001C9A 8956FE mov word ptr [bp-2], dx 0 00001C9D 09D0 or ax, dx 0 00001C9F 85C0 test ax, ax 0 00001CA1 7503E9B401 je _.L35 0 00001CA6 817EFC00A0 cmp word ptr [bp-4], -24577+1 0 00001CAB 18C9 sbb cl, cl 0 00001CAD FEC1 inc cl 0 00001CAF 837E1201 cmp word ptr [bp+18], 1 0 00001CB3 9F lahf 0 00001CB4 D0E4 shl ah, 1 0 00001CB6 99 cwd 0 00001CB7 88D0 mov al, dl 0 00001CB9 F6D8 neg al 0 00001CBB 88CC mov ah, cl 0 00001CBD 20C4 and ah, al 0 00001CBF 8866F5 mov byte ptr [bp-11], ah 128 _.L18: 0 00001CC2 BF[0000] mov di, offset _IoReqHdr 0 00001CC5 C606[0000]1E mov byte ptr [_IoReqHdr], 30 0 00001CCA 8E46FE mov es, word ptr [bp-2] 0 00001CCD 268A4401 mov al, byte ptr es:[si+1] 0 00001CD1 884501 mov byte ptr [di+1], al 0 00001CD4 837E1402 cmp word ptr [bp+20], 2 0 00001CD8 741D je _.L19 0 00001CDA 7F0C jg _.L20 0 00001CDC 837E1401 cmp word ptr [bp+20], 1 0 00001CE0 741C je _.L21 139 _.L36: 0 00001CE2 B80001 mov ax, 256 0 00001CE5 E91E01 jmp _.L15 142 _.L20: 0 00001CE8 837E1403 cmp word ptr [bp+20], 3 0 00001CEC 7503E91D01 je _.L22 0 00001CF1 837E1404 cmp word ptr [bp+20], 4 0 00001CF5 75EB jne _.L36 147 _.L19: 0 00001CF7 C606[0200]04 mov byte ptr [_IoReqHdr+2], 4 0 00001CFC EB0F jmp _.L23 150 _.L21: 0 00001CFE 803E[0000]00 cmp byte ptr [_verify_ena], 0 0 00001D03 7503E90601 je _.L22 0 00001D08 C606[0200]09 mov byte ptr [_IoReqHdr+2], 9 154 _.L23: 0 00001D0D C706[0300]0000 mov word ptr [_IoReqHdr+3], 0 0 00001D13 8E46FE mov es, word ptr [bp-2] 0 00001D16 268A4417 mov al, byte ptr es:[si+23] 0 00001D1A 88450D mov byte ptr [di+13], al 0 00001D1D 8B4612 mov ax, word ptr [bp+18] 0 00001D20 894512 mov word ptr [di+18], ax 0 00001D23 268B5C13 mov bx, word ptr es:[si+19] 0 00001D27 268B4415 mov ax, word ptr es:[si+21] 0 00001D2B 8946F2 mov word ptr [bp-14], ax 0 00001D2E 8EC0 mov es, ax 0 00001D30 268B4704 mov ax, word ptr es:[bx+4] 0 00001D34 D1E8 shr ax, 1 0 00001D36 83E001 and ax, 1 0 00001D39 8946F2 mov word ptr [bp-14], ax 0 00001D3C 807EF200 cmp byte ptr [bp-14], 0 0 00001D40 7403E9D100 jne _.L39 0 00001D45 837EF600 cmp word ptr [bp-10], 0 0 00001D49 7403E9C800 jne _.L39 0 00001D4E 837EFAFE cmp word ptr [bp-6], -2 0 00001D52 7603E9BF00 ja _.L39 0 00001D57 8B46FA mov ax, word ptr [bp-6] 0 00001D5A 894514 mov word ptr [di+20], ax 177 _.L28: 0 00001D5D 807EF500 cmp byte ptr [bp-11], 0 0 00001D61 7503E9C500 je _.L29 0 00001D66 803E[0000]00 cmp byte ptr [_bufloc], 0 0 00001D6B 7503E9BB00 je _.L29 0 00001D70 A1[0000] mov ax, word ptr [_deblock_buf] 0 00001D73 8B0E[0200] mov cx, word ptr [_deblock_buf+2] 0 00001D77 89450E mov word ptr [di+14], ax 0 00001D7A 894D10 mov word ptr [di+16], cx 0 00001D7D 837E1401 cmp word ptr [bp+20], 1 0 00001D81 7512 jne _.L30 0 00001D83 8E46FE mov es, word ptr [bp-2] 0 00001D86 26FF7402 push word ptr es:[si+2] 0 00001D8A FF76FC push word ptr [bp-4] 0 00001D8D FF76F8 push word ptr [bp-8] 0 00001D90 51 push cx 0 00001D91 50 push ax 0 00001D92 E8[FEFF] call _fmemcpy 195 _.L30: 0 00001D95 8E46FE mov es, word ptr [bp-2] 0 00001D98 26FF7415 push word ptr es:[si+21] 0 00001D9C 26FF7413 push word ptr es:[si+19] 0 00001DA0 16 push ss 0 00001DA1 B8[0000] mov ax, offset _IoReqHdr 0 00001DA4 50 push ax 0 00001DA5 E8[FEFF] call _execrh 0 00001DA8 837E1402 cmp word ptr [bp+20], 2 0 00001DAC 7518 jne _.L31 0 00001DAE 8E46FE mov es, word ptr [bp-2] 0 00001DB1 26FF7402 push word ptr es:[si+2] 0 00001DB5 FF36[0200] push word ptr [_deblock_buf+2] 0 00001DB9 FF36[0000] push word ptr [_deblock_buf] 0 00001DBD FF76FC push word ptr [bp-4] 0 00001DC0 FF76F8 push word ptr [bp-8] 0 00001DC3 E8[FEFF] call _fmemcpy 212 _.L31: 0 00001DC6 8B4503 mov ax, word ptr [di+3] 0 00001DC9 89C1 mov cx, ax 0 00001DCB 81E10081 and cx, -32512 0 00001DCF 81F90001 cmp cx, 256 0 00001DD3 7503E98700 je _.L37 0 00001DD8 837E1402 cmp word ptr [bp+20], 2 0 00001DDC 7F28 jg _.L15 220 _.L51: 0 00001DDE FF7614 push word ptr [bp+20] 0 00001DE1 8E46FE mov es, word ptr [bp-2] 0 00001DE4 26FF7415 push word ptr es:[si+21] 0 00001DE8 26FF7413 push word ptr es:[si+19] 0 00001DEC 268A04 mov al, byte ptr es:[si] 0 00001DEF 98 cbw 0 00001DF0 50 push ax 0 00001DF1 B8[0000] mov ax, offset _IoReqHdr 0 00001DF4 50 push ax 0 00001DF5 E8[FEFF] call _block_error 0 00001DF8 83F801 cmp ax, 1 0 00001DFB 7503E9C2FE je _.L18 0 00001E00 7F4B jg _.L33 0 00001E02 85C0 test ax, ax 0 00001E04 75D8 jne _.L51 236 _.L15: 0 00001E06 89EC mov sp, bp 0 00001E08 5D pop bp 0 00001E09 5F pop di 0 00001E0A 5E pop si 0 00001E0B C20E00 ret 14 242 _.L22: 0 00001E0E C606[0200]08 mov byte ptr [_IoReqHdr+2], 8 0 00001E13 E9F7FE jmp _.L23 245 _.L39: 0 00001E16 C706[1400]FFFF mov word ptr [_IoReqHdr+20], -1 0 00001E1C 8B46FA mov ax, word ptr [bp-6] 0 00001E1F 89451A mov word ptr [di+26], ax 0 00001E22 8B46F6 mov ax, word ptr [bp-10] 0 00001E25 89451C mov word ptr [di+28], ax 0 00001E28 E932FF jmp _.L28 252 _.L29: 0 00001E2B 8B46F8 mov ax, word ptr [bp-8] 0 00001E2E 89450E mov word ptr [di+14], ax 0 00001E31 8B46FC mov ax, word ptr [bp-4] 0 00001E34 894510 mov word ptr [di+16], ax 0 00001E37 8E46FE mov es, word ptr [bp-2] 0 00001E3A 26FF7415 push word ptr es:[si+21] 0 00001E3E 26FF7413 push word ptr es:[si+19] 0 00001E42 16 push ss 0 00001E43 B8[0000] mov ax, offset _IoReqHdr 0 00001E46 50 push ax 0 00001E47 E8[FEFF] call _execrh 0 00001E4A E979FF jmp _.L31 265 _.L33: 0 00001E4D 83F803 cmp ax, 3 0 00001E50 7F8C jg _.L51 0 00001E52 BB[0000] mov bx, offset _IoReqHdr 0 00001E55 8B4703 mov ax, word ptr [bx+3] 0 00001E58 EBAC jmp _.L15 271 _.L35: 0 00001E5A B80102 mov ax, 513 0 00001E5D EBA7 jmp _.L15 274 _.L37: 0 00001E5F 31C0 xor ax, ax 0 00001E61 EBA3 jmp _.L15 277 .size _dskxfer, .-_dskxfer 278 .type _flush1, @function 279 _flush1: 0 00001E63 56 push si 0 00001E64 57 push di 0 00001E65 55 push bp 0 00001E66 89E5 mov bp, sp 0 00001E68 83EC0C sub sp, 12 0 00001E6B 8B5E08 mov bx, word ptr [bp+8] 0 00001E6E 8B460A mov ax, word ptr [bp+10] 0 00001E71 8946FE mov word ptr [bp-2], ax 0 00001E74 8EC0 mov es, ax 0 00001E76 268A4705 mov al, byte ptr es:[bx+5] 0 00001E7A 8846F8 mov byte ptr [bp-8], al 0 00001E7D 2460 and al, 96 0 00001E7F 3C60 cmp al, 96 0 00001E81 7403E9A900 jne _.L66 0 00001E86 268B4706 mov ax, word ptr es:[bx+6] 0 00001E8A 8946FC mov word ptr [bp-4], ax 0 00001E8D 268B4708 mov ax, word ptr es:[bx+8] 0 00001E91 8946FA mov word ptr [bp-6], ax 0 00001E94 F646F802 test byte ptr [bp-8], 2 0 00001E98 744D je _.L67 0 00001E9A 268A570A mov dl, byte ptr es:[bx+10] 0 00001E9E 268B7F0B mov di, word ptr es:[bx+11] 0 00001EA2 31F6 xor si, si 0 00001EA4 85FF test di, di 0 00001EA6 751E jne _.L60 0 00001EA8 268B470D mov ax, word ptr es:[bx+13] 0 00001EAC 8946F8 mov word ptr [bp-8], ax 0 00001EAF 268B470F mov ax, word ptr es:[bx+15] 0 00001EB3 8946F6 mov word ptr [bp-10], ax 0 00001EB6 8EC0 mov es, ax 0 00001EB8 8B7EF8 mov di, word ptr [bp-8] 0 00001EBB 268B7D31 mov di, word ptr es:[di+49] 0 00001EBF 8B76F8 mov si, word ptr [bp-8] 0 00001EC2 268B7433 mov si, word ptr es:[si+51] 314 _.L60: 0 00001EC6 B90100 mov cx, 1 316 _.L61: 0 00001EC9 84D2 test dl, dl 0 00001ECB 7522 jne _.L63 319 _.L59: 0 00001ECD 8E46FE mov es, word ptr [bp-2] 0 00001ED0 268A4705 mov al, byte ptr es:[bx+5] 0 00001ED4 85C9 test cx, cx 0 00001ED6 745C je _.L64 0 00001ED8 24BF and al, -65 325 _.L72: 0 00001EDA 26884705 mov byte ptr es:[bx+5], al 0 00001EDE 91 xchg cx, ax 0 00001EDF 89EC mov sp, bp 0 00001EE1 5D pop bp 0 00001EE2 5F pop di 0 00001EE3 5E pop si 0 00001EE4 C20400 ret 4 333 _.L67: 0 00001EE7 B201 mov dl, 1 0 00001EE9 31FF xor di, di 0 00001EEB 89FE mov si, di 0 00001EED EBD7 jmp _.L60 338 _.L63: 0 00001EEF 894EF4 mov word ptr [bp-12], cx 0 00001EF2 8856F6 mov byte ptr [bp-10], dl 0 00001EF5 B80100 mov ax, 1 0 00001EF8 50 push ax 0 00001EF9 50 push ax 0 00001EFA 8D4714 lea ax, [20+bx] 0 00001EFD FF76FE push word ptr [bp-2] 0 00001F00 50 push ax 0 00001F01 FF76FA push word ptr [bp-6] 0 00001F04 FF76FC push word ptr [bp-4] 0 00001F07 8E46FE mov es, word ptr [bp-2] 0 00001F0A 268A4704 mov al, byte ptr es:[bx+4] 0 00001F0E 895EF8 mov word ptr [bp-8], bx 0 00001F11 98 cbw 0 00001F12 50 push ax 0 00001F13 E8[FEFF] call _dskxfer 0 00001F16 85C0 test ax, ax 0 00001F18 8B5EF8 mov bx, word ptr [bp-8] 0 00001F1B 8A56F6 mov dl, byte ptr [bp-10] 0 00001F1E 8B4EF4 mov cx, word ptr [bp-12] 0 00001F21 7402 je _.L62 0 00001F23 31C9 xor cx, cx 361 _.L62: 0 00001F25 017EFC add word ptr [bp-4], di 0 00001F28 1176FA adc word ptr [bp-6], si 0 00001F2B FECA dec dl 0 00001F2D EB9A jmp _.L61 366 _.L66: 0 00001F2F B90100 mov cx, 1 0 00001F32 EB99 jmp _.L59 369 _.L64: 0 00001F34 249F and al, -97 0 00001F36 8E46FE mov es, word ptr [bp-2] 0 00001F39 EB9F jmp _.L72 373 .size _flush1, .-_flush1 374 .global _DeleteBlockInBufferCache 375 .type _DeleteBlockInBufferCache, @function 376 _DeleteBlockInBufferCache: 0 00001F3B 56 push si 0 00001F3C 57 push di 0 00001F3D 55 push bp 0 00001F3E 89E5 mov bp, sp 0 00001F40 83EC08 sub sp, 8 0 00001F43 8B7E08 mov di, word ptr [bp+8] 0 00001F46 8B760A mov si, word ptr [bp+10] 0 00001F49 C4460C les ax, dword ptr [bp+12] 0 00001F4C 8946FC mov word ptr [bp-4], ax 0 00001F4F 8C46FA mov word ptr [bp-6], es 0 00001F52 8B1E[0000] mov bx, word ptr [_firstbuf] 0 00001F56 A1[0200] mov ax, word ptr [_firstbuf+2] 0 00001F59 8946FE mov word ptr [bp-2], ax 390 _.L80: 0 00001F5C 8E46FE mov es, word ptr [bp-2] 0 00001F5F 268B4706 mov ax, word ptr es:[bx+6] 0 00001F63 268B5708 mov dx, word ptr es:[bx+8] 0 00001F67 3B56FA cmp dx, word ptr [bp-6] 0 00001F6A 7736 ja _.L74 0 00001F6C 7505 jne _.L84 0 00001F6E 3B46FC cmp ax, word ptr [bp-4] 0 00001F71 772F ja _.L74 399 _.L84: 0 00001F73 39D6 cmp si, dx 0 00001F75 772B ja _.L74 0 00001F77 7504 jne _.L85 0 00001F79 39C7 cmp di, ax 0 00001F7B 7725 ja _.L74 405 _.L85: 0 00001F7D 8E46FE mov es, word ptr [bp-2] 0 00001F80 26F6470520 test byte ptr es:[bx+5], 32 0 00001F85 741B je _.L74 0 00001F87 268A4704 mov al, byte ptr es:[bx+4] 0 00001F8B 98 cbw 0 00001F8C 3B4610 cmp ax, word ptr [bp+16] 0 00001F8F 7511 jne _.L74 0 00001F91 837E1201 cmp word ptr [bp+18], 1 0 00001F95 7521 jne _.L79 0 00001F97 06 push es 0 00001F98 53 push bx 0 00001F99 895EF8 mov word ptr [bp-8], bx 0 00001F9C E8C4FE call _flush1 0 00001F9F 8B5EF8 mov bx, word ptr [bp-8] 420 _.L74: 0 00001FA2 8E46FE mov es, word ptr [bp-2] 0 00001FA5 268B1F mov bx, word ptr es:[bx] 0 00001FA8 391E[0000] cmp word ptr [_firstbuf], bx 0 00001FAC 75AE jne _.L80 0 00001FAE 31C0 xor ax, ax 0 00001FB0 89EC mov sp, bp 0 00001FB2 5D pop bp 0 00001FB3 5F pop di 0 00001FB4 5E pop si 0 00001FB5 C20C00 ret 12 431 _.L79: 0 00001FB8 8E46FE mov es, word ptr [bp-2] 0 00001FBB 26C6470500 mov byte ptr es:[bx+5], 0 0 00001FC0 EBE0 jmp _.L74 435 .size _DeleteBlockInBufferCache, .-_DeleteBlockInBufferCache 436 .global _flush_buffers 437 .type _flush_buffers, @function 438 _flush_buffers: 0 00001FC2 56 push si 0 00001FC3 57 push di 0 00001FC4 55 push bp 0 00001FC5 89E5 mov bp, sp 0 00001FC7 1E push ds 0 00001FC8 8B1E[0000] mov bx, word ptr [_firstbuf] 0 00001FCC 8B36[0200] mov si, word ptr [_firstbuf+2] 0 00001FD0 BF0100 mov di, 1 447 _.L94: 0 00001FD3 8EC6 mov es, si 0 00001FD5 268A4704 mov al, byte ptr es:[bx+4] 0 00001FD9 98 cbw 0 00001FDA 3B4608 cmp ax, word ptr [bp+8] 0 00001FDD 7510 jne _.L93 0 00001FDF 56 push si 0 00001FE0 53 push bx 0 00001FE1 895EFE mov word ptr [bp-2], bx 0 00001FE4 E87CFE call _flush1 0 00001FE7 85C0 test ax, ax 0 00001FE9 8B5EFE mov bx, word ptr [bp-2] 0 00001FEC 7501 jne _.L93 0 00001FEE 97 xchg di, ax 461 _.L93: 0 00001FEF 8EC6 mov es, si 0 00001FF1 268B1F mov bx, word ptr es:[bx] 0 00001FF4 391E[0000] cmp word ptr [_firstbuf], bx 0 00001FF8 75D9 jne _.L94 0 00001FFA 97 xchg di, ax 0 00001FFB 89EC mov sp, bp 0 00001FFD 5D pop bp 0 00001FFE 5F pop di 0 00001FFF 5E pop si 0 00002000 C20200 ret 2 472 .size _flush_buffers, .-_flush_buffers 473 .global _flush 474 .type _flush, @function 475 _flush: 0 00002003 56 push si 0 00002004 57 push di 0 00002005 55 push bp 0 00002006 89E5 mov bp, sp 0 00002008 1E push ds 0 00002009 8B1E[0000] mov bx, word ptr [_firstbuf] 0 0000200D 8B3E[0200] mov di, word ptr [_firstbuf+2] 0 00002011 BE0100 mov si, 1 484 _.L99: 0 00002014 57 push di 0 00002015 53 push bx 0 00002016 895EFE mov word ptr [bp-2], bx 0 00002019 E847FE call _flush1 0 0000201C 85C0 test ax, ax 0 0000201E 8B5EFE mov bx, word ptr [bp-2] 0 00002021 7501 jne _.L98 0 00002023 96 xchg si, ax 493 _.L98: 0 00002024 8EC7 mov es, di 0 00002026 26806705DF and byte ptr es:[bx+5], -33 0 0000202B 268B1F mov bx, word ptr es:[bx] 0 0000202E 391E[0000] cmp word ptr [_firstbuf], bx 0 00002032 75E0 jne _.L99 0 00002034 B82011 mov ax, 4384 0 00002037 50 push ax 0 00002038 E8[FEFF] call _network_redirector 0 0000203B 96 xchg si, ax 0 0000203C 89EC mov sp, bp 0 0000203E 5D pop bp 0 0000203F 5F pop di 0 00002040 5E pop si 0 00002041 C3 ret 508 .size _flush, .-_flush 509 .global _getblk 510 .type _getblk, @function 511 _getblk: 0 00002042 56 push si 0 00002043 57 push di 0 00002044 55 push bp 0 00002045 89E5 mov bp, sp 0 00002047 83EC0A sub sp, 10 0 0000204A C44608 les ax, dword ptr [bp+8] 0 0000204D 8946FA mov word ptr [bp-6], ax 0 00002050 8C46F8 mov word ptr [bp-8], es 0 00002053 8B1E[0000] mov bx, word ptr [_firstbuf] 0 00002057 8B3E[0200] mov di, word ptr [_firstbuf+2] 0 0000205B 89DE mov si, bx 0 0000205D 89FA mov dx, di 0 0000205F 31C9 xor cx, cx 0 00002061 894EFC mov word ptr [bp-4], cx 0 00002064 894EF6 mov word ptr [bp-10], cx 527 _.L108: 0 00002067 8EC7 mov es, di 0 00002069 8B46FA mov ax, word ptr [bp-6] 0 0000206C 26394406 cmp word ptr es:[si+6], ax 0 00002070 268A4405 mov al, byte ptr es:[si+5] 0 00002074 8846FE mov byte ptr [bp-2], al 0 00002077 755B jne _.L103 0 00002079 8B46F8 mov ax, word ptr [bp-8] 0 0000207C 26394408 cmp word ptr es:[si+8], ax 0 00002080 7552 jne _.L103 0 00002082 F646FE20 test byte ptr [bp-2], 32 0 00002086 744C je _.L103 0 00002088 268A4404 mov al, byte ptr es:[si+4] 0 0000208C 98 cbw 0 0000208D 39460C cmp word ptr [bp+12], ax 0 00002090 7542 jne _.L103 0 00002092 8A46FE mov al, byte ptr [bp-2] 0 00002095 24FE and al, -2 0 00002097 26884405 mov byte ptr es:[si+5], al 0 0000209B 39F3 cmp bx, si 0 0000209D 7410 je _.L104 0 0000209F 8956FE mov word ptr [bp-2], dx 0 000020A2 8936[0000] mov word ptr [_firstbuf], si 0 000020A6 53 push bx 0 000020A7 57 push di 0 000020A8 56 push si 0 000020A9 E819FB call _move_buffer 554 _.L139: 0 000020AC 8B56FE mov dx, word ptr [bp-2] 556 _.L104: 0 000020AF 8EC7 mov es, di 0 000020B1 26F6440501 test byte ptr es:[si+5], 1 0 000020B6 7413 je _.L102 0 000020B8 8956FE mov word ptr [bp-2], dx 0 000020BB 57 push di 0 000020BC 56 push si 0 000020BD E8A3FD call _flush1 0 000020C0 85C0 test ax, ax 0 000020C2 8B56FE mov dx, word ptr [bp-2] 0 000020C5 7571 jne _.L114 567 _.L116: 0 000020C7 31F6 xor si, si 0 000020C9 89F2 mov dx, si 570 _.L102: 0 000020CB 96 xchg si, ax 0 000020CC 89EC mov sp, bp 0 000020CE 5D pop bp 0 000020CF 5F pop di 0 000020D0 5E pop si 0 000020D1 C20800 ret 8 577 _.L103: 0 000020D4 F646FE01 test byte ptr [bp-2], 1 0 000020D8 7402 je _.L105 0 000020DA 89F1 mov cx, si 581 _.L105: 0 000020DC F646FE02 test byte ptr [bp-2], 2 0 000020E0 7449 je _.L106 0 000020E2 FF46F6 inc word ptr [bp-10] 585 _.L107: 0 000020E5 8EC7 mov es, di 0 000020E7 268B34 mov si, word ptr es:[si] 0 000020EA 39F3 cmp bx, si 0 000020EC 7403E976FF jne _.L108 0 000020F1 89CE mov si, cx 0 000020F3 85C9 test cx, cx 0 000020F5 751A jne _.L110 0 000020F7 8EC7 mov es, di 0 000020F9 26F6470502 test byte ptr es:[bx+5], 2 0 000020FE 7430 je _.L111 0 00002100 837EF602 cmp word ptr [bp-10], 2 0 00002104 7F2A jg _.L111 0 00002106 837EFC01 cmp word ptr [bp-4], 1 0 0000210A 7224 jc _.L111 0 0000210C 8B76FC mov si, word ptr [bp-4] 601 _.L138: 0 0000210F 89FA mov dx, di 603 _.L110: 0 00002111 8EC7 mov es, di 0 00002113 26804C0501 or byte ptr es:[si+5], 1 0 00002118 39F3 cmp bx, si 0 0000211A 7493 je _.L104 0 0000211C 8956FE mov word ptr [bp-2], dx 0 0000211F 53 push bx 0 00002120 57 push di 0 00002121 56 push si 0 00002122 E8A0FA call _move_buffer 0 00002125 8936[0000] mov word ptr [_firstbuf], si 0 00002129 EB81 jmp _.L139 615 _.L106: 0 0000212B 8976FC mov word ptr [bp-4], si 0 0000212E EBB5 jmp _.L107 618 _.L111: 0 00002130 8EC7 mov es, di 0 00002132 268B7702 mov si, word ptr es:[bx+2] 0 00002136 EBD7 jmp _.L138 622 _.L114: 0 00002138 837E0E00 cmp word ptr [bp+14], 0 0 0000213C 741F je _.L115 625 _.L117: 0 0000213E 8EC7 mov es, di 0 00002140 26C6440528 mov byte ptr es:[si+5], 40 0 00002145 8A460C mov al, byte ptr [bp+12] 0 00002148 26884404 mov byte ptr es:[si+4], al 0 0000214C 8B46FA mov ax, word ptr [bp-6] 0 0000214F 26894406 mov word ptr es:[si+6], ax 0 00002153 8B46F8 mov ax, word ptr [bp-8] 0 00002156 26894408 mov word ptr es:[si+8], ax 0 0000215A E96EFF jmp _.L102 635 _.L115: 0 0000215D 8956FE mov word ptr [bp-2], dx 0 00002160 B80200 mov ax, 2 0 00002163 50 push ax 0 00002164 B80100 mov ax, 1 0 00002167 50 push ax 0 00002168 8D4414 lea ax, [20+si] 0 0000216B 57 push di 0 0000216C 50 push ax 0 0000216D FF76F8 push word ptr [bp-8] 0 00002170 FF76FA push word ptr [bp-6] 0 00002173 FF760C push word ptr [bp+12] 0 00002176 E8[FEFF] call _dskxfer 0 00002179 85C0 test ax, ax 0 0000217B 8B56FE mov dx, word ptr [bp-2] 0 0000217E 74BE je _.L117 0 00002180 E944FF jmp _.L116 652 .size _getblk, .-_getblk 653 .global _AllocateHMASpace 654 .type _AllocateHMASpace, @function 655 _AllocateHMASpace: 0 00002183 56 push si 0 00002184 57 push di 0 00002185 55 push bp 0 00002186 89E5 mov bp, sp 0 00002188 1E push ds 0 00002189 1E push ds 0 0000218A 8B1E[0000] mov bx, word ptr [_firstbuf] 0 0000218E 8B36[0200] mov si, word ptr [_firstbuf+2] 0 00002192 83FEFF cmp si, -1 0 00002195 755B jne _.L140 0 00002197 8B16[0000] mov dx, word ptr [_LoL_nbuffers] 667 _.L144: 0 0000219B 3B5E0A cmp bx, word ptr [bp+10] 0 0000219E 774A ja _.L142 0 000021A0 8D871402 lea ax, [532+bx] 0 000021A4 3B4608 cmp ax, word ptr [bp+8] 0 000021A7 7641 jbe _.L142 0 000021A9 8956FC mov word ptr [bp-4], dx 0 000021AC 56 push si 0 000021AD 53 push bx 0 000021AE 895EFE mov word ptr [bp-2], bx 0 000021B1 E8AFFC call _flush1 0 000021B4 8EC6 mov es, si 0 000021B6 8B5EFE mov bx, word ptr [bp-2] 0 000021B9 268B07 mov ax, word ptr es:[bx] 0 000021BC 268B5702 mov dx, word ptr es:[bx+2] 0 000021C0 8956FE mov word ptr [bp-2], dx 0 000021C3 89D7 mov di, dx 0 000021C5 268905 mov word ptr es:[di], ax 0 000021C8 268B4702 mov ax, word ptr es:[bx+2] 0 000021CC 268B3F mov di, word ptr es:[bx] 0 000021CF 26894502 mov word ptr es:[di+2], ax 0 000021D3 391E[0000] cmp word ptr [_firstbuf], bx 0 000021D7 8B56FC mov dx, word ptr [bp-4] 0 000021DA 750A jne _.L143 0 000021DC 268B07 mov ax, word ptr es:[bx] 0 000021DF A3[0000] mov word ptr [_firstbuf], ax 0 000021E2 8936[0200] mov word ptr [_firstbuf+2], si 694 _.L143: 0 000021E6 FF0E[0000] dec word ptr [_LoL_nbuffers] 696 _.L142: 0 000021EA 8EC6 mov es, si 0 000021EC 268B1F mov bx, word ptr es:[bx] 0 000021EF 4A dec dx 0 000021F0 75A9 jne _.L144 701 _.L140: 0 000021F2 89EC mov sp, bp 0 000021F4 5D pop bp 0 000021F5 5F pop di 0 000021F6 5E pop si 0 000021F7 C20400 ret 4 707 .size _AllocateHMASpace, .-_AllocateHMASpace 708 .ident "GCC: (GNU) 6.3.0" === Trace listing source: break.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=break.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccBy6hZi.s output file : break.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:21.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .global _ctrl_break_pressed 7 .type _ctrl_break_pressed, @function 8 _ctrl_break_pressed: 0 00002E70 31C0 xor ax, ax 0 00002E72 8EC0 mov es, ax 0 00002E74 26A07104 mov al, byte ptr es:[1137] 0 00002E78 2480 and al, -128 0 00002E7A C3 ret 14 .size _ctrl_break_pressed, .-_ctrl_break_pressed === Switch to base=012B40h -> ".RODATA.STR1.1" 15 .section .rodata.str1.1,"aMS",@progbits,1 16 _.LC0: 0 0000191A 5E430D0A00 .string "^C\r\n" === Switch to base=002270h -> ".TEXT" 18 .text 19 .global _handle_break 20 .type _handle_break, @function 21 _handle_break: 0 00002E7B 56 push si 0 00002E7C 57 push di 0 00002E7D 55 push bp 0 00002E7E 89E5 mov bp, sp 0 00002E80 8B7E08 mov di, word ptr [bp+8] 0 00002E83 8B760A mov si, word ptr [bp+10] 0 00002E86 31C0 xor ax, ax 0 00002E88 8EC0 mov es, ax 0 00002E8A 26802671047F and byte ptr es:[1137], 127 0 00002E90 57 push di 0 00002E91 E8[FEFF] call _con_flush 0 00002E94 83FEFF cmp si, -1 0 00002E97 BA[0000] mov dx, offset _.LC0 0 00002E9A B80400 mov ax, 4 0 00002E9D 7525 jne _.L3 0 00002E9F 16 push ss 0 00002EA0 52 push dx 0 00002EA1 50 push ax 0 00002EA2 57 push di 0 00002EA3 E8[FEFF] call _cooked_write 42 _.L4: 0 00002EA6 803E[0000]00 cmp byte ptr [_ErrorMode], 0 0 00002EAB 750C jne _.L5 0 00002EAD A0[0000] mov al, byte ptr [_InDOS] 0 00002EB0 84C0 test al, al 0 00002EB2 7405 je _.L5 0 00002EB4 FEC8 dec al 0 00002EB6 A2[0000] mov byte ptr [_InDOS], al 50 _.L5: 0 00002EB9 E8[FEFF] call _spawn_int23 0 00002EBC 89EC mov sp, bp 0 00002EBE 5D pop bp 0 00002EBF 5F pop di 0 00002EC0 5E pop si 0 00002EC1 C20400 ret 4 57 _.L3: 0 00002EC4 B90300 mov cx, 3 0 00002EC7 51 push cx 0 00002EC8 16 push ss 0 00002EC9 52 push dx 0 00002ECA 50 push ax 0 00002ECB 56 push si 0 00002ECC E8[FEFF] call _DosRWSft 0 00002ECF EBD5 jmp _.L4 66 .size _handle_break, .-_handle_break 67 .global _check_handle_break 68 .type _check_handle_break, @function 69 _check_handle_break: 0 00002ED1 56 push si 0 00002ED2 55 push bp 0 00002ED3 89E5 mov bp, sp 0 00002ED5 8B7606 mov si, word ptr [bp+6] 0 00002ED8 31C0 xor ax, ax 0 00002EDA 8EC0 mov es, ax 0 00002EDC 26803E710400 cmp byte ptr es:[1137], 0 0 00002EE2 7911 jns _.L11 78 _.L13: 0 00002EE4 B8FFFF mov ax, -1 0 00002EE7 50 push ax 0 00002EE8 56 push si 0 00002EE9 E8[FEFF] call _handle_break 0 00002EEC B003 mov al, 3 84 _.L10: 0 00002EEE 89EC mov sp, bp 0 00002EF0 5D pop bp 0 00002EF1 5E pop si 0 00002EF2 C20200 ret 2 89 _.L11: 0 00002EF5 B8[0000] mov ax, offset _syscon 0 00002EF8 50 push ax 0 00002EF9 E8[FEFF] call _ndread 0 00002EFC 3C03 cmp al, 3 0 00002EFE 74E4 je _.L13 0 00002F00 8B14 mov dx, word ptr [si] 0 00002F02 3B16[0000] cmp dx, word ptr [_syscon] 0 00002F06 7509 jne _.L15 0 00002F08 8B5402 mov dx, word ptr [si+2] 0 00002F0B 3B16[0200] cmp dx, word ptr [_syscon+2] 0 00002F0F 74DD je _.L10 101 _.L15: 0 00002F11 56 push si 0 00002F12 E8[FEFF] call _ndread 0 00002F15 3C03 cmp al, 3 0 00002F17 75D5 jne _.L10 0 00002F19 EBC9 jmp _.L13 107 .size _check_handle_break, .-_check_handle_break 108 .ident "GCC: (GNU) 6.3.0" === Trace listing source: chario.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=chario.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccUNAP35.s output file : chario.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:21.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _CharRequest.isra.0, @function 7 _CharRequest.isra.0: 0 000021FA 56 push si 0 000021FB 57 push di 0 000021FC 55 push bp 0 000021FD 89E5 mov bp, sp 0 000021FF 1E push ds 0 00002200 8B7E08 mov di, word ptr [bp+8] 0 00002203 8B760A mov si, word ptr [bp+10] 0 00002206 BB[0000] mov bx, offset _CharReqHdr 0 00002209 8B460C mov ax, word ptr [bp+12] 0 0000220C 884702 mov byte ptr [bx+2], al 0 0000220F C606[0100]00 mov byte ptr [_CharReqHdr+1], 0 0 00002214 C706[0300]0000 mov word ptr [_CharReqHdr+3], 0 0 0000221A C606[0000]1E mov byte ptr [_CharReqHdr], 30 0 0000221F 56 push si 0 00002220 57 push di 0 00002221 16 push ss 0 00002222 53 push bx 0 00002223 895EFE mov word ptr [bp-2], bx 0 00002226 E8[FEFF] call _execrh 0 00002229 8B5EFE mov bx, word ptr [bp-2] 0 0000222C 837F0300 cmp word ptr [bx+3], 0 0 00002230 7D2C jge _.L7 30 _.L11: 0 00002232 56 push si 0 00002233 57 push di 0 00002234 53 push bx 0 00002235 895EFE mov word ptr [bp-2], bx 0 00002238 E8[FEFF] call _char_error 0 0000223B 83F801 cmp ax, 1 0 0000223E 740C je _.L1 0 00002240 8B5EFE mov bx, word ptr [bp-2] 0 00002243 7F0F jg _.L5 0 00002245 85C0 test ax, ax 0 00002247 75E9 jne _.L11 0 00002249 894712 mov word ptr [bx+18], ax 43 _.L1: 0 0000224C 89EC mov sp, bp 0 0000224E 5D pop bp 0 0000224F 5F pop di 0 00002250 5E pop si 0 00002251 C20600 ret 6 49 _.L5: 0 00002254 83F803 cmp ax, 3 0 00002257 7FD9 jg _.L11 0 00002259 B8F4FF mov ax, -12 0 0000225C EBEE jmp _.L1 54 _.L7: 0 0000225E 31C0 xor ax, ax 0 00002260 EBEA jmp _.L1 57 .size _CharRequest.isra.0, .-_CharRequest.isra.0 58 .type _CharCmd, @function 59 _CharCmd: 0 00002262 56 push si 0 00002263 55 push bp 0 00002264 89E5 mov bp, sp 0 00002266 8B7606 mov si, word ptr [bp+6] 64 _.L16: 0 00002269 FF7608 push word ptr [bp+8] 0 0000226C FF7402 push word ptr [si+2] 0 0000226F FF34 push word ptr [si] 0 00002271 E886FF call _CharRequest.isra.0 0 00002274 83F801 cmp ax, 1 0 00002277 74F0 je _.L16 0 00002279 89EC mov sp, bp 0 0000227B 5D pop bp 0 0000227C 5E pop si 0 0000227D C20400 ret 4 75 .size _CharCmd, .-_CharCmd 76 .type _Busy, @function 77 _Busy: 0 00002280 56 push si 0 00002281 57 push di 0 00002282 55 push bp 0 00002283 89E5 mov bp, sp 0 00002285 8B7E08 mov di, word ptr [bp+8] 0 00002288 B80500 mov ax, 5 0 0000228B 50 push ax 0 0000228C 57 push di 0 0000228D E8D2FF call _CharCmd 0 00002290 BE[0000] mov si, offset _CharReqHdr 0 00002293 837C0300 cmp word ptr [si+3], 0 0 00002297 7D08 jge _.L21 0 00002299 B80600 mov ax, 6 0 0000229C 50 push ax 0 0000229D 57 push di 0 0000229E E8C1FF call _CharCmd 94 _.L21: 0 000022A1 8B4403 mov ax, word ptr [si+3] 0 000022A4 250002 and ax, 512 0 000022A7 89EC mov sp, bp 0 000022A9 5D pop bp 0 000022AA 5F pop di 0 000022AB 5E pop si 0 000022AC C20200 ret 2 102 .size _Busy, .-_Busy 103 .global _BinaryCharIO 104 .type _BinaryCharIO, @function 105 _BinaryCharIO: 0 000022AF 56 push si 0 000022B0 57 push di 0 000022B1 55 push bp 0 000022B2 89E5 mov bp, sp 0 000022B4 1E push ds 0 000022B5 8B560C mov dx, word ptr [bp+12] 0 000022B8 8B760E mov si, word ptr [bp+14] 113 _.L24: 0 000022BB BF[0000] mov di, offset _CharReqHdr 0 000022BE 8B460A mov ax, word ptr [bp+10] 0 000022C1 894512 mov word ptr [di+18], ax 0 000022C4 89550E mov word ptr [di+14], dx 0 000022C7 8956FE mov word ptr [bp-2], dx 0 000022CA 897510 mov word ptr [di+16], si 0 000022CD FF7610 push word ptr [bp+16] 0 000022D0 8B5E08 mov bx, word ptr [bp+8] 0 000022D3 FF7702 push word ptr [bx+2] 0 000022D6 FF37 push word ptr [bx] 0 000022D8 E81FFF call _CharRequest.isra.0 0 000022DB 83F801 cmp ax, 1 0 000022DE 8B56FE mov dx, word ptr [bp-2] 0 000022E1 74D8 je _.L24 0 000022E3 89C1 mov cx, ax 0 000022E5 99 cwd 0 000022E6 85C0 test ax, ax 0 000022E8 7504 jne _.L23 0 000022EA 8B4D12 mov cx, word ptr [di+18] 0 000022ED 92 xchg dx, ax 134 _.L23: 0 000022EE 91 xchg cx, ax 0 000022EF 89EC mov sp, bp 0 000022F1 5D pop bp 0 000022F2 5F pop di 0 000022F3 5E pop si 0 000022F4 C20A00 ret 10 141 .size _BinaryCharIO, .-_BinaryCharIO 142 .global _con_flush 143 .type _con_flush, @function 144 _con_flush: 0 000022F7 55 push bp 0 000022F8 89E5 mov bp, sp 0 000022FA B80700 mov ax, 7 0 000022FD 50 push ax 0 000022FE FF7604 push word ptr [bp+4] 0 00002301 E85EFF call _CharCmd 0 00002304 89EC mov sp, bp 0 00002306 5D pop bp 0 00002307 C20200 ret 2 154 .size _con_flush, .-_con_flush 155 .global _sft_to_dev 156 .type _sft_to_dev, @function 157 _sft_to_dev: 0 0000230A 55 push bp 0 0000230B 89E5 mov bp, sp 0 0000230D 1E push ds 0 0000230E 8B5E04 mov bx, word ptr [bp+4] 0 00002311 8B5606 mov dx, word ptr [bp+6] 0 00002314 83FBFF cmp bx, -1 0 00002317 750D jne _.L33 0 00002319 A1[0000] mov ax, word ptr [_syscon] 0 0000231C 8B16[0200] mov dx, word ptr [_syscon+2] 167 _.L32: 0 00002320 89EC mov sp, bp 0 00002322 5D pop bp 0 00002323 C20400 ret 4 171 _.L33: 0 00002326 8EC2 mov es, dx 0 00002328 268B4705 mov ax, word ptr es:[bx+5] 0 0000232C 8946FE mov word ptr [bp-2], ax 0 0000232F 258000 and ax, 128 0 00002332 740A je _.L35 0 00002334 268B4707 mov ax, word ptr es:[bx+7] 0 00002338 268B5709 mov dx, word ptr es:[bx+9] 0 0000233C EBE2 jmp _.L32 180 _.L35: 0 0000233E 89C2 mov dx, ax 0 00002340 EBDE jmp _.L32 183 .size _sft_to_dev, .-_sft_to_dev 184 .global _StdinBusy 185 .type _StdinBusy, @function 186 _StdinBusy: 0 00002342 56 push si 0 00002343 55 push bp 0 00002344 89E5 mov bp, sp 0 00002346 83EC06 sub sp, 6 0 00002349 31C0 xor ax, ax 0 0000234B 50 push ax 0 0000234C E8[FEFF] call _get_sft 0 0000234F 89D6 mov si, dx 0 00002351 52 push dx 0 00002352 50 push ax 0 00002353 8946FA mov word ptr [bp-6], ax 0 00002356 E8[FEFF] call _sft_to_dev 0 00002359 8946FC mov word ptr [bp-4], ax 0 0000235C 8956FE mov word ptr [bp-2], dx 0 0000235F 09D0 or ax, dx 0 00002361 8B5EFA mov bx, word ptr [bp-6] 0 00002364 740C je _.L38 0 00002366 8D46FC lea ax, [-4+bp] 0 00002369 50 push ax 0 0000236A E813FF call _Busy 207 _.L37: 0 0000236D 89EC mov sp, bp 0 0000236F 5D pop bp 0 00002370 5E pop si 0 00002371 C3 ret 212 _.L38: 0 00002372 B80100 mov ax, 1 0 00002375 8EC6 mov es, si 0 00002377 268B5713 mov dx, word ptr es:[bx+19] 0 0000237B 263B5717 cmp dx, word ptr es:[bx+23] 0 0000237F 770C ja _.L42 0 00002381 75EA jne _.L37 0 00002383 268B5711 mov dx, word ptr es:[bx+17] 0 00002387 263B5715 cmp dx, word ptr es:[bx+21] 0 0000238B 76E0 jbe _.L37 222 _.L42: 0 0000238D 31C0 xor ax, ax 0 0000238F EBDC jmp _.L37 225 .size _StdinBusy, .-_StdinBusy 226 .global _ndread 227 .type _ndread, @function 228 _ndread: 0 00002391 55 push bp 0 00002392 89E5 mov bp, sp 0 00002394 B80500 mov ax, 5 0 00002397 50 push ax 0 00002398 FF7604 push word ptr [bp+4] 0 0000239B E8C4FE call _CharCmd 0 0000239E BB[0000] mov bx, offset _CharReqHdr 0 000023A1 F6470402 test byte ptr [bx+4], 2 0 000023A5 750B jne _.L46 0 000023A7 8A470D mov al, byte ptr [bx+13] 0 000023AA 30E4 xor ah, ah 240 _.L44: 0 000023AC 89EC mov sp, bp 0 000023AE 5D pop bp 0 000023AF C20200 ret 2 244 _.L46: 0 000023B2 B8FFFF mov ax, -1 0 000023B5 EBF5 jmp _.L44 247 .size _ndread, .-_ndread 248 .global _update_scr_pos 249 .type _update_scr_pos, @function 250 _update_scr_pos: 0 000023B7 55 push bp 0 000023B8 89E5 mov bp, sp 0 000023BA A0[0000] mov al, byte ptr [_scr_pos] 0 000023BD 807E040D cmp byte ptr [bp+4], 13 0 000023C1 7425 je _.L51 0 000023C3 807E0408 cmp byte ptr [bp+4], 8 0 000023C7 750E jne _.L50 0 000023C9 3C01 cmp al, 1 0 000023CB F5 cmc 0 000023CC 18E4 sbb ah, ah 0 000023CE 00E0 add al, ah 262 _.L49: 0 000023D0 A2[0000] mov byte ptr [_scr_pos], al 0 000023D3 5D pop bp 0 000023D4 C20400 ret 4 266 _.L50: 0 000023D7 807E040A cmp byte ptr [bp+4], 10 0 000023DB 74F3 je _.L49 0 000023DD 807E0407 cmp byte ptr [bp+4], 7 0 000023E1 74ED je _.L49 0 000023E3 024606 add al, byte ptr [bp+6] 0 000023E6 EBE8 jmp _.L49 273 _.L51: 0 000023E8 30C0 xor al, al 0 000023EA EBE4 jmp _.L49 276 .size _update_scr_pos, .-_update_scr_pos 277 .global _write_char 278 .type _write_char, @function 279 _write_char: 0 000023EC 55 push bp 0 000023ED 89E5 mov bp, sp 0 000023EF 1E push ds 0 000023F0 8B4604 mov ax, word ptr [bp+4] 0 000023F3 8846FF mov byte ptr [bp-1], al 0 000023F6 B80300 mov ax, 3 0 000023F9 50 push ax 0 000023FA 8D46FF lea ax, [-1+bp] 0 000023FD 16 push ss 0 000023FE 50 push ax 0 000023FF B80100 mov ax, 1 0 00002402 50 push ax 0 00002403 FF7606 push word ptr [bp+6] 0 00002406 E8[FEFF] call _DosRWSft 0 00002409 89EC mov sp, bp 0 0000240B 5D pop bp 0 0000240C C20400 ret 4 297 .size _write_char, .-_write_char 298 .type _destr_bs, @function 299 _destr_bs: 0 0000240F 56 push si 0 00002410 57 push di 0 00002411 55 push bp 0 00002412 89E5 mov bp, sp 0 00002414 8B7608 mov si, word ptr [bp+8] 0 00002417 56 push si 0 00002418 BF0800 mov di, 8 0 0000241B 57 push di 0 0000241C E8[FEFF] call _write_char 0 0000241F 56 push si 0 00002420 B82000 mov ax, 32 0 00002423 50 push ax 0 00002424 E8[FEFF] call _write_char 0 00002427 56 push si 0 00002428 57 push di 0 00002429 E8[FEFF] call _write_char 0 0000242C 89EC mov sp, bp 0 0000242E 5D pop bp 0 0000242F 5F pop di 0 00002430 5E pop si 0 00002431 C20200 ret 2 321 .size _destr_bs, .-_destr_bs 322 .type _echo_char, @function 323 _echo_char: 0 00002434 56 push si 0 00002435 55 push bp 0 00002436 89E5 mov bp, sp 0 00002438 1E push ds 0 00002439 8B4606 mov ax, word ptr [bp+6] 0 0000243C 8B7608 mov si, word ptr [bp+8] 0 0000243F 89C2 mov dx, ax 0 00002441 3C1F cmp al, 31 0 00002443 7722 ja _.L66 0 00002445 89C1 mov cx, ax 0 00002447 83C1F7 add cx, -9 0 0000244A 83F901 cmp cx, 1 0 0000244D 7618 jbe _.L66 0 0000244F 83F80D cmp ax, 13 0 00002452 7413 je _.L66 0 00002454 8946FE mov word ptr [bp-2], ax 0 00002457 56 push si 0 00002458 BA5E00 mov dx, 94 0 0000245B 52 push dx 0 0000245C E8[FEFF] call _write_char 0 0000245F 8B46FE mov ax, word ptr [bp-2] 0 00002462 89C2 mov dx, ax 0 00002464 83C240 add dx, 64 347 _.L66: 0 00002467 8946FE mov word ptr [bp-2], ax 0 0000246A 56 push si 0 0000246B 52 push dx 0 0000246C E8[FEFF] call _write_char 0 0000246F 8B46FE mov ax, word ptr [bp-2] 0 00002472 89EC mov sp, bp 0 00002474 5D pop bp 0 00002475 5E pop si 0 00002476 C20400 ret 4 357 .size _echo_char, .-_echo_char 358 .global _write_char_stdout 359 .type _write_char_stdout, @function 360 _write_char_stdout: 0 00002479 56 push si 0 0000247A 55 push bp 0 0000247B 89E5 mov bp, sp 0 0000247D 1E push ds 0 0000247E BE0100 mov si, 1 0 00002481 56 push si 0 00002482 E8[FEFF] call _get_sft 0 00002485 8EC2 mov es, dx 0 00002487 93 xchg bx, ax 0 00002488 268B4705 mov ax, word ptr es:[bx+5] 0 0000248C 89C2 mov dx, ax 0 0000248E 81E2A000 and dx, 160 0 00002492 81FA8000 cmp dx, 128 0 00002496 744C je _.L72 0 00002498 B201 mov dl, 1 0 0000249A 837E0609 cmp word ptr [bp+6], 9 0 0000249E 7510 jne _.L73 0 000024A0 8A36[0000] mov dh, byte ptr [_scr_pos] 0 000024A4 80E607 and dh, 7 0 000024A7 B208 mov dl, 8 0 000024A9 28F2 sub dl, dh 0 000024AB C746062000 mov word ptr [bp+6], 32 383 _.L73: 0 000024B0 258200 and ax, 130 0 000024B3 3D8200 cmp ax, 130 0 000024B6 740D je _.L75 0 000024B8 52 push dx 0 000024B9 8856FF mov byte ptr [bp-1], dl 0 000024BC FF7606 push word ptr [bp+6] 0 000024BF E8[FEFF] call _update_scr_pos 0 000024C2 8A56FF mov dl, byte ptr [bp-1] 392 _.L75: 0 000024C5 8856FF mov byte ptr [bp-1], dl 0 000024C8 B80100 mov ax, 1 0 000024CB 50 push ax 0 000024CC E8[FEFF] call _get_sft_idx 0 000024CF 50 push ax 0 000024D0 FF7606 push word ptr [bp+6] 0 000024D3 E8[FEFF] call _write_char 0 000024D6 8A56FF mov dl, byte ptr [bp-1] 0 000024D9 FECA dec dl 0 000024DB 75E8 jne _.L75 403 _.L71: 0 000024DD 89EC mov sp, bp 0 000024DF 5D pop bp 0 000024E0 5E pop si 0 000024E1 C20200 ret 2 408 _.L72: 0 000024E4 56 push si 0 000024E5 E8[FEFF] call _get_sft_idx 0 000024E8 50 push ax 0 000024E9 FF7606 push word ptr [bp+6] 0 000024EC E8[FEFF] call _write_char 0 000024EF EBEC jmp _.L71 415 .size _write_char_stdout, .-_write_char_stdout 416 .global _read_char 417 .type _read_char, @function 418 _read_char: 0 000024F1 56 push si 0 000024F2 55 push bp 0 000024F3 89E5 mov bp, sp 0 000024F5 1E push ds 0 000024F6 1E push ds 0 000024F7 8B7606 mov si, word ptr [bp+6] 0 000024FA 56 push si 0 000024FB E8[FEFF] call _idx_to_sft 0 000024FE 52 push dx 0 000024FF 50 push ax 0 00002500 E8[FEFF] call _sft_to_dev 0 00002503 8946FC mov word ptr [bp-4], ax 0 00002506 8956FE mov word ptr [bp-2], dx 0 00002509 FF760A push word ptr [bp+10] 0 0000250C 8D46FC lea ax, [-4+bp] 0 0000250F 50 push ax 0 00002510 FF7608 push word ptr [bp+8] 0 00002513 56 push si 0 00002514 E80700 call _read_char_sft_dev 0 00002517 89EC mov sp, bp 0 00002519 5D pop bp 0 0000251A 5E pop si 0 0000251B C20600 ret 6 442 .size _read_char, .-_read_char 443 .type _read_char_sft_dev, @function 444 _read_char_sft_dev: 0 0000251E 56 push si 0 0000251F 57 push di 0 00002520 55 push bp 0 00002521 89E5 mov bp, sp 0 00002523 1E push ds 0 00002524 1E push ds 0 00002525 8B7E0A mov di, word ptr [bp+10] 0 00002528 8B760C mov si, word ptr [bp+12] 0 0000252B 8B4402 mov ax, word ptr [si+2] 0 0000252E 0B04 or ax, word ptr [si] 0 00002530 7503E9C000 je _.L86 456 _.L96: 0 00002535 E8[FEFF] call _ctrl_break_pressed 0 00002538 84C0 test al, al 0 0000253A 7416 je _.L88 0 0000253C C746FE0300 mov word ptr [bp-2], 3 0 00002541 837E0E00 cmp word ptr [bp+14], 0 0 00002545 755B jne _.L89 463 _.L90: 0 00002547 8B46FE mov ax, word ptr [bp-2] 0 0000254A 89EC mov sp, bp 0 0000254C 5D pop bp 0 0000254D 5F pop di 0 0000254E 5E pop si 0 0000254F C20800 ret 8 470 _.L88: 0 00002552 56 push si 0 00002553 E82AFD call _Busy 0 00002556 85C0 test ax, ax 0 00002558 7569 jne _.L91 0 0000255A 8846FD mov byte ptr [bp-3], al 0 0000255D B80400 mov ax, 4 0 00002560 50 push ax 0 00002561 8D46FD lea ax, [-3+bp] 0 00002564 16 push ss 0 00002565 50 push ax 0 00002566 B80100 mov ax, 1 0 00002569 50 push ax 0 0000256A 56 push si 0 0000256B E8[FEFF] call _BinaryCharIO 0 0000256E 85C0 test ax, ax 0 00002570 744C je _.L99 0 00002572 7C05 jl _.L92 0 00002574 8A46FD mov al, byte ptr [bp-3] 0 00002577 30E4 xor ah, ah 490 _.L92: 0 00002579 8946FE mov word ptr [bp-2], ax 492 _.L93: 0 0000257C 837E0E00 cmp word ptr [bp+14], 0 0 00002580 74C5 je _.L90 0 00002582 8B46FE mov ax, word ptr [bp-2] 0 00002585 89C2 mov dx, ax 0 00002587 83E2EF and dx, -17 0 0000258A 83FA03 cmp dx, 3 0 0000258D 75B8 jne _.L90 0 0000258F 83F813 cmp ax, 19 0 00002592 750E jne _.L89 0 00002594 31C0 xor ax, ax 0 00002596 50 push ax 0 00002597 56 push si 0 00002598 57 push di 0 00002599 FF7608 push word ptr [bp+8] 0 0000259C E87FFF call _read_char_sft_dev 0 0000259F 8946FE mov word ptr [bp-2], ax 509 _.L89: 0 000025A2 837EFE03 cmp word ptr [bp-2], 3 0 000025A6 7505 jne _.L98 0 000025A8 57 push di 0 000025A9 56 push si 0 000025AA E8[FEFF] call _handle_break 515 _.L98: 0 000025AD 31C0 xor ax, ax 0 000025AF 50 push ax 0 000025B0 57 push di 0 000025B1 FF7608 push word ptr [bp+8] 0 000025B4 E8[FEFF] call _read_char 0 000025B7 B400 mov ah, 0 0 000025B9 8946FE mov word ptr [bp-2], ax 0 000025BC EB89 jmp _.L90 524 _.L99: 0 000025BE B80001 mov ax, 256 0 000025C1 EBB6 jmp _.L92 527 _.L91: 0 000025C3 837E0E00 cmp word ptr [bp+14], 0 0 000025C7 7418 je _.L94 0 000025C9 8B04 mov ax, word ptr [si] 0 000025CB 3B06[0000] cmp ax, word ptr [_syscon] 0 000025CF 7509 jne _.L100 0 000025D1 8B4402 mov ax, word ptr [si+2] 0 000025D4 3B06[0200] cmp ax, word ptr [_syscon+2] 0 000025D8 7407 je _.L94 536 _.L100: 0 000025DA B8[0000] mov ax, offset _syscon 0 000025DD 50 push ax 0 000025DE E8[FEFF] call _check_handle_break 540 _.L94: 0 000025E1 C41E[0000] les bx, dword ptr [_user_r] 0 000025E5 26807F010C cmp byte ptr es:[bx+1], 12 0 000025EA 7603E946FF ja _.L96 0 000025EF E8[FEFF] call _DosIdle_int 0 000025F2 E940FF jmp _.L96 546 _.L86: 0 000025F5 B80100 mov ax, 1 0 000025F8 50 push ax 0 000025F9 8D56FE lea dx, [-2+bp] 0 000025FC 16 push ss 0 000025FD 52 push dx 0 000025FE 50 push ax 0 000025FF FF7608 push word ptr [bp+8] 0 00002602 E8[FEFF] call _DosRWSft 0 00002605 E974FF jmp _.L93 556 .size _read_char_sft_dev, .-_read_char_sft_dev 557 .global _cooked_write 558 .type _cooked_write, @function 559 _cooked_write: 0 00002608 56 push si 0 00002609 57 push di 0 0000260A 55 push bp 0 0000260B 89E5 mov bp, sp 0 0000260D 83EC0A sub sp, 10 0 00002610 8B7E08 mov di, word ptr [bp+8] 0 00002613 C4460C les ax, dword ptr [bp+12] 0 00002616 8946FA mov word ptr [bp-6], ax 0 00002619 8C46F8 mov word ptr [bp-8], es 0 0000261C C41D les bx, dword ptr [di] 0 0000261E 268B4704 mov ax, word ptr es:[bx+4] 0 00002622 B103 mov cl, 3 0 00002624 D2E0 shl al, cl 0 00002626 2480 and al, -128 0 00002628 8846FD mov byte ptr [bp-3], al 0 0000262B 31F6 xor si, si 576 _.L110: 0 0000262D 3B760A cmp si, word ptr [bp+10] 0 00002630 720D jc _.L122 579 _.L121: 0 00002632 89F1 mov cx, si 0 00002634 31D2 xor dx, dx 582 _.L109: 0 00002636 91 xchg cx, ax 0 00002637 89EC mov sp, bp 0 00002639 5D pop bp 0 0000263A 5F pop di 0 0000263B 5E pop si 0 0000263C C20800 ret 8 589 _.L122: 0 0000263F 8E46F8 mov es, word ptr [bp-8] 0 00002642 8B5EFA mov bx, word ptr [bp-6] 0 00002645 268A07 mov al, byte ptr es:[bx] 0 00002648 8846FE mov byte ptr [bp-2], al 0 0000264B 3C1A cmp al, 26 0 0000264D 74E3 je _.L121 0 0000264F C646FC01 mov byte ptr [bp-4], 1 0 00002653 3C09 cmp al, 9 0 00002655 7510 jne _.L112 0 00002657 A0[0000] mov al, byte ptr [_scr_pos] 0 0000265A 2407 and al, 7 0 0000265C B408 mov ah, 8 0 0000265E 28C4 sub ah, al 0 00002660 8866FC mov byte ptr [bp-4], ah 0 00002663 C646FE20 mov byte ptr [bp-2], 32 605 _.L112: 0 00002667 FF76FC push word ptr [bp-4] 0 0000266A FF76FE push word ptr [bp-2] 0 0000266D E8[FEFF] call _update_scr_pos 609 _.L120: 0 00002670 807EFD80 cmp byte ptr [bp-3], -128 0 00002674 7715 ja _.L114 0 00002676 57 push di 0 00002677 E8[FEFF] call _check_handle_break 0 0000267A 3C13 cmp al, 19 0 0000267C 750D jne _.L114 0 0000267E B80100 mov ax, 1 0 00002681 50 push ax 0 00002682 57 push di 0 00002683 B8FFFF mov ax, -1 0 00002686 50 push ax 0 00002687 50 push ax 0 00002688 E893FE call _read_char_sft_dev 623 _.L114: 0 0000268B 8A46FD mov al, byte ptr [bp-3] 0 0000268E FEC0 inc al 0 00002690 249F and al, -97 0 00002692 8846FD mov byte ptr [bp-3], al 0 00002695 803E[0000]00 cmp byte ptr [_PrinterEcho], 0 0 0000269A 741E je _.L116 0 0000269C B80400 mov ax, 4 0 0000269F 50 push ax 0 000026A0 8C56F6 mov word ptr [bp-10], ss 0 000026A3 E8[FEFF] call _get_sft_idx 0 000026A6 B90200 mov cx, 2 0 000026A9 51 push cx 0 000026AA 8B56F6 mov dx, word ptr [bp-10] 0 000026AD 52 push dx 0 000026AE 8D56FE lea dx, [-2+bp] 0 000026B1 52 push dx 0 000026B2 BA0100 mov dx, 1 0 000026B5 52 push dx 0 000026B6 50 push ax 0 000026B7 E8[FEFF] call _DosRWSft 644 _.L116: 0 000026BA 807EFD00 cmp byte ptr [bp-3], 0 0 000026BE 8A46FE mov al, byte ptr [bp-2] 0 000026C1 7D0E jge _.L117 648 #APP 649 ;# 155 "chario.c" 1 1 /****************************************************************/ 2 /* */ 3 /* chario.c */ 4 /* DOS-C */ 5 /* */ 6 /* Character device functions and device driver interface */ 7 /* */ 8 /* Copyright (c) 1994 */ 9 /* Pasquale J. Villani */ 10 /* All Rights Reserved */ 11 /* */ 12 /* This file is part of DOS-C. */ 13 /* */ 14 /* DOS-C is free software; you can redistribute it and/or */ 15 /* modify it under the terms of the GNU General Public License */ 16 /* as published by the Free Software Foundation; either version */ 17 /* 2, or (at your option) any later version. */ 18 /* */ 19 /* DOS-C is distributed in the hope that it will be useful, but */ 20 /* WITHOUT ANY WARRANTY; without even the implied warranty of */ 21 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See */ 22 /* the GNU General Public License for more details. */ 23 /* */ 24 /* You should have received a copy of the GNU General Public */ 25 /* License along with DOS-C; see the file COPYING. If not, */ 26 /* write to the Free Software Foundation, 675 Mass Ave, */ 27 /* Cambridge, MA 02139, USA. */ 28 /* */ 29 /****************************************************************/ 30 31 #include "portab.h" 32 33 #ifdef VERSION_STRINGS 34 static BYTE *charioRcsId = 35 "$Id: chario.c 1413 2009-06-01 13:41:03Z bartoldeman $"; 36 #endif 37 38 #include "globals.h" 39 40 STATIC int CharRequest(struct dhdr FAR **pdev, unsigned command) 41 { 42 struct dhdr FAR *dev = *pdev; 43 CharReqHdr.r_command = command; 44 CharReqHdr.r_unit = 0; 45 CharReqHdr.r_status = 0; 46 CharReqHdr.r_length = sizeof(request); 47 execrh(&CharReqHdr, dev); 48 if (CharReqHdr.r_status & S_ERROR) 49 { 50 for (;;) { 51 switch (char_error(&CharReqHdr, dev)) 52 { 53 case ABORT: 54 case FAIL: 55 return DE_INVLDACC; 56 case CONTINUE: 57 CharReqHdr.r_count = 0; 58 return 0; 59 case RETRY: 60 return 1; 61 } 62 } 63 } 64 return SUCCESS; 65 } 66 67 long BinaryCharIO(struct dhdr FAR **pdev, size_t n, void FAR * bp, 68 unsigned command) 69 { 70 int err; 71 do 72 { 73 CharReqHdr.r_count = n; 74 CharReqHdr.r_trans = bp; 75 err = CharRequest(pdev, command); 76 } while (err == 1); 77 return err == SUCCESS ? (long)CharReqHdr.r_count : err; 78 } 79 80 STATIC int CharIO(struct dhdr FAR **pdev, unsigned char ch, unsigned command) 81 { 82 int err = (int)BinaryCharIO(pdev, 1, &ch, command); 83 if (err == 0) 84 return 256; 85 if (err < 0) 86 return err; 87 return ch; 88 } 89 90 /* STATE FUNCTIONS */ 91 92 STATIC void CharCmd(struct dhdr FAR **pdev, unsigned command) 93 { 94 while (CharRequest(pdev, command) == 1); 95 } 96 97 STATIC int Busy(struct dhdr FAR **pdev) 98 { 99 CharCmd(pdev, C_NDREAD); 100 if (CharReqHdr.r_status & S_ERROR) 101 CharCmd(pdev, C_ISTAT); 102 return CharReqHdr.r_status & S_BUSY; 103 } 104 105 void con_flush(struct dhdr FAR **pdev) 106 { 107 CharCmd(pdev, C_IFLUSH); 108 } 109 110 /* if the sft is invalid, then we just monitor syscon */ 111 struct dhdr FAR *sft_to_dev(sft FAR *s) 112 { 113 if (FP_OFF(s) == (size_t) -1) 114 return syscon; 115 if (s->sft_flags & SFT_FDEVICE) 116 return s->sft_dev; 117 return NULL; 118 } 119 120 int StdinBusy(void) 121 { 122 sft FAR *s = get_sft(STDIN); 123 struct dhdr FAR *dev = sft_to_dev(s); 124 125 if (dev) 126 return Busy(&dev); 127 128 return s->sft_posit >= s->sft_size; 129 } 130 131 /* get character from the console - this is how DOS gets 132 CTL_C/CTL_S/CTL_P when outputting */ 133 int ndread(struct dhdr FAR **pdev) 134 { 135 CharCmd(pdev, C_NDREAD); 136 if (CharReqHdr.r_status & S_BUSY) 137 return -1; 138 return CharReqHdr.r_ndbyte; 139 } 140 141 /* OUTPUT FUNCTIONS */ 142 143 #ifdef __WATCOMC__ 144 void fast_put_char(char c); 145 #pragma aux fast_put_char = "int 29h" __parm[__al] __modify __exact [__bx] 146 #else 147 148 /* writes a character in raw mode using int29 for speed */ 149 STATIC void fast_put_char(unsigned char chr) 150 { 151 #if defined(__TURBOC__) 152 _AL = chr; 153 __int__(0x29); 154 #elif defined(__GNUC__) 0 000026C3 CD29 asm volatile("{ int $0x29 | int 0x29 }":: "a"(chr):"bx"); 156 #elif defined(I86) 650 int 0x29 651 ;# 0 "" 2 652 #NO_APP 653 _.L118: 0 000026C5 FE4EFC dec byte ptr [bp-4] 0 000026C8 75A6 jne _.L120 0 000026CA FF46FA inc word ptr [bp-6] 0 000026CD 46 inc si 0 000026CE E95CFF jmp _.L110 659 _.L117: 0 000026D1 8846FF mov byte ptr [bp-1], al 0 000026D4 B80800 mov ax, 8 0 000026D7 50 push ax 0 000026D8 8D46FF lea ax, [-1+bp] 0 000026DB 16 push ss 0 000026DC 50 push ax 0 000026DD B80100 mov ax, 1 0 000026E0 50 push ax 0 000026E1 57 push di 0 000026E2 E8[FEFF] call _BinaryCharIO 0 000026E5 85C0 test ax, ax 0 000026E7 7DDC jge _.L118 0 000026E9 89C1 mov cx, ax 0 000026EB 99 cwd 0 000026EC E947FF jmp _.L109 675 .size _cooked_write, .-_cooked_write 676 .global _cooked_read 677 .type _cooked_read, @function 678 _cooked_read: 0 000026EF 56 push si 0 000026F0 57 push di 0 000026F1 55 push bp 0 000026F2 89E5 mov bp, sp 0 000026F4 1E push ds 0 000026F5 1E push ds 0 000026F6 8B5E0A mov bx, word ptr [bp+10] 0 000026F9 8B7E0C mov di, word ptr [bp+12] 0 000026FC 8B460E mov ax, word ptr [bp+14] 0 000026FF 8946FC mov word ptr [bp-4], ax 0 00002702 31F6 xor si, si 690 _.L131: 0 00002704 89D8 mov ax, bx 0 00002706 48 dec ax 0 00002707 8946FE mov word ptr [bp-2], ax 0 0000270A 85DB test bx, bx 0 0000270C 7506 jne _.L135 696 _.L134: 0 0000270E 89F3 mov bx, si 0 00002710 31D2 xor dx, dx 0 00002712 EB16 jmp _.L130 700 _.L135: 0 00002714 B80100 mov ax, 1 0 00002717 50 push ax 0 00002718 FF7608 push word ptr [bp+8] 0 0000271B B8FFFF mov ax, -1 0 0000271E 50 push ax 0 0000271F 50 push ax 0 00002720 E8FBFD call _read_char_sft_dev 0 00002723 85C0 test ax, ax 0 00002725 7D0C jge _.L132 0 00002727 89C3 mov bx, ax 0 00002729 99 cwd 712 _.L130: 0 0000272A 93 xchg bx, ax 0 0000272B 89EC mov sp, bp 0 0000272D 5D pop bp 0 0000272E 5F pop di 0 0000272F 5E pop si 0 00002730 C20800 ret 8 719 _.L132: 0 00002733 3D0001 cmp ax, 256 0 00002736 74D6 je _.L134 0 00002738 8D5501 lea dx, [1+di] 0 0000273B 8E46FC mov es, word ptr [bp-4] 0 0000273E 268805 mov byte ptr es:[di], al 0 00002741 46 inc si 0 00002742 8B5EFE mov bx, word ptr [bp-2] 0 00002745 3C1A cmp al, 26 0 00002747 74C5 je _.L134 0 00002749 89D7 mov di, dx 0 0000274B EBB7 jmp _.L131 731 .size _cooked_read, .-_cooked_read 732 .global _read_char_stdin 733 .type _read_char_stdin, @function 734 _read_char_stdin: 0 0000274D 56 push si 0 0000274E 55 push bp 0 0000274F 89E5 mov bp, sp 0 00002751 B80100 mov ax, 1 0 00002754 50 push ax 0 00002755 E8[FEFF] call _get_sft_idx 0 00002758 96 xchg si, ax 0 00002759 31C0 xor ax, ax 0 0000275B 50 push ax 0 0000275C E8[FEFF] call _get_sft_idx 0 0000275F FF7606 push word ptr [bp+6] 0 00002762 56 push si 0 00002763 50 push ax 0 00002764 E8[FEFF] call _read_char 0 00002767 89EC mov sp, bp 0 00002769 5D pop bp 0 0000276A 5E pop si 0 0000276B C20200 ret 2 753 .size _read_char_stdin, .-_read_char_stdin 754 .global _read_line 755 .type _read_line, @function 756 _read_line: 0 0000276E 56 push si 0 0000276F 57 push di 0 00002770 55 push bp 0 00002771 89E5 mov bp, sp 0 00002773 83EC12 sub sp, 18 0 00002776 8B460C mov ax, word ptr [bp+12] 0 00002779 8946FA mov word ptr [bp-6], ax 0 0000277C 8B460E mov ax, word ptr [bp+14] 0 0000277F 8946F8 mov word ptr [bp-8], ax 0 00002782 8EC0 mov es, ax 0 00002784 8B5EFA mov bx, word ptr [bp-6] 0 00002787 268A07 mov al, byte ptr es:[bx] 0 0000278A 8846F0 mov byte ptr [bp-16], al 0 0000278D 8166F0FF00 and word ptr [bp-16], 255 0 00002792 7503E96301 je _.L142 0 00002797 268A4701 mov al, byte ptr es:[bx+1] 0 0000279B 30E4 xor ah, ah 0 0000279D 8946F6 mov word ptr [bp-10], ax 0 000027A0 97 xchg di, ax 0 000027A1 268079020D cmp byte ptr es:[bx+di+2], 13 0 000027A6 7405 je _.L144 0 000027A8 C746F60000 mov word ptr [bp-10], 0 779 _.L144: 0 000027AD A0[0000] mov al, byte ptr [_scr_pos] 0 000027B0 8846EE mov byte ptr [bp-18], al 0 000027B3 C646EF00 mov byte ptr [bp-17], 0 0 000027B7 BF0100 mov di, 1 0 000027BA C746F20000 mov word ptr [bp-14], 0 0 000027BF 31F6 xor si, si 0 000027C1 8976FC mov word ptr [bp-4], si 787 _.L145: 0 000027C4 B80100 mov ax, 1 0 000027C7 50 push ax 0 000027C8 FF760A push word ptr [bp+10] 0 000027CB FF7608 push word ptr [bp+8] 0 000027CE E8[FEFF] call _read_char 0 000027D1 88C2 mov dl, al 0 000027D3 81E2FF00 and dx, 255 0 000027D7 8956FE mov word ptr [bp-2], dx 0 000027DA 7403E92B03 jne _.L147 0 000027DF B80100 mov ax, 1 0 000027E2 50 push ax 0 000027E3 FF760A push word ptr [bp+10] 0 000027E6 FF7608 push word ptr [bp+8] 0 000027E9 E8[FEFF] call _read_char 0 000027EC B108 mov cl, 8 0 000027EE D3E0 shl ax, cl 0 000027F0 8946FE mov word ptr [bp-2], ax 0 000027F3 3D003D cmp ax, 15616 0 000027F6 7503E90B02 je _.L187 0 000027FB 7603E90201 ja _.L150 0 00002800 83F81B cmp ax, 27 0 00002803 7503E9D302 je _.L151 0 00002808 775B ja _.L152 0 0000280A 83F808 cmp ax, 8 0 0000280D 7470 je _.L153 0 0000280F 83F80A cmp ax, 10 0 00002812 7503E9AF01 je _.L154 0 00002817 83F806 cmp ax, 6 0 0000281A 7503E94901 je _.L146 817 _.L148: 0 0000281F 817EFEFF00 cmp word ptr [bp-2], 255 0 00002824 7603E93F01 ja _.L146 820 _.L159: 0 00002829 8B46F0 mov ax, word ptr [bp-16] 0 0000282C 48 dec ax 0 0000282D 3946FC cmp word ptr [bp-4], ax 0 00002830 7209 jc _.L191 0 00002832 837EFE0D cmp word ptr [bp-2], 13 0 00002836 7403E9C202 jne _.L181 827 _.L191: 0 0000283B 8B7EFC mov di, word ptr [bp-4] 0 0000283E 47 inc di 0 0000283F FF760A push word ptr [bp+10] 0 00002842 FF76FE push word ptr [bp-2] 0 00002845 E8ECFB call _echo_char 0 00002848 8B5EFC mov bx, word ptr [bp-4] 0 0000284B 8887[0000] mov byte ptr [bx+_local_buffer], al 0 0000284F 897EFC mov word ptr [bp-4], di 836 _.L183: 0 00002852 3B76F6 cmp si, word ptr [bp-10] 0 00002855 736A jnc _.L178 0 00002857 F646F201 test byte ptr [bp-14], 1 0 0000285B 7564 jne _.L178 0 0000285D 46 inc si 0 0000285E C746F20000 mov word ptr [bp-14], 0 0 00002863 EB5C jmp _.L178 844 _.L152: 0 00002865 817EFE003B cmp word ptr [bp-2], 15104 0 0000286A 7503E91C01 je _.L155 0 0000286F 817EFE003C cmp word ptr [bp-2], 15360 0 00002874 7503E9B300 je _.L156 0 00002879 837EFE7F cmp word ptr [bp-2], 127 0 0000287D 75A0 jne _.L148 851 _.L153: 0 0000287F 837EFC00 cmp word ptr [bp-4], 0 0 00002883 7434 je _.L169 0 00002885 FF4EFC dec word ptr [bp-4] 0 00002888 BF[0000] mov di, offset _local_buffer 0 0000288B 8B5EFC mov bx, word ptr [bp-4] 0 0000288E 8A01 mov al, byte ptr [bx+di] 0 00002890 3C09 cmp al, 9 0 00002892 8EC7 mov es, di 0 00002894 7403E92F02 jne _.L170 0 00002899 8B46EE mov ax, word ptr [bp-18] 0 0000289C 8946F4 mov word ptr [bp-12], ax 0 0000289F 31C0 xor ax, ax 864 _.L171: 0 000028A1 3B46FC cmp ax, word ptr [bp-4] 0 000028A4 7303E9EF01 jc _.L175 867 _.L232: 0 000028A9 FF760A push word ptr [bp+10] 0 000028AC E860FB call _destr_bs 0 000028AF A0[0000] mov al, byte ptr [_scr_pos] 0 000028B2 30E4 xor ah, ah 0 000028B4 3946F4 cmp word ptr [bp-12], ax 0 000028B7 72F0 jc _.L232 874 _.L169: 0 000028B9 83FE01 cmp si, 1 0 000028BC F5 cmc 0 000028BD 19C0 sbb ax, ax 0 000028BF 01C6 add si, ax 879 _.L178: 0 000028C1 837EFE0D cmp word ptr [bp-2], 13 0 000028C5 7403E99E00 jne _.L146 0 000028CA FF76FC push word ptr [bp-4] 0 000028CD 16 push ss 0 000028CE B8[0000] mov ax, offset _local_buffer 0 000028D1 50 push ax 0 000028D2 8B46FA mov ax, word ptr [bp-6] 0 000028D5 83C002 add ax, 2 0 000028D8 FF76F8 push word ptr [bp-8] 0 000028DB 50 push ax 0 000028DC E8[FEFF] call _fmemcpy 0 000028DF 817EFC8000 cmp word ptr [bp-4], 128 0 000028E4 7605 jbe _.L184 0 000028E6 C606[0000]00 mov byte ptr [_kb_buf], 0 894 _.L184: 0 000028EB 8A46FC mov al, byte ptr [bp-4] 0 000028EE FEC8 dec al 0 000028F0 8E46F8 mov es, word ptr [bp-8] 0 000028F3 8B5EFA mov bx, word ptr [bp-6] 0 000028F6 26884701 mov byte ptr es:[bx+1], al 900 _.L142: 0 000028FA 89EC mov sp, bp 0 000028FC 5D pop bp 0 000028FD 5F pop di 0 000028FE 5E pop si 0 000028FF C20800 ret 8 906 _.L150: 0 00002902 817EFE004B cmp word ptr [bp-2], 19200 0 00002907 7503E973FF je _.L153 0 0000290C 775F ja _.L157 0 0000290E 817EFE003F cmp word ptr [bp-2], 16128 0 00002913 7503E92801 je _.L158 0 00002918 817EFE0040 cmp word ptr [bp-2], 16384 0 0000291D 7503E9D301 je _.L188 0 00002922 817EFE003E cmp word ptr [bp-2], 15872 0 00002927 7403E9F3FE jne _.L148 916 _.L156: 0 0000292C B80100 mov ax, 1 0 0000292F 50 push ax 0 00002930 FF760A push word ptr [bp+10] 0 00002933 FF7608 push word ptr [bp+8] 0 00002936 E8[FEFF] call _read_char 0 00002939 84C0 test al, al 0 0000293B 7403E9A000 jne _.L162 0 00002940 B80100 mov ax, 1 0 00002943 50 push ax 0 00002944 FF760A push word ptr [bp+10] 0 00002947 FF7608 push word ptr [bp+8] 0 0000294A E8[FEFF] call _read_char 0 0000294D 89F1 mov cx, si 930 _.L163: 0 0000294F 817EFE003E cmp word ptr [bp-2], 15872 0 00002954 7410 je _.L190 933 _.L165: 0 00002956 39CE cmp si, cx 0 00002958 730C jnc _.L190 0 0000295A 8B46F0 mov ax, word ptr [bp-16] 0 0000295D 48 dec ax 0 0000295E 3946FC cmp word ptr [bp-4], ax 0 00002961 7303E9A600 jc _.L167 940 _.L190: 0 00002966 89CE mov si, cx 942 _.L146: 0 00002968 31FF xor di, di 0 0000296A E957FE jmp _.L145 945 _.L157: 0 0000296D 817EFE0052 cmp word ptr [bp-2], 20992 0 00002972 7503E91601 je _.L160 0 00002977 817EFE0053 cmp word ptr [bp-2], 21248 0 0000297C 7503E91301 je _.L161 0 00002981 817EFE004D cmp word ptr [bp-2], 19712 0 00002986 7403E994FE jne _.L148 952 _.L155: 0 0000298B 3B76F6 cmp si, word ptr [bp-10] 0 0000298E 73D8 jnc _.L146 0 00002990 8B46F0 mov ax, word ptr [bp-16] 0 00002993 48 dec ax 0 00002994 3946FC cmp word ptr [bp-4], ax 0 00002997 73CF jnc _.L146 0 00002999 8B46FC mov ax, word ptr [bp-4] 0 0000299C 40 inc ax 0 0000299D 8946FE mov word ptr [bp-2], ax 0 000029A0 8D7C01 lea di, [1+si] 0 000029A3 FF760A push word ptr [bp+10] 0 000029A6 8E46F8 mov es, word ptr [bp-8] 0 000029A9 8B5EFA mov bx, word ptr [bp-6] 0 000029AC 268A4002 mov al, byte ptr es:[bx+si+2] 0 000029B0 98 cbw 0 000029B1 50 push ax 0 000029B2 E87FFA call _echo_char 0 000029B5 8B5EFC mov bx, word ptr [bp-4] 0 000029B8 8887[0000] mov byte ptr [bx+_local_buffer], al 0 000029BC 89FE mov si, di 0 000029BE 8B46FE mov ax, word ptr [bp-2] 0 000029C1 8946FC mov word ptr [bp-4], ax 0 000029C4 EBA2 jmp _.L146 976 _.L154: 0 000029C6 85FF test di, di 0 000029C8 759E jne _.L146 0 000029CA FF760A push word ptr [bp+10] 0 000029CD B80D00 mov ax, 13 0 000029D0 50 push ax 0 000029D1 E8[FEFF] call _write_char 0 000029D4 FF760A push word ptr [bp+10] 0 000029D7 B80A00 mov ax, 10 0 000029DA 50 push ax 0 000029DB E8[FEFF] call _write_char 0 000029DE EB88 jmp _.L146 988 _.L162: 0 000029E0 8B5EFA mov bx, word ptr [bp-6] 0 000029E3 8D7802 lea di, [2+bx+si] 0 000029E6 8B56F6 mov dx, word ptr [bp-10] 0 000029E9 29F2 sub dx, si 0 000029EB 52 push dx 0 000029EC 30E4 xor ah, ah 0 000029EE 50 push ax 0 000029EF FF76F8 push word ptr [bp-8] 0 000029F2 57 push di 0 000029F3 E8[FEFF] call _fmemchr 0 000029F6 89F1 mov cx, si 0 000029F8 09C2 or dx, ax 0 000029FA 7503E950FF je _.L163 0 000029FF 40 inc ax 0 00002A00 91 xchg cx, ax 0 00002A01 29F9 sub cx, di 0 00002A03 E949FF jmp _.L163 1006 _.L187: 0 00002A06 8B4EF6 mov cx, word ptr [bp-10] 0 00002A09 E94AFF jmp _.L165 1009 _.L167: 0 00002A0C 894EF4 mov word ptr [bp-12], cx 0 00002A0F 8B46FC mov ax, word ptr [bp-4] 0 00002A12 40 inc ax 0 00002A13 8946FE mov word ptr [bp-2], ax 0 00002A16 8D7C01 lea di, [1+si] 0 00002A19 FF760A push word ptr [bp+10] 0 00002A1C 8E46F8 mov es, word ptr [bp-8] 0 00002A1F 8B5EFA mov bx, word ptr [bp-6] 0 00002A22 268A4002 mov al, byte ptr es:[bx+si+2] 0 00002A26 98 cbw 0 00002A27 50 push ax 0 00002A28 E809FA call _echo_char 0 00002A2B 8B5EFC mov bx, word ptr [bp-4] 0 00002A2E 8887[0000] mov byte ptr [bx+_local_buffer], al 0 00002A32 89FE mov si, di 0 00002A34 8B46FE mov ax, word ptr [bp-2] 0 00002A37 8946FC mov word ptr [bp-4], ax 0 00002A3A 8B4EF4 mov cx, word ptr [bp-12] 0 00002A3D E916FF jmp _.L165 1029 _.L158: 0 00002A40 FF76FC push word ptr [bp-4] 0 00002A43 16 push ss 0 00002A44 B8[0000] mov ax, offset _local_buffer 0 00002A47 50 push ax 0 00002A48 8B46FA mov ax, word ptr [bp-6] 0 00002A4B 83C002 add ax, 2 0 00002A4E FF76F8 push word ptr [bp-8] 0 00002A51 50 push ax 0 00002A52 E8[FEFF] call _fmemcpy 0 00002A55 FF760A push word ptr [bp+10] 0 00002A58 B84000 mov ax, 64 0 00002A5B 50 push ax 0 00002A5C E8[FEFF] call _write_char 0 00002A5F 8B46FC mov ax, word ptr [bp-4] 0 00002A62 8946F6 mov word ptr [bp-10], ax 1045 _.L168: 0 00002A65 FF760A push word ptr [bp+10] 0 00002A68 B80D00 mov ax, 13 0 00002A6B 50 push ax 0 00002A6C E8[FEFF] call _write_char 0 00002A6F FF760A push word ptr [bp+10] 0 00002A72 B80A00 mov ax, 10 0 00002A75 50 push ax 0 00002A76 E8[FEFF] call _write_char 0 00002A79 31F6 xor si, si 1055 _.L179: 0 00002A7B 3B76EE cmp si, word ptr [bp-18] 0 00002A7E 7268 jc _.L180 0 00002A80 C746F20000 mov word ptr [bp-14], 0 0 00002A85 31C9 xor cx, cx 0 00002A87 894EFC mov word ptr [bp-4], cx 0 00002A8A E9D9FE jmp _.L190 1062 _.L160: 0 00002A8D 8076F201 xor byte ptr [bp-14], 1 0 00002A91 E9D4FE jmp _.L146 1065 _.L161: 0 00002A94 46 inc si 0 00002A95 E9D0FE jmp _.L146 1068 _.L175: 0 00002A98 8CC7 mov di, es 0 00002A9A 89C3 mov bx, ax 0 00002A9C 8A11 mov dl, byte ptr [bx+di] 0 00002A9E 80FA09 cmp dl, 9 0 00002AA1 7510 jne _.L172 0 00002AA3 8B7EF4 mov di, word ptr [bp-12] 0 00002AA6 83C708 add di, 8 0 00002AA9 83E7F8 and di, -8 0 00002AAC 897EF4 mov word ptr [bp-12], di 1078 _.L173: 0 00002AAF 40 inc ax 0 00002AB0 E9EEFD jmp _.L171 1081 _.L172: 0 00002AB3 8B4EF4 mov cx, word ptr [bp-12] 0 00002AB6 80FA20 cmp dl, 31+1 0 00002AB9 F5 cmc 0 00002ABA 19D2 sbb dx, dx 0 00002ABC 89CB mov bx, cx 0 00002ABE 89D7 mov di, dx 0 00002AC0 8D5102 lea dx, [2+bx+di] 0 00002AC3 8956F4 mov word ptr [bp-12], dx 0 00002AC6 EBE7 jmp _.L173 1091 _.L170: 0 00002AC8 3C1F cmp al, 31 0 00002ACA 7706 ja _.L177 0 00002ACC FF760A push word ptr [bp+10] 0 00002ACF E83DF9 call _destr_bs 1096 _.L177: 0 00002AD2 FF760A push word ptr [bp+10] 0 00002AD5 E837F9 call _destr_bs 0 00002AD8 E9DEFD jmp _.L169 1100 _.L151: 0 00002ADB FF760A push word ptr [bp+10] 0 00002ADE B85C00 mov ax, 92 0 00002AE1 50 push ax 0 00002AE2 E8[FEFF] call _write_char 0 00002AE5 E97DFF jmp _.L168 1106 _.L180: 0 00002AE8 FF760A push word ptr [bp+10] 0 00002AEB B82000 mov ax, 32 0 00002AEE 50 push ax 0 00002AEF E8[FEFF] call _write_char 0 00002AF2 46 inc si 0 00002AF3 EB86 jmp _.L179 1113 _.L188: 0 00002AF5 C746FE1A00 mov word ptr [bp-2], 26 0 00002AFA E92CFD jmp _.L159 1116 _.L181: 0 00002AFD FF760A push word ptr [bp+10] 0 00002B00 B80700 mov ax, 7 0 00002B03 50 push ax 0 00002B04 E8[FEFF] call _write_char 0 00002B07 E948FD jmp _.L183 1122 _.L147: 0 00002B0A 3C0A cmp al, 10 0 00002B0C 7503E9B5FE je _.L154 0 00002B11 7711 ja _.L185 0 00002B13 3C06 cmp al, 6 0 00002B15 7503E94EFE je _.L146 0 00002B1A 3C08 cmp al, 8 1129 _.L254: 0 00002B1C 7503E95EFD je _.L153 0 00002B21 E905FD jmp _.L159 1132 _.L185: 0 00002B24 3C1B cmp al, 27 0 00002B26 74B3 je _.L151 0 00002B28 3C7F cmp al, 127 0 00002B2A EBF0 jmp _.L254 1137 .size _read_line, .-_read_line 1138 .global _read_line_handle 1139 .type _read_line_handle, @function 1140 _read_line_handle: 0 00002B2C 56 push si 0 00002B2D 57 push di 0 00002B2E 55 push bp 0 00002B2F 89E5 mov bp, sp 0 00002B31 1E push ds 0 00002B32 1E push ds 0 00002B33 8B460C mov ax, word ptr [bp+12] 0 00002B36 8946FC mov word ptr [bp-4], ax 0 00002B39 8B7E0E mov di, word ptr [bp+14] 0 00002B3C 833E[0000]00 cmp word ptr [_inputptr], 0 0 00002B41 BE[0000] mov si, offset _kb_buf 0 00002B44 754C jne _.L256 0 00002B46 803C80 cmp byte ptr [si], -128 0 00002B49 7406 je _.L257 0 00002B4B C706[0000]8000 mov word ptr [_kb_buf], 128 1156 _.L257: 0 00002B51 16 push ss 0 00002B52 56 push si 0 00002B53 FF7608 push word ptr [bp+8] 0 00002B56 FF7608 push word ptr [bp+8] 0 00002B59 E8[FEFF] call _read_line 0 00002B5C 8A4401 mov al, byte ptr [si+1] 0 00002B5F 30E4 xor ah, ah 0 00002B61 40 inc ax 0 00002B62 8946FE mov word ptr [bp-2], ax 0 00002B65 FF7608 push word ptr [bp+8] 0 00002B68 B80A00 mov ax, 10 0 00002B6B 50 push ax 0 00002B6C E8C5F8 call _echo_char 0 00002B6F 8B5EFE mov bx, word ptr [bp-2] 0 00002B72 8887[0200] mov byte ptr [bx+_kb_buf+2], al 0 00002B76 C706[00000200] mov word ptr [_inputptr], offset _kb_buf+2 0 00002B7C 807C021A cmp byte ptr [si+2], 26 0 00002B80 7510 jne _.L256 0 00002B82 C706[0000]0000 mov word ptr [_inputptr], 0 0 00002B88 31C0 xor ax, ax 1177 _.L255: 0 00002B8A 89EC mov sp, bp 0 00002B8C 5D pop bp 0 00002B8D 5F pop di 0 00002B8E 5E pop si 0 00002B8F C20800 ret 8 1183 _.L256: 0 00002B92 8B16[0000] mov dx, word ptr [_inputptr] 0 00002B96 8A4401 mov al, byte ptr [si+1] 0 00002B99 30E4 xor ah, ah 0 00002B9B 05[0400] add ax, offset _kb_buf+4 0 00002B9E 29D0 sub ax, dx 0 00002BA0 89C6 mov si, ax 0 00002BA2 3B460A cmp ax, word ptr [bp+10] 0 00002BA5 7603 jbe _.L259 0 00002BA7 8B760A mov si, word ptr [bp+10] 1193 _.L259: 0 00002BAA 8946FE mov word ptr [bp-2], ax 0 00002BAD 56 push si 0 00002BAE 16 push ss 0 00002BAF 52 push dx 0 00002BB0 57 push di 0 00002BB1 FF76FC push word ptr [bp-4] 0 00002BB4 E8[FEFF] call _fmemcpy 0 00002BB7 8B46FE mov ax, word ptr [bp-2] 0 00002BBA 39F0 cmp ax, si 0 00002BBC 7407 je _.L260 0 00002BBE 0136[0000] add word ptr [_inputptr], si 0 00002BC2 96 xchg si, ax 0 00002BC3 EBC5 jmp _.L255 1207 _.L260: 0 00002BC5 C706[0000]0000 mov word ptr [_inputptr], 0 0 00002BCB EBBD jmp _.L255 1210 .size _read_line_handle, .-_read_line_handle 1211 .ident "GCC: (GNU) 6.3.0" === Trace listing source: config.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=config.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccXGHwHJ.s output file : config.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:23.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _SetAnyDos, @function 7 _SetAnyDos: 0 00000EC3 B80000 mov ax, offset _ReturnAnyDosVersionExpected@OZSEG16 0 00000EC6 8EC0 mov es, ax 0 00000EC8 26C606000001 mov byte ptr es:[_ReturnAnyDosVersionExpected], 1 0 00000ECE C20200 ret 2 12 .size _SetAnyDos, .-_SetAnyDos 13 .type _CfgIgnore, @function 14 _CfgIgnore: 0 00000ED1 C20200 ret 2 16 .size _CfgIgnore, .-_CfgIgnore === Switch to base=012B40h -> ".RODATA.STR1.1" 17 .section .rodata.str1.1,"aMS",@progbits,1 18 _.LC0: 0 00000750 25730A00 .string "%s\n" === Switch to base=002270h -> ".TEXT" 20 .text 21 .type _CfgMenuEsc, @function 22 _CfgMenuEsc: 0 00000ED4 55 push bp 0 00000ED5 89E5 mov bp, sp 0 00000ED7 8B4604 mov ax, word ptr [bp+4] 0 00000EDA 89C3 mov bx, ax 27 _.L6: 0 00000EDC 8A17 mov dl, byte ptr [bx] 0 00000EDE 84D2 test dl, dl 0 00000EE0 750E jne _.L8 0 00000EE2 50 push ax 0 00000EE3 B80000 mov ax, offset _.LC0 0 00000EE6 50 push ax 0 00000EE7 E8FEFF call _init_printf 0 00000EEA 89EC mov sp, bp 0 00000EEC 5D pop bp 0 00000EED C20200 ret 2 38 _.L8: 0 00000EF0 80FA24 cmp dl, 36 0 00000EF3 7503 jne _.L7 0 00000EF5 C6071B mov byte ptr [bx], 27 42 _.L7: 0 00000EF8 43 inc bx 0 00000EF9 EBE1 jmp _.L6 45 .size _CfgMenuEsc, .-_CfgMenuEsc === Switch to base=012B40h -> ".RODATA.STR1.1" 46 .section .rodata.str1.1 47 _.LC1: 0 00000754 434F4E4649472E53 .string "CONFIG.SYS error in line %d\n" 0 0000075C 5953206572726F72 0 00000764 20696E206C696E65 0 0000076C 2025640A00 49 _.LC2: 0 00000771 3E3E3E25730A2020 .string ">>>%s\n " 0 00000779 2000 51 _.LC3: 0 0000077B 2000 .string " " 53 _.LC4: 0 0000077D 5E0A00 .string "^\n" === Switch to base=002270h -> ".TEXT" 55 .text 56 .type _CfgFailure, @function 57 _CfgFailure: 0 00000EFB 56 push si 0 00000EFC 57 push di 0 00000EFD 55 push bp 0 00000EFE 89E5 mov bp, sp 0 00000F00 8B360000 mov si, word ptr [_pLineStart] 0 00000F04 8B16380A mov dx, word ptr [_nCfgLine] 0 00000F08 81FAFF03 cmp dx, 1023 0 00000F0C 7723 ja _.L11 0 00000F0E 89D3 mov bx, dx 0 00000F10 B103 mov cl, 3 0 00000F12 D3EB shr bx, cl 0 00000F14 BF3E0A mov di, offset _ErrorAlreadyPrinted 0 00000F17 8A29 mov ch, byte ptr [bx+di] 0 00000F19 88E8 mov al, ch 0 00000F1B 30E4 xor ah, ah 0 00000F1D 88D1 mov cl, dl 0 00000F1F 80E107 and cl, 7 0 00000F22 D3F8 sar ax, cl 0 00000F24 A801 test al, 1 0 00000F26 752C jne _.L10 0 00000F28 B80100 mov ax, 1 0 00000F2B D3E0 shl ax, cl 0 00000F2D 08E8 or al, ch 0 00000F2F 8801 mov byte ptr [bx+di], al 82 _.L11: 0 00000F31 52 push dx 0 00000F32 B80400 mov ax, offset _.LC1 0 00000F35 50 push ax 0 00000F36 E8FEFF call _init_printf 0 00000F39 56 push si 0 00000F3A B82100 mov ax, offset _.LC2 0 00000F3D 50 push ax 0 00000F3E E8FEFF call _init_printf 0 00000F41 83C408 add sp, 8 92 _.L13: 0 00000F44 46 inc si 0 00000F45 3B7608 cmp si, word ptr [bp+8] 0 00000F48 7512 jne _.L14 0 00000F4A B82D00 mov ax, offset _.LC4 0 00000F4D 50 push ax 0 00000F4E E8FEFF call _init_printf 0 00000F51 83C402 add sp, 2 100 _.L10: 0 00000F54 89EC mov sp, bp 0 00000F56 5D pop bp 0 00000F57 5F pop di 0 00000F58 5E pop si 0 00000F59 C20200 ret 2 106 _.L14: 0 00000F5C B82B00 mov ax, offset _.LC3 0 00000F5F 50 push ax 0 00000F60 E8FEFF call _init_printf 0 00000F63 83C402 add sp, 2 0 00000F66 EBDC jmp _.L13 112 .size _CfgFailure, .-_CfgFailure 113 .type _mcb_init, @function 114 _mcb_init: 0 00000F68 55 push bp 0 00000F69 89E5 mov bp, sp 0 00000F6B BB2808 mov bx, offset _near_mcb.2441 0 00000F6E 8A4608 mov al, byte ptr [bp+8] 0 00000F71 8807 mov byte ptr [bx], al 0 00000F73 8B4606 mov ax, word ptr [bp+6] 0 00000F76 894703 mov word ptr [bx+3], ax 0 00000F79 B81000 mov ax, 16 0 00000F7C 50 push ax 0 00000F7D 16 push ss 0 00000F7E 53 push bx 0 00000F7F FF7604 push word ptr [bp+4] 0 00000F82 31C0 xor ax, ax 0 00000F84 50 push ax 0 00000F85 E8FEFF call _init_fmemcpy 0 00000F88 89EC mov sp, bp 0 00000F8A 5D pop bp 0 00000F8B C20600 ret 6 133 .size _mcb_init, .-_mcb_init 134 .type _deletevar, @function 135 _deletevar: 0 00000F8E 56 push si 0 00000F8F 57 push di 0 00000F90 55 push bp 0 00000F91 89E5 mov bp, sp 0 00000F93 1E push ds 0 00000F94 8B7E08 mov di, word ptr [bp+8] 0 00000F97 8B560A mov dx, word ptr [bp+10] 0 00000F9A 89F8 mov ax, di 0 00000F9C 09D0 or ax, dx 0 00000F9E 742A je _.L18 0 00000FA0 52 push dx 0 00000FA1 8956FE mov word ptr [bp-2], dx 0 00000FA4 57 push di 0 00000FA5 E8FEFF call _init_fstrlen 0 00000FA8 96 xchg si, ax 0 00000FA9 89F3 mov bx, si 0 00000FAB 8D4101 lea ax, [1+bx+di] 0 00000FAE 8B56FE mov dx, word ptr [bp-2] 0 00000FB1 89D1 mov cx, dx 0 00000FB3 8B16B602 mov dx, word ptr [_envp] 0 00000FB7 83C203 add dx, 3 0 00000FBA 29C2 sub dx, ax 0 00000FBC 52 push dx 0 00000FBD 51 push cx 0 00000FBE 50 push ax 0 00000FBF 51 push cx 0 00000FC0 57 push di 0 00000FC1 E8FEFF call _init_fmemcpy 0 00000FC4 F7D6 not si 0 00000FC6 0136B602 add word ptr [_envp], si 166 _.L18: 0 00000FCA 89EC mov sp, bp 0 00000FCC 5D pop bp 0 00000FCD 5F pop di 0 00000FCE 5E pop si 0 00000FCF C20400 ret 4 172 .size _deletevar, .-_deletevar 173 .type _ClearScreen, @function 174 _ClearScreen: 0 00000FD2 56 push si 0 00000FD3 57 push di 0 00000FD4 55 push bp 0 00000FD5 89E5 mov bp, sp 0 00000FD7 83EC18 sub sp, 24 0 00000FDA C746E80006 mov word ptr [bp-24], 1536 0 00000FDF 8A4608 mov al, byte ptr [bp+8] 0 00000FE2 8846EB mov byte ptr [bp-21], al 0 00000FE5 C746EC0000 mov word ptr [bp-20], 0 0 00000FEA BA4000 mov dx, 64 0 00000FED 8EC2 mov es, dx 0 00000FEF 26A04A00 mov al, byte ptr es:[74] 0 00000FF3 FEC8 dec al 0 00000FF5 8846EE mov byte ptr [bp-18], al 0 00000FF8 26A08400 mov al, byte ptr es:[132] 0 00000FFC 84C0 test al, al 0 00000FFE 7502 jne _.L26 0 00001000 B018 mov al, 24 193 _.L26: 0 00001002 8846EF mov byte ptr [bp-17], al 0 00001005 8D7EE8 lea di, [-24+bp] 0 00001008 57 push di 0 00001009 BE1000 mov si, 16 0 0000100C 56 push si 0 0000100D E8FEFF call _init_call_intr 0 00001010 C646E902 mov byte ptr [bp-23], 2 0 00001014 C646EB00 mov byte ptr [bp-21], 0 0 00001018 C746EE0000 mov word ptr [bp-18], 0 0 0000101D 57 push di 0 0000101E 56 push si 0 0000101F E8FEFF call _init_call_intr 0 00001022 8A4608 mov al, byte ptr [bp+8] 0 00001025 B400 mov ah, 0 0 00001027 A30000 mov word ptr [_MenuColor], ax 0 0000102A 89EC mov sp, bp 0 0000102C 5D pop bp 0 0000102D 5F pop di 0 0000102E 5E pop si 0 0000102F C20200 ret 2 214 .size _ClearScreen, .-_ClearScreen === Switch to base=012B40h -> ".RODATA.STR1.1" 215 .section .rodata.str1.1 216 _.LC5: 0 00000780 257300 .string "%s" === Switch to base=002270h -> ".TEXT" 218 .text 219 .type _WriteMenuLine, @function 220 _WriteMenuLine: 0 00001032 56 push si 0 00001033 57 push di 0 00001034 55 push bp 0 00001035 89E5 mov bp, sp 0 00001037 83EC1C sub sp, 28 0 0000103A 8B7608 mov si, word ptr [bp+8] 0 0000103D 807C0500 cmp byte ptr [si+5], 0 0 00001041 7474 je _.L28 0 00001043 A10000 mov ax, word ptr [_MenuColor] 0 00001046 88C2 mov dl, al 0 00001048 807C0400 cmp byte ptr [si+4], 0 0 0000104C 740B je _.L30 0 0000104E B104 mov cl, 4 0 00001050 D3E0 shl ax, cl 0 00001052 25F00F and ax, 4080 0 00001055 D2EA shr dl, cl 0 00001057 08C2 or dl, al 238 _.L30: 0 00001059 8D7C05 lea di, [5+si] 0 0000105C C746E80006 mov word ptr [bp-24], 1536 0 00001061 8856EB mov byte ptr [bp-21], dl 0 00001064 8B04 mov ax, word ptr [si] 0 00001066 8846EE mov byte ptr [bp-18], al 0 00001069 8846EC mov byte ptr [bp-20], al 0 0000106C 8B4402 mov ax, word ptr [si+2] 0 0000106F 8846EF mov byte ptr [bp-17], al 0 00001072 8846ED mov byte ptr [bp-19], al 0 00001075 57 push di 0 00001076 E8FEFF call _init_strlen 0 00001079 48 dec ax 0 0000107A 0046EE add byte ptr [bp-18], al 0 0000107D 8D4EE8 lea cx, [-24+bp] 0 00001080 51 push cx 0 00001081 894EE4 mov word ptr [bp-28], cx 0 00001084 BA1000 mov dx, 16 0 00001087 52 push dx 0 00001088 8956E6 mov word ptr [bp-26], dx 0 0000108B E8FEFF call _init_call_intr 0 0000108E C646E902 mov byte ptr [bp-23], 2 0 00001092 C646EB00 mov byte ptr [bp-21], 0 0 00001096 8B04 mov ax, word ptr [si] 0 00001098 8846EE mov byte ptr [bp-18], al 0 0000109B 8B4402 mov ax, word ptr [si+2] 0 0000109E 8846EF mov byte ptr [bp-17], al 0 000010A1 8B4EE4 mov cx, word ptr [bp-28] 0 000010A4 51 push cx 0 000010A5 8B56E6 mov dx, word ptr [bp-26] 0 000010A8 52 push dx 0 000010A9 E8FEFF call _init_call_intr 0 000010AC 57 push di 0 000010AD B83000 mov ax, offset _.LC5 0 000010B0 50 push ax 0 000010B1 E8FEFF call _init_printf 0 000010B4 83C404 add sp, 4 275 _.L28: 0 000010B7 89EC mov sp, bp 0 000010B9 5D pop bp 0 000010BA 5F pop di 0 000010BB 5E pop si 0 000010BC C20200 ret 2 281 .size _WriteMenuLine, .-_WriteMenuLine 282 .type _set_strategy, @function 283 _set_strategy: 0 000010BF 55 push bp 0 000010C0 89E5 mov bp, sp 0 000010C2 83EC18 sub sp, 24 0 000010C5 C746E80158 mov word ptr [bp-24], 22529 0 000010CA 8A4604 mov al, byte ptr [bp+4] 0 000010CD 8846EA mov byte ptr [bp-22], al 0 000010D0 8D46E8 lea ax, [-24+bp] 0 000010D3 50 push ax 0 000010D4 B82100 mov ax, 33 0 000010D7 50 push ax 0 000010D8 E8FEFF call _init_call_intr 0 000010DB 89EC mov sp, bp 0 000010DD 5D pop bp 0 000010DE C20200 ret 2 298 .size _set_strategy, .-_set_strategy 299 .type _CmdChain, @function 300 _CmdChain: 0 000010E1 56 push si 0 000010E2 57 push di 0 000010E3 55 push bp 0 000010E4 89E5 mov bp, sp 0 000010E6 8B7E08 mov di, word ptr [bp+8] 0 000010E9 833E000004 cmp word ptr [_nCurChain], 4 0 000010EE 7E0B jle _.L36 308 _.L37: 0 000010F0 897E08 mov word ptr [bp+8], di 0 000010F3 89EC mov sp, bp 0 000010F5 5D pop bp 0 000010F6 5F pop di 0 000010F7 5E pop si 0 000010F8 E900FE jmp _CfgFailure 315 _.L36: 0 000010FB 31F6 xor si, si 0 000010FD 56 push si 0 000010FE 57 push di 0 000010FF E8FEFF call _init_DosOpen 0 00001102 39F0 cmp ax, si 0 00001104 7CEA jl _.L37 0 00001106 8B1E0000 mov bx, word ptr [_nCurChain] 0 0000110A 8D5701 lea dx, [1+bx] 0 0000110D 89160000 mov word ptr [_nCurChain], dx 0 00001111 BF0000 mov di, offset _cfgFile 0 00001114 B102 mov cl, 2 0 00001116 D3E3 shl bx, cl 0 00001118 8B160000 mov dx, word ptr [_nFileDesc] 0 0000111C 8911 mov word ptr [bx+di], dx 0 0000111E 8B16380A mov dx, word ptr [_nCfgLine] 0 00001122 895102 mov word ptr [bx+di+2], dx 0 00001125 A30000 mov word ptr [_nFileDesc], ax 0 00001128 8936380A mov word ptr [_nCfgLine], si 0 0000112C 89EC mov sp, bp 0 0000112E 5D pop bp 0 0000112F 5F pop di 0 00001130 5E pop si 0 00001131 C20200 ret 2 339 .size _CmdChain, .-_CmdChain === Switch to base=012B40h -> ".RODATA.STR1.1" 340 .section .rodata.str1.1 341 _.LC6: 0 00000783 546F6F206D616E79 .string "Too many Install commands given (%d max)\n" 0 0000078B 20496E7374616C6C 0 00000793 20636F6D6D616E64 0 0000079B 7320676976656E20 0 000007A3 282564206D617829 0 000007AB 0A00 === Switch to base=002270h -> ".TEXT" 343 .text 344 .type __CmdInstall, @function 345 __CmdInstall: 0 00001134 56 push si 0 00001135 55 push bp 0 00001136 89E5 mov bp, sp 0 00001138 8B7606 mov si, word ptr [bp+6] 0 0000113B A10000 mov ax, word ptr [_numInstallCmds] 0 0000113E 83F80A cmp ax, 10 0 00001141 7619 jbe _.L40 0 00001143 B80A00 mov ax, 10 0 00001146 50 push ax 0 00001147 B83300 mov ax, offset _.LC6 0 0000114A 50 push ax 0 0000114B E8FEFF call _init_printf 0 0000114E 56 push si 0 0000114F E8A9FD call _CfgFailure 0 00001152 83C404 add sp, 4 361 _.L39: 0 00001155 89EC mov sp, bp 0 00001157 5D pop bp 0 00001158 5E pop si 0 00001159 C20400 ret 4 366 _.L40: 0 0000115C BA7F00 mov dx, 127 0 0000115F 52 push dx 0 00001160 56 push si 0 00001161 BA8200 mov dx, 130 0 00001164 F7E2 mul dx 0 00001166 050000 add ax, offset _InstallCommands 0 00001169 89C6 mov si, ax 0 0000116B 50 push ax 0 0000116C E8FEFF call _init_memcpy 0 0000116F C6447F00 mov byte ptr [si+127], 0 0 00001173 8B4608 mov ax, word ptr [bp+8] 0 00001176 89848000 mov word ptr [si+128], ax 0 0000117A FF060000 inc word ptr [_numInstallCmds] 0 0000117E EBD5 jmp _.L39 381 .size __CmdInstall, .-__CmdInstall 382 .type _CmdInstallHigh, @function 383 _CmdInstallHigh: 0 00001180 55 push bp 0 00001181 89E5 mov bp, sp 0 00001183 B88000 mov ax, 128 0 00001186 50 push ax 0 00001187 FF7604 push word ptr [bp+4] 0 0000118A E8A7FF call __CmdInstall 0 0000118D 89EC mov sp, bp 0 0000118F 5D pop bp 0 00001190 C20200 ret 2 393 .size _CmdInstallHigh, .-_CmdInstallHigh 394 .type _CmdInstall, @function 395 _CmdInstall: 0 00001193 55 push bp 0 00001194 89E5 mov bp, sp 0 00001196 31C0 xor ax, ax 0 00001198 50 push ax 0 00001199 FF7604 push word ptr [bp+4] 0 0000119C E895FF call __CmdInstall 0 0000119F 89EC mov sp, bp 0 000011A1 5D pop bp 0 000011A2 C20200 ret 2 405 .size _CmdInstall, .-_CmdInstall 406 .type _strupr, @function 407 _strupr: 0 000011A5 89E3 mov bx, sp 0 000011A7 8B5F02 mov bx, word ptr [bx+2] 410 _.L48: 0 000011AA 8A07 mov al, byte ptr [bx] 0 000011AC 84C0 test al, al 0 000011AE 7503 jne _.L50 0 000011B0 C20200 ret 2 415 _.L50: 0 000011B3 88C4 mov ah, al 0 000011B5 80C49F add ah, -97 0 000011B8 80FC19 cmp ah, 25 0 000011BB 7702 ja _.L49 0 000011BD 04E0 add al, -32 421 _.L49: 0 000011BF 8807 mov byte ptr [bx], al 0 000011C1 43 inc bx 0 000011C2 EBE6 jmp _.L48 425 .size _strupr, .-_strupr 426 .type _strcaseequal, @function 427 _strcaseequal: 0 000011C4 57 push di 0 000011C5 55 push bp 0 000011C6 89E5 mov bp, sp 0 000011C8 31DB xor bx, bx 432 _.L53: 0 000011CA 8B7E08 mov di, word ptr [bp+8] 0 000011CD 8A01 mov al, byte ptr [bx+di] 0 000011CF 88C4 mov ah, al 0 000011D1 80C49F add ah, -97 0 000011D4 80FC19 cmp ah, 25 0 000011D7 7702 ja _.L55 0 000011D9 04E0 add al, -32 440 _.L55: 0 000011DB 8B7E06 mov di, word ptr [bp+6] 0 000011DE 8A21 mov ah, byte ptr [bx+di] 0 000011E0 88E2 mov dl, ah 0 000011E2 80C29F add dl, -97 0 000011E5 80FA19 cmp dl, 25 0 000011E8 770E ja _.L56 0 000011EA 80C4E0 add ah, -32 0 000011ED 38C4 cmp ah, al 0 000011EF 7414 je _.L57 450 _.L62: 0 000011F1 30C0 xor al, al 452 _.L52: 0 000011F3 5D pop bp 0 000011F4 5F pop di 0 000011F5 C20400 ret 4 456 _.L56: 0 000011F8 38C4 cmp ah, al 0 000011FA 75F5 jne _.L62 0 000011FC 43 inc bx 0 000011FD 84C0 test al, al 0 000011FF 75C9 jne _.L53 0 00001201 B001 mov al, 1 0 00001203 EBEE jmp _.L52 464 _.L57: 0 00001205 43 inc bx 0 00001206 EBC2 jmp _.L53 467 .size _strcaseequal, .-_strcaseequal 468 .type _skipwh, @function 469 _skipwh: 0 00001208 55 push bp 0 00001209 89E5 mov bp, sp 0 0000120B 8B4604 mov ax, word ptr [bp+4] 473 _.L65: 0 0000120E 89C3 mov bx, ax 0 00001210 8A17 mov dl, byte ptr [bx] 0 00001212 80FA0D cmp dl, 13 0 00001215 740F je _.L64 0 00001217 88D6 mov dh, dl 0 00001219 80C6F7 add dh, -9 0 0000121C 80FE02 cmp dh, 1+1 0 0000121F 7205 jc _.L64 0 00001221 80FA20 cmp dl, 32 0 00001224 7503 jne _.L69 484 _.L64: 0 00001226 40 inc ax 0 00001227 EBE5 jmp _.L65 487 _.L69: 0 00001229 5D pop bp 0 0000122A C20200 ret 2 490 .size _skipwh, .-_skipwh 491 .type _scan, @function 492 _scan: 0 0000122D 56 push si 0 0000122E 57 push di 0 0000122F 55 push bp 0 00001230 89E5 mov bp, sp 0 00001232 8B7E0A mov di, word ptr [bp+10] 0 00001235 C606000000 mov byte ptr [_askThisSingleCommand], 0 0 0000123A C606000000 mov byte ptr [_DontAskThisSingleCommand], 0 0 0000123F FF7608 push word ptr [bp+8] 0 00001242 E8C3FF call _skipwh 0 00001245 93 xchg bx, ax 0 00001246 C70600000000 mov word ptr [_MenuLine], 0 0 0000124C 837E0C00 cmp word ptr [bp+12], 0 0 00001250 742B je _.L72 0 00001252 8A07 mov al, byte ptr [bx] 0 00001254 04D0 add al, -48 0 00001256 3C09 cmp al, 9 0 00001258 7723 ja _.L72 0 0000125A 31C0 xor ax, ax 0 0000125C BA0100 mov dx, 1 512 _.L73: 0 0000125F 8A0F mov cl, byte ptr [bx] 0 00001261 88CD mov ch, cl 0 00001263 80C5D0 add ch, -48 0 00001266 80FD09 cmp ch, 9 0 00001269 7665 jbe _.L74 0 0000126B 80F93F cmp cl, 63 0 0000126E 750D jne _.L72 0 00001270 A30000 mov word ptr [_MenuLine], ax 0 00001273 09060000 or word ptr [_Menus], ax 0 00001277 43 inc bx 0 00001278 53 push bx 0 00001279 E88CFF call _skipwh 0 0000127C 93 xchg bx, ax 526 _.L72: 0 0000127D 803F21 cmp byte ptr [bx], 33 0 00001280 750B jne _.L75 0 00001282 C606000001 mov byte ptr [_DontAskThisSingleCommand], 1 0 00001287 43 inc bx 0 00001288 53 push bx 0 00001289 E87CFF call _skipwh 0 0000128C 93 xchg bx, ax 534 _.L75: 0 0000128D 803F3B cmp byte ptr [bx], 59 0 00001290 744A je _.L76 0 00001292 89FE mov si, di 0 00001294 B501 mov ch, 1 539 _.L77: 0 00001296 8A07 mov al, byte ptr [bx] 0 00001298 84C0 test al, al 0 0000129A 7447 je _.L78 0 0000129C 3C0D cmp al, 13 0 0000129E 7443 je _.L78 0 000012A0 3C0A cmp al, 10 0 000012A2 743F je _.L78 0 000012A4 3C09 cmp al, 9 0 000012A6 9F lahf 0 000012A7 D0E4 shl ah, 1 0 000012A9 99 cwd 0 000012AA F6DA neg dl 0 000012AC 88D1 mov cl, dl 0 000012AE 3C20 cmp al, 32 0 000012B0 9F lahf 0 000012B1 D0E4 shl ah, 1 0 000012B3 99 cwd 0 000012B4 88D6 mov dh, dl 0 000012B6 F6DE neg dh 0 000012B8 88CA mov dl, cl 0 000012BA 08F2 or dl, dh 0 000012BC 80FA01 cmp dl, 1 0 000012BF 7422 je _.L78 0 000012C1 3C3D cmp al, 61 0 000012C3 741E je _.L78 0 000012C5 3C3F cmp al, 63 0 000012C7 7526 jne _.L79 0 000012C9 882E0000 mov byte ptr [_askThisSingleCommand], ch 568 _.L80: 0 000012CD 43 inc bx 0 000012CE EBC6 jmp _.L77 571 _.L74: 0 000012D0 80C1D0 add cl, -48 0 000012D3 89D6 mov si, dx 0 000012D5 D3E6 shl si, cl 0 000012D7 09F0 or ax, si 0 000012D9 43 inc bx 0 000012DA EB83 jmp _.L73 578 _.L76: 0 000012DC 8D7501 lea si, [1+di] 0 000012DF 43 inc bx 0 000012E0 C6053B mov byte ptr [di], 59 582 _.L78: 0 000012E3 C60400 mov byte ptr [si], 0 0 000012E6 93 xchg bx, ax 0 000012E7 89EC mov sp, bp 0 000012E9 5D pop bp 0 000012EA 5F pop di 0 000012EB 5E pop si 0 000012EC C20600 ret 6 590 _.L79: 0 000012EF 8804 mov byte ptr [si], al 0 000012F1 46 inc si 0 000012F2 EBD9 jmp _.L80 594 .size _scan, .-_scan 595 .type _GetNumArg, @function 596 _GetNumArg: 0 000012F4 56 push si 0 000012F5 57 push di 0 000012F6 55 push bp 0 000012F7 89E5 mov bp, sp 0 000012F9 83EC06 sub sp, 6 0 000012FC FF7608 push word ptr [bp+8] 0 000012FF E806FF call _skipwh 0 00001302 93 xchg bx, ax 0 00001303 8A07 mov al, byte ptr [bx] 0 00001305 3C2D cmp al, 45 0 00001307 7544 jne _.L94 0 00001309 43 inc bx 0 0000130A BFFFFF mov di, -1 610 _.L96: 0 0000130D 31F6 xor si, si 0 0000130F B10A mov cl, 10 613 _.L95: 0 00001311 8A07 mov al, byte ptr [bx] 0 00001313 84C0 test al, al 0 00001315 742C je _.L102 0 00001317 88C4 mov ah, al 0 00001319 80C49F add ah, -97 0 0000131C 80FC19 cmp ah, 25 0 0000131F 7702 ja _.L98 0 00001321 04E0 add al, -32 622 _.L98: 0 00001323 884EFB mov byte ptr [bp-5], cl 0 00001326 3C58 cmp al, 88 0 00001328 744D je _.L104 0 0000132A 895EFC mov word ptr [bp-4], bx 0 0000132D 98 cbw 0 0000132E 50 push ax 0 0000132F B85A00 mov ax, offset _digits.2179 0 00001332 50 push ax 0 00001333 E8FEFF call _init_strchr 0 00001336 8946FE mov word ptr [bp-2], ax 0 00001339 85C0 test ax, ax 0 0000133B 8B5EFC mov bx, word ptr [bp-4] 0 0000133E 8A4EFB mov cl, byte ptr [bp-5] 0 00001341 7522 jne _.L100 637 _.L102: 0 00001343 96 xchg si, ax 0 00001344 F7E7 mul di 0 00001346 8B760A mov si, word ptr [bp+10] 0 00001349 8904 mov word ptr [si], ax 0 0000134B EB0F jmp _.L93 643 _.L94: 0 0000134D 04D0 add al, -48 0 0000134F BF0100 mov di, 1 0 00001352 3C09 cmp al, 9 0 00001354 76B7 jbe _.L96 0 00001356 53 push bx 0 00001357 E8A1FB call _CfgFailure 0 0000135A 31DB xor bx, bx 651 _.L93: 0 0000135C 93 xchg bx, ax 0 0000135D 89EC mov sp, bp 0 0000135F 5D pop bp 0 00001360 5F pop di 0 00001361 5E pop si 0 00001362 C20400 ret 4 658 _.L100: 0 00001365 88C8 mov al, cl 0 00001367 30E4 xor ah, ah 0 00001369 F7E6 mul si 0 0000136B 96 xchg si, ax 0 0000136C 8B46FE mov ax, word ptr [bp-2] 0 0000136F 2D5A00 sub ax, offset _digits.2179 0 00001372 01C6 add si, ax 666 _.L99: 0 00001374 43 inc bx 0 00001375 EB9A jmp _.L95 669 _.L104: 0 00001377 B110 mov cl, 16 0 00001379 EBF9 jmp _.L99 672 .size _GetNumArg, .-_GetNumArg 673 .type _SetIdleHalt, @function 674 _SetIdleHalt: 0 0000137B 55 push bp 0 0000137C 89E5 mov bp, sp 0 0000137E 1E push ds 0 0000137F 8D46FE lea ax, [-2+bp] 0 00001382 50 push ax 0 00001383 FF7604 push word ptr [bp+4] 0 00001386 E86BFF call _GetNumArg 0 00001389 85C0 test ax, ax 0 0000138B 740C je _.L106 0 0000138D 8B46FE mov ax, word ptr [bp-2] 0 00001390 BA0000 mov dx, offset _HaltCpuWhileIdle@OZSEG16 0 00001393 8EC2 mov es, dx 0 00001395 26A20000 mov byte ptr es:[_HaltCpuWhileIdle], al 688 _.L106: 0 00001399 89EC mov sp, bp 0 0000139B 5D pop bp 0 0000139C C20200 ret 2 692 .size _SetIdleHalt, .-_SetIdleHalt 693 .type _Files, @function 694 _Files: 0 0000139F 55 push bp 0 000013A0 89E5 mov bp, sp 0 000013A2 1E push ds 0 000013A3 8D46FE lea ax, [-2+bp] 0 000013A6 50 push ax 0 000013A7 FF7604 push word ptr [bp+4] 0 000013AA E847FF call _GetNumArg 0 000013AD 85C0 test ax, ax 0 000013AF 7418 je _.L112 0 000013B1 BB0000 mov bx, offset _Config 0 000013B4 8A4702 mov al, byte ptr [bx+2] 0 000013B7 8B56FE mov dx, word ptr [bp-2] 0 000013BA 30E4 xor ah, ah 0 000013BC 39D0 cmp ax, dx 0 000013BE 7D01 jge _.L114 0 000013C0 92 xchg dx, ax 711 _.L114: 0 000013C1 884702 mov byte ptr [bx+2], al 0 000013C4 C606030000 mov byte ptr [_Config+3], 0 714 _.L112: 0 000013C9 89EC mov sp, bp 0 000013CB 5D pop bp 0 000013CC C20200 ret 2 718 .size _Files, .-_Files 719 .type _FilesHigh, @function 720 _FilesHigh: 0 000013CF 55 push bp 0 000013D0 89E5 mov bp, sp 0 000013D2 FF7604 push word ptr [bp+4] 0 000013D5 E8C7FF call _Files 0 000013D8 C606030001 mov byte ptr [_Config+3], 1 0 000013DD 89EC mov sp, bp 0 000013DF 5D pop bp 0 000013E0 C20200 ret 2 729 .size _FilesHigh, .-_FilesHigh 730 .type _Config_Buffers, @function 731 _Config_Buffers: 0 000013E3 55 push bp 0 000013E4 89E5 mov bp, sp 0 000013E6 1E push ds 0 000013E7 8D46FE lea ax, [-2+bp] 0 000013EA 50 push ax 0 000013EB FF7604 push word ptr [bp+4] 0 000013EE E803FF call _GetNumArg 0 000013F1 85C0 test ax, ax 0 000013F3 7406 je _.L122 0 000013F5 8B46FE mov ax, word ptr [bp-2] 0 000013F8 A20100 mov byte ptr [_Config+1], al 743 _.L122: 0 000013FB 89EC mov sp, bp 0 000013FD 5D pop bp 0 000013FE C20200 ret 2 747 .size _Config_Buffers, .-_Config_Buffers === Switch to base=012B40h -> ".RODATA.STR1.1" 748 .section .rodata.str1.1 749 _.LC7: 0 000007AD 4E6F74653A204255 .string "Note: BUFFERS will be in HMA or low RAM, not in UMB\n" 0 000007B5 4646455253207769 0 000007BD 6C6C20626520696E 0 000007C5 20484D41206F7220 0 000007CD 6C6F772052414D2C 0 000007D5 206E6F7420696E20 0 000007DD 554D420A00 === Switch to base=002270h -> ".TEXT" 751 .text 752 .type _CfgBuffersHigh, @function 753 _CfgBuffersHigh: 0 00001401 55 push bp 0 00001402 89E5 mov bp, sp 0 00001404 FF7604 push word ptr [bp+4] 0 00001407 E8D9FF call _Config_Buffers 0 0000140A 803E150000 cmp byte ptr [_InitKernelConfig+21], 0 0 0000140F 780A js _.L128 0 00001411 B85D00 mov ax, offset _.LC7 0 00001414 50 push ax 0 00001415 E8FEFF call _init_printf 0 00001418 83C402 add sp, 2 764 _.L128: 0 0000141B 89EC mov sp, bp 0 0000141D 5D pop bp 0 0000141E C20200 ret 2 768 .size _CfgBuffersHigh, .-_CfgBuffersHigh === Switch to base=012B40h -> ".RODATA.STR1.1" 769 .section .rodata.str1.1 770 _.LC8: 0 000007E2 4368616E67696E67 .string "Changing reported version to %d.%d\n" 0 000007EA 207265706F727465 0 000007F2 642076657273696F 0 000007FA 6E20746F2025642E 0 00000802 25640A00 === Switch to base=002270h -> ".TEXT" 772 .text 773 .type _sysVersion, @function 774 _sysVersion: 0 00001421 56 push si 0 00001422 57 push di 0 00001423 55 push bp 0 00001424 89E5 mov bp, sp 0 00001426 1E push ds 0 00001427 1E push ds 0 00001428 8B7608 mov si, word ptr [bp+8] 0 0000142B B82E00 mov ax, 46 0 0000142E 50 push ax 0 0000142F 56 push si 0 00001430 E8FEFF call _init_strchr 0 00001433 85C0 test ax, ax 0 00001435 745C je _.L131 0 00001437 97 xchg di, ax 0 00001438 8D46FC lea ax, [-4+bp] 0 0000143B 50 push ax 0 0000143C 56 push si 0 0000143D E8B4FE call _GetNumArg 0 00001440 85C0 test ax, ax 0 00001442 744F je _.L131 0 00001444 8D46FE lea ax, [-2+bp] 0 00001447 50 push ax 0 00001448 8D4501 lea ax, [1+di] 0 0000144B 50 push ax 0 0000144C E8A5FE call _GetNumArg 0 0000144F 85C0 test ax, ax 0 00001451 7440 je _.L131 0 00001453 803E150000 cmp byte ptr [_InitKernelConfig+21], 0 0 00001458 7810 js _.L133 0 0000145A FF76FE push word ptr [bp-2] 0 0000145D FF76FC push word ptr [bp-4] 0 00001460 B89200 mov ax, offset _.LC8 0 00001463 50 push ax 0 00001464 E8FEFF call _init_printf 0 00001467 83C406 add sp, 6 810 _.L133: 0 0000146A 8B1E0000 mov bx, word ptr [_LoL] 0 0000146E 8B0E0200 mov cx, word ptr [_LoL+2] 0 00001472 8B56FC mov dx, word ptr [bp-4] 0 00001475 8EC1 mov es, cx 0 00001477 2688979100 mov byte ptr es:[bx+145], dl 0 0000147C 8B46FE mov ax, word ptr [bp-2] 0 0000147F 2688879000 mov byte ptr es:[bx+144], al 0 00001484 B108 mov cl, 8 0 00001486 D3E0 shl ax, cl 0 00001488 01D0 add ax, dx 0 0000148A BA6000 mov dx, 96 0 0000148D 8EC2 mov es, dx 0 0000148F 26A34000 mov word ptr es:[64], ax 824 _.L131: 0 00001493 89EC mov sp, bp 0 00001495 5D pop bp 0 00001496 5F pop di 0 00001497 5E pop si 0 00001498 C20200 ret 2 830 .size _sysVersion, .-_sysVersion 831 .type _sysScreenMode, @function 832 _sysScreenMode: 0 0000149B 55 push bp 0 0000149C 89E5 mov bp, sp 0 0000149E 83EC1A sub sp, 26 0 000014A1 8D46E6 lea ax, [-26+bp] 0 000014A4 50 push ax 0 000014A5 FF7604 push word ptr [bp+4] 0 000014A8 E849FE call _GetNumArg 0 000014AB 85C0 test ax, ax 0 000014AD 742F je _.L145 0 000014AF 8B46E6 mov ax, word ptr [bp-26] 0 000014B2 83F80F cmp ax, 15 0 000014B5 7E2D jle _.L150 0 000014B7 89C2 mov dx, ax 0 000014B9 83C2EF add dx, -17 0 000014BC 83FA02 cmp dx, 1+1 0 000014BF 7205 jc _.L151 0 000014C1 83F814 cmp ax, 20 0 000014C4 7518 jne _.L145 851 _.L151: 0 000014C6 BA1100 mov dx, 17 853 _.L147: 0 000014C9 8856E9 mov byte ptr [bp-23], dl 0 000014CC 8846E8 mov byte ptr [bp-24], al 0 000014CF C646EA00 mov byte ptr [bp-22], 0 0 000014D3 8D46E8 lea ax, [-24+bp] 0 000014D6 50 push ax 0 000014D7 B81000 mov ax, 16 0 000014DA 50 push ax 0 000014DB E8FEFF call _init_call_intr 862 _.L145: 0 000014DE 89EC mov sp, bp 0 000014E0 5D pop bp 0 000014E1 C20200 ret 2 866 _.L150: 0 000014E4 31D2 xor dx, dx 0 000014E6 EBE1 jmp _.L147 869 .size _sysScreenMode, .-_sysScreenMode 870 .type _Stacks, @function 871 _Stacks: 0 000014E8 56 push si 0 000014E9 57 push di 0 000014EA 55 push bp 0 000014EB 89E5 mov bp, sp 0 000014ED 1E push ds 0 000014EE 8D7EFE lea di, [-2+bp] 0 000014F1 57 push di 0 000014F2 FF7608 push word ptr [bp+8] 0 000014F5 E8FCFD call _GetNumArg 0 000014F8 BE0000 mov si, offset _Config 0 000014FB 8B56FE mov dx, word ptr [bp-2] 0 000014FE 88540C mov byte ptr [si+12], dl 0 00001501 50 push ax 0 00001502 E803FD call _skipwh 0 00001505 93 xchg bx, ax 0 00001506 803F2C cmp byte ptr [bx], 44 0 00001509 750C jne _.L160 0 0000150B 57 push di 0 0000150C 43 inc bx 0 0000150D 53 push bx 0 0000150E E8E3FD call _GetNumArg 0 00001511 8B46FE mov ax, word ptr [bp-2] 0 00001514 89440E mov word ptr [si+14], ax 895 _.L160: 0 00001517 8A440C mov al, byte ptr [si+12] 0 0000151A 84C0 test al, al 0 0000151C 7422 je _.L162 0 0000151E 837C0E1F cmp word ptr [si+14], 31 0 00001522 7706 ja _.L163 0 00001524 C7060E002000 mov word ptr [_Config+14], 32 902 _.L163: 0 0000152A 817C0E0002 cmp word ptr [si+14], 512 0 0000152F 7606 jbe _.L164 0 00001531 C7060E000002 mov word ptr [_Config+14], 512 906 _.L164: 0 00001537 3C40 cmp al, 64 0 00001539 7E05 jle _.L162 0 0000153B C6060C0040 mov byte ptr [_Config+12], 64 910 _.L162: 0 00001540 C6060D0000 mov byte ptr [_Config+13], 0 0 00001545 89EC mov sp, bp 0 00001547 5D pop bp 0 00001548 5F pop di 0 00001549 5E pop si 0 0000154A C20200 ret 2 917 .size _Stacks, .-_Stacks 918 .type _StacksHigh, @function 919 _StacksHigh: 0 0000154D 55 push bp 0 0000154E 89E5 mov bp, sp 0 00001550 FF7604 push word ptr [bp+4] 0 00001553 E892FF call _Stacks 0 00001556 C6060D0001 mov byte ptr [_Config+13], 1 0 0000155B 89EC mov sp, bp 0 0000155D 5D pop bp 0 0000155E C20200 ret 2 928 .size _StacksHigh, .-_StacksHigh 929 .type _Fcbs, @function 930 _Fcbs: 0 00001561 56 push si 0 00001562 57 push di 0 00001563 55 push bp 0 00001564 89E5 mov bp, sp 0 00001566 1E push ds 0 00001567 8D7EFE lea di, [-2+bp] 0 0000156A 57 push di 0 0000156B FF7608 push word ptr [bp+8] 0 0000156E E883FD call _GetNumArg 0 00001571 85C0 test ax, ax 0 00001573 742A je _.L169 0 00001575 BE0000 mov si, offset _Config 0 00001578 8B56FE mov dx, word ptr [bp-2] 0 0000157B 885404 mov byte ptr [si+4], dl 0 0000157E 50 push ax 0 0000157F E886FC call _skipwh 0 00001582 93 xchg bx, ax 0 00001583 803F2C cmp byte ptr [bx], 44 0 00001586 750C jne _.L171 0 00001588 57 push di 0 00001589 43 inc bx 0 0000158A 53 push bx 0 0000158B E866FD call _GetNumArg 0 0000158E 8B46FE mov ax, word ptr [bp-2] 0 00001591 884405 mov byte ptr [si+5], al 956 _.L171: 0 00001594 8A4404 mov al, byte ptr [si+4] 0 00001597 384405 cmp byte ptr [si+5], al 0 0000159A 7603 jbe _.L169 0 0000159C 884405 mov byte ptr [si+5], al 961 _.L169: 0 0000159F 89EC mov sp, bp 0 000015A1 5D pop bp 0 000015A2 5F pop di 0 000015A3 5E pop si 0 000015A4 C20200 ret 2 967 .size _Fcbs, .-_Fcbs 968 .type _CfgMenuDefault, @function 969 _CfgMenuDefault: 0 000015A7 55 push bp 0 000015A8 89E5 mov bp, sp 0 000015AA 1E push ds 0 000015AB C746FE0000 mov word ptr [bp-2], 0 0 000015B0 FF7604 push word ptr [bp+4] 0 000015B3 E852FC call _skipwh 0 000015B6 89C3 mov bx, ax 0 000015B8 803F3D cmp byte ptr [bx], 61 0 000015BB 740A je _.L178 0 000015BD 50 push ax 0 000015BE E83AF9 call _CfgFailure 981 _.L177: 0 000015C1 89EC mov sp, bp 0 000015C3 5D pop bp 0 000015C4 C20200 ret 2 985 _.L178: 0 000015C7 43 inc bx 0 000015C8 53 push bx 0 000015C9 E83CFC call _skipwh 0 000015CC 8D56FE lea dx, [-2+bp] 0 000015CF 52 push dx 0 000015D0 50 push ax 0 000015D1 E820FD call _GetNumArg 0 000015D4 8B56FE mov dx, word ptr [bp-2] 0 000015D7 88160000 mov byte ptr [_MenuSelected], dl 0 000015DB 50 push ax 0 000015DC E829FC call _skipwh 0 000015DF 93 xchg bx, ax 0 000015E0 803F2C cmp byte ptr [bx], 44 0 000015E3 75DC jne _.L177 0 000015E5 B80000 mov ax, offset _MenuTimeout 0 000015E8 50 push ax 0 000015E9 43 inc bx 0 000015EA 53 push bx 0 000015EB E806FD call _GetNumArg 0 000015EE EBD1 jmp _.L177 1006 .size _CfgMenuDefault, .-_CfgMenuDefault 1007 .type _CfgMenuColor, @function 1008 _CfgMenuColor: 0 000015F0 56 push si 0 000015F1 55 push bp 0 000015F2 89E5 mov bp, sp 0 000015F4 1E push ds 0 000015F5 1E push ds 0 000015F6 C746FE0000 mov word ptr [bp-2], 0 0 000015FB FF7606 push word ptr [bp+6] 0 000015FE E807FC call _skipwh 0 00001601 89C3 mov bx, ax 0 00001603 803F3D cmp byte ptr [bx], 61 0 00001606 7505 jne _.L183 0 00001608 40 inc ax 0 00001609 50 push ax 0 0000160A E8FBFB call _skipwh 1023 _.L183: 0 0000160D 8D76FE lea si, [-2+bp] 0 00001610 56 push si 0 00001611 50 push ax 0 00001612 E8DFFC call _GetNumArg 0 00001615 85C0 test ax, ax 0 00001617 742E je _.L182 0 00001619 8B56FE mov dx, word ptr [bp-2] 0 0000161C 8956FC mov word ptr [bp-4], dx 0 0000161F 50 push ax 0 00001620 E8E5FB call _skipwh 0 00001623 93 xchg bx, ax 0 00001624 30C0 xor al, al 0 00001626 803F2C cmp byte ptr [bx], 44 0 00001629 7511 jne _.L185 0 0000162B 43 inc bx 0 0000162C 53 push bx 0 0000162D E8D8FB call _skipwh 0 00001630 56 push si 0 00001631 50 push ax 0 00001632 E8BFFC call _GetNumArg 0 00001635 85C0 test ax, ax 0 00001637 740E je _.L182 0 00001639 8A46FE mov al, byte ptr [bp-2] 1047 _.L185: 0 0000163C B104 mov cl, 4 0 0000163E D2E0 shl al, cl 0 00001640 0A46FC or al, byte ptr [bp-4] 0 00001643 50 push ax 0 00001644 E88BF9 call _ClearScreen 1053 _.L182: 0 00001647 89EC mov sp, bp 0 00001649 5D pop bp 0 0000164A 5E pop si 0 0000164B C20200 ret 2 1058 .size _CfgMenuColor, .-_CfgMenuColor === Switch to base=012B40h -> ".RODATA.STR1.1" 1059 .section .rodata.str1.1 1060 _.LC9: 0 00000806 4D75737420737461 .string "Must start at 0xac..0x1de, not 0x100..0x104\n" 0 0000080E 7274206174203078 0 00000816 61632E2E30783164 0 0000081E 652C206E6F742030 0 00000826 783130302E2E3078 0 0000082E 3130340A00 === Switch to base=002270h -> ".TEXT" 1062 .text 1063 .type _CfgKeyBuf, @function 1064 _CfgKeyBuf: 0 0000164E 55 push bp 0 0000164F 89E5 mov bp, sp 0 00001651 1E push ds 0 00001652 1E push ds 0 00001653 8D46FC lea ax, [-4+bp] 0 00001656 50 push ax 0 00001657 FF7604 push word ptr [bp+4] 0 0000165A E897FC call _GetNumArg 0 0000165D 85C0 test ax, ax 0 0000165F 746E je _.L195 0 00001661 50 push ax 0 00001662 E8A3FB call _skipwh 0 00001665 93 xchg bx, ax 0 00001666 8B46FC mov ax, word ptr [bp-4] 0 00001669 B0FF mov al, 255 0 0000166B 40 inc ax 0 0000166C 8946FE mov word ptr [bp-2], ax 0 0000166F 803F2C cmp byte ptr [bx], 44 0 00001672 744E je _.L197 1084 _.L200: 0 00001674 8B56FC mov dx, word ptr [bp-4] 0 00001677 83E2FE and dx, -2 0 0000167A 8956FC mov word ptr [bp-4], dx 0 0000167D 8B46FE mov ax, word ptr [bp-2] 0 00001680 83E0FE and ax, -2 0 00001683 8946FE mov word ptr [bp-2], ax 0 00001686 39C2 cmp dx, ax 0 00001688 7F11 jg _.L198 0 0000168A 89C1 mov cx, ax 0 0000168C 29D1 sub cx, dx 0 0000168E 83F920 cmp cx, 32 0 00001691 7E08 jle _.L198 0 00001693 48 dec ax 0 00001694 31D0 xor ax, dx 0 00001696 F6C4FF test ah, -1 0 00001699 7405 je _.L201 1101 _.L198: 0 0000169B C746FC0000 mov word ptr [bp-4], 0 1103 _.L201: 0 000016A0 8B56FC mov dx, word ptr [bp-4] 0 000016A3 89D0 mov ax, dx 0 000016A5 FECC dec ah 0 000016A7 83F805 cmp ax, 4+1 0 000016AA 720A jc _.L206 0 000016AC 89D0 mov ax, dx 0 000016AE 0554FF add ax, -172 0 000016B1 3D3301 cmp ax, 306+1 0 000016B4 721F jc _.L202 1113 _.L206: 0 000016B6 B8B600 mov ax, offset _.LC9 0 000016B9 50 push ax 0 000016BA E8FEFF call _init_printf 0 000016BD 83C402 add sp, 2 0 000016C0 EB0D jmp _.L195 1119 _.L197: 0 000016C2 43 inc bx 0 000016C3 8D46FE lea ax, [-2+bp] 0 000016C6 50 push ax 0 000016C7 53 push bx 0 000016C8 E829FC call _GetNumArg 0 000016CB 85C0 test ax, ax 0 000016CD 75A5 jne _.L200 1127 _.L195: 0 000016CF 89EC mov sp, bp 0 000016D1 5D pop bp 0 000016D2 C20200 ret 2 1131 _.L202: 0 000016D5 B84000 mov ax, 64 0 000016D8 8EC0 mov es, ax 0 000016DA 2689161A00 mov word ptr es:[26], dx 0 000016DF 8B56FC mov dx, word ptr [bp-4] 0 000016E2 2689161C00 mov word ptr es:[28], dx 0 000016E7 8B56FC mov dx, word ptr [bp-4] 0 000016EA 2689168000 mov word ptr es:[128], dx 0 000016EF 8B56FE mov dx, word ptr [bp-2] 0 000016F2 2689168200 mov word ptr es:[130], dx 0 000016F7 E8FEFF call _keycheck 0 000016FA EBD3 jmp _.L195 1143 .size _CfgKeyBuf, .-_CfgKeyBuf 1144 .type _CfgSwitches, @function 1145 _CfgSwitches: 0 000016FC 56 push si 0 000016FD 57 push di 0 000016FE 55 push bp 0 000016FF 89E5 mov bp, sp 0 00001701 1E push ds 0 00001702 FF7608 push word ptr [bp+8] 0 00001705 E800FB call _skipwh 0 00001708 96 xchg si, ax 0 00001709 803C3D cmp byte ptr [si], 61 0 0000170C 7506 jne _.L220 0 0000170E 46 inc si 0 0000170F 56 push si 1158 _.L245: 0 00001710 E8F5FA call _skipwh 0 00001713 96 xchg si, ax 1161 _.L220: 0 00001714 8A04 mov al, byte ptr [si] 0 00001716 84C0 test al, al 0 00001718 750D jne _.L236 0 0000171A C606E30101 mov byte ptr [_commands+2], 1 0 0000171F 89EC mov sp, bp 0 00001721 5D pop bp 0 00001722 5F pop di 0 00001723 5E pop si 0 00001724 C20200 ret 2 1171 _.L236: 0 00001727 3C2F cmp al, 47 0 00001729 7403E9AD00 jne _.L221 0 0000172E 8D7C01 lea di, [1+si] 0 00001731 8A5401 mov dl, byte ptr [si+1] 0 00001734 88D6 mov dh, dl 0 00001736 80C69F add dh, -97 0 00001739 80FE19 cmp dh, 25 0 0000173C 7703 ja _.L222 0 0000173E 80C2E0 add dl, -32 1181 _.L222: 0 00001741 80FA46 cmp dl, 70 0 00001744 7436 je _.L224 0 00001746 7F0B jg _.L225 0 00001748 80FA45 cmp dl, 69 0 0000174B 7436 je _.L226 1187 _.L223: 0 0000174D 57 push di 0 0000174E E8AAF7 call _CfgFailure 0 00001751 EB23 jmp _.L229 1191 _.L225: 0 00001753 80FA4B cmp dl, 75 0 00001756 740C je _.L227 0 00001758 80FA4E cmp dl, 78 0 0000175B 75F0 jne _.L223 0 0000175D C6060A00FF mov byte ptr [_InitKernelConfig+10], -1 0 00001762 EB12 jmp _.L229 1198 _.L227: 0 00001764 803EE30101 cmp byte ptr [_commands+2], 1 0 00001769 750B jne _.L229 0 0000176B BA0000 mov dx, offset _kbdType@OZSEG16 0 0000176E 8EC2 mov es, dx 0 00001770 26C606000000 mov byte ptr es:[_kbdType], 0 1204 _.L229: 0 00001776 8D4501 lea ax, [1+di] 0 00001779 50 push ax 0 0000177A EB94 jmp _.L245 1208 _.L224: 0 0000177C C6060A0000 mov byte ptr [_InitKernelConfig+10], 0 0 00001781 EBF3 jmp _.L229 1211 _.L226: 0 00001783 C746FE0000 mov word ptr [bp-2], 0 0 00001788 8A6402 mov ah, byte ptr [si+2] 0 0000178B 80FC3A cmp ah, 58 0 0000178E 7415 je _.L230 0 00001790 8D5402 lea dx, [2+si] 1217 _.L231: 0 00001793 88E0 mov al, ah 0 00001795 04D0 add al, -48 0 00001797 3C0A cmp al, 9+1 0 00001799 7212 jc _.L232 0 0000179B 80FC2D cmp ah, 45 0 0000179E 740D je _.L232 0 000017A0 4A dec dx 0 000017A1 89D7 mov di, dx 0 000017A3 EBD1 jmp _.L229 1227 _.L230: 0 000017A5 8D5403 lea dx, [3+si] 0 000017A8 8A6403 mov ah, byte ptr [si+3] 0 000017AB EBE6 jmp _.L231 1231 _.L232: 0 000017AD 8D46FE lea ax, [-2+bp] 0 000017B0 50 push ax 0 000017B1 52 push dx 0 000017B2 E83FFB call _GetNumArg 0 000017B5 48 dec ax 0 000017B6 97 xchg di, ax 0 000017B7 8B56FE mov dx, word ptr [bp-2] 0 000017BA 83FAFF cmp dx, -1 0 000017BD 7506 jne _.L234 1241 _.L244: 0 000017BF 89161100 mov word ptr [_Config+17], dx 0 000017C3 EBB1 jmp _.L229 1244 _.L234: 0 000017C5 89D1 mov cx, dx 0 000017C7 83C1D0 add cx, -48 0 000017CA 81F9D003 cmp cx, 976 0 000017CE 7603E97AFF ja _.L223 0 000017D3 83C20F add dx, 15 0 000017D6 83E2F0 and dx, -16 0 000017D9 EBE4 jmp _.L244 1252 _.L221: 0 000017DB 56 push si 0 000017DC E81CF7 call _CfgFailure 0 000017DF 89F7 mov di, si 0 000017E1 EB93 jmp _.L229 1257 .size _CfgSwitches, .-_CfgSwitches 1258 .type _CfgLastdrive, @function 1259 _CfgLastdrive: 0 000017E3 55 push bp 0 000017E4 89E5 mov bp, sp 0 000017E6 FF7604 push word ptr [bp+4] 0 000017E9 E81CFA call _skipwh 0 000017EC 89C3 mov bx, ax 0 000017EE 8A37 mov dh, byte ptr [bx] 0 000017F0 88F2 mov dl, dh 0 000017F2 80C29F add dl, -97 0 000017F5 80FA19 cmp dl, 25 0 000017F8 7703 ja _.L247 0 000017FA 80C6E0 add dh, -32 1271 _.L247: 0 000017FD 88F2 mov dl, dh 0 000017FF 80C2BF add dl, -65 0 00001802 80FA19 cmp dl, 25 0 00001805 7609 jbe _.L248 0 00001807 894604 mov word ptr [bp+4], ax 0 0000180A 89EC mov sp, bp 0 0000180C 5D pop bp 0 0000180D E9EBF6 jmp _CfgFailure 1280 _.L248: 0 00001810 80C6C0 add dh, -64 0 00001813 BB0000 mov bx, offset _Config 0 00001816 8A570A mov dl, byte ptr [bx+10] 0 00001819 38F2 cmp dl, dh 0 0000181B 7303 jnc _.L249 0 0000181D 88770A mov byte ptr [bx+10], dh 1287 _.L249: 0 00001820 C6060B0000 mov byte ptr [_Config+11], 0 0 00001825 89EC mov sp, bp 0 00001827 5D pop bp 0 00001828 C20200 ret 2 1292 .size _CfgLastdrive, .-_CfgLastdrive 1293 .type _CfgLastdriveHigh, @function 1294 _CfgLastdriveHigh: 0 0000182B 55 push bp 0 0000182C 89E5 mov bp, sp 0 0000182E FF7604 push word ptr [bp+4] 0 00001831 E8AFFF call _CfgLastdrive 0 00001834 C6060B0001 mov byte ptr [_Config+11], 1 0 00001839 89EC mov sp, bp 0 0000183B 5D pop bp 0 0000183C C20200 ret 2 1303 .size _CfgLastdriveHigh, .-_CfgLastdriveHigh 1304 .type _mumcb_init, @function 1305 _mumcb_init: 0 0000183F 55 push bp 0 00001840 89E5 mov bp, sp 0 00001842 BB6B00 mov bx, offset _near_mcb.2446 0 00001845 8B4606 mov ax, word ptr [bp+6] 0 00001848 894703 mov word ptr [bx+3], ax 0 0000184B B81000 mov ax, 16 0 0000184E 50 push ax 0 0000184F 16 push ss 0 00001850 53 push bx 0 00001851 FF7604 push word ptr [bp+4] 0 00001854 31C0 xor ax, ax 0 00001856 50 push ax 0 00001857 E8FEFF call _init_fmemcpy 0 0000185A 89EC mov sp, bp 0 0000185C 5D pop bp 0 0000185D C20400 ret 4 1322 .size _mumcb_init, .-_mumcb_init 1323 .global _findend 1324 .type _findend, @function 1325 _findend: 0 00001860 56 push si 0 00001861 57 push di 0 00001862 55 push bp 0 00001863 89E5 mov bp, sp 0 00001865 8B7E08 mov di, word ptr [bp+8] 1331 _.L256: 0 00001868 89FE mov si, di 0 0000186A 2B7608 sub si, word ptr [bp+8] 0 0000186D 803D00 cmp byte ptr [di], 0 0 00001870 7509 jne _.L258 1336 _.L255: 0 00001872 96 xchg si, ax 0 00001873 89EC mov sp, bp 0 00001875 5D pop bp 0 00001876 5F pop di 0 00001877 5E pop si 0 00001878 C20200 ret 2 1343 _.L258: 0 0000187B 57 push di 0 0000187C E889F9 call _skipwh 0 0000187F 29F8 sub ax, di 0 00001881 83F809 cmp ax, 9 0 00001884 7FEC jg _.L255 0 00001886 47 inc di 0 00001887 EBDF jmp _.L256 1351 .size _findend, .-_findend 1352 .type _CfgMenu, @function 1353 _CfgMenu: 0 00001889 56 push si 0 0000188A 57 push di 0 0000188B 55 push bp 0 0000188C 89E5 mov bp, sp 0 0000188E 1E push ds 0 0000188F 1E push ds 0 00001890 FF7608 push word ptr [bp+8] 0 00001893 B80000 mov ax, offset _.LC0 0 00001896 50 push ax 0 00001897 E8FEFF call _init_printf 0 0000189A 83C404 add sp, 4 0 0000189D 833E0000FF cmp word ptr [_MenuColor], -1 0 000018A2 7472 je _.L261 0 000018A4 FF7608 push word ptr [bp+8] 0 000018A7 E85EF9 call _skipwh 0 000018AA 93 xchg bx, ax 1370 _.L263: 0 000018AB 8A07 mov al, byte ptr [bx] 0 000018AD 0450 add al, 80 0 000018AF 3C2F cmp al, 47 0 000018B1 766B jbe _.L264 0 000018B3 53 push bx 0 000018B4 E851F9 call _skipwh 0 000018B7 96 xchg si, ax 0 000018B8 8A04 mov al, byte ptr [si] 0 000018BA 88C4 mov ah, al 0 000018BC 80C4D0 add ah, -48 0 000018BF 80FC09 cmp ah, 9 0 000018C2 774E ja _.L265 0 000018C4 98 cbw 0 000018C5 83C0D0 add ax, -48 0 000018C8 8946FE mov word ptr [bp-2], ax 0 000018CB B8BE0A mov ax, offset _MenuStruct 0 000018CE 8EC0 mov es, ax 0 000018D0 B85500 mov ax, 85 0 000018D3 F766FE mul word ptr [bp-2] 0 000018D6 93 xchg bx, ax 0 000018D7 89F2 mov dx, si 0 000018D9 2B5608 sub dx, word ptr [bp+8] 0 000018DC 8CC7 mov di, es 0 000018DE 8911 mov word ptr [bx+di], dx 0 000018E0 8B160000 mov dx, word ptr [_nMenuLine] 0 000018E4 895102 mov word ptr [bx+di+2], dx 0 000018E7 56 push si 0 000018E8 E8FEFF call _findend 0 000018EB 83F84F cmp ax, 79 0 000018EE 7E03 jle _.L266 0 000018F0 B84F00 mov ax, 79 1402 _.L266: 0 000018F3 50 push ax 0 000018F4 8946FC mov word ptr [bp-4], ax 0 000018F7 56 push si 0 000018F8 B85500 mov ax, 85 0 000018FB F766FE mul word ptr [bp-2] 0 000018FE 97 xchg di, ax 0 000018FF 8D95C30A lea dx, [_MenuStruct+5+di] 0 00001903 52 push dx 0 00001904 E8FEFF call _init_memcpy 0 00001907 8B46FC mov ax, word ptr [bp-4] 0 0000190A 96 xchg si, ax 0 0000190B 89FB mov bx, di 0 0000190D C680C30A00 mov byte ptr [bx+si+_MenuStruct+5], 0 1416 _.L265: 0 00001912 FF060000 inc word ptr [_nMenuLine] 1418 _.L261: 0 00001916 89EC mov sp, bp 0 00001918 5D pop bp 0 00001919 5F pop di 0 0000191A 5E pop si 0 0000191B C20200 ret 2 1424 _.L264: 0 0000191E 43 inc bx 0 0000191F EB8A jmp _.L263 1427 .size _CfgMenu, .-_CfgMenu 1428 .global _configDone 1429 .type _configDone, @function 1430 _configDone: 0 00001921 833E000001 cmp word ptr [_UmbState], 1 0 00001926 750A jne _.L269 0 00001928 8E063C0A mov es, word ptr [_base_seg] 0 0000192C 26C60600005A mov byte ptr es:[0], 90 1435 _.L269: 0 00001932 803E000002 cmp byte ptr [_HMAState], 2 0 00001937 7425 je _.L268 0 00001939 A10000 mov ax, word ptr [_HMAFree] 0 0000193C 83C00F add ax, 15 0 0000193F B104 mov cl, 4 0 00001941 D3E8 shr ax, cl 0 00001943 50 push ax 0 00001944 E8FEFF call _allocmem 0 00001947 89C2 mov dx, ax 0 00001949 4A dec dx 0 0000194A 8EC2 mov es, dx 0 0000194C 26C70608005343 mov word ptr es:[8], 17235 0 00001953 26C70601000800 mov word ptr es:[1], 8 0 0000195A 50 push ax 0 0000195B E8FEFF call _MoveKernel 1451 _.L268: 0 0000195E C3 ret 1453 .size _configDone, .-_configDone 1454 .global _GetBiosKey 1455 .type _GetBiosKey, @function 1456 _GetBiosKey: 0 0000195F 56 push si 0 00001960 57 push di 0 00001961 55 push bp 0 00001962 89E5 mov bp, sp 0 00001964 83EC1E sub sp, 30 0 00001967 8B4608 mov ax, word ptr [bp+8] 0 0000196A BE6C04 mov si, 1132 0 0000196D 31D2 xor dx, dx 0 0000196F 8EC2 mov es, dx 0 00001971 268B3C mov di, word ptr es:[si] 0 00001974 39D0 cmp ax, dx 0 00001976 B91600 mov cx, 22 0 00001979 7C4F jl _.L272 0 0000197B BA1200 mov dx, 18 0 0000197E F7E2 mul dx 0 00001980 8946E6 mov word ptr [bp-26], ax 1473 _.L275: 0 00001983 C746E80001 mov word ptr [bp-24], 256 0 00001988 8D56E8 lea dx, [-24+bp] 0 0000198B 52 push dx 0 0000198C 8956E2 mov word ptr [bp-30], dx 0 0000198F 51 push cx 0 00001990 894EE4 mov word ptr [bp-28], cx 0 00001993 E8FEFF call _init_call_intr 0 00001996 8B46FE mov ax, word ptr [bp-2] 0 00001999 83E040 and ax, 64 0 0000199C 8B4EE4 mov cx, word ptr [bp-28] 0 0000199F 8B56E2 mov dx, word ptr [bp-30] 0 000019A2 750D jne _.L273 0 000019A4 8946E8 mov word ptr [bp-24], ax 0 000019A7 52 push dx 1488 _.L278: 0 000019A8 51 push cx 0 000019A9 E8FEFF call _init_call_intr 0 000019AC 8B46E8 mov ax, word ptr [bp-24] 0 000019AF EB11 jmp _.L271 1493 _.L273: 0 000019B1 31C0 xor ax, ax 0 000019B3 8EC0 mov es, ax 0 000019B5 268B04 mov ax, word ptr es:[si] 0 000019B8 29F8 sub ax, di 0 000019BA 3B46E6 cmp ax, word ptr [bp-26] 0 000019BD 72C4 jc _.L275 0 000019BF B8FFFF mov ax, -1 1501 _.L271: 0 000019C2 89EC mov sp, bp 0 000019C4 5D pop bp 0 000019C5 5F pop di 0 000019C6 5E pop si 0 000019C7 C20200 ret 2 1507 _.L272: 0 000019CA 8956E8 mov word ptr [bp-24], dx 0 000019CD 8D46E8 lea ax, [-24+bp] 0 000019D0 50 push ax 0 000019D1 EBD5 jmp _.L278 1512 .size _GetBiosKey, .-_GetBiosKey === Switch to base=012B40h -> ".RODATA.STR1.1" 1513 .section .rodata.str1.1 1514 _.LC10: 0 00000833 4F4E2000 .string "ON " 1516 _.LC11: 0 00000837 4F464600 .string "OFF" 1518 _.LC12: 0 0000083B 6572726F72202D20 .string "error - line overflow line %d \n" 0 00000843 6C696E65206F7665 0 0000084B 72666C6F77206C69 0 00000853 6E65202564200A00 1520 _.LC13: 0 0000085B 5072657373204638 .string "Press F8 to trace or F5 to skip CONFIG.SYS/AUTOEXEC.BAT" 0 00000863 20746F2074726163 0 0000086B 65206F7220463520 0 00000873 746F20736B697020 0 0000087B 434F4E4649472E53 0 00000883 59532F4155544F45 0 0000088B 5845432E42415400 1522 _.LC14: 0 00000893 536B697070696E67 .string "Skipping CONFIG.SYS/AUTOEXEC.BAT\n" 0 0000089B 20434F4E4649472E 0 000008A3 5359532F4155544F 0 000008AB 455845432E424154 0 000008B3 0A00 1524 _.LC15: 0 000008B5 00 .string "" 1526 _.LC16: 0 000008B6 0D253739730D00 .string "\r%79s\r" 1528 _.LC17: 0 000008BD 25735B592C4E5D3F .string "%s[Y,N]?" 0 000008C5 00 1530 _.LC18: 0 000008C6 4E0A00 .string "N\n" 1532 _.LC19: 0 000008C9 590A00 .string "Y\n" 1534 _.LC20: 0 000008CC 53656C6563742066 .string "Select from Menu [" 0 000008D4 726F6D204D656E75 0 000008DC 205B00 1536 _.LC21: 0 000008DF 256300 .string "%c" 1538 _.LC22: 0 000008E2 5D2C206F72207072 .string "], or press [ENTER]" 0 000008EA 657373205B454E54 0 000008F2 45525D00 1540 _.LC23: 0 000008F6 202853656C656374 .string " (Selection=%d) " 0 000008FE 696F6E3D25642920 0 00000906 00 1542 _.LC24: 0 00000907 2D202564200800 .string "- %d \b" 1544 _.LC25: 0 0000090E 2020202008080808 .string " \b\b\b\b\b" 0 00000916 0800 1546 _.LC26: 0 00000918 0D0A0A202000 .string "\r\n\n " 1548 _.LC27: 0 0000091E 202D00 .string " -" 1550 _.LC28: 0 00000921 2053696E676C6573 .string " Singlestepping (F8) is: %s \r" 0 00000929 74657070696E6720 0 00000931 284638292069733A 0 00000939 202573200D00 1552 _.LC29: 0 0000093F 0A00 .string "\n" 1554 _.LC30: 0 00000941 434F4E4649473D25 .string "CONFIG=%c" 0 00000949 6300 === Switch to base=002270h -> ".TEXT" 1556 .text 1557 .global _DoConfig 1558 .type _DoConfig, @function 1559 _DoConfig: 0 000019D3 56 push si 0 000019D4 57 push di 0 000019D5 55 push bp 0 000019D6 89E5 mov bp, sp 0 000019D8 83EC2E sub sp, 46 0 000019DB 837E0800 cmp word ptr [bp+8], 0 0 000019DF 750C jne _.L280 0 000019E1 B80000 mov ax, offset _HaltCpuWhileIdle@OZSEG16 0 000019E4 8EC0 mov es, ax 0 000019E6 8A4608 mov al, byte ptr [bp+8] 0 000019E9 26A20000 mov byte ptr es:[_HaltCpuWhileIdle], al 1571 _.L280: 0 000019ED A10000 mov ax, word ptr [_kernel_command_line_length] 0 000019F0 050000 add ax, offset _kernel_command_line 0 000019F3 8946D8 mov word ptr [bp-40], ax 0 000019F6 BE0000 mov si, offset _kernel_command_line 1576 _.L281: 0 000019F9 3B76D8 cmp si, word ptr [bp-40] 0 000019FC 7203E9B000 jnc _.L293 0 00001A01 89F1 mov cx, si 0 00001A03 EB01 jmp _.L294 1581 _.L282: 0 00001A05 41 inc cx 1583 _.L294: 0 00001A06 89CB mov bx, cx 0 00001A08 8A07 mov al, byte ptr [bx] 0 00001A0A 3C09 cmp al, 9 0 00001A0C 74F7 je _.L282 0 00001A0E 3C20 cmp al, 32 0 00001A10 74F3 je _.L282 0 00001A12 51 push cx 0 00001A13 894EDA mov word ptr [bp-38], cx 0 00001A16 BF2807 mov di, offset _commandbuffer.2117 0 00001A19 57 push di 0 00001A1A E8FEFF call _init_strcpy 0 00001A1D 57 push di 0 00001A1E E884F7 call _strupr 0 00001A21 C746DC0000 mov word ptr [bp-36], offset _configcommands.2125 0 00001A26 8B4EDA mov cx, word ptr [bp-38] 1599 _.L283: 0 00001A29 8B5EDC mov bx, word ptr [bp-36] 0 00001A2C 8B07 mov ax, word ptr [bx] 0 00001A2E 8946DA mov word ptr [bp-38], ax 0 00001A31 85C0 test ax, ax 0 00001A33 746E je _.L291 0 00001A35 894ED2 mov word ptr [bp-46], cx 0 00001A38 8B5EDC mov bx, word ptr [bp-36] 0 00001A3B 8B5702 mov dx, word ptr [bx+2] 0 00001A3E 52 push dx 0 00001A3F 8956D4 mov word ptr [bp-44], dx 0 00001A42 E8FEFF call _init_strlen 0 00001A45 50 push ax 0 00001A46 8946D6 mov word ptr [bp-42], ax 0 00001A49 8B56D4 mov dx, word ptr [bp-44] 0 00001A4C 52 push dx 0 00001A4D 57 push di 0 00001A4E E8FEFF call _init_memcmp 0 00001A51 85C0 test ax, ax 0 00001A53 8B4ED2 mov cx, word ptr [bp-46] 0 00001A56 7403E98A05 jne _.L284 0 00001A5B 8B5ED6 mov bx, word ptr [bp-42] 0 00001A5E 8A01 mov al, byte ptr [bx+di] 0 00001A60 3C3D cmp al, 61 0 00001A62 9F lahf 0 00001A63 D0E4 shl ah, 1 0 00001A65 99 cwd 0 00001A66 88D4 mov ah, dl 0 00001A68 F6DC neg ah 0 00001A6A 8866D6 mov byte ptr [bp-42], ah 0 00001A6D 3C09 cmp al, 9 0 00001A6F 9F lahf 0 00001A70 D0E4 shl ah, 1 0 00001A72 99 cwd 0 00001A73 F6DA neg dl 0 00001A75 8A66D6 mov ah, byte ptr [bp-42] 0 00001A78 08D4 or ah, dl 0 00001A7A 7507 jne _.L371 0 00001A7C A8DF test al, -33 0 00001A7E 7403E96205 jne _.L284 1639 _.L371: 0 00001A83 01CB add bx, cx 1641 _.L286: 0 00001A85 8A07 mov al, byte ptr [bx] 0 00001A87 3C09 cmp al, 9 0 00001A89 7423 je _.L287 0 00001A8B 3C20 cmp al, 32 0 00001A8D 741F je _.L287 0 00001A8F 3C3D cmp al, 61 0 00001A91 750B jne _.L288 1649 _.L290: 0 00001A93 43 inc bx 0 00001A94 8A07 mov al, byte ptr [bx] 0 00001A96 3C09 cmp al, 9 0 00001A98 74F9 je _.L290 0 00001A9A 3C20 cmp al, 32 0 00001A9C 74F5 je _.L290 1656 _.L288: 0 00001A9E 8B7EDA mov di, word ptr [bp-38] 0 00001AA1 891D mov word ptr [di], bx 1659 _.L291: 0 00001AA3 56 push si 0 00001AA4 E8FEFF call _init_strlen 0 00001AA7 93 xchg bx, ax 0 00001AA8 8D7001 lea si, [1+bx+si] 0 00001AAB E94BFF jmp _.L281 1665 _.L287: 0 00001AAE 43 inc bx 0 00001AAF EBD4 jmp _.L286 1668 _.L293: 0 00001AB1 BE0000 mov si, offset _configcommands.2125 1670 _.L295: 0 00001AB4 8B1C mov bx, word ptr [si] 0 00001AB6 85DB test bx, bx 0 00001AB8 7508 jne _.L299 1674 _.L279: 0 00001ABA 89EC mov sp, bp 0 00001ABC 5D pop bp 0 00001ABD 5F pop di 0 00001ABE 5E pop si 0 00001ABF C20200 ret 2 1680 _.L299: 0 00001AC2 8B1F mov bx, word ptr [bx] 0 00001AC4 803F00 cmp byte ptr [bx], 0 0 00001AC7 7505 jne _.L296 1684 _.L298: 0 00001AC9 83C604 add si, 4 0 00001ACC EBE6 jmp _.L295 1687 _.L296: 0 00001ACE 31FF xor di, di 0 00001AD0 57 push di 0 00001AD1 53 push bx 0 00001AD2 E8FEFF call _init_DosOpen 0 00001AD5 A30000 mov word ptr [_nFileDesc], ax 0 00001AD8 39F8 cmp ax, di 0 00001ADA 7CED jl _.L298 0 00001ADC 893E380A mov word ptr [_nCfgLine], di 1696 _.L336: 0 00001AE0 C70600003809 mov word ptr [_pLineStart], offset _szLine 0 00001AE6 BF3809 mov di, offset _szLine 1699 _.L301: 0 00001AE9 BE0100 mov si, 1 0 00001AEC 56 push si 0 00001AED 57 push di 0 00001AEE FF360000 push word ptr [_nFileDesc] 0 00001AF2 E8FEFF call _read 0 00001AF5 85C0 test ax, ax 0 00001AF7 8976DA mov word ptr [bp-38], si 0 00001AFA 7432 je _.L366 0 00001AFC 81FF350A cmp di, offset _szLine+253 0 00001B00 7219 jc _.L303 0 00001B02 57 push di 0 00001B03 E8F5F3 call _CfgFailure 0 00001B06 FF36380A push word ptr [_nCfgLine] 0 00001B0A B8EB00 mov ax, offset _.LC12 0 00001B0D 50 push ax 0 00001B0E E8FEFF call _init_printf 0 00001B11 83C404 add sp, 4 1717 _.L367: 0 00001B14 C746D80000 mov word ptr [bp-40], 0 0 00001B19 EB19 jmp _.L302 1720 _.L303: 0 00001B1B 8A05 mov al, byte ptr [di] 0 00001B1D 88C4 mov ah, al 0 00001B1F 80E4EF and ah, -17 0 00001B22 80FC0A cmp ah, 10 0 00001B25 74ED je _.L367 0 00001B27 3C0D cmp al, 13 0 00001B29 74BE je _.L301 0 00001B2B 47 inc di 0 00001B2C EBBB jmp _.L301 1730 _.L366: 0 00001B2E 8B46DA mov ax, word ptr [bp-38] 0 00001B31 8946D8 mov word ptr [bp-40], ax 1733 _.L302: 0 00001B34 C60500 mov byte ptr [di], 0 0 00001B37 837ED800 cmp word ptr [bp-40], 0 0 00001B3B 7503E97401 je _.L305 0 00001B40 8B1E0000 mov bx, word ptr [_nCurChain] 0 00001B44 85DB test bx, bx 0 00001B46 7503E96901 je _.L305 0 00001B4B 8D77FF lea si, [-1+bx] 0 00001B4E 89360000 mov word ptr [_nCurChain], si 0 00001B52 FF360000 push word ptr [_nFileDesc] 0 00001B56 E8FEFF call _close 0 00001B59 BF0000 mov di, offset _cfgFile 0 00001B5C 89F3 mov bx, si 0 00001B5E B102 mov cl, 2 0 00001B60 D3E3 shl bx, cl 0 00001B62 C401 les ax, dword ptr [bx+di] 0 00001B64 A30000 mov word ptr [_nFileDesc], ax 0 00001B67 8C06380A mov word ptr [_nCfgLine], es 0 00001B6B C746D80000 mov word ptr [bp-40], 0 1752 _.L306: 0 00001B70 FF06380A inc word ptr [_nCfgLine] 0 00001B74 837ED800 cmp word ptr [bp-40], 0 0 00001B78 7503E963FF je _.L336 0 00001B7D FF360000 push word ptr [_nFileDesc] 0 00001B81 E8FEFF call _close 0 00001B84 837E0800 cmp word ptr [bp+8], 0 0 00001B88 7403E92DFF jne _.L279 0 00001B8D A10000 mov ax, word ptr [_Menus] 0 00001B90 85C0 test ax, ax 0 00001B92 7503E923FF je _.L279 0 00001B97 C6060A00FF mov byte ptr [_InitKernelConfig+10], -1 0 00001B9C 833E0000FF cmp word ptr [_MenuColor], -1 0 00001BA1 7506 jne _.L339 0 00001BA3 83C801 or ax, 1 0 00001BA6 A30000 mov word ptr [_Menus], ax 1768 _.L339: 0 00001BA9 8306000002 add word ptr [_nMenuLine], 2 1770 _.L340: 0 00001BAE 833E0000FF cmp word ptr [_MenuColor], -1 0 00001BB3 7451 je _.L341 0 00001BB5 A00000 mov al, byte ptr [_MenuSelected] 0 00001BB8 8846DC mov byte ptr [bp-36], al 0 00001BBB 98 cbw 0 00001BBC 96 xchg si, ax 0 00001BBD BBBE0A mov bx, offset _MenuStruct 0 00001BC0 89DF mov di, bx 1779 _.L344: 0 00001BC2 807F0400 cmp byte ptr [bx+4], 0 0 00001BC6 7503E9E402 je _.L342 0 00001BCB C6470400 mov byte ptr [bx+4], 0 0 00001BCF 53 push bx 0 00001BD0 E85FF4 call _WriteMenuLine 1785 _.L343: 0 00001BD3 B85500 mov ax, 85 0 00001BD6 F7E6 mul si 0 00001BD8 93 xchg bx, ax 0 00001BD9 C6410401 mov byte ptr [bx+di+4], 1 0 00001BDD B055 mov al, 85 0 00001BDF F66EDC imul byte ptr [bp-36] 0 00001BE2 05BE0A add ax, offset _MenuStruct 0 00001BE5 50 push ax 0 00001BE6 E849F4 call _WriteMenuLine 0 00001BE9 C646E902 mov byte ptr [bp-23], 2 0 00001BED C646EB00 mov byte ptr [bp-21], 0 0 00001BF1 C646EE03 mov byte ptr [bp-18], 3 0 00001BF5 A10000 mov ax, word ptr [_nMenuLine] 0 00001BF8 8846EF mov byte ptr [bp-17], al 0 00001BFB 8D46E8 lea ax, [-24+bp] 0 00001BFE 50 push ax 0 00001BFF B81000 mov ax, 16 0 00001C02 50 push ax 0 00001C03 E8FEFF call _init_call_intr 1805 _.L341: 0 00001C06 B87C01 mov ax, offset _.LC20 0 00001C09 50 push ax 0 00001C0A E8FEFF call _init_printf 0 00001C0D 83C402 add sp, 2 0 00001C10 BE3000 mov si, 48 0 00001C13 BF0100 mov di, 1 1812 _.L346: 0 00001C16 853E0000 test di, word ptr [_Menus] 0 00001C1A 740B je _.L345 0 00001C1C 56 push si 0 00001C1D B88F01 mov ax, offset _.LC21 0 00001C20 50 push ax 0 00001C21 E8FEFF call _init_printf 0 00001C24 83C404 add sp, 4 1820 _.L345: 0 00001C27 D1E7 shl di, 1 0 00001C29 46 inc si 0 00001C2A 83FE3A cmp si, 58 0 00001C2D 75E7 jne _.L346 0 00001C2F B89201 mov ax, offset _.LC22 0 00001C32 50 push ax 0 00001C33 E8FEFF call _init_printf 0 00001C36 83C402 add sp, 2 0 00001C39 833E0000FF cmp word ptr [_MenuColor], -1 0 00001C3E 740F je _.L347 0 00001C40 A00000 mov al, byte ptr [_MenuSelected] 0 00001C43 98 cbw 0 00001C44 50 push ax 0 00001C45 B8A601 mov ax, offset _.LC23 0 00001C48 50 push ax 0 00001C49 E8FEFF call _init_printf 0 00001C4C 83C404 add sp, 4 1838 _.L347: 0 00001C4F A10000 mov ax, word ptr [_MenuTimeout] 0 00001C52 85C0 test ax, ax 0 00001C54 7D03E96502 jl _.L348 0 00001C59 50 push ax 0 00001C5A B8B701 mov ax, offset _.LC24 0 00001C5D 50 push ax 0 00001C5E E8FEFF call _init_printf 0 00001C61 83C404 add sp, 4 1847 _.L349: 0 00001C64 833E0000FF cmp word ptr [_MenuColor], -1 0 00001C69 7503E95D02 je _.L350 0 00001C6E B8C801 mov ax, offset _.LC26 1851 _.L439: 0 00001C71 50 push ax 0 00001C72 E8FEFF call _init_printf 0 00001C75 83C402 add sp, 2 0 00001C78 803E000000 cmp byte ptr [_singleStep], 0 0 00001C7D 7503E94F02 je _.L369 0 00001C82 B8E300 mov ax, offset _.LC10 1858 _.L352: 0 00001C85 50 push ax 0 00001C86 B8D101 mov ax, offset _.LC28 0 00001C89 50 push ax 0 00001C8A E8FEFF call _init_printf 0 00001C8D 83C404 add sp, 4 0 00001C90 A10000 mov ax, word ptr [_MenuTimeout] 0 00001C93 99 cwd 0 00001C94 83CA01 or dx, 1 0 00001C97 52 push dx 0 00001C98 E8FEFF call _GetBiosKey 0 00001C9B 83F8FF cmp ax, -1 0 00001C9E 7403E93402 jne _.L354 0 00001CA3 A10000 mov ax, word ptr [_MenuTimeout] 0 00001CA6 85C0 test ax, ax 0 00001CA8 7F03E93A02 jle _.L356 0 00001CAD 48 dec ax 0 00001CAE A30000 mov word ptr [_MenuTimeout], ax 0 00001CB1 E9FAFE jmp _.L340 1877 _.L305: 0 00001CB4 FF76DA push word ptr [bp-38] 0 00001CB7 BF3808 mov di, offset _szBuf 0 00001CBA 57 push di 0 00001CBB B83809 mov ax, offset _szLine 0 00001CBE 50 push ax 0 00001CBF E86BF5 call _scan 0 00001CC2 8946DC mov word ptr [bp-36], ax 0 00001CC5 803D00 cmp byte ptr [di], 0 0 00001CC8 7503E9A3FE je _.L306 0 00001CCD BEE101 mov si, offset _commands 1888 _.L307: 0 00001CD0 8B1C mov bx, word ptr [si] 0 00001CD2 803F00 cmp byte ptr [bx], 0 0 00001CD5 7409 je _.L308 0 00001CD7 57 push di 0 00001CD8 53 push bx 0 00001CD9 E8E8F4 call _strcaseequal 0 00001CDC 84C0 test al, al 0 00001CDE 741F je _.L309 1897 _.L308: 0 00001CE0 8A4402 mov al, byte ptr [si+2] 0 00001CE3 84C0 test al, al 0 00001CE5 7C09 jl _.L310 0 00001CE7 98 cbw 0 00001CE8 394608 cmp word ptr [bp+8], ax 0 00001CEB 7403E980FE jne _.L306 1904 _.L310: 0 00001CF0 837E0800 cmp word ptr [bp+8], 0 0 00001CF4 750E jne _.L311 0 00001CF6 FF76DC push word ptr [bp-36] 0 00001CF9 FF5403 call word ptr [si+3] 0 00001CFC E971FE jmp _.L306 1910 _.L309: 0 00001CFF 83C605 add si, 5 0 00001D02 EBCC jmp _.L307 1913 _.L311: 0 00001D04 8B3E0000 mov di, word ptr [_pLineStart] 0 00001D08 8A160A00 mov dl, byte ptr [_InitKernelConfig+10] 0 00001D0C 84D2 test dl, dl 0 00001D0E 7C3C jl _.L312 0 00001D10 7410 je _.L313 0 00001D12 8856D6 mov byte ptr [bp-42], dl 0 00001D15 B80B01 mov ax, offset _.LC13 0 00001D18 50 push ax 0 00001D19 E8FEFF call _init_printf 0 00001D1C 83C402 add sp, 2 0 00001D1F 8A56D6 mov dl, byte ptr [bp-42] 1925 _.L313: 0 00001D22 88D0 mov al, dl 0 00001D24 8856D6 mov byte ptr [bp-42], dl 0 00001D27 98 cbw 0 00001D28 50 push ax 0 00001D29 E8FEFF call _GetBiosKey 0 00001D2C C6060A00FF mov byte ptr [_InitKernelConfig+10], -1 0 00001D31 3D003F cmp ax, 16128 0 00001D34 8A56D6 mov dl, byte ptr [bp-42] 0 00001D37 751F jne _.L314 0 00001D39 C606000001 mov byte ptr [_SkipAllConfig], 1 0 00001D3E 84D2 test dl, dl 0 00001D40 7524 jne _.L315 1938 _.L318: 0 00001D42 B84301 mov ax, offset _.LC14 0 00001D45 50 push ax 0 00001D46 E8FEFF call _init_printf 0 00001D49 83C402 add sp, 2 1943 _.L312: 0 00001D4C 803E000000 cmp byte ptr [_SkipAllConfig], 0 0 00001D51 7403E91AFE jne _.L306 0 00001D56 EB23 jmp _.L319 1947 _.L314: 0 00001D58 3D0042 cmp ax, 16896 0 00001D5B 7505 jne _.L317 0 00001D5D C606000001 mov byte ptr [_singleStep], 1 1951 _.L317: 0 00001D62 84D2 test dl, dl 0 00001D64 740E je _.L316 1954 _.L315: 0 00001D66 B86501 mov ax, offset _.LC15 0 00001D69 50 push ax 0 00001D6A B86601 mov ax, offset _.LC16 0 00001D6D 50 push ax 0 00001D6E E8FEFF call _init_printf 0 00001D71 83C404 add sp, 4 1961 _.L316: 0 00001D74 803E000000 cmp byte ptr [_SkipAllConfig], 0 0 00001D79 75C7 jne _.L318 1964 _.L319: 0 00001D7B A10000 mov ax, word ptr [_MenuLine] 0 00001D7E 85C0 test ax, ax 0 00001D80 7410 je _.L320 0 00001D82 8A0E0000 mov cl, byte ptr [_MenuSelected] 0 00001D86 8B56DA mov dx, word ptr [bp-38] 0 00001D89 D3E2 shl dx, cl 0 00001D8B 85C2 test dx, ax 0 00001D8D 7503E9DEFD je _.L306 1973 _.L320: 0 00001D92 803E000000 cmp byte ptr [_DontAskThisSingleCommand], 0 0 00001D97 7552 jne _.L321 0 00001D99 803E000000 cmp byte ptr [_askThisSingleCommand], 0 0 00001D9E 7507 jne _.L368 0 00001DA0 803E000000 cmp byte ptr [_singleStep], 0 0 00001DA5 7444 je _.L321 1980 _.L368: 0 00001DA7 31D2 xor dx, dx 1982 _.L323: 0 00001DA9 3B160000 cmp dx, word ptr [_nCurChain] 0 00001DAD 7C7A jl _.L324 0 00001DAF 57 push di 0 00001DB0 B86D01 mov ax, offset _.LC17 0 00001DB3 50 push ax 0 00001DB4 E8FEFF call _init_printf 0 00001DB7 83C404 add sp, 4 1990 _.L332: 0 00001DBA B8FFFF mov ax, -1 0 00001DBD 50 push ax 0 00001DBE E8FEFF call _GetBiosKey 0 00001DC1 88C2 mov dl, al 0 00001DC3 88C6 mov dh, al 0 00001DC5 80C69F add dh, -97 0 00001DC8 80FE19 cmp dh, 25 0 00001DCB 7703 ja _.L326 0 00001DCD 80C2E0 add dl, -32 2000 _.L326: 0 00001DD0 80FA1B cmp dl, 27 0 00001DD3 747F je _.L328 0 00001DD5 7F66 jg _.L329 0 00001DD7 80FA0A cmp dl, 10 0 00001DDA 7405 je _.L330 0 00001DDC 80FA0D cmp dl, 13 2007 _.L437: 0 00001DDF 757A jne _.L327 2009 _.L330: 0 00001DE1 B87901 mov ax, offset _.LC19 0 00001DE4 50 push ax 0 00001DE5 E8FEFF call _init_printf 0 00001DE8 83C402 add sp, 2 2014 _.L321: 0 00001DEB 8B7403 mov si, word ptr [si+3] 0 00001DEE 81FE1100 cmp si, offset _CfgMenuEsc 0 00001DF2 7503E98300 je _.L365 0 00001DF7 81FEC609 cmp si, offset _CfgMenu 0 00001DFB 747D je _.L365 0 00001DFD 8B5EDC mov bx, word ptr [bp-36] 0 00001E00 8A07 mov al, byte ptr [bx] 0 00001E02 88C4 mov ah, al 0 00001E04 80F420 xor ah, 32 0 00001E07 80FC01 cmp ah, 1 0 00001E0A 18D2 sbb dl, dl 0 00001E0C FEC2 inc dl 0 00001E0E 88C4 mov ah, al 0 00001E10 80F409 xor ah, 9 0 00001E13 80FC01 cmp ah, 1 0 00001E16 18E4 sbb ah, ah 0 00001E18 FEC4 inc ah 0 00001E1A 84E2 test dl, ah 0 00001E1C 7453 je _.L333 0 00001E1E 3C3D cmp al, 61 0 00001E20 744F je _.L333 0 00001E22 53 push bx 0 00001E23 E8D5F0 call _CfgFailure 0 00001E26 E947FD jmp _.L306 2039 _.L324: 0 00001E29 8956D6 mov word ptr [bp-42], dx 0 00001E2C B82B00 mov ax, offset _.LC3 0 00001E2F 50 push ax 0 00001E30 E8FEFF call _init_printf 0 00001E33 8B56D6 mov dx, word ptr [bp-42] 0 00001E36 42 inc dx 0 00001E37 83C402 add sp, 2 0 00001E3A E96CFF jmp _.L323 2048 _.L329: 0 00001E3D 80FA4E cmp dl, 78 0 00001E40 7405 je _.L331 0 00001E42 80FA59 cmp dl, 89 0 00001E45 EB98 jmp _.L437 2053 _.L331: 0 00001E47 B87601 mov ax, offset _.LC18 0 00001E4A 50 push ax 0 00001E4B E8FEFF call _init_printf 2057 _.L438: 0 00001E4E 83C402 add sp, 2 0 00001E51 E91CFD jmp _.L306 2060 _.L328: 0 00001E54 C606000000 mov byte ptr [_singleStep], 0 0 00001E59 EB86 jmp _.L330 2063 _.L327: 0 00001E5B 3D003F cmp ax, 16128 0 00001E5E 7403E957FF jne _.L332 0 00001E63 B87601 mov ax, offset _.LC18 0 00001E66 50 push ax 0 00001E67 E8FEFF call _init_printf 0 00001E6A C606000001 mov byte ptr [_SkipAllConfig], 1 0 00001E6F EBDD jmp _.L438 2071 _.L333: 0 00001E71 FF76DC push word ptr [bp-36] 0 00001E74 E891F3 call _skipwh 0 00001E77 8946DC mov word ptr [bp-36], ax 2075 _.L365: 0 00001E7A 81FEC609 cmp si, offset _CfgMenu 0 00001E7E 9F lahf 0 00001E7F D0E4 shl ah, 1 0 00001E81 99 cwd 0 00001E82 88D0 mov al, dl 0 00001E84 F6D8 neg al 0 00001E86 81FE1100 cmp si, offset _CfgMenuEsc 0 00001E8A 9F lahf 0 00001E8B D0E4 shl ah, 1 0 00001E8D 99 cwd 0 00001E8E F6DA neg dl 0 00001E90 08D0 or al, dl 0 00001E92 7508 jne _.L372 0 00001E94 8B5EDC mov bx, word ptr [bp-36] 0 00001E97 803F3D cmp byte ptr [bx], 61 0 00001E9A 750B jne _.L334 2092 _.L372: 0 00001E9C 8B46DC mov ax, word ptr [bp-36] 0 00001E9F 40 inc ax 0 00001EA0 50 push ax 0 00001EA1 E864F3 call _skipwh 0 00001EA4 8946DC mov word ptr [bp-36], ax 2098 _.L334: 0 00001EA7 FF76DC push word ptr [bp-36] 0 00001EAA FFD6 call si 0 00001EAC E9C1FC jmp _.L306 2102 _.L342: 0 00001EAF 83C355 add bx, 85 0 00001EB2 81FB100E cmp bx, offset _MenuStruct+850 0 00001EB6 7303E907FD jc _.L344 0 00001EBB E915FD jmp _.L343 2107 _.L348: 0 00001EBE B8BE01 mov ax, offset _.LC25 0 00001EC1 50 push ax 0 00001EC2 E8FEFF call _init_printf 0 00001EC5 83C402 add sp, 2 0 00001EC8 E999FD jmp _.L349 2113 _.L350: 0 00001ECB B8CE01 mov ax, offset _.LC27 0 00001ECE E9A0FD jmp _.L439 2116 _.L369: 0 00001ED1 B8E700 mov ax, offset _.LC11 0 00001ED4 E9AEFD jmp _.L352 2119 _.L354: 0 00001ED7 C7060000FFFF mov word ptr [_MenuTimeout], -1 0 00001EDD 3D003F cmp ax, 16128 0 00001EE0 7568 jne _.L358 0 00001EE2 C606000001 mov byte ptr [_SkipAllConfig], 1 2124 _.L356: 0 00001EE7 B8EF01 mov ax, offset _.LC29 0 00001EEA 50 push ax 0 00001EEB E8FEFF call _init_printf 0 00001EEE A00000 mov al, byte ptr [_MenuSelected] 0 00001EF1 98 cbw 0 00001EF2 83C030 add ax, 48 0 00001EF5 50 push ax 0 00001EF6 B8F101 mov ax, offset _.LC30 0 00001EF9 50 push ax 0 00001EFA 8D76DE lea si, [-34+bp] 0 00001EFD 56 push si 0 00001EFE E8FEFF call _init_sprintf 0 00001F01 56 push si 0 00001F02 E8FEFF call _init_strlen 0 00001F05 8946DC mov word ptr [bp-36], ax 0 00001F08 16 push ss 0 00001F09 56 push si 0 00001F0A FF36B802 push word ptr [_envp+2] 0 00001F0E FF36B602 push word ptr [_envp] 0 00001F12 E8FEFF call _init_fstrcpy 0 00001F15 8B16B802 mov dx, word ptr [_envp+2] 0 00001F19 8B1EB602 mov bx, word ptr [_envp] 0 00001F1D 8B46DC mov ax, word ptr [bp-36] 0 00001F20 97 xchg di, ax 0 00001F21 8D5901 lea bx, [1+bx+di] 0 00001F24 891EB602 mov word ptr [_envp], bx 0 00001F28 8EC2 mov es, dx 0 00001F2A 26C7070000 mov word ptr es:[bx], 0 0 00001F2F 26C6470200 mov byte ptr es:[bx+2], 0 0 00001F34 83C408 add sp, 8 0 00001F37 833E0000FF cmp word ptr [_MenuColor], -1 0 00001F3C 7503E979FB je _.L279 0 00001F41 B007 mov al, 7 0 00001F43 50 push ax 0 00001F44 E88BF0 call _ClearScreen 0 00001F47 E970FB jmp _.L279 2161 _.L358: 0 00001F4A 3D0042 cmp ax, 16896 0 00001F4D 7540 jne _.L359 0 00001F4F 803E000001 cmp byte ptr [_singleStep], 1 0 00001F54 18D2 sbb dl, dl 0 00001F56 F6DA neg dl 0 00001F58 88160000 mov byte ptr [_singleStep], dl 2168 _.L360: 0 00001F5C 89C2 mov dx, ax 0 00001F5E 30F6 xor dh, dh 0 00001F60 83FA0D cmp dx, 13 0 00001F63 7482 je _.L356 0 00001F65 83FA1B cmp dx, 27 0 00001F68 7503E97AFF je _.L356 0 00001F6D 04D0 add al, -48 0 00001F6F 3C09 cmp al, 9 0 00001F71 7603E938FC ja _.L340 0 00001F76 80C2D0 add dl, -48 0 00001F79 8B5EDA mov bx, word ptr [bp-38] 0 00001F7C 88D1 mov cl, dl 0 00001F7E D3E3 shl bx, cl 0 00001F80 851E0000 test bx, word ptr [_Menus] 0 00001F84 7503E925FC je _.L340 0 00001F89 A20000 mov byte ptr [_MenuSelected], al 0 00001F8C E958FF jmp _.L356 2186 _.L359: 0 00001F8F 3D0048 cmp ax, 18432 0 00001F92 7526 jne _.L361 0 00001F94 833E0000FF cmp word ptr [_MenuColor], -1 0 00001F99 74C1 je _.L360 0 00001F9B 8A160000 mov dl, byte ptr [_MenuSelected] 0 00001F9F 84D2 test dl, dl 0 00001FA1 7EB9 jle _.L360 0 00001FA3 88D1 mov cl, dl 0 00001FA5 FEC9 dec cl 0 00001FA7 8B5EDA mov bx, word ptr [bp-38] 0 00001FAA D3E3 shl bx, cl 0 00001FAC FECA dec dl 0 00001FAE 851E0000 test bx, word ptr [_Menus] 0 00001FB2 74A8 je _.L360 2201 _.L440: 0 00001FB4 88160000 mov byte ptr [_MenuSelected], dl 0 00001FB8 EBA2 jmp _.L360 2204 _.L361: 0 00001FBA 3D0050 cmp ax, 20480 0 00001FBD 759D jne _.L360 0 00001FBF 833E0000FF cmp word ptr [_MenuColor], -1 0 00001FC4 7496 je _.L360 0 00001FC6 8A160000 mov dl, byte ptr [_MenuSelected] 0 00001FCA 80FA08 cmp dl, 8 0 00001FCD 7F8D jg _.L360 0 00001FCF 88D1 mov cl, dl 0 00001FD1 FEC1 inc cl 0 00001FD3 8B5EDA mov bx, word ptr [bp-38] 0 00001FD6 D3E3 shl bx, cl 0 00001FD8 851E0000 test bx, word ptr [_Menus] 0 00001FDC 7503E97BFF je _.L360 0 00001FE1 FEC2 inc dl 0 00001FE3 EBCF jmp _.L440 2220 _.L284: 0 00001FE5 8346DC04 add word ptr [bp-36], 4 0 00001FE9 E93DFA jmp _.L283 2223 .size _DoConfig, .-_DoConfig 2224 .global _GetStringArg 2225 .type _GetStringArg, @function 2226 _GetStringArg: 0 00001FEC 55 push bp 0 00001FED 89E5 mov bp, sp 0 00001FEF 31C0 xor ax, ax 0 00001FF1 50 push ax 0 00001FF2 FF7606 push word ptr [bp+6] 0 00001FF5 FF7604 push word ptr [bp+4] 0 00001FF8 E832F2 call _scan 0 00001FFB 89EC mov sp, bp 0 00001FFD 5D pop bp 0 00001FFE C20400 ret 4 2237 .size _GetStringArg, .-_GetStringArg 2238 .type _CfgSwitchar, @function 2239 _CfgSwitchar: 0 00002001 56 push si 0 00002002 55 push bp 0 00002003 89E5 mov bp, sp 0 00002005 BE3808 mov si, offset _szBuf 0 00002008 56 push si 0 00002009 FF7606 push word ptr [bp+6] 0 0000200C E8FEFF call _GetStringArg 0 0000200F 8A04 mov al, byte ptr [si] 0 00002011 98 cbw 0 00002012 894606 mov word ptr [bp+6], ax 0 00002015 89EC mov sp, bp 0 00002017 5D pop bp 0 00002018 5E pop si 0 00002019 E9FEFF jmp _init_switchar 2254 .size _CfgSwitchar, .-_CfgSwitchar 2255 .type _Numlock, @function 2256 _Numlock: 0 0000201C 56 push si 0 0000201D 57 push di 0 0000201E 55 push bp 0 0000201F 89E5 mov bp, sp 0 00002021 1E push ds 0 00002022 1E push ds 0 00002023 BF3808 mov di, offset _szBuf 0 00002026 57 push di 0 00002027 FF7608 push word ptr [bp+8] 0 0000202A E8FEFF call _GetStringArg 0 0000202D BB1700 mov bx, 23 0 00002030 BE4000 mov si, 64 0 00002033 8EC6 mov es, si 0 00002035 268A27 mov ah, byte ptr es:[bx] 0 00002038 80E4DF and ah, -33 0 0000203B 268827 mov byte ptr es:[bx], ah 0 0000203E 8866FD mov byte ptr [bp-3], ah 0 00002041 895EFE mov word ptr [bp-2], bx 0 00002044 BAE700 mov dx, offset _.LC11 0 00002047 52 push dx 0 00002048 57 push di 0 00002049 E878F1 call _strcaseequal 0 0000204C 84C0 test al, al 0 0000204E 750E jne _.L446 0 00002050 8A66FD mov ah, byte ptr [bp-3] 0 00002053 80CC20 or ah, 32 0 00002056 8EC6 mov es, si 0 00002058 8B5EFE mov bx, word ptr [bp-2] 0 0000205B 268827 mov byte ptr es:[bx], ah 2286 _.L446: 0 0000205E E8FEFF call _keycheck 0 00002061 89EC mov sp, bp 0 00002063 5D pop bp 0 00002064 5F pop di 0 00002065 5E pop si 0 00002066 C20200 ret 2 2293 .size _Numlock, .-_Numlock === Switch to base=012B40h -> ".RODATA.STR1.1" 2294 .section .rodata.str1.1 2295 _.LC31: 0 0000094B 554D4200 .string "UMB" === Switch to base=002270h -> ".TEXT" 2297 .text 2298 .type _DosData, @function 2299 _DosData: 0 00002069 56 push si 0 0000206A 55 push bp 0 0000206B 89E5 mov bp, sp 0 0000206D BE3808 mov si, offset _szBuf 0 00002070 56 push si 0 00002071 FF7606 push word ptr [bp+6] 0 00002074 E8FEFF call _GetStringArg 0 00002077 56 push si 0 00002078 E82AF1 call _strupr 0 0000207B B80300 mov ax, 3 0 0000207E 50 push ax 0 0000207F B8FB01 mov ax, offset _.LC31 0 00002082 50 push ax 0 00002083 56 push si 0 00002084 E8FEFF call _init_memcmp 0 00002087 85C0 test ax, ax 0 00002089 7505 jne _.L448 0 0000208B C606000001 mov byte ptr [_Config], 1 2318 _.L448: 0 00002090 89EC mov sp, bp 0 00002092 5D pop bp 0 00002093 5E pop si 0 00002094 C20200 ret 2 2323 .size _DosData, .-_DosData === Switch to base=012B40h -> ".RODATA.STR1.1" 2324 .section .rodata.str1.1 2325 _.LC32: 0 0000094F 4849474800 .string "HIGH" 2327 _.LC33: 0 00000954 4C4F5700 .string "LOW" 2329 _.LC34: 0 00000958 4E4F554D4200 .string "NOUMB" === Switch to base=002270h -> ".TEXT" 2331 .text 2332 .type _Dosmem, @function 2333 _Dosmem: 0 00002097 56 push si 0 00002098 57 push di 0 00002099 55 push bp 0 0000209A 89E5 mov bp, sp 0 0000209C 1E push ds 0 0000209D BE3808 mov si, offset _szBuf 0 000020A0 56 push si 0 000020A1 FF7608 push word ptr [bp+8] 0 000020A4 E8FEFF call _GetStringArg 0 000020A7 FF7608 push word ptr [bp+8] 0 000020AA 56 push si 0 000020AB E8FEFF call _init_strcpy 0 000020AE 56 push si 0 000020AF E8F3F0 call _strupr 0 000020B2 C646FF00 mov byte ptr [bp-1], 0 2349 _.L452: 0 000020B6 8A04 mov al, byte ptr [si] 0 000020B8 3C20 cmp al, 32 0 000020BA 7503E9B900 je _.L453 0 000020BF 3C09 cmp al, 9 0 000020C1 7503E9B200 je _.L453 0 000020C6 BF0300 mov di, 3 0 000020C9 57 push di 0 000020CA B8FB01 mov ax, offset _.LC31 0 000020CD 50 push ax 0 000020CE 56 push si 0 000020CF E8FEFF call _init_memcmp 0 000020D2 85C0 test ax, ax 0 000020D4 7506 jne _.L454 0 000020D6 01FE add si, di 0 000020D8 C646FF01 mov byte ptr [bp-1], 1 2365 _.L454: 0 000020DC B80400 mov ax, 4 0 000020DF 50 push ax 0 000020E0 B8FF01 mov ax, offset _.LC32 0 000020E3 50 push ax 0 000020E4 56 push si 0 000020E5 E8FEFF call _init_memcmp 0 000020E8 85C0 test ax, ax 0 000020EA 7508 jne _.L455 0 000020EC C606000001 mov byte ptr [_HMAState], 1 0 000020F1 83C604 add si, 4 2376 _.L455: 0 000020F4 57 push di 0 000020F5 B80402 mov ax, offset _.LC33 0 000020F8 50 push ax 0 000020F9 56 push si 0 000020FA E8FEFF call _init_memcmp 0 000020FD 85C0 test ax, ax 0 000020FF 7508 jne _.L456 0 00002101 C606000003 mov byte ptr [_HMAState], 3 0 00002106 83C603 add si, 3 2386 _.L456: 0 00002109 B80500 mov ax, 5 0 0000210C 50 push ax 0 0000210D B80802 mov ax, offset _.LC34 0 00002110 50 push ax 0 00002111 56 push si 0 00002112 E8FEFF call _init_memcmp 0 00002115 85C0 test ax, ax 0 00002117 7506 jne _.L457 0 00002119 83C605 add si, 5 0 0000211C 8846FF mov byte ptr [bp-1], al 2397 _.L457: 0 0000211F 56 push si 0 00002120 E8E5F0 call _skipwh 0 00002123 96 xchg si, ax 0 00002124 8A04 mov al, byte ptr [si] 0 00002126 84C0 test al, al 0 00002128 740F je _.L458 0 0000212A 3C2C cmp al, 44 0 0000212C 744A je _.L453 0 0000212E 81EE3808 sub si, offset _szBuf 0 00002132 037608 add si, word ptr [bp+8] 0 00002135 56 push si 0 00002136 E8C2ED call _CfgFailure 2410 _.L458: 0 00002139 833E000000 cmp word ptr [_UmbState], 0 0 0000213E 751D jne _.L461 0 00002140 C41E0000 les bx, dword ptr [_LoL] 0 00002144 26C687890000 mov byte ptr es:[bx+137], 0 0 0000214A 26C7878C00FFFF mov word ptr es:[bx+140], -1 0 00002151 807EFF01 cmp byte ptr [bp-1], 1 0 00002155 19C0 sbb ax, ax 0 00002157 40 inc ax 0 00002158 D1E0 shl ax, 1 0 0000215A A30000 mov word ptr [_UmbState], ax 2421 _.L461: 0 0000215D 803E000001 cmp byte ptr [_HMAState], 1 0 00002162 750C jne _.L451 0 00002164 E8FEFF call _MoveKernelToHMA 0 00002167 85C0 test ax, ax 0 00002169 7405 je _.L451 0 0000216B C606000002 mov byte ptr [_HMAState], 2 2428 _.L451: 0 00002170 89EC mov sp, bp 0 00002172 5D pop bp 0 00002173 5F pop di 0 00002174 5E pop si 0 00002175 C20200 ret 2 2434 _.L453: 0 00002178 46 inc si 0 00002179 E93AFF jmp _.L452 2437 .size _Dosmem, .-_Dosmem === Switch to base=012B40h -> ".RODATA.STR1.1" 2438 .section .rodata.str1.1 2439 _.LC35: 0 0000095E 5C434F554E545259 .string "\\COUNTRY.SYS" 0 00000966 2E53595300 2441 _.LC36: 0 0000096B 636F756C64206E6F .string "could not find country info for country ID %u\n" 0 00000973 742066696E642063 0 0000097B 6F756E7472792069 0 00000983 6E666F20666F7220 0 0000098B 636F756E74727920 0 00000993 49442025750A00 2443 _.LC37: 0 0000099A 63757272656E7420 .string "current supported countries are " 0 000009A2 737570706F727465 0 000009AA 6420636F756E7472 0 000009B2 6965732061726520 0 000009BA 00 2445 _.LC38: 0 000009BB 25752000 .string "%u " 2447 _.LC39: 0 000009BF 2573206E6F742066 .string "%s not found\n" 0 000009C7 6F756E640A00 2449 _.LC40: 0 000009CD 4572726F72207265 .string "Error reading %s\n" 0 000009D5 6164696E67202573 0 000009DD 0A00 2451 _.LC41: 0 000009DF FF434F554E545259 .string "\377COUNTRY" 0 000009E7 00 2453 _.LC42: 0 000009E8 2573206861732069 .string "%s has invalid format\n" 0 000009F0 6E76616C69642066 0 000009F8 6F726D61740A00 === Switch to base=002270h -> ".TEXT" 2455 .text 2456 .type _Country, @function 2457 _Country: 0 0000217C 56 push si 0 0000217D 57 push di 0 0000217E 55 push bp 0 0000217F 89E5 mov bp, sp 0 00002181 83EC44 sub sp, 68 0 00002184 C746D80000 mov word ptr [bp-40], 0 0 00002189 8D46D6 lea ax, [-42+bp] 0 0000218C 50 push ax 0 0000218D FF7608 push word ptr [bp+8] 0 00002190 E861F1 call _GetNumArg 0 00002193 85C0 test ax, ax 0 00002195 750E jne _.L475 2470 _.L479: 0 00002197 C746D00000 mov word ptr [bp-48], 0 2472 _.L476: 0 0000219C FF76D0 push word ptr [bp-48] 0 0000219F E859ED call _CfgFailure 0 000021A2 E9F200 jmp _.L474 2476 _.L475: 0 000021A5 31F6 xor si, si 0 000021A7 50 push ax 0 000021A8 E85DF0 call _skipwh 0 000021AB 8946D0 mov word ptr [bp-48], ax 0 000021AE 89F2 mov dx, si 0 000021B0 89C3 mov bx, ax 0 000021B2 36803F2C cmp byte ptr ss:[bx], 44 0 000021B6 753D jne _.L477 0 000021B8 40 inc ax 0 000021B9 50 push ax 0 000021BA E84BF0 call _skipwh 0 000021BD 89C3 mov bx, ax 0 000021BF 36803F2C cmp byte ptr ss:[bx], 44 0 000021C3 740C je _.L478 0 000021C5 8D56D8 lea dx, [-40+bp] 0 000021C8 52 push dx 0 000021C9 50 push ax 0 000021CA E827F1 call _GetNumArg 0 000021CD 85C0 test ax, ax 0 000021CF 74C6 je _.L479 2497 _.L478: 0 000021D1 50 push ax 0 000021D2 E833F0 call _skipwh 0 000021D5 8946D0 mov word ptr [bp-48], ax 0 000021D8 93 xchg bx, ax 0 000021D9 36803F2C cmp byte ptr ss:[bx], 44 0 000021DD 7403E9BD00 jne _.L517 0 000021E2 FF46D0 inc word ptr [bp-48] 0 000021E5 BA3808 mov dx, offset _szBuf 0 000021E8 52 push dx 0 000021E9 8956D4 mov word ptr [bp-44], dx 0 000021EC FF76D0 push word ptr [bp-48] 0 000021EF E8FEFF call _GetStringArg 0 000021F2 8B56D4 mov dx, word ptr [bp-44] 2511 _.L477: 0 000021F5 8B46D8 mov ax, word ptr [bp-40] 0 000021F8 8946CE mov word ptr [bp-50], ax 0 000021FB 8B7ED6 mov di, word ptr [bp-42] 0 000021FE 85D2 test dx, dx 0 00002200 7503E99F00 je _.L518 0 00002205 8956CC mov word ptr [bp-52], dx 2518 _.L480: 0 00002208 8956D2 mov word ptr [bp-46], dx 0 0000220B 56 push si 0 0000220C FF76CC push word ptr [bp-52] 0 0000220F E8FEFF call _init_DosOpen 0 00002212 8946D4 mov word ptr [bp-44], ax 0 00002215 85C0 test ax, ax 0 00002217 7C03E9E600 jge _.L481 0 0000221C 8B56D2 mov dx, word ptr [bp-46] 0 0000221F 85D2 test dx, dx 0 00002221 7403E9CC00 jne _.L482 0 00002226 BB0000 mov bx, offset _specificCountriesSupported 2530 _.L485: 0 00002229 363B3F cmp di, word ptr ss:[bx] 0 0000222C 757E jne _.L483 0 0000222E BA0000 mov dx, offset _nlsCountryInfoHardcoded@OZSEG16 0 00002231 8EC2 mov es, dx 0 00002233 26893E0300 mov word ptr es:[_nlsCountryInfoHardcoded+3], di 0 00002238 8A4702 mov al, byte ptr [bx+2] 0 0000223B 98 cbw 0 0000223C 26A30700 mov word ptr es:[_nlsCountryInfoHardcoded+7], ax 0 00002240 8A4703 mov al, byte ptr [bx+3] 0 00002243 26A20900 mov byte ptr es:[_nlsCountryInfoHardcoded+9], al 0 00002247 8A4704 mov al, byte ptr [bx+4] 0 0000224A 26A20A00 mov byte ptr es:[_nlsCountryInfoHardcoded+10], al 0 0000224E 8A4705 mov al, byte ptr [bx+5] 0 00002251 26A20B00 mov byte ptr es:[_nlsCountryInfoHardcoded+11], al 0 00002255 8A4706 mov al, byte ptr [bx+6] 0 00002258 26A20E00 mov byte ptr es:[_nlsCountryInfoHardcoded+14], al 0 0000225C 8A4707 mov al, byte ptr [bx+7] 0 0000225F 26A21000 mov byte ptr es:[_nlsCountryInfoHardcoded+16], al 0 00002263 8A4708 mov al, byte ptr [bx+8] 0 00002266 26A21200 mov byte ptr es:[_nlsCountryInfoHardcoded+18], al 0 0000226A 8A4709 mov al, byte ptr [bx+9] 0 0000226D 26A21400 mov byte ptr es:[_nlsCountryInfoHardcoded+20], al 0 00002271 8A470A mov al, byte ptr [bx+10] 0 00002274 26A21600 mov byte ptr es:[_nlsCountryInfoHardcoded+22], al 0 00002278 8A470B mov al, byte ptr [bx+11] 0 0000227B 26A21700 mov byte ptr es:[_nlsCountryInfoHardcoded+23], al 0 0000227F 8A470C mov al, byte ptr [bx+12] 0 00002282 26A21800 mov byte ptr es:[_nlsCountryInfoHardcoded+24], al 0 00002286 31C0 xor ax, ax 2560 _.L484: 0 00002288 83F001 xor ax, 1 0 0000228B 8946D2 mov word ptr [bp-46], ax 2563 _.L487: 0 0000228E 837ED200 cmp word ptr [bp-46], 0 0 00002292 7503E905FF je _.L476 2566 _.L474: 0 00002297 89EC mov sp, bp 0 00002299 5D pop bp 0 0000229A 5F pop di 0 0000229B 5E pop si 0 0000229C C20200 ret 2 2572 _.L517: 0 0000229F 31D2 xor dx, dx 0 000022A1 E951FF jmp _.L477 2575 _.L518: 0 000022A4 C746CC0E02 mov word ptr [bp-52], offset _.LC35 0 000022A9 E95CFF jmp _.L480 2578 _.L483: 0 000022AC 83C30D add bx, 13 0 000022AF 81FB5F01 cmp bx, offset _specificCountriesSupported+351 0 000022B3 7303E971FF jc _.L485 0 000022B8 57 push di 0 000022B9 B81B02 mov ax, offset _.LC36 0 000022BC 50 push ax 0 000022BD E8FEFF call _init_printf 0 000022C0 B84A02 mov ax, offset _.LC37 0 000022C3 50 push ax 0 000022C4 E8FEFF call _init_printf 0 000022C7 83C406 add sp, 6 0 000022CA BE0000 mov si, offset _specificCountriesSupported 2591 _.L486: 0 000022CD 36FF34 push word ptr ss:[si] 0 000022D0 B86B02 mov ax, offset _.LC38 0 000022D3 50 push ax 0 000022D4 E8FEFF call _init_printf 0 000022D7 83C60D add si, 13 0 000022DA 83C404 add sp, 4 0 000022DD 81FE5F01 cmp si, offset _specificCountriesSupported+351 0 000022E1 72EA jc _.L486 0 000022E3 B8EF01 mov ax, offset _.LC29 0 000022E6 50 push ax 0 000022E7 E8FEFF call _init_printf 0 000022EA 83C402 add sp, 2 0 000022ED B80100 mov ax, 1 0 000022F0 EB96 jmp _.L484 2606 _.L482: 0 000022F2 FF76CC push word ptr [bp-52] 0 000022F5 B86F02 mov ax, offset _.LC39 0 000022F8 50 push ax 0 000022F9 E8FEFF call _init_printf 0 000022FC 83C404 add sp, 4 0 000022FF E99AFE jmp _.L476 2613 _.L481: 0 00002302 B81700 mov ax, 23 0 00002305 50 push ax 0 00002306 8D56E9 lea dx, [-23+bp] 0 00002309 52 push dx 0 0000230A 8956D2 mov word ptr [bp-46], dx 0 0000230D FF76D4 push word ptr [bp-44] 0 00002310 E8FEFF call _read 0 00002313 83F817 cmp ax, 23 0 00002316 8B56D2 mov dx, word ptr [bp-46] 0 00002319 741B je _.L488 0 0000231B FF76CC push word ptr [bp-52] 0 0000231E B87D02 mov ax, offset _.LC40 2626 _.L551: 0 00002321 50 push ax 0 00002322 E8FEFF call _init_printf 0 00002325 83C404 add sp, 4 0 00002328 C746D20000 mov word ptr [bp-46], 0 2631 _.L489: 0 0000232D FF76D4 push word ptr [bp-44] 0 00002330 E8FEFF call _close 0 00002333 E958FF jmp _.L487 2635 _.L488: 0 00002336 BE0800 mov si, 8 0 00002339 56 push si 0 0000233A B88F02 mov ax, offset _.LC41 0 0000233D 50 push ax 0 0000233E 52 push dx 0 0000233F E8FEFF call _init_memcmp 0 00002342 8946D2 mov word ptr [bp-46], ax 0 00002345 85C0 test ax, ax 0 00002347 8976C4 mov word ptr [bp-60], si 0 0000234A 7408 je _.L490 2646 _.L491: 0 0000234C FF76CC push word ptr [bp-52] 0 0000234F B89802 mov ax, offset _.LC42 0 00002352 EBCD jmp _.L551 2650 _.L490: 0 00002354 FF76FE push word ptr [bp-2] 0 00002357 FF76FC push word ptr [bp-4] 0 0000235A FF76D4 push word ptr [bp-44] 0 0000235D E8FEFF call _lseek 0 00002360 83F8FF cmp ax, -1 0 00002363 7505 jne _.L520 0 00002365 83FAFF cmp dx, -1 0 00002368 74E2 je _.L491 2659 _.L520: 0 0000236A BE0200 mov si, 2 0 0000236D 56 push si 0 0000236E B82607 mov ax, offset _entries.2296 0 00002371 50 push ax 0 00002372 FF76D4 push word ptr [bp-44] 0 00002375 E8FEFF call _read 0 00002378 39F0 cmp ax, si 0 0000237A 8976CA mov word ptr [bp-54], si 0 0000237D 75CD jne _.L491 0 0000237F 8B76D2 mov si, word ptr [bp-46] 2670 _.L493: 0 00002382 363B362607 cmp si, word ptr ss:[_entries.2296] 0 00002387 7C0D jl _.L511 0 00002389 57 push di 0 0000238A B81B02 mov ax, offset _.LC36 0 0000238D 50 push ax 0 0000238E E8FEFF call _init_printf 0 00002391 83C404 add sp, 4 0 00002394 EB97 jmp _.L489 2679 _.L511: 0 00002396 B80E00 mov ax, 14 0 00002399 50 push ax 0 0000239A 8D46DB lea ax, [-37+bp] 0 0000239D 50 push ax 0 0000239E FF76D4 push word ptr [bp-44] 0 000023A1 E8FEFF call _read 0 000023A4 83F80E cmp ax, 14 0 000023A7 75A3 jne _.L491 0 000023A9 837EDB0C cmp word ptr [bp-37], 12 0 000023AD 759D jne _.L491 0 000023AF 3B7EDD cmp di, word ptr [bp-35] 0 000023B2 751A jne _.L494 0 000023B4 837ECE01 cmp word ptr [bp-50], 1 0 000023B8 18C0 sbb al, al 0 000023BA 8846C9 mov byte ptr [bp-55], al 0 000023BD FE46C9 inc byte ptr [bp-55] 0 000023C0 8B46CE mov ax, word ptr [bp-50] 0 000023C3 3B46DF cmp ax, word ptr [bp-33] 0 000023C6 7409 je _.L495 0 000023C8 807EC900 cmp byte ptr [bp-55], 0 0 000023CC 7403 je _.L495 2701 _.L494: 0 000023CE 46 inc si 0 000023CF EBB1 jmp _.L493 2704 _.L495: 0 000023D1 FF76E7 push word ptr [bp-25] 0 000023D4 FF76E5 push word ptr [bp-27] 0 000023D7 FF76D4 push word ptr [bp-44] 0 000023DA E8FEFF call _lseek 0 000023DD 83F8FF cmp ax, -1 0 000023E0 7508 jne _.L521 0 000023E2 83FAFF cmp dx, -1 0 000023E5 7503E962FF je _.L491 2713 _.L521: 0 000023EA FF76CA push word ptr [bp-54] 0 000023ED B82407 mov ax, offset _count.2297 0 000023F0 50 push ax 0 000023F1 FF76D4 push word ptr [bp-44] 0 000023F4 E8FEFF call _read 0 000023F7 83F802 cmp ax, 2 0 000023FA 7403E94DFF jne _.L491 0 000023FF A12407 mov ax, word ptr [_count.2297] 0 00002402 83F809 cmp ax, 9 0 00002405 7603E942FF ja _.L491 0 0000240A B103 mov cl, 3 0 0000240C D3E0 shl ax, cl 0 0000240E 884ECE mov byte ptr [bp-50], cl 0 00002411 50 push ax 0 00002412 BEDC06 mov si, offset _hdr.2295 0 00002415 56 push si 0 00002416 FF76D4 push word ptr [bp-44] 0 00002419 E8FEFF call _read 0 0000241C 8B162407 mov dx, word ptr [_count.2297] 0 00002420 8A4ECE mov cl, byte ptr [bp-50] 0 00002423 D3E2 shl dx, cl 0 00002425 39D0 cmp ax, dx 0 00002427 8976BE mov word ptr [bp-66], si 0 0000242A 7403E91DFF jne _.L491 2738 _.L497: 0 0000242F 8B46D2 mov ax, word ptr [bp-46] 0 00002432 363B062407 cmp ax, word ptr ss:[_count.2297] 0 00002437 7C08 jl _.L510 0 00002439 C746D20100 mov word ptr [bp-46], 1 0 0000243E E9ECFE jmp _.L489 2744 _.L510: 0 00002441 8B46D2 mov ax, word ptr [bp-46] 0 00002444 B103 mov cl, 3 0 00002446 D3E0 shl ax, cl 0 00002448 8946CE mov word ptr [bp-50], ax 0 0000244B 8B7EBE mov di, word ptr [bp-66] 0 0000244E 93 xchg bx, ax 0 0000244F 36833906 cmp word ptr ss:[bx+di], 6 0 00002453 7403E9F4FE jne _.L491 0 00002458 BFDE06 mov di, offset _hdr.2295+2 0 0000245B 8B31 mov si, word ptr [bx+di] 0 0000245D 83FE03 cmp si, 3 0 00002460 7503E9EF01 je _.L498 0 00002465 8D44FF lea ax, [-1+si] 0 00002468 83F807 cmp ax, 6+1 0 0000246B 7208 jc _.L522 0 0000246D 83FE23 cmp si, 35 0 00002470 7403E9DF01 jne _.L498 2762 _.L522: 0 00002475 83FE23 cmp si, 35 0 00002478 7503 jne _.L500 0 0000247A BE0800 mov si, 8 2766 _.L500: 0 0000247D 8B5ECE mov bx, word ptr [bp-50] 0 00002480 36FFB7E206 push word ptr ss:[bx+_hdr.2295+6] 0 00002485 36FFB7E006 push word ptr ss:[bx+_hdr.2295+4] 0 0000248A FF76D4 push word ptr [bp-44] 0 0000248D E8FEFF call _lseek 0 00002490 83F8FF cmp ax, -1 0 00002493 7508 jne _.L523 0 00002495 83FAFF cmp dx, -1 0 00002498 7503E9AFFE je _.L491 2776 _.L523: 0 0000249D B80A00 mov ax, 10 0 000024A0 50 push ax 0 000024A1 B8D205 mov ax, offset _subf_data.2290 0 000024A4 50 push ax 0 000024A5 FF76D4 push word ptr [bp-44] 0 000024A8 E8FEFF call _read 0 000024AB 83F80A cmp ax, 10 0 000024AE B9D205 mov cx, offset _subf_data.2290 0 000024B1 7403E996FE jne _.L491 0 000024B6 FF76C4 push word ptr [bp-60] 0 000024B9 B80A00 mov ax, 10 0 000024BC F7E6 mul si 0 000024BE 050000 add ax, offset _table.2294 0 000024C1 50 push ax 0 000024C2 51 push cx 0 000024C3 894EC6 mov word ptr [bp-58], cx 0 000024C6 E8FEFF call _init_memcmp 0 000024C9 85C0 test ax, ax 0 000024CB 8B4EC6 mov cx, word ptr [bp-58] 0 000024CE 7403E9BD00 jne _.L502 2797 _.L504: 0 000024D3 36FF36DA05 push word ptr ss:[_subf_data.2290+8] 0 000024D8 B8DC05 mov ax, offset _subf_data.2290+10 0 000024DB 50 push ax 0 000024DC 8946BC mov word ptr [bp-68], ax 0 000024DF FF76D4 push word ptr [bp-44] 0 000024E2 E8FEFF call _read 0 000024E5 BBD205 mov bx, offset _subf_data.2290 0 000024E8 8B5708 mov dx, word ptr [bx+8] 0 000024EB 8956C6 mov word ptr [bp-58], dx 0 000024EE 39D0 cmp ax, dx 0 000024F0 8E46BC mov es, word ptr [bp-68] 0 000024F3 7403E954FE jne _.L491 0 000024F8 BFDE06 mov di, offset _hdr.2295+2 0 000024FB 8B5ECE mov bx, word ptr [bp-50] 0 000024FE 8B09 mov cx, word ptr [bx+di] 0 00002500 83F901 cmp cx, 1 0 00002503 7403E90101 jne _.L505 0 00002508 BBD205 mov bx, offset _subf_data.2290 0 0000250B 8B4F0A mov cx, word ptr [bx+10] 0 0000250E 3B4EDD cmp cx, word ptr [bp-35] 0 00002511 7403E93E01 jne _.L498 0 00002516 8B46DF mov ax, word ptr [bp-33] 0 00002519 363B470C cmp ax, word ptr ss:[bx+12] 0 0000251D 7409 je _.L524 0 0000251F 807EC900 cmp byte ptr [bp-55], 0 0 00002523 7403E92C01 jne _.L498 2824 _.L524: 0 00002528 BA0000 mov dx, offset _nlsPackageHardcoded@OZSEG16 0 0000252B 8EC2 mov es, dx 0 0000252D 26890E0400 mov word ptr es:[_nlsPackageHardcoded+4], cx 0 00002532 26A30600 mov word ptr es:[_nlsPackageHardcoded+6], ax 0 00002536 8B5EC6 mov bx, word ptr [bp-58] 0 00002539 83FB1C cmp bx, 28 0 0000253C 7603 jbe _.L507 0 0000253E BB1C00 mov bx, 28 2833 _.L507: 0 00002541 BFD205 mov di, offset _subf_data.2290 0 00002544 895D08 mov word ptr [di+8], bx 0 00002547 B80000 mov ax, offset _nlsCountryInfoHardcoded@OZSEG16 0 0000254A 8EC0 mov es, ax 0 0000254C 268B0E1900 mov cx, word ptr es:[_nlsCountryInfoHardcoded+25] 0 00002551 894EC2 mov word ptr [bp-62], cx 0 00002554 26A11B00 mov ax, word ptr es:[_nlsCountryInfoHardcoded+27] 0 00002558 8946C0 mov word ptr [bp-64], ax 0 0000255B BE2A00 mov si, offset _nlsPackageHardcoded+42 2843 _.L508: 0 0000255E 36FF36DA05 push word ptr ss:[_subf_data.2290+8] 0 00002563 16 push ss 0 00002564 B8DC05 mov ax, offset _subf_data.2290+10 0 00002567 50 push ax 0 00002568 8D4402 lea ax, [2+si] 0 0000256B 52 push dx 0 0000256C 50 push ax 0 0000256D 16 push ss 0 0000256E 1F pop ds 0 0000256F E8FEFF call _init_fmemcpy 0 00002572 BFDE06 mov di, offset _hdr.2295+2 0 00002575 8B5ECE mov bx, word ptr [bp-50] 0 00002578 36833901 cmp word ptr ss:[bx+di], 1 0 0000257C 7403E9D300 jne _.L498 0 00002581 8B46C2 mov ax, word ptr [bp-62] 0 00002584 894416 mov word ptr [si+22], ax 0 00002587 8B46C0 mov ax, word ptr [bp-64] 0 0000258A 894418 mov word ptr [si+24], ax 0 0000258D E9C400 jmp _.L498 2863 _.L502: 0 00002590 BFDE06 mov di, offset _hdr.2295+2 0 00002593 8B5ECE mov bx, word ptr [bp-50] 0 00002596 36833904 cmp word ptr ss:[bx+di], 4 0 0000259A 7403E9ADFD jne _.L491 0 0000259F FF76C4 push word ptr [bp-60] 0 000025A2 B81400 mov ax, offset _table.2294+20 0 000025A5 50 push ax 0 000025A6 51 push cx 0 000025A7 E8FEFF call _init_memcmp 0 000025AA 85C0 test ax, ax 0 000025AC 7503E922FF je _.L504 0 000025B1 E998FD jmp _.L491 2876 _.L509: 0 000025B4 50 push ax 0 000025B5 16 push ss 0 000025B6 06 push es 0 000025B7 8C46BC mov word ptr [bp-68], es 0 000025BA 8D4402 lea ax, [2+si] 0 000025BD 52 push dx 0 000025BE 8956C6 mov word ptr [bp-58], dx 0 000025C1 50 push ax 0 000025C2 16 push ss 0 000025C3 1F pop ds 0 000025C4 8C56CE mov word ptr [bp-50], ss 0 000025C7 E8FEFF call _init_fmemcpy 0 000025CA BBD205 mov bx, offset _subf_data.2290 0 000025CD 8B4708 mov ax, word ptr [bx+8] 0 000025D0 89470A mov word ptr [bx+10], ax 0 000025D3 FF76CA push word ptr [bp-54] 0 000025D6 8B4ECE mov cx, word ptr [bp-50] 0 000025D9 51 push cx 0 000025DA 8E46BC mov es, word ptr [bp-68] 0 000025DD 06 push es 0 000025DE 8B56C6 mov dx, word ptr [bp-58] 0 000025E1 EB6A jmp _.L549 2899 _.L546: 0 000025E3 83F923 cmp cx, 35 0 000025E6 7403E973FF jne _.L508 0 000025EB FF76CA push word ptr [bp-54] 0 000025EE 16 push ss 0 000025EF 06 push es 0 000025F0 57 push di 0 000025F1 B80A00 mov ax, offset _nlsPackageHardcoded+10 0 000025F4 50 push ax 0 000025F5 16 push ss 0 000025F6 1F pop ds 0 000025F7 E8FEFF call _init_fmemcpy 0 000025FA FF76CA push word ptr [bp-54] 0 000025FD 16 push ss 0 000025FE B8DE05 mov ax, offset _subf_data.2290+12 0 00002601 50 push ax 0 00002602 57 push di 0 00002603 B80C00 mov ax, offset _nlsPackageHardcoded+12 0 00002606 50 push ax 0 00002607 EB46 jmp _.L550 2919 _.L505: 0 00002609 8946C6 mov word ptr [bp-58], ax 0 0000260C BA0000 mov dx, offset _nlsPackageHardcoded@OZSEG16 0 0000260F 89D7 mov di, dx 0 00002611 B80A00 mov ax, 10 0 00002614 F7E6 mul si 0 00002616 96 xchg si, ax 0 00002617 8B9C0800 mov bx, word ptr [si+_table.2294+8] 0 0000261B B80500 mov ax, 5 0 0000261E F7E3 mul bx 0 00002620 93 xchg bx, ax 0 00002621 81C30000 add bx, offset _nlsPackageHardcoded 0 00002625 8EDF mov ds, di 0 00002627 8B7711 mov si, word ptr [bx+17] 0 0000262A 8B5713 mov dx, word ptr [bx+19] 0 0000262D 83F907 cmp cx, 7 0 00002630 75B1 jne _.L546 0 00002632 8B46C6 mov ax, word ptr [bp-58] 0 00002635 85C0 test ax, ax 0 00002637 7403E978FF jne _.L509 0 0000263C BBD205 mov bx, offset _subf_data.2290 0 0000263F 3689470A mov word ptr ss:[bx+10], ax 0 00002643 3689470C mov word ptr ss:[bx+12], ax 0 00002647 B80400 mov ax, 4 0 0000264A 50 push ax 0 0000264B 16 push ss 0 0000264C 06 push es 2946 _.L549: 0 0000264D 52 push dx 0 0000264E 56 push si 2949 _.L550: 0 0000264F 16 push ss 0 00002650 1F pop ds 0 00002651 E8FEFF call _init_fmemcpy 2953 _.L498: 0 00002654 FF46D2 inc word ptr [bp-46] 0 00002657 E9D5FD jmp _.L497 2956 .size _Country, .-_Country 2957 .type _CfgBreak, @function 2958 _CfgBreak: 0 0000265A 56 push si 0 0000265B 55 push bp 0 0000265C 89E5 mov bp, sp 0 0000265E BE3808 mov si, offset _szBuf 0 00002661 56 push si 0 00002662 FF7606 push word ptr [bp+6] 0 00002665 E8FEFF call _GetStringArg 0 00002668 B8E700 mov ax, offset _.LC11 0 0000266B 50 push ax 0 0000266C 56 push si 0 0000266D E854EB call _strcaseequal 0 00002670 3C01 cmp al, 1 0 00002672 18C0 sbb al, al 0 00002674 F6D8 neg al 0 00002676 BA0000 mov dx, offset _break_ena@OZSEG16 0 00002679 8EC2 mov es, dx 0 0000267B 26A20000 mov byte ptr es:[_break_ena], al 0 0000267F 89EC mov sp, bp 0 00002681 5D pop bp 0 00002682 5E pop si 0 00002683 C20200 ret 2 2980 .size _CfgBreak, .-_CfgBreak 2981 .global _KernelAllocPara 2982 .type _KernelAllocPara, @function 2983 _KernelAllocPara: 0 00002686 56 push si 0 00002687 57 push di 0 00002688 55 push bp 0 00002689 89E5 mov bp, sp 0 0000268B 1E push ds 0 0000268C 1E push ds 0 0000268D 833E000001 cmp word ptr [_UmbState], 1 0 00002692 7403E9A900 jne _.L555 0 00002697 837E0E00 cmp word ptr [bp+14], 0 0 0000269B 7503E9A000 je _.L555 0 000026A0 8B3E3A0A mov di, word ptr [_umb_base_seg] 0 000026A4 A10000 mov ax, word ptr [_umb_start] 0 000026A7 8946FE mov word ptr [bp-2], ax 2997 _.L556: 0 000026AA 3B7EFE cmp di, word ptr [bp-2] 0 000026AD 7526 jne _.L557 0 000026AF 8D7501 lea si, [1+di] 0 000026B2 8EC7 mov es, di 0 000026B4 26FF360000 push word ptr es:[0] 0 000026B9 268B160300 mov dx, word ptr es:[3] 0 000026BE 4A dec dx 0 000026BF 52 push dx 0 000026C0 56 push si 0 000026C1 E8A4E8 call _mcb_init 0 000026C4 31C0 xor ax, ax 0 000026C6 50 push ax 0 000026C7 57 push di 0 000026C8 E874F1 call _mumcb_init 0 000026CB 8EC7 mov es, di 0 000026CD 26C606090044 mov byte ptr es:[9], 68 0 000026D3 89F7 mov di, si 3015 _.L557: 0 000026D5 8B5608 mov dx, word ptr [bp+8] 0 000026D8 42 inc dx 0 000026D9 89FE mov si, di 0 000026DB 01D6 add si, dx 0 000026DD 8EC7 mov es, di 0 000026DF 26FF360000 push word ptr es:[0] 0 000026E4 268B0E0300 mov cx, word ptr es:[3] 0 000026E9 29D1 sub cx, dx 0 000026EB 8956FC mov word ptr [bp-4], dx 0 000026EE 51 push cx 0 000026EF 56 push si 0 000026F0 E875E8 call _mcb_init 0 000026F3 C456FC les dx, dword ptr [bp-4] 0 000026F6 2601160300 add word ptr es:[3], dx 0 000026FB 8A560A mov dl, byte ptr [bp+10] 0 000026FE 8EC7 mov es, di 0 00002700 31DB xor bx, bx 0 00002702 268817 mov byte ptr es:[bx], dl 0 00002705 8D5501 lea dx, [1+di] 0 00002708 2689160100 mov word ptr es:[1], dx 0 0000270D 8B4608 mov ax, word ptr [bp+8] 0 00002710 26A30300 mov word ptr es:[3], ax 0 00002714 395E0C cmp word ptr [bp+12], bx 0 00002717 7413 je _.L558 0 00002719 8956FE mov word ptr [bp-2], dx 0 0000271C B90800 mov cx, 8 0 0000271F 51 push cx 0 00002720 16 push ss 0 00002721 FF760C push word ptr [bp+12] 0 00002724 57 push di 0 00002725 51 push cx 0 00002726 E8FEFF call _init_fmemcpy 0 00002729 8B56FE mov dx, word ptr [bp-2] 3049 _.L558: 0 0000272C 837E0E00 cmp word ptr [bp+14], 0 0 00002730 7425 je _.L559 0 00002732 89363A0A mov word ptr [_umb_base_seg], si 3053 _.L560: 0 00002736 31C0 xor ax, ax 0 00002738 89EC mov sp, bp 0 0000273A 5D pop bp 0 0000273B 5F pop di 0 0000273C 5E pop si 0 0000273D C20800 ret 8 3060 _.L555: 0 00002740 8B3E3C0A mov di, word ptr [_base_seg] 0 00002744 C41E0000 les bx, dword ptr [_LoL] 0 00002748 268B4724 mov ax, word ptr es:[bx+36] 0 0000274C 8946FE mov word ptr [bp-2], ax 0 0000274F C7460E0000 mov word ptr [bp+14], 0 0 00002754 E953FF jmp _.L556 3067 _.L559: 0 00002757 89363C0A mov word ptr [_base_seg], si 0 0000275B EBD9 jmp _.L560 3070 .size _KernelAllocPara, .-_KernelAllocPara 3071 .global _KernelAlloc 3072 .type _KernelAlloc, @function 3073 _KernelAlloc: 0 0000275D 56 push si 0 0000275E 57 push di 0 0000275F 55 push bp 0 00002760 89E5 mov bp, sp 0 00002762 1E push ds 0 00002763 1E push ds 0 00002764 8B7E08 mov di, word ptr [bp+8] 0 00002767 8D450F lea ax, [15+di] 0 0000276A B104 mov cl, 4 0 0000276C D3E8 shr ax, cl 0 0000276E C41E0000 les bx, dword ptr [_LoL] 0 00002772 26837F2400 cmp word ptr es:[bx+36], 0 0 00002777 BE0000 mov si, 0 0 0000277A 753C jne _.L569 0 0000277C 8B1E0000 mov bx, word ptr [_lpTop] 0 00002780 8B160200 mov dx, word ptr [_lpTop+2] 0 00002784 29C2 sub dx, ax 0 00002786 89D0 mov ax, dx 0 00002788 89160200 mov word ptr [_lpTop+2], dx 0 0000278C 8D570F lea dx, [15+bx] 0 0000278F D3EA shr dx, cl 0 00002791 01C2 add dx, ax 0 00002793 83FBF0 cmp bx, -16 0 00002796 7603 jbe _.L570 0 00002798 80C610 add dh, 16 3099 _.L570: 0 0000279B 31C0 xor ax, ax 3101 _.L571: 0 0000279D 57 push di 0 0000279E 56 push si 0 0000279F 52 push dx 0 000027A0 8956FC mov word ptr [bp-4], dx 0 000027A3 50 push ax 0 000027A4 8946FE mov word ptr [bp-2], ax 0 000027A7 E8FEFF call _init_fmemset 0 000027AA 8B46FE mov ax, word ptr [bp-2] 0 000027AD 8B56FC mov dx, word ptr [bp-4] 0 000027B0 89EC mov sp, bp 0 000027B2 5D pop bp 0 000027B3 5F pop di 0 000027B4 5E pop si 0 000027B5 C20600 ret 6 3116 _.L569: 0 000027B8 FF760C push word ptr [bp+12] 0 000027BB 56 push si 0 000027BC FF760A push word ptr [bp+10] 0 000027BF 50 push ax 0 000027C0 E8FEFF call _KernelAllocPara 0 000027C3 EBD8 jmp _.L571 3123 .size _KernelAlloc, .-_KernelAlloc === Switch to base=012B40h -> ".RODATA.STR1.1" 3124 .section .rodata.str1.1 3125 _.LC43: 0 000009FF 425546464552533D .string "BUFFERS=%u not supported, reducing to 99\n" 0 00000A07 2575206E6F742073 0 00000A0F 7570706F72746564 0 00000A17 2C20726564756369 0 00000A1F 6E6720746F203939 0 00000A27 0A00 3127 _.LC44: 0 00000A29 4B65726E656C3A20 .string "Kernel: allocated %d Diskbuffers = %u Bytes in HMA\n" 0 00000A31 616C6C6F63617465 0 00000A39 6420256420446973 0 00000A41 6B62756666657273 0 00000A49 203D202575204279 0 00000A51 74657320696E2048 0 00000A59 4D410A00 === Switch to base=002270h -> ".TEXT" 3129 .text 3130 .type _config_init_buffers, @function 3131 _config_init_buffers: 0 000027C5 56 push si 0 000027C6 57 push di 0 000027C7 55 push bp 0 000027C8 89E5 mov bp, sp 0 000027CA 83EC06 sub sp, 6 0 000027CD 8B7E08 mov di, word ptr [bp+8] 0 000027D0 85FF test di, di 0 000027D2 7D06 jge _.L574 0 000027D4 F7DF neg di 3141 _.L582: 0 000027D6 31C9 xor cx, cx 0 000027D8 EB17 jmp _.L575 3144 _.L574: 0 000027DA 803E000002 cmp byte ptr [_HMAState], 2 0 000027DF 75F5 jne _.L582 0 000027E1 B9F0FF mov cx, -16 0 000027E4 2B0E0000 sub cx, word ptr [_HMAFree] 0 000027E8 BB1402 mov bx, 532 0 000027EB 91 xchg cx, ax 0 000027EC 31D2 xor dx, dx 0 000027EE F7F3 div bx 0 000027F0 91 xchg cx, ax 3154 _.L575: 0 000027F1 83FF05 cmp di, 5 0 000027F4 7F03E9F400 jle _.L583 0 000027F9 83FF63 cmp di, 99 0 000027FC 7E14 jle _.L576 0 000027FE 894EFE mov word ptr [bp-2], cx 0 00002801 57 push di 0 00002802 B8AF02 mov ax, offset _.LC43 0 00002805 50 push ax 0 00002806 E8FEFF call _init_printf 0 00002809 83C404 add sp, 4 0 0000280C BF6300 mov di, 99 0 0000280F 8B4EFE mov cx, word ptr [bp-2] 3167 _.L576: 0 00002812 39F9 cmp cx, di 0 00002814 7302 jnc _.L577 0 00002816 89F9 mov cx, di 3171 _.L577: 0 00002818 C41E0000 les bx, dword ptr [_LoL] 0 0000281C 26894F65 mov word ptr es:[bx+101], cx 0 00002820 8D576D lea dx, [109+bx] 0 00002823 26895738 mov word ptr es:[bx+56], dx 0 00002827 268C473A mov word ptr es:[bx+58], es 0 0000282B B81402 mov ax, 532 0 0000282E F7E1 mul cx 0 00002830 894EFA mov word ptr [bp-6], cx 0 00002833 8946FC mov word ptr [bp-4], ax 0 00002836 50 push ax 0 00002837 E8FEFF call _HMAalloc 0 0000283A 96 xchg si, ax 0 0000283B 8956FE mov word ptr [bp-2], dx 0 0000283E 92 xchg dx, ax 0 0000283F 09F0 or ax, si 0 00002841 8B4EFA mov cx, word ptr [bp-6] 0 00002844 7403E9AA00 jne _.L578 0 00002849 50 push ax 0 0000284A B042 mov al, 66 0 0000284C 50 push ax 0 0000284D FF76FC push word ptr [bp-4] 0 00002850 E8FEFF call _KernelAlloc 0 00002853 96 xchg si, ax 0 00002854 8956FE mov word ptr [bp-2], dx 0 00002857 803E000002 cmp byte ptr [_HMAState], 2 0 0000285C 8B4EFA mov cx, word ptr [bp-6] 0 0000285F 7515 jne _.L579 0 00002861 B80000 mov ax, offset _firstAvailableBuf@OZSEG16 0 00002864 8B160000 mov dx, word ptr [_HMAFree] 0 00002868 8EC0 mov es, ax 0 0000286A 2689160000 mov word ptr es:[_firstAvailableBuf], dx 0 0000286F 26C7060200FFFF mov word ptr es:[_firstAvailableBuf+2], -1 3204 _.L579: 0 00002876 C41E0000 les bx, dword ptr [_LoL] 0 0000287A 26C7477A0000 mov word ptr es:[bx+122], offset _DiskTransferBuffer 0 00002880 B80000 mov ax, offset _DiskTransferBuffer@OZSEG16 0 00002883 2689477C mov word ptr es:[bx+124], ax 0 00002887 2689776D mov word ptr es:[bx+109], si 0 0000288B 8B46FE mov ax, word ptr [bp-2] 0 0000288E 2689476F mov word ptr es:[bx+111], ax 0 00002892 8B5EFC mov bx, word ptr [bp-4] 0 00002895 8D80ECFD lea ax, [-532+bx+si] 0 00002899 8E46FE mov es, word ptr [bp-2] 0 0000289C 26894402 mov word ptr es:[si+2], ax 0 000028A0 89C8 mov ax, cx 0 000028A2 48 dec ax 0 000028A3 89F3 mov bx, si 3219 _.L580: 0 000028A5 8D971402 lea dx, [532+bx] 0 000028A9 8E46FE mov es, word ptr [bp-2] 0 000028AC 268917 mov word ptr es:[bx], dx 0 000028AF 8E46FE mov es, word ptr [bp-2] 0 000028B2 89D7 mov di, dx 0 000028B4 26895D02 mov word ptr es:[di+2], bx 0 000028B8 89D3 mov bx, dx 0 000028BA 48 dec ax 0 000028BB 75E8 jne _.L580 0 000028BD 8B5EFC mov bx, word ptr [bp-4] 0 000028C0 8D98ECFD lea bx, [-532+bx+si] 0 000028C4 8E46FE mov es, word ptr [bp-2] 0 000028C7 268937 mov word ptr es:[bx], si 0 000028CA 837EFEFF cmp word ptr [bp-2], -1 0 000028CE 7515 jne _.L573 0 000028D0 803E150000 cmp byte ptr [_InitKernelConfig+21], 0 0 000028D5 780E js _.L573 0 000028D7 FF76FC push word ptr [bp-4] 0 000028DA 51 push cx 0 000028DB B8D902 mov ax, offset _.LC44 0 000028DE 50 push ax 0 000028DF E8FEFF call _init_printf 0 000028E2 83C406 add sp, 6 3243 _.L573: 0 000028E5 89EC mov sp, bp 0 000028E7 5D pop bp 0 000028E8 5F pop di 0 000028E9 5E pop si 0 000028EA C20200 ret 2 3249 _.L583: 0 000028ED BF0600 mov di, 6 0 000028F0 E91FFF jmp _.L576 3252 _.L578: 0 000028F3 C41E0000 les bx, dword ptr [_LoL] 0 000028F7 26C6477901 mov byte ptr es:[bx+121], 1 0 000028FC BB0000 mov bx, offset _firstAvailableBuf@OZSEG16 0 000028FF B81402 mov ax, 532 0 00002902 F7E7 mul di 0 00002904 01F0 add ax, si 0 00002906 8EC3 mov es, bx 0 00002908 26A30000 mov word ptr es:[_firstAvailableBuf], ax 0 0000290C 8B46FE mov ax, word ptr [bp-2] 0 0000290F 26A30200 mov word ptr es:[_firstAvailableBuf+2], ax 0 00002913 E960FF jmp _.L579 3264 .size _config_init_buffers, .-_config_init_buffers 3265 .global _PreConfig 3266 .type _PreConfig, @function 3267 _PreConfig: 0 00002916 56 push si 0 00002917 57 push di 0 00002918 55 push bp 0 00002919 89E5 mov bp, sp 0 0000291B 1E push ds 0 0000291C 1E push ds 0 0000291D 8B1E0000 mov bx, word ptr [_LoL] 0 00002921 A10200 mov ax, word ptr [_LoL+2] 0 00002924 31F6 xor si, si 0 00002926 8EC0 mov es, ax 0 00002928 26C7472ACC00 mov word ptr es:[bx+42], 204 0 0000292E 2689472C mov word ptr es:[bx+44], ax 0 00002932 A00100 mov al, byte ptr [_Config+1] 0 00002935 98 cbw 0 00002936 50 push ax 0 00002937 E88BFE call _config_init_buffers 0 0000293A 8B1E0000 mov bx, word ptr [_LoL] 0 0000293E 8B3E0200 mov di, word ptr [_LoL+2] 0 00002942 56 push si 0 00002943 B04C mov al, 76 0 00002945 50 push ax 0 00002946 8EC7 mov es, di 0 00002948 268A4747 mov al, byte ptr es:[bx+71] 0 0000294C 895EFE mov word ptr [bp-2], bx 0 0000294F B258 mov dl, 88 0 00002951 F6E2 mul dl 0 00002953 50 push ax 0 00002954 E8FEFF call _KernelAlloc 0 00002957 8EC7 mov es, di 0 00002959 8B5EFE mov bx, word ptr [bp-2] 0 0000295C 2689473C mov word ptr es:[bx+60], ax 0 00002960 2689573E mov word ptr es:[bx+62], dx 0 00002964 89EC mov sp, bp 0 00002966 5D pop bp 0 00002967 5F pop di 0 00002968 5E pop si 0 00002969 C3 ret 3305 .size _PreConfig, .-_PreConfig 3306 .global _PreConfig2 3307 .type _PreConfig2, @function 3308 _PreConfig2: 0 0000296A 56 push si 0 0000296B 57 push di 0 0000296C 55 push bp 0 0000296D 89E5 mov bp, sp 0 0000296F 1E push ds 0 00002970 8B360000 mov si, word ptr [_LoL] 0 00002974 8B3E0200 mov di, word ptr [_LoL+2] 0 00002978 E8FEFF call _DynLast 0 0000297B 89C1 mov cx, ax 0 0000297D 83C10F add cx, 15 0 00002980 89CB mov bx, cx 0 00002982 83C01E add ax, 30 0 00002985 B104 mov cl, 4 0 00002987 D3E8 shr ax, cl 0 00002989 01C2 add dx, ax 0 0000298B 83FBF0 cmp bx, -16 0 0000298E 7603 jbe _.L589 0 00002990 80C610 add dh, 16 3327 _.L589: 0 00002993 8EC7 mov es, di 0 00002995 26895424 mov word ptr es:[si+36], dx 0 00002999 89163C0A mov word ptr [_base_seg], dx 0 0000299D BE0000 mov si, offset _Config 0 000029A0 837C1100 cmp word ptr [si+17], 0 0 000029A4 741C je _.L590 0 000029A6 E8FEFF call _ebdasize 0 000029A9 A30000 mov word ptr [_ebda_size], ax 0 000029AC 8B5411 mov dx, word ptr [si+17] 0 000029AF 39D0 cmp ax, dx 0 000029B1 7604 jbe _.L591 0 000029B3 89160000 mov word ptr [_ebda_size], dx 3340 _.L591: 0 000029B7 A10000 mov ax, word ptr [_ebda_size] 0 000029BA B10A mov cl, 10 0 000029BC D3E8 shr ax, cl 0 000029BE 01060000 add word ptr [_ram_top], ax 3345 _.L590: 0 000029C2 B05A mov al, 90 0 000029C4 50 push ax 0 000029C5 A10000 mov ax, word ptr [_ram_top] 0 000029C8 B106 mov cl, 6 0 000029CA D3E0 shl ax, cl 0 000029CC 48 dec ax 0 000029CD C41E0000 les bx, dword ptr [_LoL] 0 000029D1 262B4724 sub ax, word ptr es:[bx+36] 0 000029D5 50 push ax 0 000029D6 FF363C0A push word ptr [_base_seg] 0 000029DA E88BE5 call _mcb_init 0 000029DD C41E0000 les bx, dword ptr [_LoL] 0 000029E1 268B7F2A mov di, word ptr es:[bx+42] 0 000029E5 268B472C mov ax, word ptr es:[bx+44] 0 000029E9 8946FE mov word ptr [bp-2], ax 0 000029EC 31F6 xor si, si 0 000029EE 56 push si 0 000029EF B046 mov al, 70 0 000029F1 50 push ax 0 000029F2 B8B700 mov ax, 183 0 000029F5 50 push ax 0 000029F6 E8FEFF call _KernelAlloc 0 000029F9 8E46FE mov es, word ptr [bp-2] 0 000029FC 268905 mov word ptr es:[di], ax 0 000029FF 8E46FE mov es, word ptr [bp-2] 0 00002A02 26895502 mov word ptr es:[di+2], dx 0 00002A06 8EC2 mov es, dx 0 00002A08 93 xchg bx, ax 0 00002A09 26C707FFFF mov word ptr es:[bx], -1 0 00002A0E 26C74702FFFF mov word ptr es:[bx+2], -1 0 00002A14 26C747040300 mov word ptr es:[bx+4], 3 0 00002A1A A10000 mov ax, word ptr [_ebda_size] 0 00002A1D 39F0 cmp ax, si 0 00002A1F 7410 je _.L588 0 00002A21 56 push si 0 00002A22 B249 mov dl, 73 0 00002A24 52 push dx 0 00002A25 50 push ax 0 00002A26 E8FEFF call _KernelAlloc 0 00002A29 52 push dx 0 00002A2A FF360000 push word ptr [_ebda_size] 0 00002A2E E8FEFF call _movebda 3388 _.L588: 0 00002A31 89EC mov sp, bp 0 00002A33 5D pop bp 0 00002A34 5F pop di 0 00002A35 5E pop si 0 00002A36 C3 ret 3394 .size _PreConfig2, .-_PreConfig2 3395 .global _PostConfig 3396 .type _PostConfig, @function 3397 _PostConfig: 0 00002A37 56 push si 0 00002A38 57 push di 0 00002A39 55 push bp 0 00002A3A 89E5 mov bp, sp 0 00002A3C 1E push ds 0 00002A3D 1E push ds 0 00002A3E 803E000001 cmp byte ptr [_HMAState], 1 0 00002A43 750C jne _.L599 0 00002A45 E8FEFF call _MoveKernelToHMA 0 00002A48 85C0 test ax, ax 0 00002A4A 7405 je _.L599 0 00002A4C C606000002 mov byte ptr [_HMAState], 2 3410 _.L599: 0 00002A51 BE0000 mov si, offset _Config 0 00002A54 803C00 cmp byte ptr [si], 0 0 00002A57 740F je _.L601 0 00002A59 C606030001 mov byte ptr [_Config+3], 1 0 00002A5E C6060B0001 mov byte ptr [_Config+11], 1 0 00002A63 C6060D0001 mov byte ptr [_Config+13], 1 3417 _.L601: 0 00002A68 8B1E0000 mov bx, word ptr [_LoL] 0 00002A6C A10200 mov ax, word ptr [_LoL+2] 0 00002A6F 8A740A mov dh, byte ptr [si+10] 0 00002A72 8EC0 mov es, ax 0 00002A74 26887747 mov byte ptr es:[bx+71], dh 0 00002A78 268A5746 mov dl, byte ptr es:[bx+70] 0 00002A7C 38D6 cmp dh, dl 0 00002A7E 7304 jnc _.L602 0 00002A80 26885747 mov byte ptr es:[bx+71], dl 3427 _.L602: 0 00002A84 8A4401 mov al, byte ptr [si+1] 0 00002A87 98 cbw 0 00002A88 50 push ax 0 00002A89 E839FD call _config_init_buffers 0 00002A8C C43E0000 les di, dword ptr [_LoL] 0 00002A90 26C45D2A les bx, dword ptr es:[di+42] 0 00002A94 268B3F mov di, word ptr es:[bx] 0 00002A97 268B4702 mov ax, word ptr es:[bx+2] 0 00002A9B 8946FC mov word ptr [bp-4], ax 0 00002A9E 8A4403 mov al, byte ptr [si+3] 0 00002AA1 30E4 xor ah, ah 0 00002AA3 50 push ax 0 00002AA4 B046 mov al, 70 0 00002AA6 50 push ax 0 00002AA7 8A4402 mov al, byte ptr [si+2] 0 00002AAA 30E4 xor ah, ah 0 00002AAC BA3B00 mov dx, 59 0 00002AAF F7E2 mul dx 0 00002AB1 052EFE add ax, -466 0 00002AB4 50 push ax 0 00002AB5 E8FEFF call _KernelAlloc 0 00002AB8 8E46FC mov es, word ptr [bp-4] 0 00002ABB 268905 mov word ptr es:[di], ax 0 00002ABE 8E46FC mov es, word ptr [bp-4] 0 00002AC1 26895502 mov word ptr es:[di+2], dx 0 00002AC5 8EC2 mov es, dx 0 00002AC7 89C3 mov bx, ax 0 00002AC9 26C707FFFF mov word ptr es:[bx], -1 0 00002ACE 26C74702FFFF mov word ptr es:[bx+2], -1 0 00002AD4 8A4C02 mov cl, byte ptr [si+2] 0 00002AD7 884EFC mov byte ptr [bp-4], cl 0 00002ADA C646FD00 mov byte ptr [bp-3], 0 0 00002ADE 8B4EFC mov cx, word ptr [bp-4] 0 00002AE1 83C1F8 add cx, -8 0 00002AE4 26894F04 mov word ptr es:[bx+4], cx 0 00002AE8 8B1E0000 mov bx, word ptr [_LoL] 0 00002AEC 8B3E0200 mov di, word ptr [_LoL+2] 0 00002AF0 8A440B mov al, byte ptr [si+11] 0 00002AF3 30E4 xor ah, ah 0 00002AF5 50 push ax 0 00002AF6 B04C mov al, 76 0 00002AF8 50 push ax 0 00002AF9 8EC7 mov es, di 0 00002AFB 268A4747 mov al, byte ptr es:[bx+71] 0 00002AFF 895EFE mov word ptr [bp-2], bx 0 00002B02 B258 mov dl, 88 0 00002B04 F6E2 mul dl 0 00002B06 50 push ax 0 00002B07 E8FEFF call _KernelAlloc 0 00002B0A 8EC7 mov es, di 0 00002B0C 8B5EFE mov bx, word ptr [bp-2] 0 00002B0F 2689473C mov word ptr es:[bx+60], ax 0 00002B13 2689573E mov word ptr es:[bx+62], dx 0 00002B17 8A540C mov dl, byte ptr [si+12] 0 00002B1A 84D2 test dl, dl 0 00002B1C 7424 je _.L597 0 00002B1E 8A440D mov al, byte ptr [si+13] 0 00002B21 98 cbw 0 00002B22 50 push ax 0 00002B23 B053 mov al, 83 0 00002B25 50 push ax 0 00002B26 88D0 mov al, dl 0 00002B28 98 cbw 0 00002B29 F7640E mul word ptr [si+14] 0 00002B2C 50 push ax 0 00002B2D E8FEFF call _KernelAlloc 0 00002B30 91 xchg cx, ax 0 00002B31 FF360E00 push word ptr [_Config+14] 0 00002B35 8A440C mov al, byte ptr [si+12] 0 00002B38 98 cbw 0 00002B39 50 push ax 0 00002B3A 52 push dx 0 00002B3B 51 push cx 0 00002B3C E8FEFF call _init_stacks 0 00002B3F 83C408 add sp, 8 3503 _.L597: 0 00002B42 89EC mov sp, bp 0 00002B44 5D pop bp 0 00002B45 5F pop di 0 00002B46 5E pop si 0 00002B47 C3 ret 3509 .size _PostConfig, .-_PostConfig 3510 .global _strcat 3511 .type _strcat, @function 3512 _strcat: 0 00002B48 56 push si 0 00002B49 55 push bp 0 00002B4A 89E5 mov bp, sp 0 00002B4C 8B7606 mov si, word ptr [bp+6] 0 00002B4F 56 push si 0 00002B50 E8FEFF call _init_strlen 0 00002B53 FF7608 push word ptr [bp+8] 0 00002B56 01F0 add ax, si 0 00002B58 50 push ax 0 00002B59 E8FEFF call _init_strcpy 0 00002B5C 96 xchg si, ax 0 00002B5D 89EC mov sp, bp 0 00002B5F 5D pop bp 0 00002B60 5E pop si 0 00002B61 C20400 ret 4 3528 .size _strcat, .-_strcat === Switch to base=012B40h -> ".RODATA.STR1.1" 3529 .section .rodata.str1.1 3530 _.LC45: 0 00000A5D 3D00 .string "=" 3532 _.LC46: 0 00000A5F 4D61737465722065 .string "Master environment is full - can't add \"%s\"\n" 0 00000A67 6E7669726F6E6D65 0 00000A6F 6E74206973206675 0 00000A77 6C6C202D2063616E 0 00000A7F 2774206164642022 0 00000A87 2573220A00 3534 _.LC47: 0 00000A8C 496E76616C696420 .string "Invalid SET command: \"%s\"\n" 0 00000A94 53455420636F6D6D 0 00000A9C 616E643A20222573 0 00000AA4 220A00 === Switch to base=002270h -> ".TEXT" 3536 .text 3537 .type _CmdSet, @function 3538 _CmdSet: 0 00002B64 56 push si 0 00002B65 57 push di 0 00002B66 55 push bp 0 00002B67 89E5 mov bp, sp 0 00002B69 83EC0E sub sp, 14 0 00002B6C BA3808 mov dx, offset _szBuf 0 00002B6F 52 push dx 0 00002B70 8956FE mov word ptr [bp-2], dx 0 00002B73 FF7608 push word ptr [bp+8] 0 00002B76 E8FEFF call _GetStringArg 0 00002B79 50 push ax 0 00002B7A E88BE6 call _skipwh 0 00002B7D 8946F8 mov word ptr [bp-8], ax 0 00002B80 93 xchg bx, ax 0 00002B81 803F3D cmp byte ptr [bx], 61 0 00002B84 8B56FE mov dx, word ptr [bp-2] 0 00002B87 7403E9F100 jne _.L614 0 00002B8C 89D7 mov di, dx 0 00002B8E 52 push dx 0 00002B8F E813E6 call _strupr 0 00002B92 57 push di 0 00002B93 E8FEFF call _init_strlen 0 00002B96 8946F4 mov word ptr [bp-12], ax 0 00002B99 B80D03 mov ax, offset _.LC45 0 00002B9C 50 push ax 0 00002B9D 57 push di 0 00002B9E E8FEFF call _strcat 0 00002BA1 B80000 mov ax, offset _master_env@OZSEG16 0 00002BA4 8946FC mov word ptr [bp-4], ax 0 00002BA7 BB0000 mov bx, offset _master_env 0 00002BAA 8946FE mov word ptr [bp-2], ax 3570 _.L616: 0 00002BAD 8B46F4 mov ax, word ptr [bp-12] 0 00002BB0 40 inc ax 0 00002BB1 8946F6 mov word ptr [bp-10], ax 0 00002BB4 8C56FA mov word ptr [bp-6], ss 0 00002BB7 50 push ax 0 00002BB8 FF76FC push word ptr [bp-4] 0 00002BBB 53 push bx 0 00002BBC 895EF2 mov word ptr [bp-14], bx 0 00002BBF 16 push ss 0 00002BC0 57 push di 0 00002BC1 E8FEFF call _init_fmemcmp 0 00002BC4 85C0 test ax, ax 0 00002BC6 8B5EF2 mov bx, word ptr [bp-14] 0 00002BC9 741C je _.L615 0 00002BCB FF76FC push word ptr [bp-4] 0 00002BCE 53 push bx 0 00002BCF E8FEFF call _init_fstrlen 0 00002BD2 96 xchg si, ax 0 00002BD3 8B5EF2 mov bx, word ptr [bp-14] 0 00002BD6 8D5801 lea bx, [1+bx+si] 0 00002BD9 8E46FC mov es, word ptr [bp-4] 0 00002BDC 26803F00 cmp byte ptr es:[bx], 0 0 00002BE0 75CB jne _.L616 0 00002BE2 31DB xor bx, bx 0 00002BE4 895EFE mov word ptr [bp-2], bx 3596 _.L615: 0 00002BE7 895EFC mov word ptr [bp-4], bx 0 00002BEA 8B76F8 mov si, word ptr [bp-8] 0 00002BED 46 inc si 0 00002BEE 56 push si 0 00002BEF E816E6 call _skipwh 0 00002BF2 50 push ax 0 00002BF3 57 push di 0 00002BF4 E8FEFF call _strcat 0 00002BF7 57 push di 0 00002BF8 E8FEFF call _init_strlen 0 00002BFB 89C6 mov si, ax 0 00002BFD 3B46F6 cmp ax, word ptr [bp-10] 0 00002C00 8B5EFC mov bx, word ptr [bp-4] 0 00002C03 750F jne _.L617 0 00002C05 FF76FE push word ptr [bp-2] 0 00002C08 53 push bx 0 00002C09 E882E3 call _deletevar 3614 _.L613: 0 00002C0C 89EC mov sp, bp 0 00002C0E 5D pop bp 0 00002C0F 5F pop di 0 00002C10 5E pop si 0 00002C11 C20200 ret 2 3620 _.L617: 0 00002C14 8B46FE mov ax, word ptr [bp-2] 0 00002C17 09D8 or ax, bx 0 00002C19 740E je _.L619 0 00002C1B FF76FE push word ptr [bp-2] 0 00002C1E 53 push bx 0 00002C1F 895EFC mov word ptr [bp-4], bx 0 00002C22 E8FEFF call _init_fstrlen 0 00002C25 40 inc ax 0 00002C26 8B5EFC mov bx, word ptr [bp-4] 3630 _.L619: 0 00002C29 B98000 mov cx, offset _master_env+128 0 00002C2C 8B16B602 mov dx, word ptr [_envp] 0 00002C30 29C2 sub dx, ax 0 00002C32 29D1 sub cx, dx 0 00002C34 83C1FD add cx, -3 0 00002C37 39CE cmp si, cx 0 00002C39 7D35 jge _.L621 0 00002C3B FF76FE push word ptr [bp-2] 0 00002C3E 53 push bx 0 00002C3F E84CE3 call _deletevar 0 00002C42 FF76FA push word ptr [bp-6] 0 00002C45 B83808 mov ax, offset _szBuf 0 00002C48 50 push ax 0 00002C49 FF36B802 push word ptr [_envp+2] 0 00002C4D FF36B602 push word ptr [_envp] 0 00002C51 E8FEFF call _init_fstrcpy 0 00002C54 A1B802 mov ax, word ptr [_envp+2] 0 00002C57 8B1EB602 mov bx, word ptr [_envp] 0 00002C5B 8D5801 lea bx, [1+bx+si] 0 00002C5E 891EB602 mov word ptr [_envp], bx 0 00002C62 8EC0 mov es, ax 0 00002C64 26C7070000 mov word ptr es:[bx], 0 0 00002C69 26C6470200 mov byte ptr es:[bx+2], 0 0 00002C6E EB9C jmp _.L613 3655 _.L621: 0 00002C70 57 push di 0 00002C71 B80F03 mov ax, offset _.LC46 3658 _.L628: 0 00002C74 50 push ax 0 00002C75 E8FEFF call _init_printf 0 00002C78 83C404 add sp, 4 0 00002C7B EB8F jmp _.L613 3663 _.L614: 0 00002C7D 52 push dx 0 00002C7E B83C03 mov ax, offset _.LC47 0 00002C81 EBF1 jmp _.L628 3667 .size _CmdSet, .-_CmdSet === Switch to base=012B40h -> ".RODATA.STR1.1" 3668 .section .rodata.str1.1 3669 _.LC48: 0 00000AA7 200D0A00 .string " \r\n" === Switch to base=002270h -> ".TEXT" 3671 .text 3672 .type _LoadDevice, @function 3673 _LoadDevice: 0 00002C83 56 push si 0 00002C84 57 push di 0 00002C85 55 push bp 0 00002C86 89E5 mov bp, sp 0 00002C88 83EC24 sub sp, 36 0 00002C8B 8B7E08 mov di, word ptr [bp+8] 0 00002C8E 837E0E00 cmp word ptr [bp+14], 0 0 00002C92 7446 je _.L630 0 00002C94 8B0E3A0A mov cx, word ptr [_umb_base_seg] 0 00002C98 A10000 mov ax, word ptr [_umb_start] 3684 _.L631: 0 00002C9B 39C1 cmp cx, ax 0 00002C9D 9F lahf 0 00002C9E D0E4 shl ah, 1 0 00002CA0 99 cwd 0 00002CA1 29D1 sub cx, dx 0 00002CA3 41 inc cx 0 00002CA4 894EE4 mov word ptr [bp-28], cx 0 00002CA7 BE3808 mov si, offset _szBuf 0 00002CAA 56 push si 0 00002CAB 57 push di 0 00002CAC E8FEFF call _GetStringArg 0 00002CAF 8B46E4 mov ax, word ptr [bp-28] 0 00002CB2 8946EA mov word ptr [bp-22], ax 0 00002CB5 8946EC mov word ptr [bp-20], ax 0 00002CB8 56 push si 0 00002CB9 8D46EA lea ax, [-22+bp] 0 00002CBC 50 push ax 0 00002CBD B80300 mov ax, 3 0 00002CC0 50 push ax 0 00002CC1 E8FEFF call _init_DosExec 0 00002CC4 8946E0 mov word ptr [bp-32], ax 0 00002CC7 85C0 test ax, ax 0 00002CC9 741D je _.L633 0 00002CCB 57 push di 0 00002CCC E82CE2 call _CfgFailure 3710 _.L629: 0 00002CCF 8B46E0 mov ax, word ptr [bp-32] 0 00002CD2 89EC mov sp, bp 0 00002CD4 5D pop bp 0 00002CD5 5F pop di 0 00002CD6 5E pop si 0 00002CD7 C20800 ret 8 3717 _.L630: 0 00002CDA 8B0E3C0A mov cx, word ptr [_base_seg] 0 00002CDE C41E0000 les bx, dword ptr [_LoL] 0 00002CE2 268B4724 mov ax, word ptr es:[bx+36] 0 00002CE6 EBB3 jmp _.L631 3722 _.L633: 0 00002CE8 57 push di 0 00002CE9 56 push si 0 00002CEA E8FEFF call _init_strcpy 0 00002CED 56 push si 0 00002CEE E8B4E4 call _strupr 0 00002CF1 B85703 mov ax, offset _.LC48 0 00002CF4 50 push ax 0 00002CF5 56 push si 0 00002CF6 E8FEFF call _strcat 0 00002CF9 8B7EE0 mov di, word ptr [bp-32] 0 00002CFC 89FA mov dx, di 3734 _.L635: 0 00002CFE 83FAFF cmp dx, -1 0 00002D01 7419 je _.L636 0 00002D03 8D460A lea ax, [10+bp] 0 00002D06 50 push ax 0 00002D07 FF760E push word ptr [bp+14] 0 00002D0A 56 push si 0 00002D0B FF76E4 push word ptr [bp-28] 0 00002D0E 57 push di 0 00002D0F E8FEFF call _init_device 0 00002D12 85C0 test ax, ax 0 00002D14 7503E9BC00 je _.L637 0 00002D19 8946E0 mov word ptr [bp-32], ax 3747 _.L636: 0 00002D1C 833E000002 cmp word ptr [_UmbState], 2 0 00002D21 75AC jne _.L629 0 00002D23 E8FEFF call _DetectXMSDriver 0 00002D26 8946DE mov word ptr [bp-34], ax 0 00002D29 09D0 or ax, dx 0 00002D2B 74A2 je _.L629 0 00002D2D 8D46E8 lea ax, [-24+bp] 0 00002D30 50 push ax 0 00002D31 8D46E6 lea ax, [-26+bp] 0 00002D34 50 push ax 0 00002D35 52 push dx 0 00002D36 8956E4 mov word ptr [bp-28], dx 0 00002D39 FF76DE push word ptr [bp-34] 0 00002D3C E8FEFF call _UMB_get_largest 0 00002D3F 85C0 test ax, ax 0 00002D41 748C je _.L629 0 00002D43 C70600000100 mov word ptr [_UmbState], 1 0 00002D49 E8FEFF call _init_oem 0 00002D4C A30000 mov word ptr [_ram_top], ax 0 00002D4F B106 mov cl, 6 0 00002D51 D3E0 shl ax, cl 0 00002D53 48 dec ax 0 00002D54 C41E0000 les bx, dword ptr [_LoL] 0 00002D58 2689878C00 mov word ptr es:[bx+140], ax 0 00002D5D A13C0A mov ax, word ptr [_base_seg] 0 00002D60 8EC0 mov es, ax 0 00002D62 26C60600004D mov byte ptr es:[0], 77 0 00002D68 26FF0E0300 dec word ptr es:[3] 0 00002D6D C41E0000 les bx, dword ptr [_LoL] 0 00002D71 268B8F8C00 mov cx, word ptr es:[bx+140] 0 00002D76 89C8 mov ax, cx 0 00002D78 F7D0 not ax 0 00002D7A 0346E6 add ax, word ptr [bp-26] 0 00002D7D 50 push ax 0 00002D7E 51 push cx 0 00002D7F E8BDEA call _mumcb_init 0 00002D82 B04D mov al, 77 0 00002D84 50 push ax 0 00002D85 8B46E8 mov ax, word ptr [bp-24] 0 00002D88 83C0FE add ax, -2 0 00002D8B 50 push ax 0 00002D8C FF76E6 push word ptr [bp-26] 0 00002D8F E8D6E1 call _mcb_init 0 00002D92 8B46E6 mov ax, word ptr [bp-26] 0 00002D95 A30000 mov word ptr [_umb_start], ax 0 00002D98 A33A0A mov word ptr [_umb_base_seg], ax 0 00002D9B 8B4EE8 mov cx, word ptr [bp-24] 0 00002D9E 890E0000 mov word ptr [_UMB_top], cx 0 00002DA2 8946E2 mov word ptr [bp-30], ax 0 00002DA5 8B56E4 mov dx, word ptr [bp-28] 3798 _.L641: 0 00002DA8 8D46E8 lea ax, [-24+bp] 0 00002DAB 50 push ax 0 00002DAC 8D46E6 lea ax, [-26+bp] 0 00002DAF 50 push ax 0 00002DB0 52 push dx 0 00002DB1 8956E4 mov word ptr [bp-28], dx 0 00002DB4 FF76DE push word ptr [bp-34] 0 00002DB7 E8FEFF call _UMB_get_largest 0 00002DBA 85C0 test ax, ax 0 00002DBC 8B56E4 mov dx, word ptr [bp-28] 0 00002DBF 7547 jne _.L656 0 00002DC1 8E46E2 mov es, word ptr [bp-30] 0 00002DC4 26FF060300 inc word ptr es:[3] 0 00002DC9 8E46E2 mov es, word ptr [bp-30] 0 00002DCC 26C60600005A mov byte ptr es:[0], 90 0 00002DD2 E9FAFE jmp _.L629 3815 _.L637: 0 00002DD5 8E46E4 mov es, word ptr [bp-28] 0 00002DD8 268B15 mov dx, word ptr es:[di] 0 00002DDB C41E0000 les bx, dword ptr [_LoL] 0 00002DDF 268B4F48 mov cx, word ptr es:[bx+72] 0 00002DE3 268B474A mov ax, word ptr es:[bx+74] 0 00002DE7 8E46E4 mov es, word ptr [bp-28] 0 00002DEA 26890D mov word ptr es:[di], cx 0 00002DED 8E46E4 mov es, word ptr [bp-28] 0 00002DF0 26894502 mov word ptr es:[di+2], ax 0 00002DF4 C41E0000 les bx, dword ptr [_LoL] 0 00002DF8 26897F48 mov word ptr es:[bx+72], di 0 00002DFC 8B46E4 mov ax, word ptr [bp-28] 0 00002DFF 2689474A mov word ptr es:[bx+74], ax 0 00002E03 89D7 mov di, dx 0 00002E05 E9F6FE jmp _.L635 3831 _.L656: 0 00002E08 8956E4 mov word ptr [bp-28], dx 0 00002E0B B04D mov al, 77 0 00002E0D 50 push ax 0 00002E0E 8B46E8 mov ax, word ptr [bp-24] 0 00002E11 83C0FE add ax, -2 0 00002E14 50 push ax 0 00002E15 FF76E6 push word ptr [bp-26] 0 00002E18 E84DE1 call _mcb_init 0 00002E1B C41E0000 les bx, dword ptr [_LoL] 0 00002E1F 268BBF8C00 mov di, word ptr es:[bx+140] 0 00002E24 8B4EE6 mov cx, word ptr [bp-26] 0 00002E27 89FE mov si, di 0 00002E29 8B56E4 mov dx, word ptr [bp-28] 3845 _.L642: 0 00002E2C 39F1 cmp cx, si 0 00002E2E 774B ja _.L643 3848 _.L647: 0 00002E30 8EC7 mov es, di 0 00002E32 268B1E0300 mov bx, word ptr es:[3] 0 00002E37 8D4101 lea ax, [1+bx+di] 0 00002E3A 8946E4 mov word ptr [bp-28], ax 0 00002E3D 3B4EE2 cmp cx, word ptr [bp-30] 0 00002E40 7251 jc _.L644 3855 _.L645: 0 00002E42 8B46E6 mov ax, word ptr [bp-26] 0 00002E45 2B46E4 sub ax, word ptr [bp-28] 0 00002E48 83F801 cmp ax, 1 0 00002E4B 7403E99A00 jne _.L649 0 00002E50 C41E0000 les bx, dword ptr [_LoL] 0 00002E54 268B8F8C00 mov cx, word ptr es:[bx+140] 0 00002E59 89CE mov si, cx 3863 _.L650: 0 00002E5B 3976E4 cmp word ptr [bp-28], si 0 00002E5E 7771 ja _.L651 3866 _.L654: 0 00002E60 8B46E8 mov ax, word ptr [bp-24] 0 00002E63 8EC1 mov es, cx 0 00002E65 2601060300 add word ptr es:[3], ax 3870 _.L652: 0 00002E6A 8B46E6 mov ax, word ptr [bp-26] 0 00002E6D 3946E2 cmp word ptr [bp-30], ax 0 00002E70 7203E933FF jnc _.L641 0 00002E75 8946E2 mov word ptr [bp-30], ax 0 00002E78 E92DFF jmp _.L641 3876 _.L643: 0 00002E7B 8EC6 mov es, si 0 00002E7D 31DB xor bx, bx 0 00002E7F 26803F4D cmp byte ptr es:[bx], 77 0 00002E83 75AB jne _.L647 0 00002E85 8EC6 mov es, si 0 00002E87 268B1E0300 mov bx, word ptr es:[3] 0 00002E8C 89F7 mov di, si 0 00002E8E 8D7001 lea si, [1+bx+si] 0 00002E91 EB99 jmp _.L642 3886 _.L644: 0 00002E93 8B46E4 mov ax, word ptr [bp-28] 0 00002E96 29C8 sub ax, cx 0 00002E98 8B76E8 mov si, word ptr [bp-24] 0 00002E9B 39F0 cmp ax, si 0 00002E9D 751A jne _.L648 0 00002E9F 8E46E4 mov es, word ptr [bp-28] 0 00002EA2 268B1E0300 mov bx, word ptr es:[3] 0 00002EA7 96 xchg si, ax 0 00002EA8 8D4001 lea ax, [1+bx+si] 0 00002EAB 8946E8 mov word ptr [bp-24], ax 0 00002EAE 8EC1 mov es, cx 0 00002EB0 26A30300 mov word ptr es:[3], ax 0 00002EB4 897EE4 mov word ptr [bp-28], di 0 00002EB7 EB89 jmp _.L645 3901 _.L648: 0 00002EB9 8956DC mov word ptr [bp-36], dx 0 00002EBC 29F0 sub ax, si 0 00002EBE 50 push ax 0 00002EBF 89CB mov bx, cx 0 00002EC1 8D48FF lea cx, [-1+bx+si] 0 00002EC4 51 push cx 0 00002EC5 E877E9 call _mumcb_init 0 00002EC8 897EE4 mov word ptr [bp-28], di 0 00002ECB 8B56DC mov dx, word ptr [bp-36] 0 00002ECE E971FF jmp _.L645 3912 _.L651: 0 00002ED1 8EC6 mov es, si 0 00002ED3 31DB xor bx, bx 0 00002ED5 26803F4D cmp byte ptr es:[bx], 77 0 00002ED9 7585 jne _.L654 0 00002EDB 89F1 mov cx, si 0 00002EDD 8EC6 mov es, si 0 00002EDF 268B1E0300 mov bx, word ptr es:[3] 0 00002EE4 8D7001 lea si, [1+bx+si] 0 00002EE7 E971FF jmp _.L650 3922 _.L649: 0 00002EEA 8956DC mov word ptr [bp-36], dx 0 00002EED 48 dec ax 0 00002EEE 50 push ax 0 00002EEF FF76E4 push word ptr [bp-28] 0 00002EF2 E84AE9 call _mumcb_init 0 00002EF5 8B56DC mov dx, word ptr [bp-36] 0 00002EF8 E96FFF jmp _.L652 3930 .size _LoadDevice, .-_LoadDevice === Switch to base=012B40h -> ".RODATA.STR1.1" 3931 .section .rodata.str1.1 3932 _.LC49: 0 00000AAB 4E6F7420656E6F75 .string "Not enough free memory in UMBs: loading low\n" 0 00000AB3 6768206672656520 0 00000ABB 6D656D6F72792069 0 00000AC3 6E20554D42733A20 0 00000ACB 6C6F6164696E6720 0 00000AD3 6C6F770A00 3934 _.LC50: 0 00000AD8 554D427320756E61 .string "UMBs unavailable!\n" 0 00000AE0 7661696C61626C65 0 00000AE8 210A00 === Switch to base=002270h -> ".TEXT" 3936 .text 3937 .type _DeviceHigh, @function 3938 _DeviceHigh: 0 00002EFB 56 push si 0 00002EFC 57 push di 0 00002EFD 55 push bp 0 00002EFE 89E5 mov bp, sp 0 00002F00 8B7E08 mov di, word ptr [bp+8] 0 00002F03 833E000001 cmp word ptr [_UmbState], 1 0 00002F08 BE0000 mov si, 0 0 00002F0B 7535 jne _.L668 0 00002F0D B80100 mov ax, 1 0 00002F10 50 push ax 0 00002F11 A10000 mov ax, word ptr [_UMB_top] 0 00002F14 03060000 add ax, word ptr [_umb_start] 0 00002F18 50 push ax 0 00002F19 56 push si 0 00002F1A 57 push di 0 00002F1B E865FD call _LoadDevice 0 00002F1E 83F8F8 cmp ax, -8 0 00002F21 7517 jne _.L667 0 00002F23 B85B03 mov ax, offset _.LC49 3958 _.L671: 0 00002F26 50 push ax 0 00002F27 E8FEFF call _init_printf 0 00002F2A 56 push si 0 00002F2B FF360200 push word ptr [_lpTop+2] 0 00002F2F FF360000 push word ptr [_lpTop] 0 00002F33 57 push di 0 00002F34 E84CFD call _LoadDevice 0 00002F37 83C402 add sp, 2 3967 _.L667: 0 00002F3A 89EC mov sp, bp 0 00002F3C 5D pop bp 0 00002F3D 5F pop di 0 00002F3E 5E pop si 0 00002F3F C20200 ret 2 3973 _.L668: 0 00002F42 B88803 mov ax, offset _.LC50 0 00002F45 EBDF jmp _.L671 3976 .size _DeviceHigh, .-_DeviceHigh 3977 .type _Device, @function 3978 _Device: 0 00002F47 55 push bp 0 00002F48 89E5 mov bp, sp 0 00002F4A 31C0 xor ax, ax 0 00002F4C 50 push ax 0 00002F4D FF360200 push word ptr [_lpTop+2] 0 00002F51 FF360000 push word ptr [_lpTop] 0 00002F55 FF7604 push word ptr [bp+4] 0 00002F58 E828FD call _LoadDevice 0 00002F5B 89EC mov sp, bp 0 00002F5D 5D pop bp 0 00002F5E C20200 ret 2 3990 .size _Device, .-_Device === Switch to base=012B40h -> ".RODATA.STR1.1" 3991 .section .rodata.str1.1 3992 _.LC51: 0 00000AEB 0D0A00 .string "\r\n" === Switch to base=002270h -> ".TEXT" 3994 .text 3995 .type _InitPgm, @function 3996 _InitPgm: 0 00002F61 56 push si 0 00002F62 55 push bp 0 00002F63 89E5 mov bp, sp 0 00002F65 BE0000 mov si, offset _Config 0 00002F68 C744068F05 mov word ptr [si+6], offset _init.2335 0 00002F6D C744084C05 mov word ptr [si+8], offset _inittail.2336 0 00002F72 B88F05 mov ax, offset _init.2335 0 00002F75 50 push ax 0 00002F76 FF7606 push word ptr [bp+6] 0 00002F79 E8FEFF call _GetStringArg 0 00002F7C 50 push ax 0 00002F7D FF7408 push word ptr [si+8] 0 00002F80 E8FEFF call _init_strcpy 0 00002F83 B89B03 mov ax, offset _.LC51 0 00002F86 50 push ax 0 00002F87 FF7408 push word ptr [si+8] 0 00002F8A E8FEFF call _strcat 0 00002F8D C6441000 mov byte ptr [si+16], 0 0 00002F91 89EC mov sp, bp 0 00002F93 5D pop bp 0 00002F94 5E pop si 0 00002F95 C20200 ret 2 4019 .size _InitPgm, .-_InitPgm 4020 .type _InitPgmHigh, @function 4021 _InitPgmHigh: 0 00002F98 55 push bp 0 00002F99 89E5 mov bp, sp 0 00002F9B FF7604 push word ptr [bp+4] 0 00002F9E E8C0FF call _InitPgm 0 00002FA1 C606100080 mov byte ptr [_Config+16], -128 0 00002FA6 89EC mov sp, bp 0 00002FA8 5D pop bp 0 00002FA9 C20200 ret 2 4030 .size _InitPgmHigh, .-_InitPgmHigh 4031 .global _DoInstall 4032 .type _DoInstall, @function 4033 _DoInstall: 0 00002FAC 833E000000 cmp word ptr [_numInstallCmds], 0 0 00002FB1 7455 je _.L691 0 00002FB3 56 push si 0 00002FB4 57 push di 0 00002FB5 55 push bp 0 00002FB6 89E5 mov bp, sp 0 00002FB8 81EC9E00 sub sp, 158 0 00002FBC B002 mov al, 2 0 00002FBE 50 push ax 0 00002FBF E8FDE0 call _set_strategy 0 00002FC2 A10000 mov ax, word ptr [_ebda_size] 0 00002FC5 050F00 add ax, offset __init_end+15 0 00002FC8 B104 mov cl, 4 0 00002FCA D3E8 shr ax, cl 0 00002FCC 50 push ax 0 00002FCD E8FEFF call _allocmem 0 00002FD0 898664FF mov word ptr [bp-156], ax 0 00002FD4 BE0000 mov si, offset _InstallCommands 0 00002FD7 C78668FF0000 mov word ptr [bp-152], 0 4053 _.L680: 0 00002FDD 8B8668FF mov ax, word ptr [bp-152] 0 00002FE1 3B060000 cmp ax, word ptr [_numInstallCmds] 0 00002FE5 7C22 jl _.L685 0 00002FE7 30C0 xor al, al 0 00002FE9 50 push ax 0 00002FEA E8D2E0 call _set_strategy 0 00002FED C6468149 mov byte ptr [bp-127], 73 0 00002FF1 8B8664FF mov ax, word ptr [bp-156] 0 00002FF5 894690 mov word ptr [bp-112], ax 0 00002FF8 8D4680 lea ax, [-128+bp] 0 00002FFB 50 push ax 0 00002FFC B82100 mov ax, 33 0 00002FFF 50 push ax 0 00003000 E8FEFF call _init_call_intr 0 00003003 89EC mov sp, bp 0 00003005 5D pop bp 0 00003006 5F pop di 0 00003007 5E pop si 4072 _.L691: 0 00003008 C3 ret 4074 _.L685: 0 00003009 FFB48000 push word ptr [si+128] 0 0000300D E8AFE0 call _set_strategy 0 00003010 56 push si 0 00003011 E8F4E1 call _skipwh 0 00003014 89C2 mov dx, ax 0 00003016 97 xchg di, ax 0 00003017 8D5E80 lea bx, [-128+bp] 4082 _.L683: 0 0000301A 8A05 mov al, byte ptr [di] 0 0000301C 8807 mov byte ptr [bx], al 0 0000301E 3C20 cmp al, 32 0 00003020 7E08 jle _.L681 0 00003022 3C2F cmp al, 47 0 00003024 7404 je _.L681 0 00003026 47 inc di 0 00003027 43 inc bx 0 00003028 EBF0 jmp _.L683 4092 _.L681: 0 0000302A 899662FF mov word ptr [bp-158], dx 0 0000302E C60700 mov byte ptr [bx], 0 0 00003031 89F8 mov ax, di 0 00003033 48 dec ax 0 00003034 898666FF mov word ptr [bp-154], ax 0 00003038 57 push di 0 00003039 E8FEFF call _init_strlen 0 0000303C 8845FF mov byte ptr [di-1], al 0 0000303F 98 cbw 0 00003040 93 xchg bx, ax 0 00003041 C6010D mov byte ptr [bx+di], 13 0 00003044 8A45FF mov al, byte ptr [di-1] 0 00003047 98 cbw 0 00003048 8BBE66FF mov di, word ptr [bp-154] 0 0000304C 93 xchg bx, ax 0 0000304D C6410200 mov byte ptr [bx+di+2], 0 0 00003051 C7866AFF0000 mov word ptr [bp-150], 0 0 00003057 89BE6CFF mov word ptr [bp-148], di 0 0000305B 8C966EFF mov word ptr [bp-146], ss 0 0000305F C78674FFFFFF mov word ptr [bp-140], -1 0 00003065 C78676FFFFFF mov word ptr [bp-138], -1 0 0000306B C78670FFFFFF mov word ptr [bp-144], -1 0 00003071 C78672FFFFFF mov word ptr [bp-142], -1 0 00003077 8D4680 lea ax, [-128+bp] 0 0000307A 50 push ax 0 0000307B 8D866AFF lea ax, [-150+bp] 0 0000307F 50 push ax 0 00003080 FFB48000 push word ptr [si+128] 0 00003084 E8FEFF call _init_DosExec 0 00003087 85C0 test ax, ax 0 00003089 8B9662FF mov dx, word ptr [bp-158] 0 0000308D 7404 je _.L684 0 0000308F 52 push dx 0 00003090 E868DE call _CfgFailure 4127 _.L684: 0 00003093 FF8668FF inc word ptr [bp-152] 0 00003097 81C68200 add si, 130 0 0000309B E93FFF jmp _.L680 4131 .size _DoInstall, .-_DoInstall 4132 .local _inittail.2336 4133 .comm _inittail.2336,67,1 4134 .local _init.2335 4135 .comm _init.2335,67,1 === Switch to base=000790h -> ".DATA" 4136 .data 4137 .type _table.2294, @object 4138 .size _table.2294, 90 4139 _table.2294: 0 000002B2 FF20202020202020 .ascii "\377 " 0 000002BA FFFF .hword -1 0 000002BC FF435459494E464F .ascii "\377CTYINFO" 0 000002C4 0500 .hword 5 0 000002C6 FF55434153452020 .ascii "\377UCASE " 0 000002CE 0000 .hword 0 0 000002D0 FF4C434153452020 .ascii "\377LCASE " 0 000002D8 FFFF .hword -1 0 000002DA FF46554341534520 .ascii "\377FUCASE " 0 000002E2 0100 .hword 1 0 000002E4 FF46434841522020 .ascii "\377FCHAR " 0 000002EC 0200 .hword 2 0 000002EE FF434F4C4C415445 .ascii "\377COLLATE" 0 000002F6 0300 .hword 3 0 000002F8 FF44424353202020 .ascii "\377DBCS " 0 00000300 0400 .hword 4 0 00000302 FF5945534E4F2020 .ascii "\377YESNO " 0 0000030A FFFF .hword -1 4158 .local _subf_data.2290 4159 .comm _subf_data.2290,266,1 4160 .local _hdr.2295 4161 .comm _hdr.2295,72,1 4162 .local _count.2297 4163 .comm _count.2297,2,2 4164 .local _entries.2296 4165 .comm _entries.2296,2,2 4166 .type _digits.2179, @object 4167 .size _digits.2179, 17 4168 _digits.2179: 0 0000030C 3031323334353637 .string "0123456789ABCDEF" 0 00000314 3839414243444546 0 0000031C 00 4170 .type _near_mcb.2446, @object 4171 .size _near_mcb.2446, 16 4172 _near_mcb.2446: 0 0000031D 4D .byte 77 0 0000031E 0800 .hword 8 0 00000320 0000 .hword 0 0 00000322 00 .byte 0 0 00000323 00 .byte 0 0 00000324 00 .byte 0 0 00000325 534300 .string "SC" 0 00000328 0000000000 .skip 5,0 0 0000032D 00 .p2align 1 4182 .type _configfile.2119, @object 4183 .size _configfile.2119, 2 4184 _configfile.2119: 0 0000032E 6501 .hword _.LC15 === Switch to base=012B40h -> ".RODATA.STR1.1" 4186 .section .rodata.str1.1 4187 _.LC52: 0 00000AEE 6664636F6E666967 .string "fdconfig.sys" 0 00000AF6 2E73797300 === Switch to base=000790h -> ".DATA" 4189 .data 4190 .p2align 1 4191 .type _altconfigfile.2120, @object 4192 .size _altconfigfile.2120, 2 4193 _altconfigfile.2120: 0 00000330 9E03 .hword _.LC52 === Switch to base=012B40h -> ".RODATA.STR1.1" 4195 .section .rodata.str1.1 4196 _.LC53: 0 00000AFB 636F6E6669672E73 .string "config.sys" 0 00000B03 797300 === Switch to base=000790h -> ".DATA" 4198 .data 4199 .p2align 1 4200 .type _oldconfigfile.2121, @object 4201 .size _oldconfigfile.2121, 2 4202 _oldconfigfile.2121: 0 00000332 AB03 .hword _.LC53 === Switch to base=012B40h -> ".RODATA.STR1.1" 4204 .section .rodata.str1.1 4205 _.LC54: 0 00000B06 434F4E46494700 .string "CONFIG" 4207 _.LC55: 0 00000B0D 414C54434F4E4649 .string "ALTCONFIG" 0 00000B15 4700 4209 _.LC56: 0 00000B17 4F4C44434F4E4649 .string "OLDCONFIG" 0 00000B1F 4700 === Switch to base=012B40h -> ".RODATA" 4211 .section .rodata 4212 .type _configcommands.2125, @object 4213 .size _configcommands.2125, 16 4214 _configcommands.2125: 0 00000629 7C00 .hword _configfile.2119 0 0000062B B603 .hword _.LC54 0 0000062D 7E00 .hword _altconfigfile.2120 0 0000062F BD03 .hword _.LC55 0 00000631 8000 .hword _oldconfigfile.2121 0 00000633 C703 .hword _.LC56 0 00000635 0000 .hword 0 0 00000637 0000 .hword 0 4223 .local _commandbuffer.2117 4224 .comm _commandbuffer.2117,256,1 4225 .local _near_mcb.2441 4226 .comm _near_mcb.2441,16,1 4227 .global _InstallCommands === Switch to base=012B40h -> ".BSS" 4228 .bss 4229 .p2align 0 4230 .type _InstallCommands, @object 4231 .size _InstallCommands, 1300 4232 _InstallCommands: 0 00001226 0000000000000000 .skip 1300,0 0 0000122E 0000000000000000 0 00001236 0000000000000000 0 0000123E 0000000000000000 0 00001246 0000000000000000 0 0000124E 0000000000000000 0 00001256 0000000000000000 0 0000125E 0000000000000000 0 00001266 0000000000000000 0 0000126E 0000000000000000 0 00001276 0000000000000000 0 0000127E 0000000000000000 0 00001286 0000000000000000 0 0000128E 0000000000000000 0 00001296 0000000000000000 0 0000129E 0000000000000000 0 000012A6 0000000000000000 0 000012AE 0000000000000000 0 000012B6 0000000000000000 0 000012BE 0000000000000000 0 000012C6 0000000000000000 0 000012CE 0000000000000000 0 000012D6 0000000000000000 0 000012DE 0000000000000000 0 000012E6 0000000000000000 0 000012EE 0000000000000000 0 000012F6 0000000000000000 0 000012FE 0000000000000000 0 00001306 0000000000000000 0 0000130E 0000000000000000 0 00001316 0000000000000000 0 0000131E 0000000000000000 0 00001326 0000000000000000 0 0000132E 0000000000000000 0 00001336 0000000000000000 0 0000133E 0000000000000000 0 00001346 0000000000000000 0 0000134E 0000000000000000 0 00001356 0000000000000000 0 0000135E 0000000000000000 0 00001366 0000000000000000 0 0000136E 0000000000000000 0 00001376 0000000000000000 0 0000137E 0000000000000000 0 00001386 0000000000000000 0 0000138E 0000000000000000 0 00001396 0000000000000000 0 0000139E 0000000000000000 0 000013A6 0000000000000000 0 000013AE 0000000000000000 0 000013B6 0000000000000000 0 000013BE 0000000000000000 0 000013C6 0000000000000000 0 000013CE 0000000000000000 0 000013D6 0000000000000000 0 000013DE 0000000000000000 0 000013E6 0000000000000000 0 000013EE 0000000000000000 0 000013F6 0000000000000000 0 000013FE 0000000000000000 0 00001406 0000000000000000 0 0000140E 0000000000000000 0 00001416 0000000000000000 0 0000141E 0000000000000000 0 00001426 0000000000000000 0 0000142E 0000000000000000 0 00001436 0000000000000000 0 0000143E 0000000000000000 0 00001446 0000000000000000 0 0000144E 0000000000000000 0 00001456 0000000000000000 0 0000145E 0000000000000000 0 00001466 0000000000000000 0 0000146E 0000000000000000 0 00001476 0000000000000000 0 0000147E 0000000000000000 0 00001486 0000000000000000 0 0000148E 0000000000000000 0 00001496 0000000000000000 0 0000149E 0000000000000000 0 000014A6 0000000000000000 0 000014AE 0000000000000000 0 000014B6 0000000000000000 0 000014BE 0000000000000000 0 000014C6 0000000000000000 0 000014CE 0000000000000000 0 000014D6 0000000000000000 0 000014DE 0000000000000000 0 000014E6 0000000000000000 0 000014EE 0000000000000000 0 000014F6 0000000000000000 0 000014FE 0000000000000000 0 00001506 0000000000000000 0 0000150E 0000000000000000 0 00001516 0000000000000000 0 0000151E 0000000000000000 0 00001526 0000000000000000 0 0000152E 0000000000000000 0 00001536 0000000000000000 0 0000153E 0000000000000000 0 00001546 0000000000000000 0 0000154E 0000000000000000 0 00001556 0000000000000000 0 0000155E 0000000000000000 0 00001566 0000000000000000 0 0000156E 0000000000000000 0 00001576 0000000000000000 0 0000157E 0000000000000000 0 00001586 0000000000000000 0 0000158E 0000000000000000 0 00001596 0000000000000000 0 0000159E 0000000000000000 0 000015A6 0000000000000000 0 000015AE 0000000000000000 0 000015B6 0000000000000000 0 000015BE 0000000000000000 0 000015C6 0000000000000000 0 000015CE 0000000000000000 0 000015D6 0000000000000000 0 000015DE 0000000000000000 0 000015E6 0000000000000000 0 000015EE 0000000000000000 0 000015F6 0000000000000000 0 000015FE 0000000000000000 0 00001606 0000000000000000 0 0000160E 0000000000000000 0 00001616 0000000000000000 0 0000161E 0000000000000000 0 00001626 0000000000000000 0 0000162E 0000000000000000 0 00001636 0000000000000000 0 0000163E 0000000000000000 0 00001646 0000000000000000 0 0000164E 0000000000000000 0 00001656 0000000000000000 0 0000165E 0000000000000000 0 00001666 0000000000000000 0 0000166E 0000000000000000 0 00001676 0000000000000000 0 0000167E 0000000000000000 0 00001686 0000000000000000 0 0000168E 0000000000000000 0 00001696 0000000000000000 0 0000169E 0000000000000000 0 000016A6 0000000000000000 0 000016AE 0000000000000000 0 000016B6 0000000000000000 0 000016BE 0000000000000000 0 000016C6 0000000000000000 0 000016CE 0000000000000000 0 000016D6 0000000000000000 0 000016DE 0000000000000000 0 000016E6 0000000000000000 0 000016EE 0000000000000000 0 000016F6 0000000000000000 0 000016FE 0000000000000000 0 00001706 0000000000000000 0 0000170E 0000000000000000 0 00001716 0000000000000000 0 0000171E 0000000000000000 0 00001726 0000000000000000 0 0000172E 0000000000000000 0 00001736 00000000 4234 .global _numInstallCmds 4235 .p2align 1 4236 .type _numInstallCmds, @object 4237 .size _numInstallCmds, 2 4238 _numInstallCmds: 0 0000173A 0000 .skip 2,0 4240 .global _specificCountriesSupported === Switch to base=000790h -> ".DATA" 4241 .data 4242 .type _specificCountriesSupported, @object 4243 .size _specificCountriesSupported, 351 4244 _specificCountriesSupported: 0 00000334 0100 .hword 1 0 00000336 00 .byte 0 0 00000337 2400 .string "$" 0 00000339 00 .skip 1,0 0 0000033A 2C .byte 44 0 0000033B 2E .byte 46 0 0000033C 2F .byte 47 0 0000033D 3A .byte 58 0 0000033E 00 .byte 0 0 0000033F 02 .byte 2 0 00000340 00 .byte 0 0 00000341 0200 .hword 2 0 00000343 02 .byte 2 0 00000344 2400 .string "$" 0 00000346 00 .skip 1,0 0 00000347 2C .byte 44 0 00000348 2E .byte 46 0 00000349 2D .byte 45 0 0000034A 3A .byte 58 0 0000034B 00 .byte 0 0 0000034C 02 .byte 2 0 0000034D 01 .byte 1 0 0000034E 0300 .hword 3 0 00000350 00 .byte 0 0 00000351 2400 .string "$" 0 00000353 00 .skip 1,0 0 00000354 2C .byte 44 0 00000355 2E .byte 46 0 00000356 2F .byte 47 0 00000357 3A .byte 58 0 00000358 00 .byte 0 0 00000359 02 .byte 2 0 0000035A 00 .byte 0 0 0000035B 0700 .hword 7 0 0000035D 01 .byte 1 0 0000035E 525542 .ascii "RUB" 0 00000361 20 .byte 32 0 00000362 2C .byte 44 0 00000363 2E .byte 46 0 00000364 3A .byte 58 0 00000365 03 .byte 3 0 00000366 02 .byte 2 0 00000367 01 .byte 1 0 00000368 1F00 .hword 31 0 0000036A 01 .byte 1 0 0000036B 455552 .ascii "EUR" 0 0000036E 2E .byte 46 0 0000036F 2C .byte 44 0 00000370 2D .byte 45 0 00000371 3A .byte 58 0 00000372 00 .byte 0 0 00000373 02 .byte 2 0 00000374 01 .byte 1 0 00000375 2000 .hword 32 0 00000377 01 .byte 1 0 00000378 455552 .ascii "EUR" 0 0000037B 2E .byte 46 0 0000037C 2C .byte 44 0 0000037D 2D .byte 45 0 0000037E 3A .byte 58 0 0000037F 00 .byte 0 0 00000380 02 .byte 2 0 00000381 01 .byte 1 0 00000382 2100 .hword 33 0 00000384 01 .byte 1 0 00000385 455552 .ascii "EUR" 0 00000388 2E .byte 46 0 00000389 2C .byte 44 0 0000038A 2D .byte 45 0 0000038B 3A .byte 58 0 0000038C 00 .byte 0 0 0000038D 02 .byte 2 0 0000038E 01 .byte 1 0 0000038F 2200 .hword 34 0 00000391 01 .byte 1 0 00000392 455552 .ascii "EUR" 0 00000395 2E .byte 46 0 00000396 27 .byte 39 0 00000397 2D .byte 45 0 00000398 3A .byte 58 0 00000399 00 .byte 0 0 0000039A 02 .byte 2 0 0000039B 01 .byte 1 0 0000039C 2400 .hword 36 0 0000039E 01 .byte 1 0 0000039F 244855 .ascii "$HU" 0 000003A2 2E .byte 46 0 000003A3 2C .byte 44 0 000003A4 2D .byte 45 0 000003A5 3A .byte 58 0 000003A6 00 .byte 0 0 000003A7 02 .byte 2 0 000003A8 01 .byte 1 0 000003A9 2600 .hword 38 0 000003AB 01 .byte 1 0 000003AC 245955 .ascii "$YU" 0 000003AF 2E .byte 46 0 000003B0 2C .byte 44 0 000003B1 2D .byte 45 0 000003B2 3A .byte 58 0 000003B3 00 .byte 0 0 000003B4 02 .byte 2 0 000003B5 01 .byte 1 0 000003B6 2700 .hword 39 0 000003B8 01 .byte 1 0 000003B9 455552 .ascii "EUR" 0 000003BC 2E .byte 46 0 000003BD 2C .byte 44 0 000003BE 2D .byte 45 0 000003BF 3A .byte 58 0 000003C0 00 .byte 0 0 000003C1 02 .byte 2 0 000003C2 01 .byte 1 0 000003C3 2900 .hword 41 0 000003C5 01 .byte 1 0 000003C6 534600 .string "SF" 0 000003C9 2E .byte 46 0 000003CA 2C .byte 44 0 000003CB 2E .byte 46 0 000003CC 3A .byte 58 0 000003CD 00 .byte 0 0 000003CE 02 .byte 2 0 000003CF 01 .byte 1 0 000003D0 2A00 .hword 42 0 000003D2 01 .byte 1 0 000003D3 245955 .ascii "$YU" 0 000003D6 2E .byte 46 0 000003D7 2C .byte 44 0 000003D8 2E .byte 46 0 000003D9 3A .byte 58 0 000003DA 00 .byte 0 0 000003DB 02 .byte 2 0 000003DC 01 .byte 1 0 000003DD 2C00 .hword 44 0 000003DF 01 .byte 1 0 000003E0 9C00 .string "\234" 0 000003E2 00 .skip 1,0 0 000003E3 2E .byte 46 0 000003E4 2C .byte 44 0 000003E5 2F .byte 47 0 000003E6 3A .byte 58 0 000003E7 00 .byte 0 0 000003E8 02 .byte 2 0 000003E9 01 .byte 1 0 000003EA 2D00 .hword 45 0 000003EC 01 .byte 1 0 000003ED 444B4B .ascii "DKK" 0 000003F0 2E .byte 46 0 000003F1 2C .byte 44 0 000003F2 2D .byte 45 0 000003F3 3A .byte 58 0 000003F4 00 .byte 0 0 000003F5 02 .byte 2 0 000003F6 01 .byte 1 0 000003F7 2E00 .hword 46 0 000003F9 02 .byte 2 0 000003FA 53454B .ascii "SEK" 0 000003FD 2C .byte 44 0 000003FE 2E .byte 46 0 000003FF 2D .byte 45 0 00000400 3A .byte 58 0 00000401 00 .byte 0 0 00000402 02 .byte 2 0 00000403 01 .byte 1 0 00000404 2F00 .hword 47 0 00000406 01 .byte 1 0 00000407 4E4F4B .ascii "NOK" 0 0000040A 2C .byte 44 0 0000040B 2E .byte 46 0 0000040C 2E .byte 46 0 0000040D 3A .byte 58 0 0000040E 00 .byte 0 0 0000040F 02 .byte 2 0 00000410 01 .byte 1 0 00000411 3000 .hword 48 0 00000413 02 .byte 2 0 00000414 504C4E .ascii "PLN" 0 00000417 2C .byte 44 0 00000418 2E .byte 46 0 00000419 2E .byte 46 0 0000041A 3A .byte 58 0 0000041B 00 .byte 0 0 0000041C 02 .byte 2 0 0000041D 01 .byte 1 0 0000041E 3100 .hword 49 0 00000420 01 .byte 1 0 00000421 455552 .ascii "EUR" 0 00000424 2E .byte 46 0 00000425 2C .byte 44 0 00000426 2E .byte 46 0 00000427 3A .byte 58 0 00000428 03 .byte 3 0 00000429 02 .byte 2 0 0000042A 01 .byte 1 0 0000042B 3600 .hword 54 0 0000042D 01 .byte 1 0 0000042E 246172 .ascii "$ar" 0 00000431 2E .byte 46 0 00000432 2C .byte 44 0 00000433 2F .byte 47 0 00000434 3A .byte 58 0 00000435 01 .byte 1 0 00000436 02 .byte 2 0 00000437 00 .byte 0 0 00000438 3700 .hword 55 0 0000043A 01 .byte 1 0 0000043B 246172 .ascii "$ar" 0 0000043E 2E .byte 46 0 0000043F 2C .byte 44 0 00000440 2F .byte 47 0 00000441 3A .byte 58 0 00000442 01 .byte 1 0 00000443 02 .byte 2 0 00000444 01 .byte 1 0 00000445 3D00 .hword 61 0 00000447 00 .byte 0 0 00000448 2400 .string "$" 0 0000044A 00 .skip 1,0 0 0000044B 2E .byte 46 0 0000044C 2C .byte 44 0 0000044D 2F .byte 47 0 0000044E 3A .byte 58 0 0000044F 00 .byte 0 0 00000450 02 .byte 2 0 00000451 01 .byte 1 0 00000452 5100 .hword 81 0 00000454 02 .byte 2 0 00000455 818F00 .string "\201\217" 0 00000458 2C .byte 44 0 00000459 2E .byte 46 0 0000045A 2F .byte 47 0 0000045B 3A .byte 58 0 0000045C 00 .byte 0 0 0000045D 02 .byte 2 0 0000045E 00 .byte 0 0 0000045F 5F01 .hword 351 0 00000461 01 .byte 1 0 00000462 455552 .ascii "EUR" 0 00000465 2E .byte 46 0 00000466 2C .byte 44 0 00000467 2D .byte 45 0 00000468 3A .byte 58 0 00000469 00 .byte 0 0 0000046A 02 .byte 2 0 0000046B 01 .byte 1 0 0000046C 6601 .hword 358 0 0000046E 01 .byte 1 0 0000046F 455552 .ascii "EUR" 0 00000472 20 .byte 32 0 00000473 2C .byte 44 0 00000474 2E .byte 46 0 00000475 3A .byte 58 0 00000476 03 .byte 3 0 00000477 02 .byte 2 0 00000478 01 .byte 1 0 00000479 6701 .hword 359 0 0000047B 01 .byte 1 0 0000047C 42474C .ascii "BGL" 0 0000047F 20 .byte 32 0 00000480 2C .byte 44 0 00000481 2E .byte 46 0 00000482 3A .byte 58 0 00000483 03 .byte 3 0 00000484 02 .byte 2 0 00000485 01 .byte 1 0 00000486 7C01 .hword 380 0 00000488 01 .byte 1 0 00000489 554148 .ascii "UAH" 0 0000048C 20 .byte 32 0 0000048D 2C .byte 44 0 0000048E 2E .byte 46 0 0000048F 3A .byte 58 0 00000490 03 .byte 3 0 00000491 02 .byte 2 0 00000492 01 .byte 1 4520 .global _HMAState === Switch to base=012B40h -> ".BSS" 4521 .bss 4522 .p2align 0 4523 .type _HMAState, @object 4524 .size _HMAState, 1 4525 _HMAState: 0 0000173C 00 .skip 1,0 4527 .global _pLineStart 0 0000173D 00 .p2align 1 4529 .type _pLineStart, @object 4530 .size _pLineStart, 2 4531 _pLineStart: 0 0000173E 0000 .skip 2,0 === Switch to base=012B40h -> ".RODATA.STR1.1" 4533 .section .rodata.str1.1 4534 _.LC57: 0 00000B21 5357495443484553 .string "SWITCHES" 0 00000B29 00 4536 _.LC58: 0 00000B2A 52454D00 .string "REM" 4538 _.LC59: 0 00000B2E 3B00 .string ";" 4540 _.LC60: 0 00000B30 4D454E55434F4C4F .string "MENUCOLOR" 0 00000B38 5200 4542 _.LC61: 0 00000B3A 4D454E5544454641 .string "MENUDEFAULT" 0 00000B42 554C5400 4544 _.LC62: 0 00000B46 4D454E5500 .string "MENU" 4546 _.LC63: 0 00000B4B 4543484F00 .string "ECHO" 4548 _.LC64: 0 00000B50 454543484F00 .string "EECHO" 4550 _.LC65: 0 00000B56 425245414B00 .string "BREAK" 4552 _.LC66: 0 00000B5C 4255464645525300 .string "BUFFERS" 4554 _.LC67: 0 00000B64 4255464645525348 .string "BUFFERSHIGH" 0 00000B6C 49474800 4556 _.LC68: 0 00000B70 434F4D4D414E4400 .string "COMMAND" 4558 _.LC69: 0 00000B78 434F554E54525900 .string "COUNTRY" 4560 _.LC70: 0 00000B80 444F5300 .string "DOS" 4562 _.LC71: 0 00000B84 444F534441544100 .string "DOSDATA" 4564 _.LC72: 0 00000B8C 4643425300 .string "FCBS" 4566 _.LC73: 0 00000B91 4B455942554600 .string "KEYBUF" 4568 _.LC74: 0 00000B98 46494C455300 .string "FILES" 4570 _.LC75: 0 00000B9E 46494C4553484947 .string "FILESHIGH" 0 00000BA6 4800 4572 _.LC76: 0 00000BA8 4C41535444524956 .string "LASTDRIVE" 0 00000BB0 4500 4574 _.LC77: 0 00000BB2 4C41535444524956 .string "LASTDRIVEHIGH" 0 00000BBA 454849474800 4576 _.LC78: 0 00000BC0 4E554D4C4F434B00 .string "NUMLOCK" 4578 _.LC79: 0 00000BC8 5348454C4C00 .string "SHELL" 4580 _.LC80: 0 00000BCE 5348454C4C484947 .string "SHELLHIGH" 0 00000BD6 4800 4582 _.LC81: 0 00000BD8 535441434B5300 .string "STACKS" 4584 _.LC82: 0 00000BDF 535441434B534849 .string "STACKSHIGH" 0 00000BE7 474800 4586 _.LC83: 0 00000BEA 5357495443484152 .string "SWITCHAR" 0 00000BF2 00 4588 _.LC84: 0 00000BF3 53435245454E00 .string "SCREEN" 4590 _.LC85: 0 00000BFA 56455253494F4E00 .string "VERSION" 4592 _.LC86: 0 00000C02 414E59444F5300 .string "ANYDOS" 4594 _.LC87: 0 00000C09 49444C4548414C54 .string "IDLEHALT" 0 00000C11 00 4596 _.LC88: 0 00000C12 44455649434500 .string "DEVICE" 4598 _.LC89: 0 00000C19 4445564943454849 .string "DEVICEHIGH" 0 00000C21 474800 4600 _.LC90: 0 00000C24 494E5354414C4C00 .string "INSTALL" 4602 _.LC91: 0 00000C2C 494E5354414C4C48 .string "INSTALLHIGH" 0 00000C34 49474800 4604 _.LC92: 0 00000C38 434841494E00 .string "CHAIN" 4606 _.LC93: 0 00000C3E 53455400 .string "SET" === Switch to base=000790h -> ".DATA" 4608 .data 4609 .type _commands, @object 4610 .size _commands, 190 4611 _commands: 0 00000493 D103 .hword _.LC57 0 00000495 00 .byte 0 0 00000496 3908 .hword _CfgSwitches 0 00000498 DA03 .hword _.LC58 0 0000049A 00 .byte 0 0 0000049B 0E00 .hword _CfgIgnore 0 0000049D DE03 .hword _.LC59 0 0000049F 00 .byte 0 0 000004A0 0E00 .hword _CfgIgnore 0 000004A2 E003 .hword _.LC60 0 000004A4 00 .byte 0 0 000004A5 2D07 .hword _CfgMenuColor 0 000004A7 EA03 .hword _.LC61 0 000004A9 00 .byte 0 0 000004AA E406 .hword _CfgMenuDefault 0 000004AC F603 .hword _.LC62 0 000004AE 00 .byte 0 0 000004AF C609 .hword _CfgMenu 0 000004B1 FB03 .hword _.LC63 0 000004B3 02 .byte 2 0 000004B4 C609 .hword _CfgMenu 0 000004B6 0004 .hword _.LC64 0 000004B8 02 .byte 2 0 000004B9 1100 .hword _CfgMenuEsc 0 000004BB 0604 .hword _.LC65 0 000004BD 01 .byte 1 0 000004BE 9717 .hword _CfgBreak 0 000004C0 0C04 .hword _.LC66 0 000004C2 01 .byte 1 0 000004C3 2005 .hword _Config_Buffers 0 000004C5 1404 .hword _.LC67 0 000004C7 01 .byte 1 0 000004C8 3E05 .hword _CfgBuffersHigh 0 000004CA 2004 .hword _.LC68 0 000004CC 01 .byte 1 0 000004CD 9E20 .hword _InitPgm 0 000004CF 2804 .hword _.LC69 0 000004D1 01 .byte 1 0 000004D2 B912 .hword _Country 0 000004D4 3004 .hword _.LC70 0 000004D6 01 .byte 1 0 000004D7 D411 .hword _Dosmem 0 000004D9 3404 .hword _.LC71 0 000004DB 01 .byte 1 0 000004DC A611 .hword _DosData 0 000004DE 3C04 .hword _.LC72 0 000004E0 01 .byte 1 0 000004E1 9E06 .hword _Fcbs 0 000004E3 4104 .hword _.LC73 0 000004E5 01 .byte 1 0 000004E6 8B07 .hword _CfgKeyBuf 0 000004E8 4804 .hword _.LC74 0 000004EA 01 .byte 1 0 000004EB DC04 .hword _Files 0 000004ED 4E04 .hword _.LC75 0 000004EF 01 .byte 1 0 000004F0 0C05 .hword _FilesHigh 0 000004F2 5804 .hword _.LC76 0 000004F4 01 .byte 1 0 000004F5 2009 .hword _CfgLastdrive 0 000004F7 6204 .hword _.LC77 0 000004F9 01 .byte 1 0 000004FA 6809 .hword _CfgLastdriveHigh 0 000004FC 7004 .hword _.LC78 0 000004FE 01 .byte 1 0 000004FF 5911 .hword _Numlock 0 00000501 7804 .hword _.LC79 0 00000503 01 .byte 1 0 00000504 9E20 .hword _InitPgm 0 00000506 7E04 .hword _.LC80 0 00000508 01 .byte 1 0 00000509 D520 .hword _InitPgmHigh 0 0000050B 8804 .hword _.LC81 0 0000050D 01 .byte 1 0 0000050E 2506 .hword _Stacks 0 00000510 8F04 .hword _.LC82 0 00000512 01 .byte 1 0 00000513 8A06 .hword _StacksHigh 0 00000515 9A04 .hword _.LC83 0 00000517 01 .byte 1 0 00000518 3E11 .hword _CfgSwitchar 0 0000051A A304 .hword _.LC84 0 0000051C 01 .byte 1 0 0000051D D805 .hword _sysScreenMode 0 0000051F AA04 .hword _.LC85 0 00000521 01 .byte 1 0 00000522 5E05 .hword _sysVersion 0 00000524 B204 .hword _.LC86 0 00000526 01 .byte 1 0 00000527 0000 .hword _SetAnyDos 0 00000529 B904 .hword _.LC87 0 0000052B 01 .byte 1 0 0000052C B804 .hword _SetIdleHalt 0 0000052E C204 .hword _.LC88 0 00000530 02 .byte 2 0 00000531 8420 .hword _Device 0 00000533 C904 .hword _.LC89 0 00000535 02 .byte 2 0 00000536 3820 .hword _DeviceHigh 0 00000538 D404 .hword _.LC90 0 0000053A 02 .byte 2 0 0000053B D002 .hword _CmdInstall 0 0000053D DC04 .hword _.LC91 0 0000053F 02 .byte 2 0 00000540 BD02 .hword _CmdInstallHigh 0 00000542 E804 .hword _.LC92 0 00000544 02 .byte 2 0 00000545 1E02 .hword _CmdChain 0 00000547 EE04 .hword _.LC93 0 00000549 02 .byte 2 0 0000054A A11C .hword _CmdSet 0 0000054C 6501 .hword _.LC15 0 0000054E FF .byte -1 0 0000054F 3800 .hword _CfgFailure 4726 .global _Menus === Switch to base=012B40h -> ".BSS" 4727 .bss 4728 .p2align 1 4729 .type _Menus, @object 4730 .size _Menus, 2 4731 _Menus: 0 00001740 0000 .skip 2,0 4733 .global _MenuLine 4734 .p2align 1 4735 .type _MenuLine, @object 4736 .size _MenuLine, 2 4737 _MenuLine: 0 00001742 0000 .skip 2,0 4739 .global _MenuSelected 4740 .p2align 0 4741 .type _MenuSelected, @object 4742 .size _MenuSelected, 1 4743 _MenuSelected: 0 00001744 00 .skip 1,0 4745 .global _MenuTimeout === Switch to base=000790h -> ".DATA" 4746 .data 0 00000551 00 .p2align 1 4748 .type _MenuTimeout, @object 4749 .size _MenuTimeout, 2 4750 _MenuTimeout: 0 00000552 FFFF .hword -1 4752 .global _DontAskThisSingleCommand === Switch to base=012B40h -> ".BSS" 4753 .bss 4754 .p2align 0 4755 .type _DontAskThisSingleCommand, @object 4756 .size _DontAskThisSingleCommand, 1 4757 _DontAskThisSingleCommand: 0 00001745 00 .skip 1,0 4759 .global _askThisSingleCommand 4760 .p2align 0 4761 .type _askThisSingleCommand, @object 4762 .size _askThisSingleCommand, 1 4763 _askThisSingleCommand: 0 00001746 00 .skip 1,0 4765 .global _SkipAllConfig 4766 .p2align 0 4767 .type _SkipAllConfig, @object 4768 .size _SkipAllConfig, 1 4769 _SkipAllConfig: 0 00001747 00 .skip 1,0 4771 .global _singleStep 4772 .p2align 0 4773 .type _singleStep, @object 4774 .size _singleStep, 1 4775 _singleStep: 0 00001748 00 .skip 1,0 4777 .global _nFileDesc 0 00001749 00 .p2align 1 4779 .type _nFileDesc, @object 4780 .size _nFileDesc, 2 4781 _nFileDesc: 0 0000174A 0000 .skip 2,0 4783 .global _nCurChain 4784 .p2align 1 4785 .type _nCurChain, @object 4786 .size _nCurChain, 2 4787 _nCurChain: 0 0000174C 0000 .skip 2,0 4789 .global _cfgFile 4790 .p2align 0 4791 .type _cfgFile, @object 4792 .size _cfgFile, 20 4793 _cfgFile: 0 0000174E 0000000000000000 .skip 20,0 0 00001756 0000000000000000 0 0000175E 00000000 4795 .local _szBuf 4796 .comm _szBuf,256,1 4797 .local _szLine 4798 .comm _szLine,256,1 4799 .global _UmbState 4800 .p2align 1 4801 .type _UmbState, @object 4802 .size _UmbState, 2 4803 _UmbState: 0 00001762 0000 .skip 2,0 4805 .local _nCfgLine 4806 .comm _nCfgLine,2,2 4807 .global _lpTop 4808 .p2align 1 4809 .type _lpTop, @object 4810 .size _lpTop, 4 4811 _lpTop: 0 00001764 00000000 .skip 4,0 4813 .local _umb_base_seg 4814 .comm _umb_base_seg,2,2 4815 .local _base_seg 4816 .comm _base_seg,2,2 4817 .global _Config === Switch to base=012B40h -> ".RODATA.STR1.1" 4818 .section .rodata.str1.1 4819 _.LC94: 0 00000C42 636F6D6D616E642E .string "command.com" 0 00000C4A 636F6D00 4821 _.LC95: 0 00000C4E 202F50202F453A32 .string " /P /E:256\r\n" 0 00000C56 35360D0A00 === Switch to base=000790h -> ".DATA" 4823 .data 4824 .type _Config, @object 4825 .size _Config, 19 4826 _Config: 0 00000554 00 .byte 0 0 00000555 14 .byte 20 0 00000556 10 .byte 16 0 00000557 00 .byte 0 0 00000558 10 .byte 16 0 00000559 00 .byte 0 0 0000055A F204 .hword _.LC94 0 0000055C FE04 .hword _.LC95 0 0000055E 05 .byte 5 0 0000055F 00 .byte 0 0 00000560 08 .byte 8 0 00000561 00 .byte 0 0 00000562 0001 .hword 256 0 00000564 00 .byte 0 0 00000565 0000 .hword 0 0 00000567 00 .p2align 1 4843 .type _envp, @object 4844 .size _envp, 4 4845 _envp: 0 00000568 0000 .hword _master_env 4847 .reloc ., R_386_OZSEG16, _master_env 0 0000056A 0000 .hword 0 4849 .local _ErrorAlreadyPrinted 4850 .comm _ErrorAlreadyPrinted,128,1 4851 .global _ebda_size === Switch to base=012B40h -> ".BSS" 4852 .bss 4853 .p2align 1 4854 .type _ebda_size, @object 4855 .size _ebda_size, 2 4856 _ebda_size: 0 00001768 0000 .skip 2,0 4858 .global _ram_top 4859 .p2align 1 4860 .type _ram_top, @object 4861 .size _ram_top, 2 4862 _ram_top: 0 0000176A 0000 .skip 2,0 4864 .global _UMB_top 4865 .p2align 1 4866 .type _UMB_top, @object 4867 .size _UMB_top, 2 4868 _UMB_top: 0 0000176C 0000 .skip 2,0 4870 .global _umb_start 4871 .p2align 1 4872 .type _umb_start, @object 4873 .size _umb_start, 2 4874 _umb_start: 0 0000176E 0000 .skip 2,0 4876 .global _MenuColor === Switch to base=000790h -> ".DATA" 4877 .data 4878 .p2align 1 4879 .type _MenuColor, @object 4880 .size _MenuColor, 2 4881 _MenuColor: 0 0000056C FFFF .hword -1 4883 .global _nMenuLine === Switch to base=012B40h -> ".BSS" 4884 .bss 4885 .p2align 1 4886 .type _nMenuLine, @object 4887 .size _nMenuLine, 2 4888 _nMenuLine: 0 00001770 0000 .skip 2,0 4890 .local _MenuStruct 4891 .comm _MenuStruct,850,1 4892 .ident "GCC: (GNU) 6.3.0" === Trace listing source: console.lst 1 ; 2 ; File: 3 ; console.asm 4 ; Description: 5 ; Console device driver 6 ; 7 ; Copyright (c) 1998 8 ; Pasquale J. Villani 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; You should have received a copy of the GNU General Public 24 ; License along with DOS-C; see the file COPYING. If not, 25 ; write to the Free Software Foundation, 675 Mass Ave, 26 ; Cambridge, MA 02139, USA. 27 ; 28 ; $Header$ 29 ; 30 31 %include "io.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; io.inc 4 <1> ; Description: 5 <1> ; Segments and external common routines used by various device drivers 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Header$ 29 <1> ; 30 <1> 31 <1> %include "segs.inc" 1 <2> ; File: 2 <2> ; segs.inc 3 <2> ; Description: 4 <2> ; Segment definitions for the kernel 5 <2> ; 6 <2> ; Copyright (c) 1998 7 <2> ; Pasquale J. Villani 8 <2> ; All Rights Reserved 9 <2> ; 10 <2> ; This file is part of DOS-C. 11 <2> ; 12 <2> ; DOS-C is free software; you can redistribute it and/or 13 <2> ; modify it under the terms of the GNU General Public License 14 <2> ; as published by the Free Software Foundation; either version 15 <2> ; 2, or (at your option) any later version. 16 <2> ; 17 <2> ; DOS-C is distributed in the hope that it will be useful, but 18 <2> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <2> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <2> ; the GNU General Public License for more details. 21 <2> ; 22 <2> ; You should have received a copy of the GNU General Public 23 <2> ; License along with DOS-C; see the file COPYING. If not, 24 <2> ; write to the Free Software Foundation, 675 Mass Ave, 25 <2> ; Cambridge, MA 02139, USA. 26 <2> ; 27 <2> ; $Header$ 28 <2> ; 29 <2> 30 <2> ; CPU specification -- putting it here because all .asm files include this 31 <2> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <2> ; understand it 33 <2> %ifdef __NASM_VER__ 34 <2> %if XCPU == 86 35 <2> CPU 8086 36 <2> %else 37 <2> CPU XCPU 38 <2> %endif 39 <2> %endif 40 <2> 41 <2> ; for OW on Linux: 42 <2> %ifdef owlinux 43 <2> %define WATCOM 44 <2> %endif 45 <2> 46 <2> %ifidn __OUTPUT_FORMAT__, obj 47 <2> group PGROUP PSP 48 <2> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <2> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <2> %ifdef WATCOM 51 <2> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <2> %define IGROUP TGROUP 53 <2> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <2> %else 55 <2> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <2> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <2> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <2> %endif 59 <2> %define class(x) class=x 60 <2> %define nobits 61 <2> %define exec 62 <2> %define INITSIZE init_end wrt INIT_TEXT 63 <2> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <2> 65 <2> %else ; using ELF 66 <2> 67 <2> BITS 16 68 <2> ; groups are defined in the linker script kernel.ld 69 <2> extern PGROUP 70 <2> extern DGROUP 71 <2> extern LGROUP 72 <2> extern TGROUP 73 <2> extern IGROUP 74 <2> extern I_GROUP 75 <2> %define class(x) 76 <2> %define stack 77 <2> extern INITSIZE 78 <2> %define INITTEXTSIZE __InitTextEnd 79 <2> 80 <2> %endif 81 <2> === Switch to base=000000h -> "PSP" 82 <2> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <2> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <2> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <2> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <2> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <2> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <2> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <2> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <2> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <2> segment _DATAEND class(DATA) align=1 92 <2> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <2> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <2> segment CONST2 class(DATA) align=2 95 <2> ;for MSC === Switch to base=000000h -> "DCONST" 96 <2> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <2> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <2> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <2> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <2> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <2> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <2> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <2> segment INIT_TEXT_END class(CODE) align=16 104 <2> 105 <2> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <2> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <2> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <2> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <2> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <2> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <2> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <2> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <2> segment IB_E class(FAR_DATA) align=2 114 <2> %else === Switch to base=012B40h -> "ID_B" 115 <2> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <2> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <2> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <2> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <2> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <2> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <2> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <2> segment IB_E class(IB) align=2 nobits 123 <2> %endif 32 <1> 33 <1> ; 34 <1> ; Error Return Codes 35 <1> ; 36 <1> 37 <1> %define E_WRPRT 0 ; Write Protect 38 <1> %define E_UNIT 1 ; Unknown Unit 39 <1> %define E_NOTRDY 2 ; Device Not Ready 40 <1> %define E_CMD 3 ; Unknown Command 41 <1> %define E_CRC 4 ; Crc Error 42 <1> %define E_LENGTH 5 ; Bad Length 43 <1> %define E_SEEK 6 ; Seek Error 44 <1> %define E_MEDIA 7 ; Unknown MEDIA 45 <1> %define E_NOTFND 8 ; Sector Not Found 46 <1> %define E_PAPER 9 ; No Paper 47 <1> %define E_WRITE 10 ; Write Fault 48 <1> %define E_READ 11 ; Read Fault 49 <1> %define E_FAILURE 12 ; General Failure 50 <1> 51 <1> 52 <1> extern _IOExit 53 <1> extern _IOSuccess 54 <1> extern _IOErrorExit 55 <1> extern _IOErrCnt 56 <1> extern _IODone 57 <1> extern _IOCommandError 58 <1> extern GetUnitNum 59 <1> extern _ReqPktPtr 60 <1> 32 33 === Switch to base=000100h -> "_IO_FIXED_DATA" 34 segment _IO_FIXED_DATA 35 36 global ConTable 0 00000624 0A ConTable db 0Ah 0 00000625 [0200] dw ConInit 0 00000627 [0000] dw _IOExit 0 00000629 [0000] dw _IOExit 0 0000062B [0000] dw _IOCommandError 0 0000062D [1200] dw ConRead 0 0000062F [5200] dw CommonNdRdExit 0 00000631 [5200] dw CommonNdRdExit 0 00000633 [9000] dw ConInpFlush 0 00000635 [AF00] dw ConWrite 0 00000637 [AF00] dw ConWrite 0 00000639 [0000] dw _IOExit 49 50 CTL_PRT_SCREEN equ 7200h 51 CTL_P equ 10h 52 === Switch to base=000100h -> "_LOWTEXT" 53 segment _LOWTEXT 54 0 0000012E 00 uScanCode db 0 ; Scan code for con: device 56 57 global _kbdType 0 0000012F 00 _kbdType db 0 ; 00 for 84key, 10h for 102key 59 60 %IFDEF DEBUG_PRINT_COMPORT 61 ASYNC_NEED_INIT db 1 62 %ENDIF 63 64 65 global ConInit 66 ConInit: 0 00000130 31C0 xor ax,ax 0 00000132 8ED8 mov ds,ax 0 00000134 A09604 mov al,[496h] 0 00000137 2410 and al,10h 0 00000139 2EA2[0100] mov byte[cs:_kbdType],al ; enhanced keyboard if bit 4 set 0 0000013D E9[0000] jmp _IOExit 73 74 ; 75 ; Name: 76 ; ConRead 77 ; 78 ; Function: 79 ; Read to address in es:di characters from the keyboard. Cx contains 80 ; a count of how many characters are to be transferred. 81 ; 82 ; Description: 83 ; Calls KbdRdChar to read the characters. Destroys ax. 84 ; 85 global ConRead 86 ConRead: 0 00000140 E306 jcxz ConRead2 ; Exit if read of zero 88 89 ConRead1: 0 00000142 E81800 call KbdRdChar ; Get a char from kbd in al 0 00000145 AA stosb ; Store al to es:[di] 0 00000146 E2FA loop ConRead1 ; Loop until all are read 93 94 ConRead2: 0 00000148 E9[0000] jmp _IOExit 96 97 98 readkey: 0 0000014B 2E8A26[0100] mov ah,[cs:_kbdType] 0 00000150 CD16 int 16h 0 00000152 3CE0 checke0: cmp al,0xe0 ; must check for 0xe0 scan code 0 00000154 7506 jne .ret 0 00000156 08E4 or ah,ah ; check for Greek alpha 0 00000158 7402 jz .ret 0 0000015A B000 mov al,0 ; otherwise destroy the 0xe0 0 0000015C C3 .ret: retn 107 108 ; 109 ; Name: 110 ; KbdRdChar 111 ; 112 ; Function: 113 ; Read a character from the keyboard. 114 ; 115 ; Description: 116 ; This subroutine reads a character from the keyboard. It also handles 117 ; a couple of special functions. 118 ; It converts ctrl-printscreen to a control-P. 119 ; It also accounts for extended scan codes by saving off 120 ; the high byte of the return and returning it if it was non-zero on 121 ; the previous read. 122 ; 123 global KbdRdChar 124 KbdRdChar: 0 0000015D 31C0 xor ax,ax ; Zero the scratch register 0 0000015F 2E8606[0000] xchg [cs:uScanCode],al ; and swap with scan code 127 ; now AL is set if previous key was extended, 128 ; and previous is erased in any case 0 00000164 08C0 or al,al ; Test to see if it was set 0 00000166 7517 jnz KbdRdRtn ; Exit if it was, returning it 0 00000168 E8E0FF call readkey ; get keybd char in al, ah=scan 0 0000016B 09C0 or ax,ax ; Zero ? 0 0000016D 74EE jz KbdRdChar ; Loop if it is 0 0000016F 3D0072 cmp ax,CTL_PRT_SCREEN ; Ctrl-Print screen? 0 00000172 7502 jne KbdRd1 ; Nope, keep going 0 00000174 B010 mov al,CTL_P ; Yep, make it ^P 137 KbdRd1: 0 00000176 08C0 or al,al ; Extended key? 0 00000178 7505 jnz KbdRdRtn ; Nope, just exit 0 0000017A 2E8826[0000] mov [cs:uScanCode],ah ; Yep, save the scan code 141 KbdRdRtn: 0 0000017F C3 retn 143 144 ; 145 ; Name: 146 ; CommonNdRdExit 147 ; 148 ; Function: 149 ; Checks the keyboard input buffer. 150 ; 151 ; Description: 152 ; Calls int 16 (get status). Sets Busy-Flag in status field. Destroys ax. 153 ; 154 global CommonNdRdExit 155 CommonNdRdExit: ; *** tell if key waiting and return its ASCII if yes 0 00000180 2EA0[0000] mov al,[cs:uScanCode] ; Test for last scan code 157 ; now AL is set if previous key was extended, 0 00000184 08C0 or al,al ; Was it zero ? 0 00000186 7522 jnz ConNdRd2 ; Jump if there's a char waiting 0 00000188 B401 mov ah,1 0 0000018A 2E0226[0100] add ah,[cs:_kbdType] 0 0000018F CD16 int 16h ; Get status, if zf=0 al=char 0 00000191 7428 jz ConNdRd4 ; Jump if no char available 0 00000193 09C0 or ax,ax ; Also check for ax=0 as apparently some 0 00000195 7424 jz ConNdRd4 ; int16h handlers set ax=0 to indicate unsupported function 0 00000197 E8B8FF call checke0 ; check for e0 scancode 0 0000019A 09C0 or ax,ax ; Zero ? 0 0000019C 7505 jnz ConNdRd1 ; Jump if not zero 0 0000019E E8AAFF call readkey 0 000001A1 EBDD jmp short CommonNdRdExit 171 ; if char was there but 0, fetch and retry... 172 ; (why do we check uScanCode here?) 173 174 ConNdRd1: 0 000001A3 3D0072 cmp ax,CTL_PRT_SCREEN ; Was ctl+prntscrn key pressed? 0 000001A6 7502 jne ConNdRd2 ; Jump if not 0 000001A8 B010 mov al,CTL_P 178 179 ConNdRd2: 0 000001AA 2EC51E[0000] lds bx,[cs:_ReqPktPtr] ; Set the status 0 000001AF 807F0206 cmp byte[bx+2],6 ; input status call? 0 000001B3 7403 je ConNdRd3 0 000001B5 88470D mov [bx+0Dh],al ; return the ASCII of that key 184 185 ConNdRd3: 0 000001B8 E9[0000] jmp _IOExit 187 188 ConNdRd4: 0 000001BB E9[0000] jmp _IODone 190 191 192 193 global ConInpFlush 194 ConInpFlush: ; *** flush that keyboard queue 0 000001BE E80300 call KbdInpChar ; get all available keys 0 000001C1 E9[0000] jmp _IOExit ; do not even remember the last one 197 198 199 200 KbdInpChar: ; *** get ??00 or the last waiting key after flushing the queue 0 000001C4 31C0 xor ax,ax 0 000001C6 2EA2[0000] mov byte [cs:uScanCode],al 203 KbdInpCh1: 0 000001CA B401 mov ah,1 0 000001CC 2E0226[0100] add ah,[cs:_kbdType] 0 000001D1 CD16 int 16h ; get status, if zf=0 al=char 0 000001D3 7405 jz KbdInpRtnZero ; Jump if zero 208 ; returns 0 or the last key that was waiting in AL 0 000001D5 E873FF call readkey 0 000001D8 EBF0 jmp short KbdInpCh1 211 ; just read any key that is waiting, then check if 212 ; more keys are waiting. if not, return AL of this 213 ; key (which is its ASCII). AH (scan) discarded! 0 000001DA B401 KbdInpRtnZero: mov ah,1 ; if anybody wants "1 if no key was waiting"! 215 KbdInpRtn: 0 000001DC C3 retn 217 218 219 global ConWrite 220 ConWrite: 0 000001DD E3D9 jcxz ConNdRd3 ; Exit if nothing to write 222 ConWr1: 0 000001DF 268A05 mov al,[es:di] 0 000001E2 47 inc di 0 000001E3 CD29 int 29h ; Do fast output call 0 000001E5 E2F8 loop ConWr1 ; Loop if more to output 0 000001E7 E9[0000] jmp _IOExit 228 229 CBreak: 0 000001EA 2EC606[0000]03 mov byte [cs:uScanCode],3 ; Put a ^C into the buffer 231 IntRetn: 0 000001F0 CF iret 233 234 235 ; global _cso 236 ;_cso 237 ; push bp 238 ; mov bp,sp 239 ; push ax 240 ; mov ax,[bp+4] 241 ; int 29h 242 ; pop ax 243 ; pop bp 244 ; retn 245 246 global _int29_handler 247 _int29_handler: 0 000001F1 50 push ax 0 000001F2 56 push si 0 000001F3 57 push di 0 000001F4 55 push bp 0 000001F5 53 push bx 253 %IFDEF DEBUG_PRINT_COMPORT 254 cmp bx, 0xFD05 ; magic value for COM print routine 255 je .comprint 256 %ENDIF 0 000001F6 B40E mov ah,0Eh 0 000001F8 BB0700 mov bx,7 0 000001FB CD10 int 10h ; write char al, teletype mode 260 .int29hndlr_ret: 0 000001FD 5B pop bx 0 000001FE 5D pop bp 0 000001FF 5F pop di 0 00000200 5E pop si 0 00000201 58 pop ax 0 00000202 CF iret 267 %IFDEF DEBUG_PRINT_COMPORT 268 %ifnum DEBUG_PRINT_COMPORT 269 %define DEBUG_USE_COMPORT DEBUG_PRINT_COMPORT 270 %else 271 %define DEBUG_USE_COMPORT 1 ; default to COM2 if not specified 272 %endif 273 .comprint: 274 push dx 275 mov dx, DEBUG_USE_COMPORT ; 0=COM1,1=COM2,2=COM3,3=COM4 276 277 mov ah, [cs:ASYNC_NEED_INIT] 278 or ah,ah 279 jz .skip_init 280 push ax ; preserve char (AL) to print 281 282 ; initialize serial port using BIOS to DOS default 283 ; of 2400 bps, 8 data bits, 1 stop bit, and no parity 284 mov ax, 0x00A3 285 int 14h ; BIOS initialize serial port 286 287 mov ax, 0x011B ; clear the remote screen (ESC[2J) 288 int 14h ; BIOS write character to serial port 289 mov ax, 0x015B ; '[' 290 int 14h ; BIOS write character to serial port 291 mov ax, 0x0132 ; '2' 292 int 14h ; BIOS write character to serial port 293 mov ax, 0x014A ; 'J' 294 int 14h ; BIOS write character to serial port 295 296 ; mark initialization complete 297 mov byte [cs:ASYNC_NEED_INIT], 0 298 299 pop ax ; restore char to print 300 .skip_init: 301 cmp al, 0x0A ; do we need to add a carriage return? 302 jne .print_it 303 mov ax, 0x010D ; print as \r\n 304 int 14h 305 mov al, 0x0A 306 .print_it: 307 mov ah, 0x01 308 int 14h ; BIOS write character to serial port 309 310 pop dx 311 jmp .int29hndlr_ret 312 %ENDIF ; DEBUG_PRINT_COMPORT === Trace listing source: cpu.lst 1 ; File: 2 ; cpu.asm 3 ; Description: 4 ; Query basic CPU running on 5 ; 6 ; DOS-C 7 ; Copyright (c) 2012 8 ; FreeDOS 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; 24 25 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif === Switch to base=00E0E0h -> "INIT_TEXT" 26 segment INIT_TEXT 27 28 CPU 386 29 ;********************************************************************* 30 ; 31 ; UWORD query_cpu() based on Eric Auer's public domain cpulevel.asm 32 ; input: none 33 ; output: ax = cpu, 0=8086/8088, 1=186/188, 2=286, 3=386+ 34 global _query_cpu 35 _query_cpu: 36 ; save registers, assumes enough space on stack & valid stack frame setup 37 ;push ax - no need to save, return value saved here 0 0000049D 53 push bx 0 0000049E 51 push cx 0 0000049F 9C pushf ; save flags 41 42 ; begin check, assume x86 unless later family detected 0 000004A0 31DB xor bx, bx ; 808x or 186 highest detected family stored in bx 0 000004A2 53 push bx 0 000004A3 9D popf ; try to clear all flag bits 0 000004A4 9C pushf ; copy flags to ax so we can test if clear succeeded 0 000004A5 58 pop ax 0 000004A6 2500F0 and ax, 0f000h 0 000004A9 3D00F0 cmp ax, 0f000h 0 000004AC 7523 jnz is286 ; no the 4 msb stuck set to 1, so is a 808x or 8018x 51 ; NEC V20/V30 support 186 instructions but 52 ; do not mask the shift count like a 186. 53 ; based on https://hg.pushbx.org/ecm/ldebug/file/7f3440d5824d/source/init.asm#l3071 54 ; which is based on http://www.textfiles.com/hamradio/v20_bug.txt 0 000004AE 89E0 mov ax, sp ; we use stack to do test 0 000004B0 B90000 mov cx, 0 ; after pop still 0 if 8088/8086 0 000004B3 51 push cx 0 000004B4 41 inc cx ; after pop still 1 if NEC V20/V30 59 ; next instructions may lock system if breakpoint or trace flag set 0 000004B5 8FC1 db 8Fh, 0C1h; pop r/m16 with operand cx on 808x, nop on NEC V20/V30 0 000004B7 89C4 mov sp, ax ; reset stack to known good state (pre push, optional pop) 0 000004B9 09C9 or cx, cx ; cx is 0 if 808x, 1 if NEC 0 000004BB 7404 jz is808x ; if not NEC then goto test for 808x vs 8018x 0 000004BD 89CB mov bx, cx ; treat NEC V20/V30 as 8018x, i.e. return 1 0 000004BF EB22 jmp short cleanup 66 is808x: 0 000004C1 B80100 mov ax,1 ; determine if 8086 or 186 0 000004C4 B140 mov cl,64 ; try to shift further than size of ax 0 000004C6 D3E8 shr ax,cl 0 000004C8 09C0 or ax,ax 0 000004CA 7403 jz is086 ; 186 ignores the upper bits of cl 0 000004CC BB0100 mov bx, 1 ; 186: above 808x, below 286 0 000004CF EB12 is086: jmp short cleanup 0 000004D1 BB0200 is286: mov bx, 2 ; at least 286 0 000004D4 B800F0 mov ax, 0f000h 0 000004D7 50 push ax 0 000004D8 9D popf ; try to set 4 msb of flags 0 000004D9 9C pushf ; copy flags to ax so we can test if clear succeeded 0 000004DA 58 pop ax 0 000004DB A900F0 test ax, 0f000h 0 000004DE 7403 jz cleanup ; 4 msb stuck to 0: 80286 0 000004E0 BB0300 mov bx, 3 ; at least 386 83 84 cleanup: 0 000004E3 89D8 mov ax, bx ; return CPU family 0 000004E5 9D popf 0 000004E6 59 pop cx 0 000004E7 5B pop bx 0 000004E8 C3 retn 90 === Trace listing source: dosfns.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=dosfns.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/cc1k8IUF.s output file : dosfns.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:21.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _get_free_hndl, @function 7 _get_free_hndl: 0 00002F1B 56 push si 0 00002F1C 8E06[0000] mov es, word ptr [_cu_psp] 0 00002F20 268B363400 mov si, word ptr es:[52] 0 00002F25 26A13600 mov ax, word ptr es:[54] 0 00002F29 26FF363200 push word ptr es:[50] 0 00002F2E BAFF00 mov dx, 255 0 00002F31 52 push dx 0 00002F32 50 push ax 0 00002F33 56 push si 0 00002F34 E8[FEFF] call _fmemchr 0 00002F37 85D2 test dx, dx 0 00002F39 7406 je _.L3 0 00002F3B 29F0 sub ax, si 0 00002F3D 31D2 xor dx, dx 22 _.L1: 0 00002F3F 5E pop si 0 00002F40 C3 ret 25 _.L3: 0 00002F41 B8FCFF mov ax, -4 0 00002F44 BAFFFF mov dx, -1 0 00002F47 EBF6 jmp _.L1 29 .size _get_free_hndl, .-_get_free_hndl 30 .type _pop_dmp.part.0, @function 31 _pop_dmp.part.0: 0 00002F49 56 push si 0 00002F4A 57 push di 0 00002F4B 55 push bp 0 00002F4C 89E5 mov bp, sp 0 00002F4E 1E push ds 0 00002F4F 8B5E08 mov bx, word ptr [bp+8] 0 00002F52 8B760A mov si, word ptr [bp+10] 0 00002F55 B81500 mov ax, 21 0 00002F58 50 push ax 0 00002F59 16 push ss 0 00002F5A B8[0000] mov ax, offset _sda_tmp_dm 0 00002F5D 50 push ax 0 00002F5E 56 push si 0 00002F5F 53 push bx 0 00002F60 895EFE mov word ptr [bp-2], bx 0 00002F63 E8[FEFF] call _fmemcpy 0 00002F66 BF[0000] mov di, offset _SearchDir 0 00002F69 8A450B mov al, byte ptr [di+11] 0 00002F6C 8EC6 mov es, si 0 00002F6E 8B5EFE mov bx, word ptr [bp-2] 0 00002F71 26884715 mov byte ptr es:[bx+21], al 0 00002F75 8B4516 mov ax, word ptr [di+22] 0 00002F78 26894716 mov word ptr es:[bx+22], ax 0 00002F7C 8B4518 mov ax, word ptr [di+24] 0 00002F7F 26894718 mov word ptr es:[bx+24], ax 0 00002F83 8B451C mov ax, word ptr [di+28] 0 00002F86 8B551E mov dx, word ptr [di+30] 0 00002F89 2689471A mov word ptr es:[bx+26], ax 0 00002F8D 2689571C mov word ptr es:[bx+28], dx 0 00002F91 16 push ss 0 00002F92 57 push di 0 00002F93 83C31E add bx, 30 0 00002F96 56 push si 0 00002F97 53 push bx 0 00002F98 E8[FEFF] call _ConvertName83ToNameSZ 0 00002F9B 89EC mov sp, bp 0 00002F9D 5D pop bp 0 00002F9E 5F pop di 0 00002F9F 5E pop si 0 00002FA0 C20400 ret 4 72 .size _pop_dmp.part.0, .-_pop_dmp.part.0 73 .type _IsShareInstalled.part.1, @function 74 _IsShareInstalled.part.1: 0 00002FA3 E8[FEFF] call _share_check 0 00002FA6 3CFF cmp al, -1 0 00002FA8 18C0 sbb al, al 0 00002FAA FEC0 inc al 0 00002FAC A2[0000] mov byte ptr [_share_installed], al 0 00002FAF 98 cbw 0 00002FB0 C3 ret 82 .size _IsShareInstalled.part.1, .-_IsShareInstalled.part.1 83 .global _get_cds_unvalidated 84 .type _get_cds_unvalidated, @function 85 _get_cds_unvalidated: 0 00002FB1 89E3 mov bx, sp 0 00002FB3 8B4702 mov ax, word ptr [bx+2] 0 00002FB6 8A16[0000] mov dl, byte ptr [_lastdrive] 0 00002FBA 30F6 xor dh, dh 0 00002FBC 39C2 cmp dx, ax 0 00002FBE 7610 jbe _.L12 0 00002FC0 BA5800 mov dx, 88 0 00002FC3 F7E2 mul dx 0 00002FC5 0306[0000] add ax, word ptr [_CDSp] 0 00002FC9 8B16[0200] mov dx, word ptr [_CDSp+2] 96 _.L10: 0 00002FCD C20200 ret 2 98 _.L12: 0 00002FD0 31C0 xor ax, ax 0 00002FD2 89C2 mov dx, ax 0 00002FD4 EBF7 jmp _.L10 102 .size _get_cds_unvalidated, .-_get_cds_unvalidated 103 .global _get_cds 104 .type _get_cds, @function 105 _get_cds: 0 00002FD6 55 push bp 0 00002FD7 89E5 mov bp, sp 0 00002FD9 8B4604 mov ax, word ptr [bp+4] 0 00002FDC 8A16[0000] mov dl, byte ptr [_lastdrive] 0 00002FE0 30F6 xor dh, dh 0 00002FE2 39C2 cmp dx, ax 0 00002FE4 7632 jbe _.L18 0 00002FE6 BA5800 mov dx, 88 0 00002FE9 F7E2 mul dx 0 00002FEB 0306[0000] add ax, word ptr [_CDSp] 0 00002FEF 8B16[0200] mov dx, word ptr [_CDSp+2] 0 00002FF3 8EC2 mov es, dx 0 00002FF5 89C3 mov bx, ax 0 00002FF7 268B4F43 mov cx, word ptr es:[bx+67] 0 00002FFB 89CB mov bx, cx 0 00002FFD 81E300C0 and bx, -16384 0 00003001 7415 je _.L18 0 00003003 F6C520 test ch, 32 0 00003006 7510 jne _.L18 0 00003008 85C9 test cx, cx 0 0000300A 7C10 jl _.L14 0 0000300C 89C3 mov bx, ax 0 0000300E 268B4F47 mov cx, word ptr es:[bx+71] 0 00003012 260B4F45 or cx, word ptr es:[bx+69] 0 00003016 7504 jne _.L14 131 _.L18: 0 00003018 31C0 xor ax, ax 0 0000301A 89C2 mov dx, ax 134 _.L14: 0 0000301C 5D pop bp 0 0000301D C20200 ret 2 137 .size _get_cds, .-_get_cds 138 .global _get_cds1 139 .type _get_cds1, @function 140 _get_cds1: 0 00003020 89E3 mov bx, sp 0 00003022 8B4702 mov ax, word ptr [bx+2] 0 00003025 85C0 test ax, ax 0 00003027 7406 je _.L21 0 00003029 48 dec ax 146 _.L22: 0 0000302A 894702 mov word ptr [bx+2], ax 0 0000302D EBA7 jmp _get_cds 149 _.L21: 0 0000302F A0[0000] mov al, byte ptr [_default_drive] 0 00003032 98 cbw 0 00003033 EBF5 jmp _.L22 153 .size _get_cds1, .-_get_cds1 154 .global _GetDriveDPB 155 .type _GetDriveDPB, @function 156 _GetDriveDPB: 0 00003035 56 push si 0 00003036 57 push di 0 00003037 55 push bp 0 00003038 89E5 mov bp, sp 0 0000303A 8B760A mov si, word ptr [bp+10] 0 0000303D 8A4608 mov al, byte ptr [bp+8] 0 00003040 30E4 xor ah, ah 0 00003042 50 push ax 0 00003043 E8[FEFF] call _get_cds1 0 00003046 89C3 mov bx, ax 0 00003048 09D0 or ax, dx 0 0000304A 7512 jne _.L25 169 _.L27: 0 0000304C C704F1FF mov word ptr [si], -15 0 00003050 31C0 xor ax, ax 0 00003052 89C1 mov cx, ax 173 _.L24: 0 00003054 89CA mov dx, cx 0 00003056 89EC mov sp, bp 0 00003058 5D pop bp 0 00003059 5F pop di 0 0000305A 5E pop si 0 0000305B C20400 ret 4 180 _.L25: 0 0000305E 8EC2 mov es, dx 0 00003060 268B4745 mov ax, word ptr es:[bx+69] 0 00003064 268B4F47 mov cx, word ptr es:[bx+71] 0 00003068 89C7 mov di, ax 0 0000306A 09CF or di, cx 0 0000306C 74DE je _.L27 0 0000306E 26837F4300 cmp word ptr es:[bx+67], 0 0 00003073 7CD7 jl _.L27 0 00003075 C7040000 mov word ptr [si], 0 0 00003079 EBD9 jmp _.L24 191 .size _GetDriveDPB, .-_GetDriveDPB 192 .global _idx_to_sft_ 193 .type _idx_to_sft_, @function 194 _idx_to_sft_: 0 0000307B 56 push si 0 0000307C 57 push di 0 0000307D 55 push bp 0 0000307E 89E5 mov bp, sp 0 00003080 8B7E08 mov di, word ptr [bp+8] 0 00003083 C706[0000]FFFF mov word ptr [_lpCurSft], -1 0 00003089 C706[0200]FFFF mov word ptr [_lpCurSft+2], -1 0 0000308F 85FF test di, di 0 00003091 7C12 jl _.L38 0 00003093 8B1E[0000] mov bx, word ptr [_sfthead] 0 00003097 8B0E[0200] mov cx, word ptr [_sfthead+2] 206 _.L35: 0 0000309B 83FBFF cmp bx, -1 0 0000309E 750A jne _.L37 0 000030A0 83F9FF cmp cx, -1 0 000030A3 7505 jne _.L37 211 _.L38: 0 000030A5 BFFFFF mov di, -1 0 000030A8 EB1D jmp _.L34 214 _.L37: 0 000030AA 89DE mov si, bx 0 000030AC 8EC1 mov es, cx 0 000030AE 268B5704 mov dx, word ptr es:[bx+4] 0 000030B2 39D7 cmp di, dx 0 000030B4 7D18 jge _.L36 0 000030B6 B83B00 mov ax, 59 0 000030B9 F7E7 mul di 0 000030BB 96 xchg si, ax 0 000030BC 8D7006 lea si, [6+bx+si] 0 000030BF 8936[0000] mov word ptr [_lpCurSft], si 0 000030C3 890E[0200] mov word ptr [_lpCurSft+2], cx 226 _.L34: 0 000030C7 97 xchg di, ax 0 000030C8 5D pop bp 0 000030C9 5F pop di 0 000030CA 5E pop si 0 000030CB C20200 ret 2 232 _.L36: 0 000030CE 29D7 sub di, dx 0 000030D0 8EC1 mov es, cx 0 000030D2 268B1F mov bx, word ptr es:[bx] 0 000030D5 268B4C02 mov cx, word ptr es:[si+2] 0 000030D9 EBC0 jmp _.L35 238 .size _idx_to_sft_, .-_idx_to_sft_ 239 .global _idx_to_sft 240 .type _idx_to_sft, @function 241 _idx_to_sft: 0 000030DB 55 push bp 0 000030DC 89E5 mov bp, sp 0 000030DE FF7604 push word ptr [bp+4] 0 000030E1 E8[FEFF] call _idx_to_sft_ 0 000030E4 89C3 mov bx, ax 0 000030E6 89C2 mov dx, ax 0 000030E8 83F8FF cmp ax, -1 0 000030EB 7411 je _.L40 0 000030ED C41E[0000] les bx, dword ptr [_lpCurSft] 0 000030F1 8CC2 mov dx, es 0 000030F3 26833F00 cmp word ptr es:[bx], 0 0 000030F7 7505 jne _.L40 0 000030F9 BBFFFF mov bx, -1 0 000030FC 89DA mov dx, bx 256 _.L40: 0 000030FE 93 xchg bx, ax 0 000030FF 89EC mov sp, bp 0 00003101 5D pop bp 0 00003102 C20200 ret 2 261 .size _idx_to_sft, .-_idx_to_sft 262 .global _get_sft_idx 263 .type _get_sft_idx, @function 264 _get_sft_idx: 0 00003105 89E3 mov bx, sp 0 00003107 8B5F02 mov bx, word ptr [bx+2] 0 0000310A 8B16[0000] mov dx, word ptr [_cu_psp] 0 0000310E 8EC2 mov es, dx 0 00003110 26391E3200 cmp word ptr es:[50], bx 0 00003115 7616 jbe _.L47 0 00003117 268B0E3600 mov cx, word ptr es:[54] 0 0000311C 26031E3400 add bx, word ptr es:[52] 0 00003121 8EC1 mov es, cx 0 00003123 268A07 mov al, byte ptr es:[bx] 0 00003126 30E4 xor ah, ah 0 00003128 3DFF00 cmp ax, 255 0 0000312B 7503 jne _.L45 278 _.L47: 0 0000312D B8FAFF mov ax, -6 280 _.L45: 0 00003130 C20200 ret 2 282 .size _get_sft_idx, .-_get_sft_idx 283 .global _get_sft 284 .type _get_sft, @function 285 _get_sft: 0 00003133 55 push bp 0 00003134 89E5 mov bp, sp 0 00003136 FF7604 push word ptr [bp+4] 0 00003139 E8[FEFF] call _get_sft_idx 0 0000313C 894604 mov word ptr [bp+4], ax 0 0000313F 89EC mov sp, bp 0 00003141 5D pop bp 0 00003142 EB97 jmp _idx_to_sft 294 .size _get_sft, .-_get_sft 295 .global _DosRWSft 296 .type _DosRWSft, @function 297 _DosRWSft: 0 00003144 56 push si 0 00003145 57 push di 0 00003146 55 push bp 0 00003147 89E5 mov bp, sp 0 00003149 83EC0C sub sp, 12 0 0000314C C47608 les si, dword ptr [bp+8] 0 0000314F 8C46F6 mov word ptr [bp-10], es 0 00003152 8B7E0C mov di, word ptr [bp+12] 0 00003155 8B460E mov ax, word ptr [bp+14] 0 00003158 8946F8 mov word ptr [bp-8], ax 0 0000315B 56 push si 0 0000315C E8[FEFF] call _idx_to_sft 0 0000315F 89C3 mov bx, ax 0 00003161 8956FA mov word ptr [bp-6], dx 0 00003164 83F8FF cmp ax, -1 0 00003167 7503E90E02 je _.L69 0 0000316C 837E1001 cmp word ptr [bp+16], 1 0 00003170 8E46F6 mov es, word ptr [bp-10] 0 00003173 7510 jne _.L53 0 00003175 8EDA mov ds, dx 0 00003177 F6470201 test byte ptr [bx+2], 1 0 0000317B 7417 je _.L54 320 _.L71: 0 0000317D B9FBFF mov cx, -5 0 00003180 BEFFFF mov si, -1 0 00003183 EB6F jmp _.L51 324 _.L53: 0 00003185 837E1002 cmp word ptr [bp+16], 2 0 00003189 7576 jne _.L55 0 0000318B 8E5EFA mov ds, word ptr [bp-6] 0 0000318E F6470203 test byte ptr [bx+2], 3 0 00003192 74E9 je _.L71 330 _.L54: 0 00003194 8E5EFA mov ds, word ptr [bp-6] 0 00003197 8B5705 mov dx, word ptr [bx+5] 0 0000319A 85D2 test dx, dx 0 0000319C 7D70 jge _.L56 0 0000319E 36A1[0000] mov ax, word ptr ss:[_dta] 0 000031A2 8946F6 mov word ptr [bp-10], ax 0 000031A5 36A1[0200] mov ax, word ptr ss:[_dta+2] 0 000031A9 8946F4 mov word ptr [bp-12], ax 0 000031AC 36891E[0000] mov word ptr ss:[_lpCurSft], bx 0 000031B1 368C1E[0200] mov word ptr ss:[_lpCurSft+2], ds 0 000031B6 8B4715 mov ax, word ptr [bx+21] 0 000031B9 36A3[0000] mov word ptr ss:[_current_filepos], ax 0 000031BD 8B4717 mov ax, word ptr [bx+23] 0 000031C0 36A3[0200] mov word ptr ss:[_current_filepos+2], ax 0 000031C4 36893E[0000] mov word ptr ss:[_dta], di 0 000031C9 8B46F8 mov ax, word ptr [bp-8] 0 000031CC 36A3[0200] mov word ptr ss:[_dta+2], ax 0 000031D0 837E1001 cmp word ptr [bp+16], 1 0 000031D4 9F lahf 0 000031D5 D0E4 shl ah, 1 0 000031D7 99 cwd 0 000031D8 81C20911 add dx, 4361 0 000031DC 06 push es 0 000031DD 1E push ds 0 000031DE 53 push bx 0 000031DF 52 push dx 0 000031E0 16 push ss 0 000031E1 1F pop ds 0 000031E2 E8[FEFF] call _network_redirector_mx 0 000031E5 91 xchg cx, ax 0 000031E6 89D6 mov si, dx 0 000031E8 8B46F6 mov ax, word ptr [bp-10] 0 000031EB A3[0000] mov word ptr [_dta], ax 0 000031EE 8B46F4 mov ax, word ptr [bp-12] 0 000031F1 A3[0200] mov word ptr [_dta+2], ax 366 _.L51: 0 000031F4 91 xchg cx, ax 0 000031F5 89F2 mov dx, si 0 000031F7 89EC mov sp, bp 0 000031F9 5D pop bp 0 000031FA 5F pop di 0 000031FB 5E pop si 0 000031FC 16 push ss 0 000031FD 1F pop ds 0 000031FE C20A00 ret 10 376 _.L55: 0 00003201 837E1003 cmp word ptr [bp+16], 3 0 00003205 758D jne _.L54 0 00003207 C746100200 mov word ptr [bp+16], 2 0 0000320C EB86 jmp _.L54 381 _.L56: 0 0000320E 89D0 mov ax, dx 0 00003210 258000 and ax, 128 0 00003213 7503E91301 je _.L58 0 00003218 8E5EFA mov ds, word ptr [bp-6] 0 0000321B 8B4707 mov ax, word ptr [bx+7] 0 0000321E 8946FC mov word ptr [bp-4], ax 0 00003221 8B4709 mov ax, word ptr [bx+9] 0 00003224 8946FE mov word ptr [bp-2], ax 0 00003227 89D0 mov ax, dx 0 00003229 83E020 and ax, 32 0 0000322C 8946F6 mov word ptr [bp-10], ax 0 0000322F 7479 je _.L59 0 00003231 837E1001 cmp word ptr [bp+16], 1 0 00003235 746E je _.L74 0 00003237 B80800 mov ax, 8 397 _.L60: 0 0000323A 895EF4 mov word ptr [bp-12], bx 0 0000323D 50 push ax 0 0000323E FF76F8 push word ptr [bp-8] 0 00003241 57 push di 0 00003242 06 push es 0 00003243 8D46FC lea ax, [-4+bp] 0 00003246 50 push ax 0 00003247 16 push ss 0 00003248 1F pop ds 0 00003249 E8[FEFF] call _BinaryCharIO 0 0000324C 91 xchg cx, ax 0 0000324D 89D6 mov si, dx 0 0000324F 837E1002 cmp word ptr [bp+16], 2 0 00003253 759F jne _.L51 0 00003255 92 xchg dx, ax 0 00003256 99 cwd 0 00003257 89D0 mov ax, dx 0 00003259 29CA sub dx, cx 0 0000325B 19F0 sbb ax, si 0 0000325D 99 cwd 0 0000325E F7DA neg dx 0 00003260 8956F6 mov word ptr [bp-10], dx 0 00003263 807EF600 cmp byte ptr [bp-10], 0 0 00003267 748B je _.L51 0 00003269 8E46FA mov es, word ptr [bp-6] 0 0000326C 8B5EF4 mov bx, word ptr [bp-12] 0 0000326F 26F6470502 test byte ptr es:[bx+5], 2 0 00003274 7503E97BFF je _.L51 0 00003279 89C8 mov ax, cx 0 0000327B 89FB mov bx, di 428 _.L62: 0 0000327D 89C7 mov di, ax 0 0000327F 4F dec di 0 00003280 85C0 test ax, ax 0 00003282 7503E96DFF je _.L51 0 00003287 894EF6 mov word ptr [bp-10], cx 0 0000328A 89D8 mov ax, bx 0 0000328C 40 inc ax 0 0000328D 8946FA mov word ptr [bp-6], ax 0 00003290 B001 mov al, 1 0 00003292 50 push ax 0 00003293 8E46F8 mov es, word ptr [bp-8] 0 00003296 26FF37 push word ptr es:[bx] 0 00003299 E8[FEFF] call _update_scr_pos 0 0000329C 8B5EFA mov bx, word ptr [bp-6] 0 0000329F 97 xchg di, ax 0 000032A0 8B4EF6 mov cx, word ptr [bp-10] 0 000032A3 EBD8 jmp _.L62 446 _.L74: 0 000032A5 B80400 mov ax, 4 0 000032A8 EB90 jmp _.L60 449 _.L59: 0 000032AA 89D0 mov ax, dx 0 000032AC 837E1001 cmp word ptr [bp+16], 1 0 000032B0 754C jne _.L64 0 000032B2 83E040 and ax, 64 0 000032B5 746E je _.L75 0 000032B7 F6C201 test dl, 1 0 000032BA 7429 je _.L65 0 000032BC 895EF4 mov word ptr [bp-12], bx 0 000032BF FF76F8 push word ptr [bp-8] 0 000032C2 57 push di 0 000032C3 06 push es 0 000032C4 56 push si 0 000032C5 16 push ss 0 000032C6 1F pop ds 0 000032C7 E8[FEFF] call _read_line_handle 0 000032CA 91 xchg cx, ax 0 000032CB 8B76F6 mov si, word ptr [bp-10] 0 000032CE 8B5EF4 mov bx, word ptr [bp-12] 468 _.L66: 0 000032D1 36803D1A cmp byte ptr ss:[di], 26 0 000032D5 7403E91AFF jne _.L51 0 000032DA 8E46FA mov es, word ptr [bp-6] 0 000032DD 26806705BF and byte ptr es:[bx+5], -65 0 000032E2 E90FFF jmp _.L51 474 _.L65: 0 000032E5 895EF6 mov word ptr [bp-10], bx 0 000032E8 FF76F8 push word ptr [bp-8] 0 000032EB 57 push di 0 000032EC 06 push es 0 000032ED 8D46FC lea ax, [-4+bp] 0 000032F0 50 push ax 0 000032F1 16 push ss 0 000032F2 1F pop ds 0 000032F3 E8[FEFF] call _cooked_read 0 000032F6 91 xchg cx, ax 0 000032F7 89D6 mov si, dx 0 000032F9 8B5EF6 mov bx, word ptr [bp-10] 0 000032FC EBD3 jmp _.L66 488 _.L64: 0 000032FE 83C840 or ax, 64 0 00003301 8E5EFA mov ds, word ptr [bp-6] 0 00003304 894705 mov word ptr [bx+5], ax 0 00003307 F6C204 test dl, 4 0 0000330A 7408 je _.L67 0 0000330C 8CC1 mov cx, es 0 0000330E 8B76F6 mov si, word ptr [bp-10] 0 00003311 E9E0FE jmp _.L51 497 _.L67: 0 00003314 FF76F8 push word ptr [bp-8] 0 00003317 57 push di 0 00003318 06 push es 0 00003319 8D46FC lea ax, [-4+bp] 0 0000331C 50 push ax 0 0000331D 16 push ss 0 0000331E 1F pop ds 0 0000331F E8[FEFF] call _cooked_write 506 _.L90: 0 00003322 91 xchg cx, ax 0 00003323 EB40 jmp _.L89 509 _.L75: 0 00003325 89C1 mov cx, ax 0 00003327 96 xchg si, ax 0 00003328 E9C9FE jmp _.L51 513 _.L58: 0 0000332B 36803E[0000]00 cmp byte ptr ss:[_share_installed], 0 0 00003331 7437 je _.L68 0 00003333 8E5EFA mov ds, word ptr [bp-6] 0 00003336 8B5733 mov dx, word ptr [bx+51] 0 00003339 85D2 test dx, dx 0 0000333B 7C2D jl _.L68 0 0000333D B90100 mov cx, 1 0 00003340 51 push cx 0 00003341 50 push ax 0 00003342 06 push es 0 00003343 8C46F6 mov word ptr [bp-10], es 0 00003346 1E push ds 0 00003347 07 pop es 0 00003348 26FF7717 push word ptr es:[bx+23] 0 0000334C 26FF7715 push word ptr es:[bx+21] 0 00003350 52 push dx 0 00003351 36FF36[0000] push word ptr ss:[_cu_psp] 0 00003356 16 push ss 0 00003357 1F pop ds 0 00003358 E8[FEFF] call _share_access_check 0 0000335B 85C0 test ax, ax 0 0000335D 8E46F6 mov es, word ptr [bp-10] 0 00003360 7408 je _.L68 0 00003362 89C1 mov cx, ax 0 00003364 99 cwd 539 _.L89: 0 00003365 89D6 mov si, dx 0 00003367 E98AFE jmp _.L51 542 _.L68: 0 0000336A FF7610 push word ptr [bp+16] 0 0000336D 06 push es 0 0000336E FF76F8 push word ptr [bp-8] 0 00003371 57 push di 0 00003372 56 push si 0 00003373 16 push ss 0 00003374 1F pop ds 0 00003375 E8[FEFF] call _rwblock 0 00003378 EBA8 jmp _.L90 552 _.L69: 0 0000337A B9FAFF mov cx, -6 0 0000337D 96 xchg si, ax 0 0000337E E973FE jmp _.L51 556 .size _DosRWSft, .-_DosRWSft 557 .global _SftSeek2 558 .type _SftSeek2, @function 559 _SftSeek2: 0 00003381 56 push si 0 00003382 57 push di 0 00003383 55 push bp 0 00003384 89E5 mov bp, sp 0 00003386 1E push ds 0 00003387 FF7608 push word ptr [bp+8] 0 0000338A E8[FEFF] call _idx_to_sft 0 0000338D 83F8FF cmp ax, -1 0 00003390 7503E9A600 je _.L97 0 00003395 837E0E02 cmp word ptr [bp+14], 2 0 00003399 7603E9A200 ja _.L98 0 0000339E 89C3 mov bx, ax 0 000033A0 89D6 mov si, dx 0 000033A2 A3[0000] mov word ptr [_lpCurSft], ax 0 000033A5 8916[0200] mov word ptr [_lpCurSft+2], dx 0 000033A9 8EC2 mov es, dx 0 000033AB 268B4705 mov ax, word ptr es:[bx+5] 0 000033AF A880 test al, -128 0 000033B1 742C je _.L93 0 000033B3 C7460A0000 mov word ptr [bp+10], 0 0 000033B8 C7460C0000 mov word ptr [bp+12], 0 581 _.L94: 0 000033BD 8B560A mov dx, word ptr [bp+10] 0 000033C0 8B460C mov ax, word ptr [bp+12] 0 000033C3 8EC6 mov es, si 0 000033C5 26895715 mov word ptr es:[bx+21], dx 0 000033C9 26894717 mov word ptr es:[bx+23], ax 0 000033CD 8B5E10 mov bx, word ptr [bp+16] 0 000033D0 8917 mov word ptr [bx], dx 0 000033D2 894702 mov word ptr [bx+2], ax 0 000033D5 31C0 xor ax, ax 591 _.L91: 0 000033D7 89EC mov sp, bp 0 000033D9 5D pop bp 0 000033DA 5F pop di 0 000033DB 5E pop si 0 000033DC C20A00 ret 10 597 _.L93: 0 000033DF 837E0E01 cmp word ptr [bp+14], 1 0 000033E3 751C jne _.L95 0 000033E5 8EC2 mov es, dx 0 000033E7 268B4715 mov ax, word ptr es:[bx+21] 0 000033EB 268B5717 mov dx, word ptr es:[bx+23] 603 _.L103: 0 000033EF 8B4E0A mov cx, word ptr [bp+10] 0 000033F2 8B7E0C mov di, word ptr [bp+12] 0 000033F5 01C8 add ax, cx 0 000033F7 11FA adc dx, di 0 000033F9 89460A mov word ptr [bp+10], ax 0 000033FC 89560C mov word ptr [bp+12], dx 0 000033FF EBBC jmp _.L94 611 _.L95: 0 00003401 837E0E02 cmp word ptr [bp+14], 2 0 00003405 75B6 jne _.L94 0 00003407 85C0 test ax, ax 0 00003409 7D24 jge _.L96 0 0000340B 8EC2 mov es, dx 0 0000340D 26F6470270 test byte ptr es:[bx+2], 112 0 00003412 741B je _.L96 0 00003414 8D460A lea ax, [10+bp] 0 00003417 50 push ax 0 00003418 52 push dx 0 00003419 53 push bx 0 0000341A 895EFE mov word ptr [bp-2], bx 0 0000341D B82111 mov ax, 4385 0 00003420 50 push ax 0 00003421 E8[FEFF] call _network_redirector_mx 0 00003424 89460A mov word ptr [bp+10], ax 0 00003427 89560C mov word ptr [bp+12], dx 0 0000342A 8B5EFE mov bx, word ptr [bp-2] 0 0000342D EB8E jmp _.L94 631 _.L96: 0 0000342F 8EC6 mov es, si 0 00003431 268B4711 mov ax, word ptr es:[bx+17] 0 00003435 268B5713 mov dx, word ptr es:[bx+19] 0 00003439 EBB4 jmp _.L103 636 _.L97: 0 0000343B B8FAFF mov ax, -6 0 0000343E EB97 jmp _.L91 639 _.L98: 0 00003440 B8FFFF mov ax, -1 0 00003443 EB92 jmp _.L91 642 .size _SftSeek2, .-_SftSeek2 643 .global _SftSeek 644 .type _SftSeek, @function 645 _SftSeek: 0 00003445 55 push bp 0 00003446 89E5 mov bp, sp 0 00003448 1E push ds 0 00003449 1E push ds 0 0000344A 8D46FC lea ax, [-4+bp] 0 0000344D 50 push ax 0 0000344E FF760A push word ptr [bp+10] 0 00003451 FF7608 push word ptr [bp+8] 0 00003454 FF7606 push word ptr [bp+6] 0 00003457 FF7604 push word ptr [bp+4] 0 0000345A E8[FEFF] call _SftSeek2 0 0000345D 89EC mov sp, bp 0 0000345F 5D pop bp 0 00003460 C20800 ret 8 660 .size _SftSeek, .-_SftSeek 661 .global _DosSeek 662 .type _DosSeek, @function 663 _DosSeek: 0 00003463 56 push si 0 00003464 57 push di 0 00003465 55 push bp 0 00003466 89E5 mov bp, sp 0 00003468 1E push ds 0 00003469 1E push ds 0 0000346A 8B7E0A mov di, word ptr [bp+10] 0 0000346D 8B760C mov si, word ptr [bp+12] 0 00003470 FF7608 push word ptr [bp+8] 0 00003473 E8[FEFF] call _get_sft_idx 0 00003476 8D56FC lea dx, [-4+bp] 0 00003479 52 push dx 0 0000347A FF760E push word ptr [bp+14] 0 0000347D 56 push si 0 0000347E 57 push di 0 0000347F 50 push ax 0 00003480 E8[FEFF] call _SftSeek2 0 00003483 8B5E10 mov bx, word ptr [bp+16] 0 00003486 8907 mov word ptr [bx], ax 0 00003488 99 cwd 0 00003489 85C0 test ax, ax 0 0000348B 7506 jne _.L106 0 0000348D 8B46FC mov ax, word ptr [bp-4] 0 00003490 8B56FE mov dx, word ptr [bp-2] 688 _.L106: 0 00003493 89EC mov sp, bp 0 00003495 5D pop bp 0 00003496 5F pop di 0 00003497 5E pop si 0 00003498 C20A00 ret 10 694 .size _DosSeek, .-_DosSeek 695 .global _get_root 696 .type _get_root, @function 697 _get_root: 0 0000349B 56 push si 0 0000349C 57 push di 0 0000349D 55 push bp 0 0000349E 89E5 mov bp, sp 0 000034A0 1E push ds 0 000034A1 8B7608 mov si, word ptr [bp+8] 0 000034A4 8B560A mov dx, word ptr [bp+10] 0 000034A7 52 push dx 0 000034A8 8956FE mov word ptr [bp-2], dx 0 000034AB 56 push si 0 000034AC E8[FEFF] call _fstrlen 0 000034AF 89F1 mov cx, si 0 000034B1 01C1 add cx, ax 0 000034B3 8B56FE mov dx, word ptr [bp-2] 712 _.L112: 0 000034B6 85C0 test ax, ax 0 000034B8 7509 jne _.L114 715 _.L111: 0 000034BA 91 xchg cx, ax 0 000034BB 89EC mov sp, bp 0 000034BD 5D pop bp 0 000034BE 5F pop di 0 000034BF 5E pop si 0 000034C0 C20400 ret 4 722 _.L114: 0 000034C3 48 dec ax 0 000034C4 97 xchg di, ax 0 000034C5 89CE mov si, cx 0 000034C7 4E dec si 0 000034C8 8EC2 mov es, dx 0 000034CA 268A1C mov bl, byte ptr es:[si] 0 000034CD 80FB2F cmp bl, 47 0 000034D0 9F lahf 0 000034D1 D0E4 shl ah, 1 0 000034D3 99 cwd 0 000034D4 88D7 mov bh, dl 0 000034D6 F6DF neg bh 0 000034D8 88F8 mov al, bh 0 000034DA 80FB5C cmp bl, 92 0 000034DD 9F lahf 0 000034DE D0E4 shl ah, 1 0 000034E0 99 cwd 0 000034E1 88D7 mov bh, dl 0 000034E3 F6DF neg bh 0 000034E5 88C4 mov ah, al 0 000034E7 08FC or ah, bh 0 000034E9 8CC2 mov dx, es 0 000034EB 75CD jne _.L111 0 000034ED 80FB3A cmp bl, 58 0 000034F0 74C8 je _.L111 0 000034F2 89F1 mov cx, si 0 000034F4 97 xchg di, ax 0 000034F5 EBBF jmp _.L112 751 .size _get_root, .-_get_root 752 .type _set_fcbname, @function 753 _set_fcbname: 0 000034F7 56 push si 0 000034F8 16 push ss 0 000034F9 B8[0000] mov ax, offset __PriPathBuffer 0 000034FC 50 push ax 0 000034FD E8[FEFF] call _get_root 0 00003500 50 push ax 0 00003501 BE[0000] mov si, offset _DirEntBuffer 0 00003504 56 push si 0 00003505 E8[FEFF] call _ConvertNameSZToName83 0 00003508 C6440B00 mov byte ptr [si+11], 0 0 0000350C 5E pop si 0 0000350D C3 ret 766 .size _set_fcbname, .-_set_fcbname 767 .global _CloneHandle 768 .type _CloneHandle, @function 769 _CloneHandle: 0 0000350E 55 push bp 0 0000350F 89E5 mov bp, sp 0 00003511 1E push ds 0 00003512 FF7604 push word ptr [bp+4] 0 00003515 E8[FEFF] call _get_sft 0 00003518 89C3 mov bx, ax 0 0000351A 83F8FF cmp ax, -1 0 0000351D 7505 jne _.L125 0 0000351F 83FAFF cmp dx, -1 0 00003522 7417 je _.L124 780 _.L125: 0 00003524 8EC2 mov es, dx 0 00003526 268B4702 mov ax, word ptr es:[bx+2] 0 0000352A 8946FE mov word ptr [bp-2], ax 0 0000352D 258000 and ax, 128 0 00003530 7509 jne _.L124 0 00003532 26FF07 inc word ptr es:[bx] 787 _.L120: 0 00003535 89EC mov sp, bp 0 00003537 5D pop bp 0 00003538 C20200 ret 2 791 _.L124: 0 0000353B B8FAFF mov ax, -6 0 0000353E EBF5 jmp _.L120 794 .size _CloneHandle, .-_CloneHandle 795 .global _DosCloseSft 796 .type _DosCloseSft, @function 797 _DosCloseSft: 0 00003540 56 push si 0 00003541 57 push di 0 00003542 55 push bp 0 00003543 89E5 mov bp, sp 0 00003545 83EC06 sub sp, 6 0 00003548 8B7E0A mov di, word ptr [bp+10] 0 0000354B FF7608 push word ptr [bp+8] 0 0000354E E8[FEFF] call _idx_to_sft 0 00003551 8956FA mov word ptr [bp-6], dx 0 00003554 83F8FF cmp ax, -1 0 00003557 7456 je _.L140 0 00003559 89C6 mov si, ax 0 0000355B A3[0000] mov word ptr [_lpCurSft], ax 0 0000355E 8916[0200] mov word ptr [_lpCurSft+2], dx 0 00003562 8EC2 mov es, dx 0 00003564 268B4405 mov ax, word ptr es:[si+5] 0 00003568 85C0 test ax, ax 0 0000356A 7D16 jge _.L130 0 0000356C 83FF01 cmp di, 1 0 0000356F 19C0 sbb ax, ax 0 00003571 050711 add ax, 4359 0 00003574 52 push dx 0 00003575 56 push si 0 00003576 50 push ax 0 00003577 E8[FEFF] call _network_redirector_fp 823 _.L128: 0 0000357A 89EC mov sp, bp 0 0000357C 5D pop bp 0 0000357D 5F pop di 0 0000357E 5E pop si 0 0000357F C20400 ret 4 829 _.L130: 0 00003582 A880 test al, -128 0 00003584 743C je _.L132 0 00003586 8E46FA mov es, word ptr [bp-6] 0 00003589 26C45C07 les bx, dword ptr es:[si+7] 0 0000358D 26F6470508 test byte ptr es:[bx+5], 8 0 00003592 B80000 mov ax, 0 0 00003595 741D je _.L133 0 00003597 895EFC mov word ptr [bp-4], bx 0 0000359A 8C46FE mov word ptr [bp-2], es 0 0000359D BA0E00 mov dx, 14 0 000035A0 52 push dx 0 000035A1 50 push ax 0 000035A2 50 push ax 0 000035A3 50 push ax 0 000035A4 8D46FC lea ax, [-4+bp] 0 000035A7 50 push ax 0 000035A8 E8[FEFF] call _BinaryCharIO 0 000035AB 09D0 or ax, dx 0 000035AD 7405 je _.L133 849 _.L140: 0 000035AF B8FAFF mov ax, -6 0 000035B2 EBC6 jmp _.L128 852 _.L133: 0 000035B4 85FF test di, di 0 000035B6 7506 jne _.L142 855 _.L137: 0 000035B8 8E46FA mov es, word ptr [bp-6] 0 000035BB 26FF0C dec word ptr es:[si] 858 _.L142: 0 000035BE 31C0 xor ax, ax 0 000035C0 EBB8 jmp _.L128 861 _.L132: 0 000035C2 FF7608 push word ptr [bp+8] 0 000035C5 E8[FEFF] call _dos_close 0 000035C8 85FF test di, di 0 000035CA 75AE jne _.L128 0 000035CC 85C0 test ax, ax 0 000035CE 75AA jne _.L128 0 000035D0 8E46FA mov es, word ptr [bp-6] 0 000035D3 26833C01 cmp word ptr es:[si], 1 0 000035D7 75DF jne _.L137 0 000035D9 E8C7F9 call _IsShareInstalled.part.1 0 000035DC 85C0 test ax, ax 0 000035DE 74D8 je _.L137 0 000035E0 8E46FA mov es, word ptr [bp-6] 0 000035E3 268B4433 mov ax, word ptr es:[si+51] 0 000035E7 85C0 test ax, ax 0 000035E9 7C04 jl _.L139 0 000035EB 50 push ax 0 000035EC E8[FEFF] call _share_close_file 880 _.L139: 0 000035EF 8E46FA mov es, word ptr [bp-6] 0 000035F2 26C74433FFFF mov word ptr es:[si+51], -1 0 000035F8 EBBE jmp _.L137 884 .size _DosCloseSft, .-_DosCloseSft 885 .global _DosClose 886 .type _DosClose, @function 887 _DosClose: 0 000035FA 56 push si 0 000035FB 57 push di 0 000035FC 55 push bp 0 000035FD 89E5 mov bp, sp 0 000035FF 8B36[0000] mov si, word ptr [_cu_psp] 0 00003603 FF7608 push word ptr [bp+8] 0 00003606 E8[FEFF] call _get_sft_idx 0 00003609 89C7 mov di, ax 0 0000360B 50 push ax 0 0000360C E8[FEFF] call _idx_to_sft 0 0000360F 83F8FF cmp ax, -1 0 00003612 7423 je _.L155 0 00003614 8EC6 mov es, si 0 00003616 26A13600 mov ax, word ptr es:[54] 0 0000361A 8B5E08 mov bx, word ptr [bp+8] 0 0000361D 26031E3400 add bx, word ptr es:[52] 0 00003622 8EC0 mov es, ax 0 00003624 26C607FF mov byte ptr es:[bx], -1 0 00003628 31C0 xor ax, ax 0 0000362A 50 push ax 0 0000362B 57 push di 0 0000362C E8[FEFF] call _DosCloseSft 910 _.L153: 0 0000362F 89EC mov sp, bp 0 00003631 5D pop bp 0 00003632 5F pop di 0 00003633 5E pop si 0 00003634 C20200 ret 2 916 _.L155: 0 00003637 B8FAFF mov ax, -6 0 0000363A EBF3 jmp _.L153 919 .size _DosClose, .-_DosClose 920 .global _DosForceDup 921 .type _DosForceDup, @function 922 _DosForceDup: 0 0000363C 56 push si 0 0000363D 57 push di 0 0000363E 55 push bp 0 0000363F 89E5 mov bp, sp 0 00003641 1E push ds 0 00003642 1E push ds 0 00003643 8B7E0A mov di, word ptr [bp+10] 0 00003646 A1[0000] mov ax, word ptr [_cu_psp] 0 00003649 8946FE mov word ptr [bp-2], ax 0 0000364C FF7608 push word ptr [bp+8] 0 0000364F E8[FEFF] call _get_sft 0 00003652 89C6 mov si, ax 0 00003654 83F8FF cmp ax, -1 0 00003657 7505 jne _.L163 0 00003659 83FAFF cmp dx, -1 0 0000365C 744F je _.L167 939 _.L163: 0 0000365E 8E46FE mov es, word ptr [bp-2] 0 00003661 26A13600 mov ax, word ptr es:[54] 0 00003665 8946FC mov word ptr [bp-4], ax 0 00003668 89FB mov bx, di 0 0000366A 26031E3400 add bx, word ptr es:[52] 0 0000366F 8EC0 mov es, ax 0 00003671 26803FFF cmp byte ptr es:[bx], -1 0 00003675 7526 jne _.L160 948 _.L161: 0 00003677 8E46FE mov es, word ptr [bp-2] 0 0000367A 26C5063400 lds ax, dword ptr es:[52] 0 0000367F 89C3 mov bx, ax 0 00003681 035E08 add bx, word ptr [bp+8] 0 00003684 8A0F mov cl, byte ptr [bx] 0 00003686 89FB mov bx, di 0 00003688 01C3 add bx, ax 0 0000368A 880F mov byte ptr [bx], cl 0 0000368C 8EC2 mov es, dx 0 0000368E 26FF04 inc word ptr es:[si] 0 00003691 31C0 xor ax, ax 960 _.L157: 0 00003693 89EC mov sp, bp 0 00003695 5D pop bp 0 00003696 5F pop di 0 00003697 5E pop si 0 00003698 16 push ss 0 00003699 1F pop ds 0 0000369A C20400 ret 4 968 _.L160: 0 0000369D 8956FC mov word ptr [bp-4], dx 0 000036A0 57 push di 0 000036A1 E8[FEFF] call _DosClose 0 000036A4 85C0 test ax, ax 0 000036A6 8B56FC mov dx, word ptr [bp-4] 0 000036A9 74CC je _.L161 0 000036AB EBE6 jmp _.L157 976 _.L167: 0 000036AD B8FAFF mov ax, -6 0 000036B0 EBE1 jmp _.L157 979 .size _DosForceDup, .-_DosForceDup 980 .global _DosDup 981 .type _DosDup, @function 982 _DosDup: 0 000036B2 56 push si 0 000036B3 55 push bp 0 000036B4 89E5 mov bp, sp 0 000036B6 1E push ds 0 000036B7 E861F8 call _get_free_hndl 0 000036BA 89C6 mov si, ax 0 000036BC 85D2 test dx, dx 0 000036BE 7C17 jl _.L169 0 000036C0 8956FE mov word ptr [bp-2], dx 0 000036C3 50 push ax 0 000036C4 FF7606 push word ptr [bp+6] 0 000036C7 E8[FEFF] call _DosForceDup 0 000036CA 85C0 test ax, ax 0 000036CC 8B56FE mov dx, word ptr [bp-2] 0 000036CF 7D06 jge _.L169 0 000036D1 BEFAFF mov si, -6 0 000036D4 BAFFFF mov dx, -1 1000 _.L169: 0 000036D7 96 xchg si, ax 0 000036D8 89EC mov sp, bp 0 000036DA 5D pop bp 0 000036DB 5E pop si 0 000036DC C20200 ret 2 1006 .size _DosDup, .-_DosDup 1007 .global _DosGetFree 1008 .type _DosGetFree, @function 1009 _DosGetFree: 0 000036DF 56 push si 0 000036E0 57 push di 0 000036E1 55 push bp 0 000036E2 89E5 mov bp, sp 0 000036E4 83EC1A sub sp, 26 0 000036E7 8B760A mov si, word ptr [bp+10] 0 000036EA 8A4608 mov al, byte ptr [bp+8] 0 000036ED 30E4 xor ah, ah 0 000036EF 50 push ax 0 000036F0 E8[FEFF] call _get_cds1 0 000036F3 89C3 mov bx, ax 0 000036F5 09D0 or ax, dx 0 000036F7 750C jne _.L175 1023 _.L178: 0 000036F9 BAFFFF mov dx, -1 1025 _.L174: 0 000036FC 92 xchg dx, ax 0 000036FD 89EC mov sp, bp 0 000036FF 5D pop bp 0 00003700 5F pop di 0 00003701 5E pop si 0 00003702 C20800 ret 8 1032 _.L175: 0 00003705 891E[0000] mov word ptr [_current_ldt], bx 0 00003709 8916[0200] mov word ptr [_current_ldt+2], dx 0 0000370D 8EC2 mov es, dx 0 0000370F 26837F4300 cmp word ptr es:[bx+67], 0 0 00003714 7D31 jge _.L177 0 00003716 8D46F6 lea ax, [-10+bp] 0 00003719 50 push ax 0 0000371A 52 push dx 0 0000371B 53 push bx 0 0000371C B80C11 mov ax, 4364 0 0000371F 50 push ax 0 00003720 E8[FEFF] call _network_redirector_mx 0 00003723 85C0 test ax, ax 0 00003725 75D2 jne _.L178 0 00003727 8B56F6 mov dx, word ptr [bp-10] 0 0000372A 85F6 test si, si 0 0000372C 7407 je _.L179 0 0000372E 8B46FC mov ax, word ptr [bp-4] 0 00003731 8904 mov word ptr [si], ax 0 00003733 30F6 xor dh, dh 1053 _.L179: 0 00003735 8B46F8 mov ax, word ptr [bp-8] 0 00003738 8B7E0E mov di, word ptr [bp+14] 0 0000373B 8905 mov word ptr [di], ax 0 0000373D 8B46FA mov ax, word ptr [bp-6] 0 00003740 8B7E0C mov di, word ptr [bp+12] 0 00003743 8905 mov word ptr [di], ax 0 00003745 EBB5 jmp _.L174 1061 _.L177: 0 00003747 8EC2 mov es, dx 0 00003749 268B4747 mov ax, word ptr es:[bx+71] 0 0000374D 8946F4 mov word ptr [bp-12], ax 0 00003750 268B4745 mov ax, word ptr es:[bx+69] 0 00003754 8946F2 mov word ptr [bp-14], ax 0 00003757 8B46F4 mov ax, word ptr [bp-12] 0 0000375A 260B4745 or ax, word ptr es:[bx+69] 0 0000375E 7499 je _.L178 0 00003760 85F6 test si, si 0 00003762 7513 jne _.L181 0 00003764 C45EF2 les bx, dword ptr [bp-14] 0 00003767 268A07 mov al, byte ptr es:[bx] 0 0000376A 98 cbw 0 0000376B 50 push ax 0 0000376C E8[FEFF] call _flush_buffers 0 0000376F C45EF2 les bx, dword ptr [bp-14] 0 00003772 26C64718FF mov byte ptr es:[bx+24], -1 1079 _.L181: 0 00003777 FF76F4 push word ptr [bp-12] 0 0000377A FF76F2 push word ptr [bp-14] 0 0000377D E8[FEFF] call _media_check 0 00003780 85C0 test ax, ax 0 00003782 7D03E972FF jl _.L178 0 00003787 C45EF2 les bx, dword ptr [bp-14] 0 0000378A 268A4704 mov al, byte ptr es:[bx+4] 0 0000378E 30E4 xor ah, ah 0 00003790 40 inc ax 0 00003791 8946F0 mov word ptr [bp-16], ax 0 00003794 92 xchg dx, ax 0 00003795 268B4702 mov ax, word ptr es:[bx+2] 0 00003799 8B7E0C mov di, word ptr [bp+12] 0 0000379C 8905 mov word ptr [di], ax 0 0000379E 26837F0F00 cmp word ptr es:[bx+15], 0 0 000037A3 7403E99F00 jne _.L182 0 000037A8 8956E8 mov word ptr [bp-24], dx 0 000037AB 268B5702 mov dx, word ptr es:[bx+2] 0 000037AF 268A4705 mov al, byte ptr es:[bx+5] 0 000037B3 30E4 xor ah, ah 0 000037B5 50 push ax 0 000037B6 31C0 xor ax, ax 0 000037B8 50 push ax 0 000037B9 52 push dx 0 000037BA E8[FEFF] call ___ashlsi3 0 000037BD 8946F0 mov word ptr [bp-16], ax 0 000037C0 8956EE mov word ptr [bp-18], dx 0 000037C3 C45EF2 les bx, dword ptr [bp-14] 0 000037C6 268B7F2D mov di, word ptr es:[bx+45] 0 000037CA 268B4F2F mov cx, word ptr es:[bx+47] 0 000037CE 83C7FF add di, -1 0 000037D1 83D1FF adc cx, -1 0 000037D4 85F6 test si, si 0 000037D6 8B56E8 mov dx, word ptr [bp-24] 0 000037D9 7414 je _.L184 0 000037DB 894EE6 mov word ptr [bp-26], cx 0 000037DE 06 push es 0 000037DF 53 push bx 0 000037E0 E8[FEFF] call _dos_free 0 000037E3 8946EC mov word ptr [bp-20], ax 0 000037E6 8956EA mov word ptr [bp-22], dx 0 000037E9 8B56E8 mov dx, word ptr [bp-24] 0 000037EC 8B4EE6 mov cx, word ptr [bp-26] 1123 _.L184: 0 000037EF 85C9 test cx, cx 0 000037F1 7505 jne _.L209 0 000037F3 83FFF5 cmp di, -11 0 000037F6 760D jbe _.L201 1128 _.L209: 0 000037F8 837EEE00 cmp word ptr [bp-18], 0 0 000037FC 7507 jne _.L201 0 000037FE 817EF0FF7F cmp word ptr [bp-16], 32767 0 00003803 762E jbe _.L224 1133 _.L201: 0 00003805 85C9 test cx, cx 0 00003807 7505 jne _.L192 0 00003809 83FFF5 cmp di, -11 0 0000380C 7603 jbe _.L191 1138 _.L192: 0 0000380E BFF5FF mov di, -11 1140 _.L191: 0 00003811 8B5E0E mov bx, word ptr [bp+14] 0 00003814 893F mov word ptr [bx], di 0 00003816 85F6 test si, si 0 00003818 7503E9DFFE je _.L174 0 0000381D 8B46EC mov ax, word ptr [bp-20] 0 00003820 837EEA00 cmp word ptr [bp-22], 0 0 00003824 7505 jne _.L194 0 00003826 83F8F5 cmp ax, -11 0 00003829 7603 jbe _.L193 1150 _.L194: 0 0000382B B8F5FF mov ax, -11 1152 _.L193: 0 0000382E 8904 mov word ptr [si], ax 0 00003830 E9C9FE jmp _.L174 1155 _.L224: 0 00003833 D166F0 shl word ptr [bp-16], 1 0 00003836 D156EE rcl word ptr [bp-18], 1 0 00003839 D1E2 shl dx, 1 0 0000383B D1E9 shr cx, 1 0 0000383D D1DF rcr di, 1 0 0000383F D16EEA shr word ptr [bp-22], 1 0 00003842 D15EEC rcr word ptr [bp-20], 1 0 00003845 EBA8 jmp _.L184 1164 _.L182: 0 00003847 85F6 test si, si 0 00003849 7411 je _.L195 0 0000384B 8956EE mov word ptr [bp-18], dx 0 0000384E FF76F4 push word ptr [bp-12] 0 00003851 FF76F2 push word ptr [bp-14] 0 00003854 E8[FEFF] call _dos_free 0 00003857 8904 mov word ptr [si], ax 0 00003859 8B56EE mov dx, word ptr [bp-18] 1173 _.L195: 0 0000385C C45EF2 les bx, dword ptr [bp-14] 0 0000385F 268B470D mov ax, word ptr es:[bx+13] 0 00003863 48 dec ax 0 00003864 8B5E0E mov bx, word ptr [bp+14] 0 00003867 8907 mov word ptr [bx], ax 0 00003869 837EF040 cmp word ptr [bp-16], 64 0 0000386D 7F03E98AFE jle _.L174 0 00003872 8B5EF0 mov bx, word ptr [bp-16] 0 00003875 D1EB shr bx, 1 0 00003877 89DA mov dx, bx 0 00003879 85F6 test si, si 0 0000387B 740B je _.L196 0 0000387D 8B04 mov ax, word ptr [si] 0 0000387F 3DF97F cmp ax, 32761 0 00003882 7718 ja _.L199 0 00003884 D1E0 shl ax, 1 1190 _.L197: 0 00003886 8904 mov word ptr [si], ax 1192 _.L196: 0 00003888 8B5E0E mov bx, word ptr [bp+14] 0 0000388B 8B07 mov ax, word ptr [bx] 0 0000388D 3DF97F cmp ax, 32761 0 00003890 770F ja _.L200 0 00003892 D1E0 shl ax, 1 1198 _.L198: 0 00003894 8B5E0E mov bx, word ptr [bp+14] 0 00003897 8907 mov word ptr [bx], ax 0 00003899 E960FE jmp _.L174 1202 _.L199: 0 0000389C B8F5FF mov ax, -11 0 0000389F EBE5 jmp _.L197 1205 _.L200: 0 000038A1 B8F5FF mov ax, -11 0 000038A4 EBEE jmp _.L198 1208 .size _DosGetFree, .-_DosGetFree 1209 .global _DosGetExtFree 1210 .type _DosGetExtFree, @function 1211 _DosGetExtFree: 0 000038A6 56 push si 0 000038A7 57 push di 0 000038A8 55 push bp 0 000038A9 89E5 mov bp, sp 0 000038AB 83EC16 sub sp, 22 0 000038AE 8B7608 mov si, word ptr [bp+8] 0 000038B1 C4460A les ax, dword ptr [bp+10] 0 000038B4 8946EE mov word ptr [bp-18], ax 0 000038B7 8C46F4 mov word ptr [bp-12], es 0 000038BA 8B460E mov ax, word ptr [bp+14] 0 000038BD 8946F2 mov word ptr [bp-14], ax 0 000038C0 BA2C00 mov dx, 44 0 000038C3 52 push dx 0 000038C4 8956EC mov word ptr [bp-20], dx 0 000038C7 31FF xor di, di 0 000038C9 57 push di 0 000038CA 50 push ax 0 000038CB FF76F4 push word ptr [bp-12] 0 000038CE E8[FEFF] call _fmemset 0 000038D1 8E46F2 mov es, word ptr [bp-14] 0 000038D4 8B5EF4 mov bx, word ptr [bp-12] 0 000038D7 8B56EC mov dx, word ptr [bp-20] 0 000038DA 268917 mov word ptr es:[bx], dx 0 000038DD 8E46EE mov es, word ptr [bp-18] 0 000038E0 268A04 mov al, byte ptr es:[si] 0 000038E3 3C01 cmp al, 1 0 000038E5 897EEC mov word ptr [bp-20], di 0 000038E8 7226 jc _.L227 0 000038EA 3C2E cmp al, 46 0 000038EC 7422 je _.L227 0 000038EE 3C5C cmp al, 92 0 000038F0 7407 je _.L255 0 000038F2 3C2F cmp al, 47 0 000038F4 7403E96401 jne _.L228 1246 _.L255: 0 000038F9 8E46EE mov es, word ptr [bp-18] 0 000038FC 268A6401 mov ah, byte ptr es:[si+1] 0 00003900 80FC5C cmp ah, 92 0 00003903 7503E95501 je _.L228 0 00003908 80FC2F cmp ah, 47 0 0000390B 7503E94D01 je _.L228 1253 _.L227: 0 00003910 A0[0000] mov al, byte ptr [_default_drive] 0 00003913 98 cbw 1256 _.L282: 0 00003914 50 push ax 0 00003915 E8[FEFF] call _get_cds 0 00003918 89C6 mov si, ax 0 0000391A 09D0 or ax, dx 0 0000391C 7503E94601 je _.L233 0 00003921 8EC2 mov es, dx 0 00003923 26837C4300 cmp word ptr es:[si+67], 0 0 00003928 7C03E90B02 jge _.L235 0 0000392D 8D7EF6 lea di, [-10+bp] 0 00003930 57 push di 0 00003931 52 push dx 0 00003932 8956EE mov word ptr [bp-18], dx 0 00003935 56 push si 0 00003936 B8A311 mov ax, 4515 0 00003939 50 push ax 0 0000393A E8[FEFF] call _network_redirector_mx 0 0000393D 85C0 test ax, ax 0 0000393F 8B4EEE mov cx, word ptr [bp-18] 0 00003942 7503E93901 je _.L236 0 00003947 57 push di 0 00003948 51 push cx 0 00003949 56 push si 0 0000394A B80C11 mov ax, 4364 0 0000394D 50 push ax 0 0000394E E8[FEFF] call _network_redirector_mx 0 00003951 85C0 test ax, ax 0 00003953 7403E90F01 jne _.L233 0 00003958 8B56F6 mov dx, word ptr [bp-10] 0 0000395B 8E46F2 mov es, word ptr [bp-14] 0 0000395E 8B5EF4 mov bx, word ptr [bp-12] 0 00003961 26895704 mov word ptr es:[bx+4], dx 0 00003965 8E46F2 mov es, word ptr [bp-14] 0 00003968 8B5EF4 mov bx, word ptr [bp-12] 0 0000396B 26894706 mov word ptr es:[bx+6], ax 0 0000396F 8B56F8 mov dx, word ptr [bp-8] 0 00003972 8E46F2 mov es, word ptr [bp-14] 0 00003975 8B5EF4 mov bx, word ptr [bp-12] 0 00003978 26895710 mov word ptr es:[bx+16], dx 0 0000397C 8E46F2 mov es, word ptr [bp-14] 0 0000397F 8B5EF4 mov bx, word ptr [bp-12] 0 00003982 26894712 mov word ptr es:[bx+18], ax 0 00003986 8B56FA mov dx, word ptr [bp-6] 0 00003989 8E46F2 mov es, word ptr [bp-14] 0 0000398C 8B5EF4 mov bx, word ptr [bp-12] 0 0000398F 26895708 mov word ptr es:[bx+8], dx 0 00003993 8E46F2 mov es, word ptr [bp-14] 0 00003996 8B5EF4 mov bx, word ptr [bp-12] 0 00003999 2689470A mov word ptr es:[bx+10], ax 0 0000399D 8B56FC mov dx, word ptr [bp-4] 0 000039A0 8E46F2 mov es, word ptr [bp-14] 0 000039A3 8B5EF4 mov bx, word ptr [bp-12] 0 000039A6 2689570C mov word ptr es:[bx+12], dx 0 000039AA 8E46F2 mov es, word ptr [bp-14] 0 000039AD 8B5EF4 mov bx, word ptr [bp-12] 0 000039B0 2689470E mov word ptr es:[bx+14], ax 1312 _.L237: 0 000039B4 8E46F2 mov es, word ptr [bp-14] 0 000039B7 8B5EF4 mov bx, word ptr [bp-12] 0 000039BA 268B5F10 mov bx, word ptr es:[bx+16] 0 000039BE 8B7EF4 mov di, word ptr [bp-12] 0 000039C1 268B4512 mov ax, word ptr es:[di+18] 0 000039C5 26895D20 mov word ptr es:[di+32], bx 0 000039C9 8E46F2 mov es, word ptr [bp-14] 0 000039CC 8B7EF4 mov di, word ptr [bp-12] 0 000039CF 26894522 mov word ptr es:[di+34], ax 0 000039D3 8E46F2 mov es, word ptr [bp-14] 0 000039D6 8B7EF4 mov di, word ptr [bp-12] 0 000039D9 268B7D0C mov di, word ptr es:[di+12] 0 000039DD 8B76F4 mov si, word ptr [bp-12] 0 000039E0 268E5C0E mov ds, word ptr es:[si+14] 0 000039E4 26897C1C mov word ptr es:[si+28], di 0 000039E8 8E46F2 mov es, word ptr [bp-14] 0 000039EB 8B76F4 mov si, word ptr [bp-12] 0 000039EE 268C5C1E mov word ptr es:[si+30], ds 0 000039F2 8E46F2 mov es, word ptr [bp-14] 0 000039F5 8B76F4 mov si, word ptr [bp-12] 0 000039F8 268B5404 mov dx, word ptr es:[si+4] 0 000039FC 8956EC mov word ptr [bp-20], dx 0 000039FF 268B4C06 mov cx, word ptr es:[si+6] 0 00003A03 F7E2 mul dx 0 00003A05 8946EE mov word ptr [bp-18], ax 0 00003A08 89C8 mov ax, cx 0 00003A0A F7E3 mul bx 0 00003A0C 96 xchg si, ax 0 00003A0D 0376EE add si, word ptr [bp-18] 0 00003A10 93 xchg bx, ax 0 00003A11 F766EC mul word ptr [bp-20] 0 00003A14 01D6 add si, dx 0 00003A16 8B5EF4 mov bx, word ptr [bp-12] 0 00003A19 26894718 mov word ptr es:[bx+24], ax 0 00003A1D 8E46F2 mov es, word ptr [bp-14] 0 00003A20 8B5EF4 mov bx, word ptr [bp-12] 0 00003A23 2689771A mov word ptr es:[bx+26], si 0 00003A27 8CD8 mov ax, ds 0 00003A29 F766EC mul word ptr [bp-20] 0 00003A2C 93 xchg bx, ax 0 00003A2D 91 xchg cx, ax 0 00003A2E F7E7 mul di 0 00003A30 91 xchg cx, ax 0 00003A31 01D9 add cx, bx 0 00003A33 8B46EC mov ax, word ptr [bp-20] 0 00003A36 F7E7 mul di 0 00003A38 01D1 add cx, dx 0 00003A3A 8E46F2 mov es, word ptr [bp-14] 0 00003A3D 8B5EF4 mov bx, word ptr [bp-12] 0 00003A40 26894714 mov word ptr es:[bx+20], ax 0 00003A44 8E46F2 mov es, word ptr [bp-14] 0 00003A47 8B5EF4 mov bx, word ptr [bp-12] 0 00003A4A 26894F16 mov word ptr es:[bx+22], cx 0 00003A4E 8E46F2 mov es, word ptr [bp-14] 0 00003A51 8B5EF4 mov bx, word ptr [bp-12] 0 00003A54 26C7072C00 mov word ptr es:[bx], 44 0 00003A59 31C0 xor ax, ax 0 00003A5B EB0D jmp _.L226 1371 _.L228: 0 00003A5D 8E46EE mov es, word ptr [bp-18] 0 00003A60 26807C013A cmp byte ptr es:[si+1], 58 0 00003A65 740D je _.L231 1375 _.L233: 0 00003A67 B8F1FF mov ax, -15 1377 _.L226: 0 00003A6A 89EC mov sp, bp 0 00003A6C 5D pop bp 0 00003A6D 5F pop di 0 00003A6E 5E pop si 0 00003A6F 16 push ss 0 00003A70 1F pop ds 0 00003A71 C20800 ret 8 1385 _.L231: 0 00003A74 50 push ax 0 00003A75 E8[FEFF] call _DosUpFChar 0 00003A78 30E4 xor ah, ah 0 00003A7A 83C0BF add ax, -65 0 00003A7D E994FE jmp _.L282 1391 _.L236: 0 00003A80 8B7EFE mov di, word ptr [bp-2] 0 00003A83 8946EE mov word ptr [bp-18], ax 0 00003A86 8B4EF8 mov cx, word ptr [bp-8] 0 00003A89 8B46F6 mov ax, word ptr [bp-10] 0 00003A8C 8B56FC mov dx, word ptr [bp-4] 0 00003A8F 8B76FA mov si, word ptr [bp-6] 0 00003A92 C746EC0100 mov word ptr [bp-20], 1 0 00003A97 8B5EEE mov bx, word ptr [bp-18] 0 00003A9A 895EEA mov word ptr [bp-22], bx 1401 _.L238: 0 00003A9D 3DFF00 cmp ax, 255 0 00003AA0 7629 jbe _.L245 0 00003AA2 837EEA00 cmp word ptr [bp-22], 0 0 00003AA6 7523 jne _.L245 0 00003AA8 837EEC7F cmp word ptr [bp-20], 127 0 00003AAC 771D ja _.L245 0 00003AAE D166EC shl word ptr [bp-20], 1 0 00003AB1 D156EA rcl word ptr [bp-22], 1 0 00003AB4 D1EE shr si, 1 0 00003AB6 D1DA rcr dx, 1 0 00003AB8 D1E8 shr ax, 1 0 00003ABA D1D9 rcr cx, 1 0 00003ABC EBDF jmp _.L238 1415 _.L280: 0 00003ABE D1E7 shl di, 1 0 00003AC0 D156EE rcl word ptr [bp-18], 1 0 00003AC3 D1EE shr si, 1 0 00003AC5 D1DA rcr dx, 1 0 00003AC7 D1E8 shr ax, 1 0 00003AC9 D1D9 rcr cx, 1 1422 _.L245: 0 00003ACB 3DFF00 cmp ax, 255 0 00003ACE 760C jbe _.L257 0 00003AD0 837EEE00 cmp word ptr [bp-18], 0 0 00003AD4 7506 jne _.L257 0 00003AD6 81FFFF7F cmp di, 32767 0 00003ADA 76E2 jbe _.L280 1429 _.L257: 0 00003ADC 8E46F2 mov es, word ptr [bp-14] 0 00003ADF 8B5EF4 mov bx, word ptr [bp-12] 0 00003AE2 26897F08 mov word ptr es:[bx+8], di 0 00003AE6 8E46F2 mov es, word ptr [bp-14] 0 00003AE9 8B5EF4 mov bx, word ptr [bp-12] 0 00003AEC 8B7EEE mov di, word ptr [bp-18] 0 00003AEF 26897F0A mov word ptr es:[bx+10], di 0 00003AF3 8E46F2 mov es, word ptr [bp-14] 0 00003AF6 8B5EF4 mov bx, word ptr [bp-12] 0 00003AF9 8B7EEC mov di, word ptr [bp-20] 0 00003AFC 26897F04 mov word ptr es:[bx+4], di 0 00003B00 8E46F2 mov es, word ptr [bp-14] 0 00003B03 8B5EF4 mov bx, word ptr [bp-12] 0 00003B06 8B7EEA mov di, word ptr [bp-22] 0 00003B09 26897F06 mov word ptr es:[bx+6], di 0 00003B0D 8E46F2 mov es, word ptr [bp-14] 0 00003B10 8B5EF4 mov bx, word ptr [bp-12] 0 00003B13 26894F10 mov word ptr es:[bx+16], cx 0 00003B17 8E46F2 mov es, word ptr [bp-14] 0 00003B1A 8B5EF4 mov bx, word ptr [bp-12] 0 00003B1D 26894712 mov word ptr es:[bx+18], ax 0 00003B21 8E46F2 mov es, word ptr [bp-14] 0 00003B24 8B5EF4 mov bx, word ptr [bp-12] 0 00003B27 2689570C mov word ptr es:[bx+12], dx 0 00003B2B 8E46F2 mov es, word ptr [bp-14] 0 00003B2E 8B5EF4 mov bx, word ptr [bp-12] 0 00003B31 2689770E mov word ptr es:[bx+14], si 0 00003B35 E97CFE jmp _.L237 1458 _.L235: 0 00003B38 8EC2 mov es, dx 0 00003B3A 268B5C45 mov bx, word ptr es:[si+69] 0 00003B3E 268B7447 mov si, word ptr es:[si+71] 0 00003B42 89D8 mov ax, bx 0 00003B44 09F0 or ax, si 0 00003B46 7503E91CFF je _.L233 0 00003B4B 56 push si 0 00003B4C 53 push bx 0 00003B4D 895EEE mov word ptr [bp-18], bx 0 00003B50 E8[FEFF] call _media_check 0 00003B53 85C0 test ax, ax 0 00003B55 7D03E90DFF jl _.L233 0 00003B5A 8EC6 mov es, si 0 00003B5C 8B5EEE mov bx, word ptr [bp-18] 0 00003B5F 268B4702 mov ax, word ptr es:[bx+2] 0 00003B63 8E46F2 mov es, word ptr [bp-14] 0 00003B66 8B7EF4 mov di, word ptr [bp-12] 0 00003B69 26894508 mov word ptr es:[di+8], ax 0 00003B6D 8E46F2 mov es, word ptr [bp-14] 0 00003B70 8B7EF4 mov di, word ptr [bp-12] 0 00003B73 8B46EC mov ax, word ptr [bp-20] 0 00003B76 2689450A mov word ptr es:[di+10], ax 0 00003B7A 8EC6 mov es, si 0 00003B7C 26837F0F00 cmp word ptr es:[bx+15], 0 0 00003B81 7562 jne _.L253 0 00003B83 268B472D mov ax, word ptr es:[bx+45] 0 00003B87 268B572F mov dx, word ptr es:[bx+47] 1486 _.L283: 0 00003B8B 83C0FF add ax, -1 0 00003B8E 83D2FF adc dx, -1 0 00003B91 8E46F2 mov es, word ptr [bp-14] 0 00003B94 8B7EF4 mov di, word ptr [bp-12] 0 00003B97 26894510 mov word ptr es:[di+16], ax 0 00003B9B 8E46F2 mov es, word ptr [bp-14] 0 00003B9E 8B7EF4 mov di, word ptr [bp-12] 0 00003BA1 26895512 mov word ptr es:[di+18], dx 0 00003BA5 56 push si 0 00003BA6 53 push bx 0 00003BA7 895EEE mov word ptr [bp-18], bx 0 00003BAA E8[FEFF] call _dos_free 0 00003BAD 8E46F2 mov es, word ptr [bp-14] 0 00003BB0 8B5EF4 mov bx, word ptr [bp-12] 0 00003BB3 2689470C mov word ptr es:[bx+12], ax 0 00003BB7 8E46F2 mov es, word ptr [bp-14] 0 00003BBA 8B5EF4 mov bx, word ptr [bp-12] 0 00003BBD 2689570E mov word ptr es:[bx+14], dx 0 00003BC1 8EC6 mov es, si 0 00003BC3 8B5EEE mov bx, word ptr [bp-18] 0 00003BC6 268A4704 mov al, byte ptr es:[bx+4] 0 00003BCA 30E4 xor ah, ah 0 00003BCC 40 inc ax 0 00003BCD 99 cwd 0 00003BCE 8E46F2 mov es, word ptr [bp-14] 0 00003BD1 8B5EF4 mov bx, word ptr [bp-12] 0 00003BD4 26894704 mov word ptr es:[bx+4], ax 0 00003BD8 8E46F2 mov es, word ptr [bp-14] 0 00003BDB 8B5EF4 mov bx, word ptr [bp-12] 0 00003BDE 26895706 mov word ptr es:[bx+6], dx 0 00003BE2 E9CFFD jmp _.L237 1518 _.L253: 0 00003BE5 8EC6 mov es, si 0 00003BE7 268B470D mov ax, word ptr es:[bx+13] 0 00003BEB 8B56EC mov dx, word ptr [bp-20] 0 00003BEE EB9B jmp _.L283 1523 .size _DosGetExtFree, .-_DosGetExtFree 1524 .global _DosGetCuDir 1525 .type _DosGetCuDir, @function 1526 _DosGetCuDir: 0 00003BF0 56 push si 0 00003BF1 57 push di 0 00003BF2 55 push bp 0 00003BF3 89E5 mov bp, sp 0 00003BF5 1E push ds 0 00003BF6 1E push ds 0 00003BF7 8B7E0A mov di, word ptr [bp+10] 0 00003BFA 8B760C mov si, word ptr [bp+12] 0 00003BFD 807E0800 cmp byte ptr [bp+8], 0 0 00003C01 7439 je _.L285 0 00003C03 8A4608 mov al, byte ptr [bp+8] 0 00003C06 FEC8 dec al 1539 _.L286: 0 00003C08 241F and al, 31 0 00003C0A 0441 add al, 65 0 00003C0C 8846FD mov byte ptr [bp-3], al 0 00003C0F C746FE3A00 mov word ptr [bp-2], 58 0 00003C14 B80100 mov ax, 1 0 00003C17 50 push ax 0 00003C18 B8[0000] mov ax, offset __PriPathBuffer 0 00003C1B 50 push ax 0 00003C1C 8D46FD lea ax, [-3+bp] 0 00003C1F 16 push ss 0 00003C20 50 push ax 0 00003C21 E8[FEFF] call _truename 0 00003C24 85C0 test ax, ax 0 00003C26 7C19 jl _.L288 0 00003C28 16 push ss 0 00003C29 B8[0300] mov ax, offset __PriPathBuffer+3 0 00003C2C 50 push ax 0 00003C2D 56 push si 0 00003C2E 57 push di 0 00003C2F E8[FEFF] call _fstrcpy 0 00003C32 31C0 xor ax, ax 1561 _.L284: 0 00003C34 89EC mov sp, bp 0 00003C36 5D pop bp 0 00003C37 5F pop di 0 00003C38 5E pop si 0 00003C39 C20600 ret 6 1567 _.L285: 0 00003C3C A0[0000] mov al, byte ptr [_default_drive] 0 00003C3F EBC7 jmp _.L286 1570 _.L288: 0 00003C41 B8F1FF mov ax, -15 0 00003C44 EBEE jmp _.L284 1573 .size _DosGetCuDir, .-_DosGetCuDir 1574 .global _DosChangeDir 1575 .type _DosChangeDir, @function 1576 _DosChangeDir: 0 00003C46 56 push si 0 00003C47 57 push di 0 00003C48 55 push bp 0 00003C49 89E5 mov bp, sp 0 00003C4B 1E push ds 0 00003C4C B80200 mov ax, 2 0 00003C4F 50 push ax 0 00003C50 BE[0000] mov si, offset __PriPathBuffer 0 00003C53 56 push si 0 00003C54 FF760A push word ptr [bp+10] 0 00003C57 FF7608 push word ptr [bp+8] 0 00003C5A E8[FEFF] call _truename 0 00003C5D 85C0 test ax, ax 0 00003C5F 7D0B jge _.L291 1591 _.L296: 0 00003C61 B8FDFF mov ax, -3 1593 _.L290: 0 00003C64 89EC mov sp, bp 0 00003C66 5D pop bp 0 00003C67 5F pop di 0 00003C68 5E pop si 0 00003C69 C20400 ret 4 1599 _.L291: 0 00003C6C 97 xchg di, ax 0 00003C6D E887F8 call _set_fcbname 0 00003C70 833E[0000]FF cmp word ptr [_current_ldt], -1 0 00003C75 720C jc _.L293 1604 _.L297: 0 00003C77 F7C74000 test di, 64 0 00003C7B 7511 jne _.L294 0 00003C7D 56 push si 0 00003C7E E8[FEFF] call _dos_cd 0 00003C81 EB12 jmp _.L298 1610 _.L293: 0 00003C83 56 push si 0 00003C84 E8[FEFF] call _strlen 0 00003C87 83F842 cmp ax, 66 0 00003C8A 76EB jbe _.L297 0 00003C8C EBD3 jmp _.L296 1616 _.L294: 0 00003C8E B80511 mov ax, 4357 0 00003C91 50 push ax 0 00003C92 E8[FEFF] call _network_redirector 1620 _.L298: 0 00003C95 85C0 test ax, ax 0 00003C97 75CB jne _.L290 0 00003C99 8B16[0000] mov dx, word ptr [_current_ldt] 0 00003C9D 8B0E[0200] mov cx, word ptr [_current_ldt+2] 0 00003CA1 83FAFF cmp dx, -1 0 00003CA4 74BE je _.L290 0 00003CA6 8946FE mov word ptr [bp-2], ax 0 00003CA9 16 push ss 0 00003CAA 56 push si 0 00003CAB 51 push cx 0 00003CAC 52 push dx 0 00003CAD E8[FEFF] call _fstrcpy 0 00003CB0 807C0700 cmp byte ptr [si+7], 0 0 00003CB4 8B46FE mov ax, word ptr [bp-2] 0 00003CB7 75AB jne _.L290 0 00003CB9 C41E[0000] les bx, dword ptr [_current_ldt] 0 00003CBD 26884708 mov byte ptr es:[bx+8], al 0 00003CC1 EBA1 jmp _.L290 1639 .size _DosChangeDir, .-_DosChangeDir 1640 .global _DosFindFirst 1641 .type _DosFindFirst, @function 1642 _DosFindFirst: 0 00003CC3 56 push si 0 00003CC4 57 push di 0 00003CC5 55 push bp 0 00003CC6 89E5 mov bp, sp 0 00003CC8 83EC06 sub sp, 6 0 00003CCB C406[0000] les ax, dword ptr [_dta] 0 00003CCF 8946FC mov word ptr [bp-4], ax 0 00003CD2 8C46FA mov word ptr [bp-6], es 0 00003CD5 B80600 mov ax, 6 0 00003CD8 50 push ax 0 00003CD9 BF[0000] mov di, offset __PriPathBuffer 0 00003CDC 57 push di 0 00003CDD FF760C push word ptr [bp+12] 0 00003CE0 FF760A push word ptr [bp+10] 0 00003CE3 E8[FEFF] call _truename 0 00003CE6 89C6 mov si, ax 0 00003CE8 85C0 test ax, ax 0 00003CEA 7D03E9A900 jl _.L303 0 00003CEF E805F8 call _set_fcbname 0 00003CF2 8A4608 mov al, byte ptr [bp+8] 0 00003CF5 A2[0000] mov byte ptr [_SAttr], al 0 00003CF8 B8[0000] mov ax, offset _sda_tmp_dm 0 00003CFB A3[0000] mov word ptr [_dta], ax 0 00003CFE 8C16[0200] mov word ptr [_dta+2], ss 0 00003D02 BA4B00 mov dx, 75 0 00003D05 52 push dx 0 00003D06 31D2 xor dx, dx 0 00003D08 52 push dx 0 00003D09 50 push ax 0 00003D0A E8[FEFF] call _memset 0 00003D0D 89F1 mov cx, si 0 00003D0F 83E140 and cx, 64 0 00003D12 7412 je _.L305 0 00003D14 FF36[0200] push word ptr [_current_ldt+2] 0 00003D18 FF36[0000] push word ptr [_current_ldt] 0 00003D1C B81B11 mov ax, 4379 0 00003D1F 50 push ax 0 00003D20 E8[FEFF] call _network_redirector_fp 1681 _.L317: 0 00003D23 96 xchg si, ax 0 00003D24 EB5B jmp _.L306 1684 _.L305: 0 00003D26 894EFE mov word ptr [bp-2], cx 0 00003D29 F7C62000 test si, 32 0 00003D2D 7472 je _.L307 0 00003D2F C706[0D00]FFFF mov word ptr [_sda_tmp_dm+13], -1 0 00003D35 BE[0000] mov si, offset _SearchDir 0 00003D38 C606[0B00]40 mov byte ptr [_SearchDir+11], 64 0 00003D3D E8[FEFF] call _dos_gettime 0 00003D40 894416 mov word ptr [si+22], ax 0 00003D43 E8[FEFF] call _dos_getdate 0 00003D46 894418 mov word ptr [si+24], ax 0 00003D49 16 push ss 0 00003D4A 57 push di 0 00003D4B E8[FEFF] call _get_root 0 00003D4E 97 xchg di, ax 0 00003D4F B80B00 mov ax, 11 0 00003D52 50 push ax 0 00003D53 B82000 mov ax, 32 0 00003D56 50 push ax 0 00003D57 56 push si 0 00003D58 E8[FEFF] call _memset 0 00003D5B 8B4EFE mov cx, word ptr [bp-2] 0 00003D5E 8EC6 mov es, si 1707 _.L308: 0 00003D60 8B76FE mov si, word ptr [bp-2] 0 00003D63 89FB mov bx, di 0 00003D65 8A00 mov al, byte ptr [bx+si] 0 00003D67 84C0 test al, al 0 00003D69 7414 je _.L311 0 00003D6B 3C2E cmp al, 46 0 00003D6D 7410 je _.L311 0 00003D6F 8CC6 mov si, es 0 00003D71 8B5EFE mov bx, word ptr [bp-2] 0 00003D74 8800 mov byte ptr [bx+si], al 0 00003D76 FF46FE inc word ptr [bp-2] 0 00003D79 837EFE08 cmp word ptr [bp-2], 8 0 00003D7D 75E1 jne _.L308 1721 _.L311: 0 00003D7F 89CE mov si, cx 1723 _.L306: 0 00003D81 8B46FC mov ax, word ptr [bp-4] 0 00003D84 A3[0000] mov word ptr [_dta], ax 0 00003D87 8B46FA mov ax, word ptr [bp-6] 0 00003D8A A3[0200] mov word ptr [_dta+2], ax 0 00003D8D 85F6 test si, si 0 00003D8F 7507 jne _.L303 0 00003D91 50 push ax 0 00003D92 FF76FC push word ptr [bp-4] 0 00003D95 E8B1F1 call _pop_dmp.part.0 1733 _.L303: 0 00003D98 96 xchg si, ax 0 00003D99 89EC mov sp, bp 0 00003D9B 5D pop bp 0 00003D9C 5F pop di 0 00003D9D 5E pop si 0 00003D9E C20600 ret 6 1740 _.L307: 0 00003DA1 57 push di 0 00003DA2 FF7608 push word ptr [bp+8] 0 00003DA5 E8[FEFF] call _dos_findfirst 0 00003DA8 E978FF jmp _.L317 1745 .size _DosFindFirst, .-_DosFindFirst 1746 .global _DosFindNext 1747 .type _DosFindNext, @function 1748 _DosFindNext: 0 00003DAB 56 push si 0 00003DAC 57 push di 0 00003DAD 55 push bp 0 00003DAE 89E5 mov bp, sp 0 00003DB0 1E push ds 0 00003DB1 1E push ds 0 00003DB2 8B3E[0000] mov di, word ptr [_dta] 0 00003DB6 A1[0200] mov ax, word ptr [_dta+2] 0 00003DB9 8946FC mov word ptr [bp-4], ax 0 00003DBC BB[0000] mov bx, offset _sda_tmp_dm 0 00003DBF 8CD6 mov si, ss 0 00003DC1 B81500 mov ax, 21 0 00003DC4 50 push ax 0 00003DC5 FF76FC push word ptr [bp-4] 0 00003DC8 57 push di 0 00003DC9 16 push ss 0 00003DCA 53 push bx 0 00003DCB 895EFE mov word ptr [bp-2], bx 0 00003DCE E8[FEFF] call _fmemcpy 0 00003DD1 8B5EFE mov bx, word ptr [bp-2] 0 00003DD4 8A470C mov al, byte ptr [bx+12] 0 00003DD7 259E00 and ax, 158 0 00003DDA 83F808 cmp ax, 8 0 00003DDD 745D je _.L324 0 00003DDF 803F00 cmp byte ptr [bx], 0 0 00003DE2 7C06 jl _.L320 0 00003DE4 837F0DFF cmp word ptr [bx+13], -1 0 00003DE8 7452 je _.L324 1777 _.L320: 0 00003DEA 895EFE mov word ptr [bp-2], bx 0 00003DED B82000 mov ax, 32 0 00003DF0 50 push ax 0 00003DF1 31C0 xor ax, ax 0 00003DF3 50 push ax 0 00003DF4 B8[0000] mov ax, offset _SearchDir 0 00003DF7 50 push ax 0 00003DF8 E8[FEFF] call _memset 0 00003DFB 8B5EFE mov bx, word ptr [bp-2] 0 00003DFE 891E[0000] mov word ptr [_dta], bx 0 00003E02 8936[0200] mov word ptr [_dta+2], si 0 00003E06 BB[0000] mov bx, offset _sda_tmp_dm 0 00003E09 803F00 cmp byte ptr [bx], 0 0 00003E0C 7D29 jge _.L321 0 00003E0E 56 push si 0 00003E0F 53 push bx 0 00003E10 B81C11 mov ax, 4380 0 00003E13 50 push ax 0 00003E14 E8[FEFF] call _network_redirector_fp 1797 _.L322: 0 00003E17 893E[0000] mov word ptr [_dta], di 0 00003E1B 8B56FC mov dx, word ptr [bp-4] 0 00003E1E 8916[0200] mov word ptr [_dta+2], dx 0 00003E22 85C0 test ax, ax 0 00003E24 750B jne _.L318 0 00003E26 8946FE mov word ptr [bp-2], ax 0 00003E29 52 push dx 0 00003E2A 57 push di 0 00003E2B E81BF1 call _pop_dmp.part.0 0 00003E2E 8B46FE mov ax, word ptr [bp-2] 1808 _.L318: 0 00003E31 89EC mov sp, bp 0 00003E33 5D pop bp 0 00003E34 5F pop di 0 00003E35 5E pop si 0 00003E36 C3 ret 1814 _.L321: 0 00003E37 E8[FEFF] call _dos_findnext 0 00003E3A EBDB jmp _.L322 1817 _.L324: 0 00003E3C B8EEFF mov ax, -18 0 00003E3F EBF0 jmp _.L318 1820 .size _DosFindNext, .-_DosFindNext 1821 .global _DosGetFtime 1822 .type _DosGetFtime, @function 1823 _DosGetFtime: 0 00003E41 56 push si 0 00003E42 55 push bp 0 00003E43 89E5 mov bp, sp 0 00003E45 FF7606 push word ptr [bp+6] 0 00003E48 E8[FEFF] call _get_sft 0 00003E4B 83F8FF cmp ax, -1 0 00003E4E 741E je _.L328 0 00003E50 93 xchg bx, ax 0 00003E51 8EC2 mov es, dx 0 00003E53 268B470F mov ax, word ptr es:[bx+15] 0 00003E57 8B7608 mov si, word ptr [bp+8] 0 00003E5A 8904 mov word ptr [si], ax 0 00003E5C 268B470D mov ax, word ptr es:[bx+13] 0 00003E60 8B5E0A mov bx, word ptr [bp+10] 0 00003E63 8907 mov word ptr [bx], ax 0 00003E65 31C0 xor ax, ax 1840 _.L326: 0 00003E67 89EC mov sp, bp 0 00003E69 5D pop bp 0 00003E6A 5E pop si 0 00003E6B C20600 ret 6 1845 _.L328: 0 00003E6E B8FAFF mov ax, -6 0 00003E71 EBF4 jmp _.L326 1848 .size _DosGetFtime, .-_DosGetFtime 1849 .global _DosSetFtimeSft 1850 .type _DosSetFtimeSft, @function 1851 _DosSetFtimeSft: 0 00003E73 55 push bp 0 00003E74 89E5 mov bp, sp 0 00003E76 FF7604 push word ptr [bp+4] 0 00003E79 E8[FEFF] call _idx_to_sft 0 00003E7C 83F8FF cmp ax, -1 0 00003E7F 7429 je _.L332 0 00003E81 93 xchg bx, ax 0 00003E82 8EC2 mov es, dx 0 00003E84 268B4F05 mov cx, word ptr es:[bx+5] 0 00003E88 89C8 mov ax, cx 0 00003E8A 258000 and ax, 128 0 00003E8D 7520 jne _.L333 0 00003E8F 80CD40 or ch, 64 0 00003E92 26894F05 mov word ptr es:[bx+5], cx 0 00003E96 8B4E06 mov cx, word ptr [bp+6] 0 00003E99 26894F0F mov word ptr es:[bx+15], cx 0 00003E9D 8B4E08 mov cx, word ptr [bp+8] 0 00003EA0 26894F0D mov word ptr es:[bx+13], cx 1870 _.L330: 0 00003EA4 89EC mov sp, bp 0 00003EA6 5D pop bp 0 00003EA7 C20600 ret 6 1874 _.L332: 0 00003EAA B8FAFF mov ax, -6 0 00003EAD EBF5 jmp _.L330 1877 _.L333: 0 00003EAF 31C0 xor ax, ax 0 00003EB1 EBF1 jmp _.L330 1880 .size _DosSetFtimeSft, .-_DosSetFtimeSft 1881 .global _DosGetFattr 1882 .type _DosGetFattr, @function 1883 _DosGetFattr: 0 00003EB3 56 push si 0 00003EB4 55 push bp 0 00003EB5 89E5 mov bp, sp 0 00003EB7 1E push ds 0 00003EB8 B80200 mov ax, 2 0 00003EBB 50 push ax 0 00003EBC BE[0000] mov si, offset __PriPathBuffer 0 00003EBF 56 push si 0 00003EC0 FF7608 push word ptr [bp+8] 0 00003EC3 FF7606 push word ptr [bp+6] 0 00003EC6 E8[FEFF] call _truename 0 00003EC9 85C0 test ax, ax 0 00003ECB 7C1A jl _.L335 0 00003ECD 807C0300 cmp byte ptr [si+3], 0 0 00003ED1 7425 je _.L338 0 00003ED3 8946FE mov word ptr [bp-2], ax 0 00003ED6 E81EF6 call _set_fcbname 0 00003ED9 8B46FE mov ax, word ptr [bp-2] 0 00003EDC A840 test al, 64 0 00003EDE 740E je _.L337 0 00003EE0 B80F11 mov ax, 4367 0 00003EE3 50 push ax 0 00003EE4 E8[FEFF] call _network_redirector 1907 _.L335: 0 00003EE7 89EC mov sp, bp 0 00003EE9 5D pop bp 0 00003EEA 5E pop si 0 00003EEB C20400 ret 4 1912 _.L337: 0 00003EEE A820 test al, 32 0 00003EF0 750B jne _.L339 0 00003EF2 56 push si 0 00003EF3 E8[FEFF] call _dos_getfattr 0 00003EF6 EBEF jmp _.L335 1918 _.L338: 0 00003EF8 B81000 mov ax, 16 0 00003EFB EBEA jmp _.L335 1921 _.L339: 0 00003EFD B8FEFF mov ax, -2 0 00003F00 EBE5 jmp _.L335 1924 .size _DosGetFattr, .-_DosGetFattr 1925 .global _DosSetFattr 1926 .type _DosSetFattr, @function 1927 _DosSetFattr: 0 00003F02 56 push si 0 00003F03 57 push di 0 00003F04 55 push bp 0 00003F05 89E5 mov bp, sp 0 00003F07 1E push ds 0 00003F08 BE0200 mov si, 2 0 00003F0B 56 push si 0 00003F0C BF[0000] mov di, offset __PriPathBuffer 0 00003F0F 57 push di 0 00003F10 FF760A push word ptr [bp+10] 0 00003F13 FF7608 push word ptr [bp+8] 0 00003F16 E8[FEFF] call _truename 0 00003F19 85C0 test ax, ax 0 00003F1B 7C1B jl _.L341 0 00003F1D 8946FE mov word ptr [bp-2], ax 0 00003F20 E8D4F5 call _set_fcbname 0 00003F23 8B46FE mov ax, word ptr [bp-2] 0 00003F26 A840 test al, 64 0 00003F28 7416 je _.L343 0 00003F2A FF760C push word ptr [bp+12] 0 00003F2D 31C0 xor ax, ax 0 00003F2F 50 push ax 0 00003F30 50 push ax 0 00003F31 B80E11 mov ax, 4366 0 00003F34 50 push ax 0 00003F35 E8[FEFF] call _network_redirector_mx 1954 _.L341: 0 00003F38 89EC mov sp, bp 0 00003F3A 5D pop bp 0 00003F3B 5F pop di 0 00003F3C 5E pop si 0 00003F3D C20600 ret 6 1960 _.L343: 0 00003F40 83E020 and ax, 32 0 00003F43 8946FE mov word ptr [bp-2], ax 0 00003F46 7525 jne _.L345 0 00003F48 E858F0 call _IsShareInstalled.part.1 0 00003F4B 85C0 test ax, ax 0 00003F4D 7415 je _.L344 0 00003F4F FF76FE push word ptr [bp-2] 0 00003F52 56 push si 0 00003F53 FF36[0000] push word ptr [_cu_psp] 0 00003F57 16 push ss 0 00003F58 57 push di 0 00003F59 E8[FEFF] call _share_open_check 0 00003F5C 85C0 test ax, ax 0 00003F5E 7CD8 jl _.L341 0 00003F60 50 push ax 0 00003F61 E8[FEFF] call _share_close_file 1977 _.L344: 0 00003F64 FF760C push word ptr [bp+12] 0 00003F67 57 push di 0 00003F68 E8[FEFF] call _dos_setfattr 0 00003F6B EBCB jmp _.L341 1982 _.L345: 0 00003F6D B8FEFF mov ax, -2 0 00003F70 EBC6 jmp _.L341 1985 .size _DosSetFattr, .-_DosSetFattr 1986 .global _DosSelectDrv 1987 .type _DosSelectDrv, @function 1988 _DosSelectDrv: 0 00003F72 55 push bp 0 00003F73 89E5 mov bp, sp 0 00003F75 8A4604 mov al, byte ptr [bp+4] 0 00003F78 30E4 xor ah, ah 0 00003F7A 50 push ax 0 00003F7B E8[FEFF] call _get_cds 0 00003F7E A3[0000] mov word ptr [_current_ldt], ax 0 00003F81 8916[0200] mov word ptr [_current_ldt+2], dx 0 00003F85 09D0 or ax, dx 0 00003F87 85C0 test ax, ax 0 00003F89 7406 je _.L351 0 00003F8B 8A4604 mov al, byte ptr [bp+4] 0 00003F8E A2[0000] mov byte ptr [_default_drive], al 2002 _.L351: 0 00003F91 A0[0000] mov al, byte ptr [_lastdrive] 0 00003F94 89EC mov sp, bp 0 00003F96 5D pop bp 0 00003F97 C20200 ret 2 2007 .size _DosSelectDrv, .-_DosSelectDrv 2008 .global _DosDelete 2009 .type _DosDelete, @function 2010 _DosDelete: 0 00003F9A 56 push si 0 00003F9B 57 push di 0 00003F9C 55 push bp 0 00003F9D 89E5 mov bp, sp 0 00003F9F 1E push ds 0 00003FA0 B80200 mov ax, 2 0 00003FA3 50 push ax 0 00003FA4 BE[0000] mov si, offset __PriPathBuffer 0 00003FA7 56 push si 0 00003FA8 FF760A push word ptr [bp+10] 0 00003FAB FF7608 push word ptr [bp+8] 0 00003FAE E8[FEFF] call _truename 0 00003FB1 85C0 test ax, ax 0 00003FB3 7C14 jl _.L357 0 00003FB5 8946FE mov word ptr [bp-2], ax 0 00003FB8 E83CF5 call _set_fcbname 0 00003FBB 8B46FE mov ax, word ptr [bp-2] 0 00003FBE A840 test al, 64 0 00003FC0 740F je _.L359 0 00003FC2 B81311 mov ax, 4371 0 00003FC5 50 push ax 0 00003FC6 E8[FEFF] call _network_redirector 2033 _.L357: 0 00003FC9 89EC mov sp, bp 0 00003FCB 5D pop bp 0 00003FCC 5F pop di 0 00003FCD 5E pop si 0 00003FCE C20600 ret 6 2039 _.L359: 0 00003FD1 A820 test al, 32 0 00003FD3 7520 jne _.L362 0 00003FD5 89F7 mov di, si 0 00003FD7 E8C9EF call _IsShareInstalled.part.1 0 00003FDA 85C0 test ax, ax 0 00003FDC 7509 jne _.L360 2046 _.L361: 0 00003FDE FF760C push word ptr [bp+12] 0 00003FE1 57 push di 0 00003FE2 E8[FEFF] call _dos_delete 0 00003FE5 EBE2 jmp _.L357 2051 _.L360: 0 00003FE7 16 push ss 0 00003FE8 56 push si 0 00003FE9 E8[FEFF] call _share_is_file_open 0 00003FEC 85C0 test ax, ax 0 00003FEE 74EE je _.L361 0 00003FF0 B8FBFF mov ax, -5 0 00003FF3 EBD4 jmp _.L357 2059 _.L362: 0 00003FF5 B8FEFF mov ax, -2 0 00003FF8 EBCF jmp _.L357 2062 .size _DosDelete, .-_DosDelete 2063 .global _DosRenameTrue 2064 .type _DosRenameTrue, @function 2065 _DosRenameTrue: 0 00003FFA 56 push si 0 00003FFB 57 push di 0 00003FFC 55 push bp 0 00003FFD 89E5 mov bp, sp 0 00003FFF 1E push ds 0 00004000 8B7E08 mov di, word ptr [bp+8] 0 00004003 8B760A mov si, word ptr [bp+10] 0 00004006 8B460C mov ax, word ptr [bp+12] 0 00004009 8946FE mov word ptr [bp-2], ax 0 0000400C 8A05 mov al, byte ptr [di] 0 0000400E 3A04 cmp al, byte ptr [si] 0 00004010 754E jne _.L373 0 00004012 8B1E[0000] mov bx, word ptr [_current_ldt] 0 00004016 8B16[0200] mov dx, word ptr [_current_ldt+2] 0 0000401A 83FBFF cmp bx, -1 0 0000401D 7409 je _.L369 0 0000401F 8EC2 mov es, dx 0 00004021 26837F4300 cmp word ptr es:[bx+67], 0 0 00004026 7D0F jge _.L370 2085 _.L369: 0 00004028 B81111 mov ax, 4369 0 0000402B 50 push ax 0 0000402C E8[FEFF] call _network_redirector 2089 _.L367: 0 0000402F 89EC mov sp, bp 0 00004031 5D pop bp 0 00004032 5F pop di 0 00004033 5E pop si 0 00004034 C20600 ret 6 2095 _.L370: 0 00004037 E869EF call _IsShareInstalled.part.1 0 0000403A 85C0 test ax, ax 0 0000403C 7514 jne _.L371 2099 _.L372: 0 0000403E 8B46FE mov ax, word ptr [bp-2] 0 00004041 89460C mov word ptr [bp+12], ax 0 00004044 89760A mov word ptr [bp+10], si 0 00004047 897E08 mov word ptr [bp+8], di 0 0000404A 89EC mov sp, bp 0 0000404C 5D pop bp 0 0000404D 5F pop di 0 0000404E 5E pop si 0 0000404F E9[FEFF] jmp _dos_rename 2109 _.L371: 0 00004052 16 push ss 0 00004053 57 push di 0 00004054 E8[FEFF] call _share_is_file_open 0 00004057 85C0 test ax, ax 0 00004059 74E3 je _.L372 0 0000405B B8FBFF mov ax, -5 0 0000405E EBCF jmp _.L367 2117 _.L373: 0 00004060 B8EFFF mov ax, -17 0 00004063 EBCA jmp _.L367 2120 .size _DosRenameTrue, .-_DosRenameTrue 2121 .global _DosRename 2122 .type _DosRename, @function 2123 _DosRename: 0 00004065 56 push si 0 00004066 57 push di 0 00004067 55 push bp 0 00004068 89E5 mov bp, sp 0 0000406A 1E push ds 0 0000406B 1E push ds 0 0000406C C44608 les ax, dword ptr [bp+8] 0 0000406F 8946FE mov word ptr [bp-2], ax 0 00004072 8C46FC mov word ptr [bp-4], es 0 00004075 BF0200 mov di, 2 0 00004078 57 push di 0 00004079 BE[0000] mov si, offset __SecPathBuffer 0 0000407C 56 push si 0 0000407D FF760E push word ptr [bp+14] 0 00004080 FF760C push word ptr [bp+12] 0 00004083 E8[FEFF] call _truename 0 00004086 85C0 test ax, ax 0 00004088 7C0B jl _.L381 0 0000408A 83E060 and ax, 96 0 0000408D 83F820 cmp ax, 32 0 00004090 750B jne _.L383 2145 _.L384: 0 00004092 B8FEFF mov ax, -2 2147 _.L381: 0 00004095 89EC mov sp, bp 0 00004097 5D pop bp 0 00004098 5F pop di 0 00004099 5E pop si 0 0000409A C20800 ret 8 2153 _.L383: 0 0000409D 57 push di 0 0000409E BF[0000] mov di, offset __PriPathBuffer 0 000040A1 57 push di 0 000040A2 FF76FC push word ptr [bp-4] 0 000040A5 FF76FE push word ptr [bp-2] 0 000040A8 E8[FEFF] call _truename 0 000040AB 85C0 test ax, ax 0 000040AD 7CE6 jl _.L381 0 000040AF 8946FE mov word ptr [bp-2], ax 0 000040B2 E842F4 call _set_fcbname 0 000040B5 8A46FE mov al, byte ptr [bp-2] 0 000040B8 83E060 and ax, 96 0 000040BB 83F820 cmp ax, 32 0 000040BE 74D2 je _.L384 0 000040C0 B83700 mov ax, 55 0 000040C3 50 push ax 0 000040C4 56 push si 0 000040C5 57 push di 0 000040C6 E8[FEFF] call _DosRenameTrue 0 000040C9 EBCA jmp _.L381 2174 .size _DosRename, .-_DosRename 2175 .global _DosMkRmdir 2176 .type _DosMkRmdir, @function 2177 _DosMkRmdir: 0 000040CB 56 push si 0 000040CC 55 push bp 0 000040CD 89E5 mov bp, sp 0 000040CF 1E push ds 0 000040D0 B80200 mov ax, 2 0 000040D3 50 push ax 0 000040D4 BE[0000] mov si, offset __PriPathBuffer 0 000040D7 56 push si 0 000040D8 FF7608 push word ptr [bp+8] 0 000040DB FF7606 push word ptr [bp+6] 0 000040DE E8[FEFF] call _truename 0 000040E1 85C0 test ax, ax 0 000040E3 7C1A jl _.L389 0 000040E5 8946FE mov word ptr [bp-2], ax 0 000040E8 E80CF4 call _set_fcbname 0 000040EB 8B46FE mov ax, word ptr [bp-2] 0 000040EE A840 test al, 64 0 000040F0 7419 je _.L391 0 000040F2 837E0A39 cmp word ptr [bp+10], 57 0 000040F6 740E je _.L394 0 000040F8 B80111 mov ax, 4353 2199 _.L392: 0 000040FB 50 push ax 0 000040FC E8[FEFF] call _network_redirector 2202 _.L389: 0 000040FF 89EC mov sp, bp 0 00004101 5D pop bp 0 00004102 5E pop si 0 00004103 C20600 ret 6 2207 _.L394: 0 00004106 B80311 mov ax, 4355 0 00004109 EBF0 jmp _.L392 2210 _.L391: 0 0000410B A820 test al, 32 0 0000410D 7513 jne _.L395 0 0000410F 837E0A39 cmp word ptr [bp+10], 57 0 00004113 7408 je _.L396 0 00004115 B8[0000] mov ax, offset _dos_rmdir 2216 _.L393: 0 00004118 56 push si 0 00004119 FFD0 call ax 0 0000411B EBE2 jmp _.L389 2220 _.L396: 0 0000411D B8[0000] mov ax, offset _dos_mkdir 0 00004120 EBF6 jmp _.L393 2223 _.L395: 0 00004122 B8FBFF mov ax, -5 0 00004125 EBD8 jmp _.L389 2226 .size _DosMkRmdir, .-_DosMkRmdir 2227 .global _DosLockUnlock 2228 .type _DosLockUnlock, @function 2229 _DosLockUnlock: 0 00004127 56 push si 0 00004128 57 push di 0 00004129 55 push bp 0 0000412A 89E5 mov bp, sp 0 0000412C 83EC10 sub sp, 16 0 0000412F 8B5E0A mov bx, word ptr [bp+10] 0 00004132 895EF0 mov word ptr [bp-16], bx 0 00004135 8B760C mov si, word ptr [bp+12] 0 00004138 C4460E les ax, dword ptr [bp+14] 0 0000413B 8946F4 mov word ptr [bp-12], ax 0 0000413E 8C46F2 mov word ptr [bp-14], es 0 00004141 FF7608 push word ptr [bp+8] 0 00004144 E8[FEFF] call _get_sft 0 00004147 83F8FF cmp ax, -1 0 0000414A 7460 je _.L401 0 0000414C 8EC2 mov es, dx 0 0000414E 89C3 mov bx, ax 0 00004150 26837F0500 cmp word ptr es:[bx+5], 0 0 00004155 8B4EF2 mov cx, word ptr [bp-14] 0 00004158 8B5EF0 mov bx, word ptr [bp-16] 0 0000415B 7D2A jge _.L400 0 0000415D 895EF6 mov word ptr [bp-10], bx 0 00004160 8976F8 mov word ptr [bp-8], si 0 00004163 8B5EF4 mov bx, word ptr [bp-12] 0 00004166 895EFA mov word ptr [bp-6], bx 0 00004169 894EFC mov word ptr [bp-4], cx 0 0000416C 8B4E12 mov cx, word ptr [bp+18] 0 0000416F 894EFE mov word ptr [bp-2], cx 0 00004172 8D4EF6 lea cx, [-10+bp] 0 00004175 51 push cx 0 00004176 52 push dx 0 00004177 50 push ax 0 00004178 B80A11 mov ax, 4362 0 0000417B 50 push ax 0 0000417C E8[FEFF] call _network_redirector_mx 2265 _.L398: 0 0000417F 89EC mov sp, bp 0 00004181 5D pop bp 0 00004182 5F pop di 0 00004183 5E pop si 0 00004184 C20C00 ret 12 2271 _.L400: 0 00004187 803E[0000]00 cmp byte ptr [_share_installed], 0 0 0000418C 7423 je _.L402 0 0000418E 8EC2 mov es, dx 0 00004190 97 xchg di, ax 0 00004191 268B4533 mov ax, word ptr es:[di+51] 0 00004195 85C0 test ax, ax 0 00004197 7C1D jl _.L403 0 00004199 FF7612 push word ptr [bp+18] 0 0000419C 51 push cx 0 0000419D FF76F4 push word ptr [bp-12] 0 000041A0 56 push si 0 000041A1 53 push bx 0 000041A2 50 push ax 0 000041A3 FF36[0000] push word ptr [_cu_psp] 0 000041A7 E8[FEFF] call _share_lock_unlock 0 000041AA EBD3 jmp _.L398 2288 _.L401: 0 000041AC B8FAFF mov ax, -6 0 000041AF EBCE jmp _.L398 2291 _.L402: 0 000041B1 B8FFFF mov ax, -1 0 000041B4 EBC9 jmp _.L398 2294 _.L403: 0 000041B6 B8D9FF mov ax, -39 0 000041B9 EBC4 jmp _.L398 2297 .size _DosLockUnlock, .-_DosLockUnlock 2298 .global _IsDevice 2299 .type _IsDevice, @function 2300 _IsDevice: 0 000041BB 56 push si 0 000041BC 57 push di 0 000041BD 55 push bp 0 000041BE 89E5 mov bp, sp 0 000041C0 83EC0A sub sp, 10 0 000041C3 FF760A push word ptr [bp+10] 0 000041C6 FF7608 push word ptr [bp+8] 0 000041C9 E8[FEFF] call _get_root 0 000041CC 8946FE mov word ptr [bp-2], ax 0 000041CF 8956FC mov word ptr [bp-4], dx 0 000041D2 8EC2 mov es, dx 0 000041D4 93 xchg bx, ax 0 000041D5 268A07 mov al, byte ptr es:[bx] 0 000041D8 84C0 test al, al 0 000041DA 750D jne _.L406 2316 _.L409: 0 000041DC 31F6 xor si, si 0 000041DE 89F2 mov dx, si 2319 _.L405: 0 000041E0 96 xchg si, ax 0 000041E1 89EC mov sp, bp 0 000041E3 5D pop bp 0 000041E4 5F pop di 0 000041E5 5E pop si 0 000041E6 C20400 ret 4 2326 _.L406: 0 000041E9 3C2E cmp al, 46 0 000041EB 7519 jne _.L408 0 000041ED 8E46FC mov es, word ptr [bp-4] 0 000041F0 8B5EFE mov bx, word ptr [bp-2] 0 000041F3 268A4701 mov al, byte ptr es:[bx+1] 0 000041F7 84C0 test al, al 0 000041F9 74E1 je _.L409 0 000041FB 26807F0201 cmp byte ptr es:[bx+2], 1 0 00004200 7304 jnc _.L408 0 00004202 3C2E cmp al, 46 0 00004204 74D6 je _.L409 2338 _.L408: 0 00004206 BE[0000] mov si, offset _nul_dev 0 00004209 8CD2 mov dx, ss 2341 _.L411: 0 0000420B 83FEFF cmp si, -1 0 0000420E 7505 jne _.L418 0 00004210 83FAFF cmp dx, -1 0 00004213 74C7 je _.L409 2346 _.L418: 0 00004215 8EC2 mov es, dx 0 00004217 26837C0400 cmp word ptr es:[si+4], 0 0 0000421C 7C0D jl _.L412 2350 _.L415: 0 0000421E 89F3 mov bx, si 0 00004220 8EC2 mov es, dx 0 00004222 268B34 mov si, word ptr es:[si] 0 00004225 268B5702 mov dx, word ptr es:[bx+2] 0 00004229 EBE0 jmp _.L411 2356 _.L412: 0 0000422B B90800 mov cx, 8 0 0000422E 31FF xor di, di 2359 _.L417: 0 00004230 8B5EFE mov bx, word ptr [bp-2] 0 00004233 01FB add bx, di 0 00004235 8E46FC mov es, word ptr [bp-4] 0 00004238 268A07 mov al, byte ptr es:[bx] 0 0000423B 3C2E cmp al, 46 0 0000423D 7404 je _.L416 0 0000423F 84C0 test al, al 0 00004241 7517 jne _.L413 2368 _.L416: 0 00004243 8EC2 mov es, dx 0 00004245 89F3 mov bx, si 0 00004247 268A410A mov al, byte ptr es:[bx+di+10] 0 0000424B 8846FA mov byte ptr [bp-6], al 0 0000424E A8DF test al, -33 0 00004250 75CC jne _.L415 0 00004252 47 inc di 0 00004253 83FF08 cmp di, 8 0 00004256 75EB jne _.L416 0 00004258 EB86 jmp _.L405 2379 _.L413: 0 0000425A 8956FA mov word ptr [bp-6], dx 0 0000425D 894EF6 mov word ptr [bp-10], cx 0 00004260 50 push ax 0 00004261 E8[FEFF] call _DosUpFChar 0 00004264 8846F9 mov byte ptr [bp-7], al 0 00004267 8B56FA mov dx, word ptr [bp-6] 0 0000426A 8EC2 mov es, dx 0 0000426C 89F3 mov bx, si 0 0000426E 26FF710A push word ptr es:[bx+di+10] 0 00004272 E8[FEFF] call _DosUpFChar 0 00004275 8A66F9 mov ah, byte ptr [bp-7] 0 00004278 38C4 cmp ah, al 0 0000427A 8B56FA mov dx, word ptr [bp-6] 0 0000427D 759F jne _.L415 0 0000427F 47 inc di 0 00004280 8B4EF6 mov cx, word ptr [bp-10] 0 00004283 49 dec cx 0 00004284 75AA jne _.L417 0 00004286 E957FF jmp _.L405 2399 .size _IsDevice, .-_IsDevice 2400 .global _DosOpenSft 2401 .type _DosOpenSft, @function 2402 _DosOpenSft: 0 00004289 56 push si 0 0000428A 57 push di 0 0000428B 55 push bp 0 0000428C 89E5 mov bp, sp 0 0000428E 83EC12 sub sp, 18 0 00004291 C44608 les ax, dword ptr [bp+8] 0 00004294 8946F4 mov word ptr [bp-12], ax 0 00004297 8C46F0 mov word ptr [bp-16], es 0 0000429A B80200 mov ax, 2 0 0000429D 50 push ax 0 0000429E BE[0000] mov si, offset __PriPathBuffer 0 000042A1 56 push si 0 000042A2 FF76F0 push word ptr [bp-16] 0 000042A5 FF76F4 push word ptr [bp-12] 0 000042A8 E8[FEFF] call _truename 0 000042AB 89C7 mov di, ax 0 000042AD 89C1 mov cx, ax 0 000042AF 99 cwd 0 000042B0 85D2 test dx, dx 0 000042B2 8976F2 mov word ptr [bp-14], si 0 000042B5 7D03E9E602 jl _.L429 0 000042BA E83AF2 call _set_fcbname 0 000042BD 8B1E[0000] mov bx, word ptr [_sfthead] 0 000042C1 A1[0200] mov ax, word ptr [_sfthead+2] 0 000042C4 8946FA mov word ptr [bp-6], ax 0 000042C7 C746F80000 mov word ptr [bp-8], 0 2429 _.L432: 0 000042CC 83FBFF cmp bx, -1 0 000042CF 7506 jne _.L437 0 000042D1 837EFAFF cmp word ptr [bp-6], -1 0 000042D5 7438 je _.L438 2434 _.L437: 0 000042D7 8E46FA mov es, word ptr [bp-6] 0 000042DA 268B4704 mov ax, word ptr es:[bx+4] 0 000042DE 8D7706 lea si, [6+bx] 2438 _.L433: 0 000042E1 48 dec ax 0 000042E2 7911 jns _.L436 0 000042E4 89DE mov si, bx 0 000042E6 8E46FA mov es, word ptr [bp-6] 0 000042E9 268B1F mov bx, word ptr es:[bx] 0 000042EC 268B4402 mov ax, word ptr es:[si+2] 0 000042F0 8946FA mov word ptr [bp-6], ax 0 000042F3 EBD7 jmp _.L432 2447 _.L436: 0 000042F5 8E46FA mov es, word ptr [bp-6] 0 000042F8 26833C00 cmp word ptr es:[si], 0 0 000042FC 751A jne _.L434 0 000042FE 8B46F8 mov ax, word ptr [bp-8] 0 00004301 A3[0000] mov word ptr [_current_sft_idx], ax 0 00004304 83FEFF cmp si, -1 0 00004307 7517 jne _.L435 0 00004309 837EFAFF cmp word ptr [bp-6], -1 0 0000430D 7511 jne _.L435 2457 _.L438: 0 0000430F B9FCFF mov cx, -4 2459 _.L476: 0 00004312 BAFFFF mov dx, -1 0 00004315 E98802 jmp _.L429 2462 _.L434: 0 00004318 FF46F8 inc word ptr [bp-8] 0 0000431B 83C63B add si, 59 0 0000431E EBC1 jmp _.L433 2466 _.L435: 0 00004320 B83B00 mov ax, 59 0 00004323 50 push ax 0 00004324 31C0 xor ax, ax 0 00004326 50 push ax 0 00004327 FF76FA push word ptr [bp-6] 0 0000432A 56 push si 0 0000432B E8[FEFF] call _fmemset 0 0000432E A1[0000] mov ax, word ptr [_cu_psp] 0 00004331 8E46FA mov es, word ptr [bp-6] 0 00004334 26894431 mov word ptr es:[si+49], ax 0 00004338 8B460C mov ax, word ptr [bp+12] 0 0000433B 80E4F0 and ah, -16 0 0000433E 8E46FA mov es, word ptr [bp-6] 0 00004341 26894402 mov word ptr es:[si+2], ax 0 00004345 8A460C mov al, byte ptr [bp+12] 0 00004348 8846EF mov byte ptr [bp-17], al 0 0000434B A2[0000] mov byte ptr [_OpenMode], al 0 0000434E 8E46FA mov es, word ptr [bp-6] 0 00004351 26C74433FFFF mov word ptr es:[si+51], -1 0 00004357 8B460E mov ax, word ptr [bp+14] 0 0000435A 83C820 or ax, 32 0 0000435D 8946F6 mov word ptr [bp-10], ax 0 00004360 8E46FA mov es, word ptr [bp-6] 0 00004363 8A46F6 mov al, byte ptr [bp-10] 0 00004366 26884404 mov byte ptr es:[si+4], al 0 0000436A 89F8 mov ax, di 0 0000436C A820 test al, 32 0 0000436E 7503E9E600 je _.L439 0 00004373 FF76F0 push word ptr [bp-16] 0 00004376 FF76F4 push word ptr [bp-12] 0 00004379 E8[FEFF] call _IsDevice 0 0000437C 8946F4 mov word ptr [bp-12], ax 0 0000437F 09D0 or ax, dx 0 00004381 7503E9D300 je _.L439 0 00004386 8E46FA mov es, word ptr [bp-6] 0 00004389 26C74433FFFF mov word ptr es:[si+51], -1 0 0000438F 8E46FA mov es, word ptr [bp-6] 0 00004392 26FF04 inc word ptr es:[si] 0 00004395 8EC2 mov es, dx 0 00004397 8B5EF4 mov bx, word ptr [bp-12] 0 0000439A 268B4704 mov ax, word ptr es:[bx+4] 0 0000439E 251F7F and ax, 32543 0 000043A1 0CC0 or al, -64 0 000043A3 8E46FA mov es, word ptr [bp-6] 0 000043A6 26894405 mov word ptr es:[si+5], ax 0 000043AA 8D4420 lea ax, [32+si] 0 000043AD B90800 mov cx, 8 0 000043B0 51 push cx 0 000043B1 8B4EF4 mov cx, word ptr [bp-12] 0 000043B4 83C10A add cx, 10 0 000043B7 52 push dx 0 000043B8 8956F2 mov word ptr [bp-14], dx 0 000043BB 51 push cx 0 000043BC FF76FA push word ptr [bp-6] 0 000043BF 50 push ax 0 000043C0 8946F6 mov word ptr [bp-10], ax 0 000043C3 E8[FEFF] call _fmemcpy 0 000043C6 BF0A00 mov di, 10 0 000043C9 8B46F6 mov ax, word ptr [bp-10] 0 000043CC 8B56F2 mov dx, word ptr [bp-14] 2527 _.L441: 0 000043CF 8E46FA mov es, word ptr [bp-6] 0 000043D2 89F3 mov bx, si 0 000043D4 2680792000 cmp byte ptr es:[bx+di+32], 0 0 000043D9 7470 je _.L442 0 000043DB 8956F6 mov word ptr [bp-10], dx 0 000043DE B90B00 mov cx, 11 0 000043E1 51 push cx 0 000043E2 06 push es 0 000043E3 50 push ax 0 000043E4 E8[FEFF] call _DosUpFMem 0 000043E7 8E46FA mov es, word ptr [bp-6] 0 000043EA 8B46F4 mov ax, word ptr [bp-12] 0 000043ED 26894407 mov word ptr es:[si+7], ax 0 000043F1 8E46FA mov es, word ptr [bp-6] 0 000043F4 8B56F6 mov dx, word ptr [bp-10] 0 000043F7 26895409 mov word ptr es:[si+9], dx 0 000043FB E8[FEFF] call _dos_getdate 0 000043FE 8E46FA mov es, word ptr [bp-6] 0 00004401 2689440F mov word ptr es:[si+15], ax 0 00004405 E8[FEFF] call _dos_gettime 0 00004408 8E46FA mov es, word ptr [bp-6] 0 0000440B 2689440D mov word ptr es:[si+13], ax 0 0000440F 8E46FA mov es, word ptr [bp-6] 0 00004412 26C6440440 mov byte ptr es:[si+4], 64 0 00004417 8E46FA mov es, word ptr [bp-6] 0 0000441A 26C45C07 les bx, dword ptr es:[si+7] 0 0000441E 26F6470508 test byte ptr es:[bx+5], 8 0 00004423 7503E98701 je _.L443 0 00004428 895EFC mov word ptr [bp-4], bx 0 0000442B 8C46FE mov word ptr [bp-2], es 0 0000442E B80D00 mov ax, 13 0 00004431 50 push ax 0 00004432 31C0 xor ax, ax 0 00004434 50 push ax 0 00004435 50 push ax 0 00004436 50 push ax 0 00004437 8D46FC lea ax, [-4+bp] 0 0000443A 50 push ax 0 0000443B E8[FEFF] call _BinaryCharIO 0 0000443E 09D0 or ax, dx 0 00004440 7503E96A01 je _.L443 2569 _.L459: 0 00004445 B9FBFF mov cx, -5 0 00004448 E9C7FE jmp _.L476 2572 _.L442: 0 0000444B 8E46FA mov es, word ptr [bp-6] 0 0000444E 89F3 mov bx, si 0 00004450 26C6412020 mov byte ptr es:[bx+di+32], 32 0 00004455 4F dec di 0 00004456 E976FF jmp _.L441 2578 _.L439: 0 00004459 97 xchg di, ax 0 0000445A A840 test al, 64 0 0000445C 8B460C mov ax, word ptr [bp+12] 0 0000445F 7503E99500 je _.L446 0 00004464 250006 and ax, 1536 0 00004467 3D0004 cmp ax, 1024 0 0000446A 7509 jne _.L447 0 0000446C 8B460E mov ax, word ptr [bp+14] 0 0000446F 0D2001 or ax, 288 0 00004472 8946F6 mov word ptr [bp-10], ax 2589 _.L447: 0 00004475 8936[0000] mov word ptr [_lpCurSft], si 0 00004479 8B46FA mov ax, word ptr [bp-6] 0 0000447C A3[0200] mov word ptr [_lpCurSft+2], ax 0 0000447F F6460D08 test byte ptr [bp+13], 8 0 00004483 7557 jne _.L448 0 00004485 8B460C mov ax, word ptr [bp+12] 0 00004488 80E470 and ah, 112 0 0000448B A3[0000] mov word ptr [_ext_open_mode], ax 0 0000448E 8B46F6 mov ax, word ptr [bp-10] 0 00004491 B400 mov ah, 0 0 00004493 A3[0000] mov word ptr [_ext_open_attrib], ax 0 00004496 8B460C mov ax, word ptr [bp+12] 0 00004499 B108 mov cl, 8 0 0000449B D3E8 shr ax, cl 0 0000449D 83E003 and ax, 3 0 000044A0 8B560C mov dx, word ptr [bp+12] 0 000044A3 B106 mov cl, 6 0 000044A5 D3EA shr dx, cl 0 000044A7 83E210 and dx, 16 0 000044AA 09D0 or ax, dx 0 000044AC A3[0000] mov word ptr [_ext_open_action], ax 0 000044AF B82E11 mov ax, 4398 2612 _.L449: 0 000044B2 FF76F6 push word ptr [bp-10] 0 000044B5 FF76FA push word ptr [bp-6] 0 000044B8 56 push si 0 000044B9 50 push ax 0 000044BA E8[FEFF] call _network_redirector_mx 0 000044BD 89C3 mov bx, ax 0 000044BF 85C0 test ax, ax 0 000044C1 7C30 jl _.L450 0 000044C3 8E46FA mov es, word ptr [bp-6] 0 000044C6 26833C00 cmp word ptr es:[si], 0 0 000044CA 7505 jne _.L454 0 000044CC 26C7040100 mov word ptr es:[si], 1 2625 _.L454: 0 000044D1 8B4EF8 mov cx, word ptr [bp-8] 0 000044D4 89C8 mov ax, cx 0 000044D6 99 cwd 0 000044D7 09DA or dx, bx 0 000044D9 E9C400 jmp _.L429 2631 _.L448: 0 000044DC F6460D04 test byte ptr [bp+13], 4 0 000044E0 750C jne _.L457 0 000044E2 8A46EF mov al, byte ptr [bp-17] 0 000044E5 98 cbw 0 000044E6 8946F6 mov word ptr [bp-10], ax 0 000044E9 B81611 mov ax, 4374 0 000044EC EBC4 jmp _.L449 2639 _.L457: 0 000044EE B81711 mov ax, 4375 0 000044F1 EBBF jmp _.L449 2642 _.L450: 0 000044F3 89C1 mov cx, ax 2644 _.L477: 0 000044F5 99 cwd 0 000044F6 E9A700 jmp _.L429 2647 _.L446: 0 000044F9 83E003 and ax, 3 0 000044FC 83F803 cmp ax, 3 0 000044FF 7503E9A500 je _.L458 0 00004504 837E0C00 cmp word ptr [bp+12], 0 0 00004508 7C0A jl _.L452 0 0000450A F7460ED0FF test word ptr [bp+14], -48 0 0000450F 7403E931FF jne _.L459 2655 _.L452: 0 00004514 E88CEA call _IsShareInstalled.part.1 0 00004517 85C0 test ax, ax 0 00004519 742A je _.L453 0 0000451B 8B460C mov ax, word ptr [bp+12] 0 0000451E B104 mov cl, 4 0 00004520 D3E8 shr ax, cl 0 00004522 83E007 and ax, 7 0 00004525 50 push ax 0 00004526 8A460C mov al, byte ptr [bp+12] 0 00004529 83E003 and ax, 3 0 0000452C 50 push ax 0 0000452D FF36[0000] push word ptr [_cu_psp] 0 00004531 16 push ss 0 00004532 FF76F2 push word ptr [bp-14] 0 00004535 E8[FEFF] call _share_open_check 0 00004538 8E46FA mov es, word ptr [bp-6] 0 0000453B 26894433 mov word ptr es:[si+51], ax 0 0000453F 89C1 mov cx, ax 0 00004541 85C0 test ax, ax 0 00004543 7CB0 jl _.L477 2676 _.L453: 0 00004545 8E46FA mov es, word ptr [bp-6] 0 00004548 26FF04 inc word ptr es:[si] 0 0000454B 8B5EF2 mov bx, word ptr [bp-14] 0 0000454E 8A07 mov al, byte ptr [bx] 0 00004550 98 cbw 0 00004551 83C0BF add ax, -65 0 00004554 8E46FA mov es, word ptr [bp-6] 0 00004557 26894405 mov word ptr es:[si+5], ax 0 0000455B FF76F8 push word ptr [bp-8] 0 0000455E FF76F6 push word ptr [bp-10] 0 00004561 FF760C push word ptr [bp+12] 0 00004564 FF76F2 push word ptr [bp-14] 0 00004567 E8[FEFF] call _dos_open 0 0000456A 89C3 mov bx, ax 0 0000456C 89C1 mov cx, ax 0 0000456E 99 cwd 0 0000456F 85D2 test dx, dx 0 00004571 7C03E95BFF jge _.L454 0 00004576 8E46FA mov es, word ptr [bp-6] 0 00004579 268B4433 mov ax, word ptr es:[si+51] 0 0000457D 85C0 test ax, ax 0 0000457F 7C19 jl _.L456 0 00004581 8956F6 mov word ptr [bp-10], dx 0 00004584 895EF8 mov word ptr [bp-8], bx 0 00004587 50 push ax 0 00004588 E8[FEFF] call _share_close_file 0 0000458B 8E46FA mov es, word ptr [bp-6] 0 0000458E 26C74433FFFF mov word ptr es:[si+51], -1 0 00004594 8B56F6 mov dx, word ptr [bp-10] 0 00004597 8B4EF8 mov cx, word ptr [bp-8] 2707 _.L456: 0 0000459A 8E46FA mov es, word ptr [bp-6] 0 0000459D 26FF0C dec word ptr es:[si] 2710 _.L429: 0 000045A0 91 xchg cx, ax 0 000045A1 89EC mov sp, bp 0 000045A3 5D pop bp 0 000045A4 5F pop di 0 000045A5 5E pop si 0 000045A6 C20800 ret 8 2717 _.L458: 0 000045A9 B9F4FF mov cx, -12 0 000045AC E963FD jmp _.L476 2720 _.L443: 0 000045AF 8B4EF8 mov cx, word ptr [bp-8] 0 000045B2 89C8 mov ax, cx 0 000045B4 E93EFF jmp _.L477 2724 .size _DosOpenSft, .-_DosOpenSft 2725 .global _DosOpen 2726 .type _DosOpen, @function 2727 _DosOpen: 0 000045B7 56 push si 0 000045B8 57 push di 0 000045B9 55 push bp 0 000045BA 89E5 mov bp, sp 0 000045BC 1E push ds 0 000045BD 8B7E08 mov di, word ptr [bp+8] 0 000045C0 8B760A mov si, word ptr [bp+10] 0 000045C3 F6460C0C test byte ptr [bp+12], 12 0 000045C7 753E jne _.L482 0 000045C9 E84FE9 call _get_free_hndl 0 000045CC 89C1 mov cx, ax 0 000045CE 85D2 test dx, dx 0 000045D0 7C2C jl _.L478 0 000045D2 8946FE mov word ptr [bp-2], ax 0 000045D5 FF760E push word ptr [bp+14] 0 000045D8 FF760C push word ptr [bp+12] 0 000045DB 56 push si 0 000045DC 57 push di 0 000045DD E8[FEFF] call _DosOpenSft 0 000045E0 89C1 mov cx, ax 0 000045E2 85D2 test dx, dx 0 000045E4 7C18 jl _.L478 0 000045E6 8E06[0000] mov es, word ptr [_cu_psp] 0 000045EA 268B363600 mov si, word ptr es:[54] 0 000045EF 8B4EFE mov cx, word ptr [bp-2] 0 000045F2 89CB mov bx, cx 0 000045F4 26031E3400 add bx, word ptr es:[52] 0 000045F9 8EC6 mov es, si 0 000045FB 268807 mov byte ptr es:[bx], al 2757 _.L478: 0 000045FE 91 xchg cx, ax 0 000045FF 89EC mov sp, bp 0 00004601 5D pop bp 0 00004602 5F pop di 0 00004603 5E pop si 0 00004604 C20800 ret 8 2764 _.L482: 0 00004607 B9F4FF mov cx, -12 0 0000460A BAFFFF mov dx, -1 0 0000460D EBEF jmp _.L478 2768 .size _DosOpen, .-_DosOpen 2769 .global _IsShareInstalled 2770 .type _IsShareInstalled, @function 2771 _IsShareInstalled: 0 0000460F 55 push bp 0 00004610 89E5 mov bp, sp 0 00004612 837E0401 cmp word ptr [bp+4], 1 0 00004616 7308 jnc _.L486 0 00004618 A0[0000] mov al, byte ptr [_share_installed] 0 0000461B 98 cbw 2778 _.L485: 0 0000461C 5D pop bp 0 0000461D C20200 ret 2 2781 _.L486: 0 00004620 E880E9 call _IsShareInstalled.part.1 0 00004623 EBF7 jmp _.L485 2784 .size _IsShareInstalled, .-_IsShareInstalled 2785 .global _DosTruename 2786 .type _DosTruename, @function 2787 _DosTruename: 0 00004625 56 push si 0 00004626 57 push di 0 00004627 55 push bp 0 00004628 89E5 mov bp, sp 0 0000462A 1E push ds 0 0000462B 1E push ds 0 0000462C 8B7E0C mov di, word ptr [bp+12] 0 0000462F 8B460E mov ax, word ptr [bp+14] 0 00004632 8946FE mov word ptr [bp-2], ax 0 00004635 B80400 mov ax, 4 0 00004638 50 push ax 0 00004639 BE[0000] mov si, offset __PriPathBuffer 0 0000463C 56 push si 0 0000463D FF760A push word ptr [bp+10] 0 00004640 FF7608 push word ptr [bp+8] 0 00004643 E8[FEFF] call _truename 0 00004646 85C0 test ax, ax 0 00004648 7C12 jl _.L489 0 0000464A 8946FC mov word ptr [bp-4], ax 0 0000464D 16 push ss 0 0000464E 56 push si 0 0000464F FF76FE push word ptr [bp-2] 0 00004652 57 push di 0 00004653 E8[FEFF] call _fstrcpy 0 00004656 E89EEE call _set_fcbname 0 00004659 8B46FC mov ax, word ptr [bp-4] 2814 _.L489: 0 0000465C 89EC mov sp, bp 0 0000465E 5D pop bp 0 0000465F 5F pop di 0 00004660 5E pop si 0 00004661 C20800 ret 8 2820 .size _DosTruename, .-_DosTruename 2821 .global _share_installed === Switch to base=012B40h -> ".BSS" 2822 .bss 2823 .p2align 0 2824 .type _share_installed, @object 2825 .size _share_installed, 1 2826 _share_installed: 0 00000D02 00 .skip 1,0 2828 .ident "GCC: (GNU) 6.3.0" === Trace listing source: dosidle.lst 1 ; File: 2 ; DosIdle.asm 3 ; Description: 4 ; Dos Idle Interrupt Call 5 ; 6 ; DOS-C 7 ; Copyright (c) 1995, 1999 8 ; James B. Tabor 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; You should have received a copy of the GNU General Public 24 ; License along with DOS-C; see the file COPYING. If not, 25 ; write to the Free Software Foundation, 675 Mass Ave, 26 ; Cambridge, MA 02139, USA. 27 ; 28 ; 29 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 30 31 PSP_USERSP equ 2eh 32 PSP_USERSS equ 30h 33 === Switch to base=002270h -> "HMA_TEXT" 34 segment HMA_TEXT 35 36 global _DosIdle_int 37 global _DosIdle_hlt 38 39 extern _InDOS 40 extern _cu_psp 41 extern _MachineId 42 extern critical_sp 43 extern _user_r 44 ; variables as the following are "part of" module inthndlr.c 45 ; because of the define MAIN before include globals.h there! 46 extern _HaltCpuWhileIdle 47 extern _DGROUP_ 48 ; 49 _DosIdle_hlt: 0 000005C6 1E push ds 0 000005C7 2E8E1E[0000] mov ds, [cs:_DGROUP_] 0 000005CC 803E[0000]01 cmp byte [_HaltCpuWhileIdle],1 0 000005D1 7204 jb DosId0 0 000005D3 9C pushf 0 000005D4 FB sti 0 000005D5 F4 hlt ; save some energy :-) 0 000005D6 9D popf 0 000005D7 1F DosId0: pop ds 0 000005D8 C3 retn 60 ; 61 _DosIdle_int: 0 000005D9 E8EAFF call _DosIdle_hlt 0 000005DC 1E push ds 0 000005DD 2E8E1E[0000] mov ds, [cs:_DGROUP_] 0 000005E2 803E[0000]01 cmp byte [_InDOS],1 0 000005E7 7703 ja DosId1 0 000005E9 E80200 call Do_DosI 68 DosId1: 0 000005EC 1F pop ds 0 000005ED C3 retn 71 72 Do_DosI: 0 000005EE 50 push ax 0 000005EF 06 push es 0 000005F0 FF36[0000] push word [_MachineId] 0 000005F4 FF36[0000] push word [_user_r] 0 000005F8 FF36[0200] push word [_user_r+2] 0 000005FC 8E06[0000] mov es,word [_cu_psp] 0 00000600 26FF363000 push word [es:PSP_USERSS] 0 00000605 26FF362E00 push word [es:PSP_USERSP] 81 0 0000060A CD28 int 28h 83 0 0000060C 8E06[0000] mov es,word [_cu_psp] 0 00000610 268F062E00 pop word [es:PSP_USERSP] 0 00000615 268F063000 pop word [es:PSP_USERSS] 0 0000061A 8F06[0200] pop word [_user_r+2] 0 0000061E 8F06[0000] pop word [_user_r] 0 00000622 8F06[0000] pop word [_MachineId] 0 00000626 07 pop es 0 00000627 58 pop ax 0 00000628 C3 ret 93 94 ; segment _DATA ; belongs to DGROUP 95 ; whatever db whatever 96 === Trace listing source: dsk.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=dsk.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccuFO7T6.s output file : dsk.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:20.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _blk_Open, @function 7 _blk_Open: 0 000009EC 89E3 mov bx, sp 0 000009EE 8B5F06 mov bx, word ptr [bx+6] 0 000009F1 FF4730 inc word ptr [bx+48] 0 000009F4 B80001 mov ax, 256 0 000009F7 C20600 ret 6 13 .size _blk_Open, .-_blk_Open 14 .type _blk_Close, @function 15 _blk_Close: 0 000009FA 89E3 mov bx, sp 0 000009FC 8B5F06 mov bx, word ptr [bx+6] 0 000009FF FF4F30 dec word ptr [bx+48] 0 00000A02 B80001 mov ax, 256 0 00000A05 C20600 ret 6 21 .size _blk_Close, .-_blk_Close 22 .type _blk_nondr, @function 23 _blk_nondr: 0 00000A08 B80003 mov ax, 768 0 00000A0B C20600 ret 6 26 .size _blk_nondr, .-_blk_nondr 27 .type _blk_Media, @function 28 _blk_Media: 0 00000A0E 89E3 mov bx, sp 0 00000A10 8B5F06 mov bx, word ptr [bx+6] 0 00000A13 F6473301 test byte ptr [bx+51], 1 0 00000A17 7506 jne _.L9 0 00000A19 B80001 mov ax, 256 34 _.L7: 0 00000A1C C20600 ret 6 36 _.L9: 0 00000A1F B80003 mov ax, 768 0 00000A22 EBF8 jmp _.L7 39 .size _blk_Media, .-_blk_Media 40 .type _IoctlQueblk, @function 41 _IoctlQueblk: 0 00000A24 55 push bp 0 00000A25 89E5 mov bp, sp 0 00000A27 1E push ds 0 00000A28 C45E04 les bx, dword ptr [bp+4] 0 00000A2B 268A470D mov al, byte ptr es:[bx+13] 0 00000A2F 8846FF mov byte ptr [bp-1], al 0 00000A32 24BF and al, -65 0 00000A34 3C08 cmp al, 8 0 00000A36 7510 jne _.L15 0 00000A38 268A470E mov al, byte ptr es:[bx+14] 0 00000A3C 3C60 cmp al, 96 0 00000A3E 7415 je _.L16 0 00000A40 770F ja _.L14 0 00000A42 04BA add al, -70 56 _.L22: 0 00000A44 3C01 cmp al, 1 0 00000A46 760D jbe _.L16 59 _.L15: 0 00000A48 B80381 mov ax, -32509 61 _.L11: 0 00000A4B 89EC mov sp, bp 0 00000A4D 5D pop bp 0 00000A4E C20600 ret 6 65 _.L14: 0 00000A51 049A add al, -102 0 00000A53 EBEF jmp _.L22 68 _.L16: 0 00000A55 B80001 mov ax, 256 0 00000A58 EBF1 jmp _.L11 71 .size _IoctlQueblk, .-_IoctlQueblk 72 .type _blk_error, @function 73 _blk_error: 0 00000A5A 55 push bp 0 00000A5B 89E5 mov bp, sp 0 00000A5D C45E04 les bx, dword ptr [bp+4] 0 00000A60 26C747120000 mov word ptr es:[bx+18], 0 0 00000A66 B80C81 mov ax, -32500 0 00000A69 5D pop bp 0 00000A6A C20600 ret 6 81 .size _blk_error, .-_blk_error 82 .type _blk_noerr, @function 83 _blk_noerr: 0 00000A6D B80001 mov ax, 256 0 00000A70 C20600 ret 6 86 .size _blk_noerr, .-_blk_noerr 87 .type _dskerr, @function 88 _dskerr: 0 00000A73 55 push bp 0 00000A74 89E5 mov bp, sp 0 00000A76 8A4604 mov al, byte ptr [bp+4] 0 00000A79 83E003 and ax, 3 0 00000A7C 83F802 cmp ax, 2 0 00000A7F 7434 je _.L32 0 00000A81 83F803 cmp ax, 3 0 00000A84 7410 je _.L30 0 00000A86 83F801 cmp ax, 1 0 00000A89 7512 jne _.L38 0 00000A8B F6460408 test byte ptr [bp+4], 8 0 00000A8F 7529 jne _.L33 0 00000A91 B80381 mov ax, -32509 0 00000A94 EB03 jmp _.L27 103 _.L30: 0 00000A96 B80081 mov ax, -32512 105 _.L27: 0 00000A99 5D pop bp 0 00000A9A C20200 ret 2 108 _.L38: 0 00000A9D F6460480 test byte ptr [bp+4], -128 0 00000AA1 751C jne _.L34 0 00000AA3 F6460440 test byte ptr [bp+4], 64 0 00000AA7 751B jne _.L35 0 00000AA9 F6460410 test byte ptr [bp+4], 16 0 00000AAD 751A jne _.L36 0 00000AAF F6460404 test byte ptr [bp+4], 4 0 00000AB3 7519 jne _.L37 117 _.L32: 0 00000AB5 B80C81 mov ax, -32500 0 00000AB8 EBDF jmp _.L27 120 _.L33: 0 00000ABA B80280 mov ax, -32766 0 00000ABD EBDA jmp _.L27 123 _.L34: 0 00000ABF B80281 mov ax, -32510 0 00000AC2 EBD5 jmp _.L27 126 _.L35: 0 00000AC4 B80681 mov ax, -32506 0 00000AC7 EBD0 jmp _.L27 129 _.L36: 0 00000AC9 B80481 mov ax, -32508 0 00000ACC EBCB jmp _.L27 132 _.L37: 0 00000ACE B80881 mov ax, -32504 0 00000AD1 EBC6 jmp _.L27 135 .size _dskerr, .-_dskerr 136 .type _Getlogdev, @function 137 _Getlogdev: 0 00000AD3 56 push si 0 00000AD4 57 push di 0 00000AD5 55 push bp 0 00000AD6 89E5 mov bp, sp 0 00000AD8 1E push ds 0 00000AD9 1E push ds 0 00000ADA C54E08 lds cx, dword ptr [bp+8] 0 00000ADD 8B760C mov si, word ptr [bp+12] 0 00000AE0 368B4433 mov ax, word ptr ss:[si+51] 0 00000AE4 83E010 and ax, 16 0 00000AE7 7447 je _.L41 0 00000AE9 B80000 mov ax, offset _blk_dev@OZSEG16 0 00000AEC 8EC0 mov es, ax 0 00000AEE 26A00A00 mov al, byte ptr es:[_blk_dev+10] 0 00000AF2 8846FC mov byte ptr [bp-4], al 0 00000AF5 C646FD00 mov byte ptr [bp-3], 0 0 00000AF9 C746FE0000 mov word ptr [bp-2], 0 0 00000AFE B83500 mov ax, offset _Dyn+53 0 00000B01 8EC0 mov es, ax 157 _.L42: 0 00000B03 8B46FE mov ax, word ptr [bp-2] 0 00000B06 3B46FC cmp ax, word ptr [bp-4] 0 00000B09 7D20 jge _.L46 0 00000B0B B88800 mov ax, 136 0 00000B0E F766FE mul word ptr [bp-2] 0 00000B11 93 xchg bx, ax 0 00000B12 368A5404 mov dl, byte ptr ss:[si+4] 0 00000B16 BF0600 mov di, offset _Dyn+6 0 00000B19 363A11 cmp dl, byte ptr ss:[bx+di] 0 00000B1C 7524 jne _.L43 0 00000B1E 8CC7 mov di, es 0 00000B20 368A11 mov dl, byte ptr ss:[bx+di] 0 00000B23 83E230 and dx, 48 0 00000B26 83FA30 cmp dx, 48 0 00000B29 7517 jne _.L43 173 _.L46: 0 00000B2B 8A46FE mov al, byte ptr [bp-2] 0 00000B2E FEC0 inc al 176 _.L41: 0 00000B30 89CB mov bx, cx 0 00000B32 884701 mov byte ptr [bx+1], al 0 00000B35 B80001 mov ax, 256 0 00000B38 89EC mov sp, bp 0 00000B3A 5D pop bp 0 00000B3B 5F pop di 0 00000B3C 5E pop si 0 00000B3D 16 push ss 0 00000B3E 1F pop ds 0 00000B3F C20600 ret 6 187 _.L43: 0 00000B42 FF46FE inc word ptr [bp-2] 0 00000B45 EBBC jmp _.L42 190 .size _Getlogdev, .-_Getlogdev 191 .type _Setlogdev, @function 192 _Setlogdev: 0 00000B47 56 push si 0 00000B48 57 push di 0 00000B49 55 push bp 0 00000B4A 89E5 mov bp, sp 0 00000B4C 83EC06 sub sp, 6 0 00000B4F 8B5E08 mov bx, word ptr [bp+8] 0 00000B52 8B7E0A mov di, word ptr [bp+10] 0 00000B55 8B460C mov ax, word ptr [bp+12] 0 00000B58 8946FE mov word ptr [bp-2], ax 0 00000B5B 8EC7 mov es, di 0 00000B5D 268A4701 mov al, byte ptr es:[bx+1] 0 00000B61 8846FD mov byte ptr [bp-3], al 0 00000B64 FF76FE push word ptr [bp-2] 0 00000B67 57 push di 0 00000B68 53 push bx 0 00000B69 895EFA mov word ptr [bp-6], bx 0 00000B6C E864FF call _Getlogdev 0 00000B6F 8EC7 mov es, di 0 00000B71 8B5EFA mov bx, word ptr [bp-6] 0 00000B74 268A5701 mov dl, byte ptr es:[bx+1] 0 00000B78 84D2 test dl, dl 0 00000B7A 741F je _.L49 0 00000B7C 30F6 xor dh, dh 0 00000B7E 92 xchg dx, ax 0 00000B7F 48 dec ax 0 00000B80 BA8800 mov dx, 136 0 00000B83 F7E2 mul dx 0 00000B85 96 xchg si, ax 0 00000B86 80A43500DF and byte ptr [si+_Dyn+53], -33 0 00000B8B 8B76FE mov si, word ptr [bp-2] 0 00000B8E 804C3320 or byte ptr [si+51], 32 0 00000B92 8A46FD mov al, byte ptr [bp-3] 0 00000B95 FEC0 inc al 0 00000B97 26884701 mov byte ptr es:[bx+1], al 227 _.L49: 0 00000B9B B80001 mov ax, 256 0 00000B9E 89EC mov sp, bp 0 00000BA0 5D pop bp 0 00000BA1 5F pop di 0 00000BA2 5E pop si 0 00000BA3 C20600 ret 6 234 .size _Setlogdev, .-_Setlogdev === Switch to base=012B40h -> ".RODATA.STR1.1" 235 .section .rodata.str1.1,"aMS",@progbits,1 236 _.LC0: 0 00001884 4572726F7220696E .string "Error in the DJ mechanism!\n" 0 0000188C 2074686520444A20 0 00001894 6D656368616E6973 0 0000189C 6D210A00 238 _.LC1: 0 000018A0 496E7365727400 .string "Insert" 240 _.LC2: 0 000018A7 507265737320616E .string "Press any key to continue ... \n" 0 000018AF 79206B657920746F 0 000018B7 20636F6E74696E75 0 000018BF 65202E2E2E200A00 === Switch to base=002270h -> ".TEXT" 242 .text 243 .type _play_dj.part.2, @function 244 _play_dj.part.2: 0 00000BA6 56 push si 0 00000BA7 57 push di 0 00000BA8 55 push bp 0 00000BA9 89E5 mov bp, sp 0 00000BAB 1E push ds 0 00000BAC 8B7E08 mov di, word ptr [bp+8] 0 00000BAF B80000 mov ax, offset _blk_dev@OZSEG16 0 00000BB2 8EC0 mov es, ax 0 00000BB4 268A160A00 mov dl, byte ptr es:[_blk_dev+10] 0 00000BB9 30F6 xor dh, dh 0 00000BBB BE0200 mov si, offset _Dyn+2 0 00000BBE 31C0 xor ax, ax 257 _.L55: 0 00000BC0 39D0 cmp ax, dx 0 00000BC2 7C14 jl _.L58 0 00000BC4 752C jne _.L57 0 00000BC6 B80000 mov ax, offset _.LC0 0 00000BC9 50 push ax 0 00000BCA E8FEFF call _put_string 264 _.L59: 0 00000BCD B8FFFF mov ax, -1 0 00000BD0 89EC mov sp, bp 0 00000BD2 5D pop bp 0 00000BD3 5F pop di 0 00000BD4 5E pop si 0 00000BD5 C20200 ret 2 271 _.L58: 0 00000BD8 8A4D04 mov cl, byte ptr [di+4] 0 00000BDB 3A4C04 cmp cl, byte ptr [si+4] 0 00000BDE 750B jne _.L56 0 00000BE0 8A4C33 mov cl, byte ptr [si+51] 0 00000BE3 83E130 and cx, 48 0 00000BE6 83F930 cmp cx, 48 0 00000BE9 7407 je _.L57 279 _.L56: 0 00000BEB 40 inc ax 0 00000BEC 81C68800 add si, 136 0 00000BF0 EBCE jmp _.L55 283 _.L57: 0 00000BF2 8A4405 mov al, byte ptr [si+5] 0 00000BF5 B108 mov cl, 8 0 00000BF7 D3E0 shl ax, cl 0 00000BF9 0A4505 or al, byte ptr [di+5] 0 00000BFC 50 push ax 0 00000BFD E8FEFF call _floppy_change 0 00000C00 83F8FF cmp ax, -1 0 00000C03 7435 je _.L60 0 00000C05 BB1000 mov bx, offset _template_string 0 00000C08 8A4405 mov al, byte ptr [si+5] 0 00000C0B 0441 add al, 65 0 00000C0D 884719 mov byte ptr [bx+25], al 0 00000C10 53 push bx 0 00000C11 895EFE mov word ptr [bp-2], bx 0 00000C14 E8FEFF call _put_string 0 00000C17 B81C00 mov ax, offset _.LC1 0 00000C1A 50 push ax 0 00000C1B E8FEFF call _put_string 0 00000C1E 8A4505 mov al, byte ptr [di+5] 0 00000C21 0441 add al, 65 0 00000C23 8B5EFE mov bx, word ptr [bp-2] 0 00000C26 884719 mov byte ptr [bx+25], al 0 00000C29 B81600 mov ax, offset _template_string+6 0 00000C2C 50 push ax 0 00000C2D E8FEFF call _put_string 0 00000C30 B82300 mov ax, offset _.LC2 0 00000C33 50 push ax 0 00000C34 E8FEFF call _put_string 0 00000C37 E8FEFF call _fl_readkey 313 _.L60: 0 00000C3A 806433DF and byte ptr [si+51], -33 0 00000C3E 804D3320 or byte ptr [di+51], 32 0 00000C42 8A4505 mov al, byte ptr [di+5] 0 00000C45 31D2 xor dx, dx 0 00000C47 8EC2 mov es, dx 0 00000C49 26A20405 mov byte ptr es:[1284], al 0 00000C4D E97DFF jmp _.L59 321 .size _play_dj.part.2, .-_play_dj.part.2 === Switch to base=012B40h -> ".RODATA.STR1.1" 322 .section .rodata.str1.1 323 _.LC3: 0 000018C7 4C42412D5472616E .string "LBA-Transfer error : cylinder > 1023\n" 0 000018CF 7366657220657272 0 000018D7 6F72203A2063796C 0 000018DF 696E646572203E20 0 000018E7 313032330A00 === Switch to base=002270h -> ".TEXT" 325 .text 326 .type _LBA_Transfer, @function 327 _LBA_Transfer: 0 00000C50 56 push si 0 00000C51 57 push di 0 00000C52 55 push bp 0 00000C53 89E5 mov bp, sp 0 00000C55 83EC1A sub sp, 26 0 00000C58 8B7E0C mov di, word ptr [bp+12] 0 00000C5B 8B760E mov si, word ptr [bp+14] 0 00000C5E C44610 les ax, dword ptr [bp+16] 0 00000C61 8946F2 mov word ptr [bp-14], ax 0 00000C64 8C46F0 mov word ptr [bp-16], es 0 00000C67 8B5E08 mov bx, word ptr [bp+8] 0 00000C6A 8A4704 mov al, byte ptr [bx+4] 0 00000C6D 8846F9 mov byte ptr [bp-7], al 0 00000C70 8B4706 mov ax, word ptr [bx+6] 0 00000C73 8946EE mov word ptr [bp-18], ax 0 00000C76 8B5E16 mov bx, word ptr [bp+22] 0 00000C79 C7070000 mov word ptr [bx], 0 0 00000C7D 837E0AFF cmp word ptr [bp+10], -1 0 00000C81 8B5E08 mov bx, word ptr [bp+8] 0 00000C84 8B4733 mov ax, word ptr [bx+51] 0 00000C87 750E jne _.L69 0 00000C89 A801 test al, 1 0 00000C8B 740A je _.L69 351 _.L97: 0 00000C8D 31C0 xor ax, ax 353 _.L68: 0 00000C8F 89EC mov sp, bp 0 00000C91 5D pop bp 0 00000C92 5F pop di 0 00000C93 5E pop si 0 00000C94 C21000 ret 16 359 _.L69: 0 00000C97 83E030 and ax, 48 0 00000C9A 83F810 cmp ax, 16 0 00000C9D 7506 jne _.L71 0 00000C9F FF7608 push word ptr [bp+8] 0 00000CA2 E801FF call _play_dj.part.2 365 _.L71: 0 00000CA5 8B5E08 mov bx, word ptr [bp+8] 0 00000CA8 F6473301 test byte ptr [bx+51], 1 0 00000CAC 7529 jne _.L73 0 00000CAE B01E mov al, 30 0 00000CB0 50 push ax 0 00000CB1 E8FEFF call _getvec 0 00000CB4 8B5E08 mov bx, word ptr [bp+8] 0 00000CB7 8B4F13 mov cx, word ptr [bx+19] 0 00000CBA 894EFE mov word ptr [bp-2], cx 0 00000CBD 8A4EFE mov cl, byte ptr [bp-2] 0 00000CC0 8EC2 mov es, dx 0 00000CC2 89C3 mov bx, ax 0 00000CC4 263A4F04 cmp cl, byte ptr es:[bx+4] 0 00000CC8 740D je _.L73 0 00000CCA 26884F04 mov byte ptr es:[bx+4], cl 0 00000CCE 8A46F9 mov al, byte ptr [bp-7] 0 00000CD1 30E4 xor ah, ah 0 00000CD3 50 push ax 0 00000CD4 E8FEFF call _fl_reset 385 _.L73: 0 00000CD7 56 push si 0 00000CD8 57 push di 388 _.L124: 0 00000CD9 E8FEFF call _adjust_far 0 00000CDC 8946F6 mov word ptr [bp-10], ax 0 00000CDF 8956FC mov word ptr [bp-4], dx 0 00000CE2 837E1400 cmp word ptr [bp+20], 0 0 00000CE6 74A5 je _.L97 0 00000CE8 8B4614 mov ax, word ptr [bp+20] 0 00000CEB 8946FE mov word ptr [bp-2], ax 0 00000CEE 8B5E08 mov bx, word ptr [bp+8] 0 00000CF1 F6473410 test byte ptr [bx+52], 16 0 00000CF5 7525 jne _.L76 0 00000CF7 8B46FC mov ax, word ptr [bp-4] 0 00000CFA B104 mov cl, 4 0 00000CFC D3E0 shl ax, cl 0 00000CFE 0346F6 add ax, word ptr [bp-10] 0 00000D01 7403E9D500 jne _.L77 0 00000D06 B8FFFF mov ax, -1 405 _.L122: 0 00000D09 31D2 xor dx, dx 0 00000D0B F7360000 div word ptr [_maxsecsize] 0 00000D0F 8B5614 mov dx, word ptr [bp+20] 0 00000D12 8956FE mov word ptr [bp-2], dx 0 00000D15 39C2 cmp dx, ax 0 00000D17 7603 jbe _.L76 0 00000D19 8946FE mov word ptr [bp-2], ax 413 _.L76: 0 00000D1C 817EFC00A0 cmp word ptr [bp-4], -24577+1 0 00000D21 7312 jnc _.L104 0 00000D23 8B46F6 mov ax, word ptr [bp-10] 0 00000D26 8946FA mov word ptr [bp-6], ax 0 00000D29 8B46FC mov ax, word ptr [bp-4] 0 00000D2C 8946F4 mov word ptr [bp-12], ax 0 00000D2F 837EFE01 cmp word ptr [bp-2], 1 0 00000D33 7327 jnc _.L80 422 _.L104: 0 00000D35 C746FA0000 mov word ptr [bp-6], offset _DiskTransferBuffer 0 00000D3A 8C56F4 mov word ptr [bp-12], ss 0 00000D3D 8B460A mov ax, word ptr [bp+10] 0 00000D40 30C0 xor al, al 0 00000D42 3D0043 cmp ax, 17152 0 00000D45 7510 jne _.L100 0 00000D47 FF76EE push word ptr [bp-18] 0 00000D4A FF76FC push word ptr [bp-4] 0 00000D4D FF76F6 push word ptr [bp-10] 0 00000D50 16 push ss 0 00000D51 FF76FA push word ptr [bp-6] 0 00000D54 E8FEFF call _fmemcpy 435 _.L100: 0 00000D57 C746FE0100 mov word ptr [bp-2], 1 437 _.L80: 0 00000D5C C746E80500 mov word ptr [bp-24], 5 439 _.L94: 0 00000D61 8B5E08 mov bx, word ptr [bp+8] 0 00000D64 8B4733 mov ax, word ptr [bx+51] 0 00000D67 F6C404 test ah, 4 0 00000D6A 7503E99100 je _.L82 0 00000D6F 837E0AFF cmp word ptr [bp+10], -1 0 00000D73 7203E98800 jnc _.L82 0 00000D78 BE0000 mov si, offset _dap.2610 0 00000D7B 8A56FE mov dl, byte ptr [bp-2] 0 00000D7E 885402 mov byte ptr [si+2], dl 0 00000D81 8B56FA mov dx, word ptr [bp-6] 0 00000D84 895404 mov word ptr [si+4], dx 0 00000D87 8B56F4 mov dx, word ptr [bp-12] 0 00000D8A 895406 mov word ptr [si+6], dx 0 00000D8D C7060C000000 mov word ptr [_dap.2610+12], 0 0 00000D93 C7060E000000 mov word ptr [_dap.2610+14], 0 0 00000D99 8B56F2 mov dx, word ptr [bp-14] 0 00000D9C 895408 mov word ptr [si+8], dx 0 00000D9F 8B56F0 mov dx, word ptr [bp-16] 0 00000DA2 89540A mov word ptr [si+10], dx 0 00000DA5 F6C408 test ah, 8 0 00000DA8 89F0 mov ax, si 0 00000DAA 7509 jne _.L83 0 00000DAC 8B560A mov dx, word ptr [bp+10] 0 00000DAF 3B160000 cmp dx, word ptr [_LBA_WRITE_VERIFY] 0 00000DB3 742B je _.L84 465 _.L83: 0 00000DB5 16 push ss 0 00000DB6 50 push ax 0 00000DB7 FF760A push word ptr [bp+10] 469 _.L125: 0 00000DBA FF76F9 push word ptr [bp-7] 0 00000DBD E8FEFF call _fl_lba_ReadWrite 472 _.L123: 0 00000DC0 89C7 mov di, ax 0 00000DC2 85C0 test ax, ax 0 00000DC4 7503E91401 je _.L93 476 _.L86: 0 00000DC9 8A46F9 mov al, byte ptr [bp-7] 0 00000DCC 30E4 xor ah, ah 0 00000DCE 50 push ax 0 00000DCF E8FEFF call _fl_reset 0 00000DD2 FF4EE8 dec word ptr [bp-24] 0 00000DD5 758A jne _.L94 0 00000DD7 97 xchg di, ax 0 00000DD8 E9B4FE jmp _.L68 485 _.L77: 0 00000DDB F7D8 neg ax 0 00000DDD E929FF jmp _.L122 488 _.L84: 0 00000DE0 16 push ss 0 00000DE1 56 push si 0 00000DE2 B80043 mov ax, 17152 0 00000DE5 50 push ax 0 00000DE6 FF76F9 push word ptr [bp-7] 0 00000DE9 8C56EC mov word ptr [bp-20], ss 0 00000DEC E8FEFF call _fl_lba_ReadWrite 0 00000DEF 89C7 mov di, ax 0 00000DF1 85C0 test ax, ax 0 00000DF3 8B56EC mov dx, word ptr [bp-20] 0 00000DF6 75D1 jne _.L86 0 00000DF8 52 push dx 0 00000DF9 56 push si 0 00000DFA B80044 mov ax, 17408 0 00000DFD 50 push ax 0 00000DFE EBBA jmp _.L125 505 _.L82: 0 00000E00 8B5E08 mov bx, word ptr [bp+8] 0 00000E03 A801 test al, 1 0 00000E05 7443 je _.L87 0 00000E07 83C337 add bx, 55 510 _.L88: 0 00000E0A 8B7F0D mov di, word ptr [bx+13] 0 00000E0D 89F8 mov ax, di 0 00000E0F F7670F mul word ptr [bx+15] 0 00000E12 8946EC mov word ptr [bp-20], ax 0 00000E15 31F6 xor si, si 0 00000E17 56 push si 0 00000E18 50 push ax 0 00000E19 FF76F0 push word ptr [bp-16] 0 00000E1C FF76F2 push word ptr [bp-14] 0 00000E1F E8FEFF call ___umodsi3 0 00000E22 8946EA mov word ptr [bp-22], ax 0 00000E25 56 push si 0 00000E26 FF76EC push word ptr [bp-20] 0 00000E29 FF76F0 push word ptr [bp-16] 0 00000E2C FF76F2 push word ptr [bp-14] 0 00000E2F E8FEFF call ___udivsi3 0 00000E32 89C6 mov si, ax 0 00000E34 85D2 test dx, dx 0 00000E36 7505 jne _.L105 0 00000E38 3DFF03 cmp ax, 1023 0 00000E3B 7612 jbe _.L120 532 _.L105: 0 00000E3D B84300 mov ax, offset _.LC3 0 00000E40 50 push ax 0 00000E41 E8FEFF call _put_string 0 00000E44 B80100 mov ax, 1 0 00000E47 E945FE jmp _.L68 538 _.L87: 0 00000E4A 83C306 add bx, 6 0 00000E4D EBBB jmp _.L88 541 _.L120: 0 00000E4F 8B46EA mov ax, word ptr [bp-22] 0 00000E52 31D2 xor dx, dx 0 00000E54 F7F7 div di 0 00000E56 8946EA mov word ptr [bp-22], ax 0 00000E59 42 inc dx 0 00000E5A 8D4D01 lea cx, [1+di] 0 00000E5D 8B46FE mov ax, word ptr [bp-2] 0 00000E60 01D0 add ax, dx 0 00000E62 39C8 cmp ax, cx 0 00000E64 7605 jbe _.L91 0 00000E66 29D1 sub cx, dx 0 00000E68 894EFE mov word ptr [bp-2], cx 554 _.L91: 0 00000E6B 817E0A0042 cmp word ptr [bp+10], 16896 0 00000E70 745C je _.L101 0 00000E72 817E0A0044 cmp word ptr [bp+10], 17408 0 00000E77 745A je _.L102 0 00000E79 837E0AFF cmp word ptr [bp+10], -1 0 00000E7D 7559 jne _.L103 0 00000E7F B80000 mov ax, offset _fl_format 562 _.L92: 0 00000E82 8A4EF9 mov cl, byte ptr [bp-7] 0 00000E85 884EEC mov byte ptr [bp-20], cl 0 00000E88 C646ED00 mov byte ptr [bp-19], 0 0 00000E8C FF76F4 push word ptr [bp-12] 0 00000E8F FF76FA push word ptr [bp-6] 0 00000E92 FF76FE push word ptr [bp-2] 0 00000E95 52 push dx 0 00000E96 8956E6 mov word ptr [bp-26], dx 0 00000E99 56 push si 0 00000E9A FF76EA push word ptr [bp-22] 0 00000E9D FF76EC push word ptr [bp-20] 0 00000EA0 FFD0 call ax 0 00000EA2 89C7 mov di, ax 0 00000EA4 85C0 test ax, ax 0 00000EA6 7403E91EFF jne _.L86 0 00000EAB 8B460A mov ax, word ptr [bp+10] 0 00000EAE 3B060000 cmp ax, word ptr [_LBA_WRITE_VERIFY] 0 00000EB2 8B56E6 mov dx, word ptr [bp-26] 0 00000EB5 7526 jne _.L93 0 00000EB7 FF76F4 push word ptr [bp-12] 0 00000EBA FF76FA push word ptr [bp-6] 0 00000EBD FF76FE push word ptr [bp-2] 0 00000EC0 52 push dx 0 00000EC1 56 push si 0 00000EC2 FF76EA push word ptr [bp-22] 0 00000EC5 FF76EC push word ptr [bp-20] 0 00000EC8 E8FEFF call _fl_verify 0 00000ECB E9F2FE jmp _.L123 591 _.L101: 0 00000ECE B80000 mov ax, offset _fl_read 0 00000ED1 EBAF jmp _.L92 594 _.L102: 0 00000ED3 B80000 mov ax, offset _fl_verify 0 00000ED6 EBAA jmp _.L92 597 _.L103: 0 00000ED8 B80000 mov ax, offset _fl_write 0 00000EDB EBA5 jmp _.L92 600 _.L93: 0 00000EDD 817EFA0000 cmp word ptr [bp-6], offset _DiskTransferBuffer 0 00000EE2 7521 jne _.L95 0 00000EE4 8CD0 mov ax, ss 0 00000EE6 3946F4 cmp word ptr [bp-12], ax 0 00000EE9 751A jne _.L95 0 00000EEB 8B460A mov ax, word ptr [bp+10] 0 00000EEE 30C0 xor al, al 0 00000EF0 3D0042 cmp ax, 16896 0 00000EF3 7510 jne _.L95 0 00000EF5 FF76EE push word ptr [bp-18] 0 00000EF8 16 push ss 0 00000EF9 FF76FA push word ptr [bp-6] 0 00000EFC FF76FC push word ptr [bp-4] 0 00000EFF FF76F6 push word ptr [bp-10] 0 00000F02 E8FEFF call _fmemcpy 616 _.L95: 0 00000F05 8B5E16 mov bx, word ptr [bp+22] 0 00000F08 8B46FE mov ax, word ptr [bp-2] 0 00000F0B 0107 add word ptr [bx], ax 0 00000F0D 0146F2 add word ptr [bp-14], ax 0 00000F10 8356F000 adc word ptr [bp-16], 0 0 00000F14 294614 sub word ptr [bp+20], ax 0 00000F17 F766EE mul word ptr [bp-18] 0 00000F1A 0346F6 add ax, word ptr [bp-10] 0 00000F1D FF76FC push word ptr [bp-4] 0 00000F20 50 push ax 0 00000F21 E9B5FD jmp _.L124 628 .size _LBA_Transfer, .-_LBA_Transfer 629 .type _blockio, @function 630 _blockio: 0 00000F24 56 push si 0 00000F25 57 push di 0 00000F26 55 push bp 0 00000F27 89E5 mov bp, sp 0 00000F29 83EC0A sub sp, 10 0 00000F2C 8B4608 mov ax, word ptr [bp+8] 0 00000F2F 8946FC mov word ptr [bp-4], ax 0 00000F32 8B460A mov ax, word ptr [bp+10] 0 00000F35 8946FA mov word ptr [bp-6], ax 0 00000F38 8B7E0C mov di, word ptr [bp+12] 0 00000F3B 8EC0 mov es, ax 0 00000F3D 8B5EFC mov bx, word ptr [bp-4] 0 00000F40 268A4702 mov al, byte ptr es:[bx+2] 0 00000F44 3C08 cmp al, 8 0 00000F46 7410 je _.L128 0 00000F48 3C09 cmp al, 9 0 00000F4A 7413 je _.L129 0 00000F4C 3C04 cmp al, 4 0 00000F4E 7403E9F200 jne _.L141 0 00000F53 B80042 mov ax, 16896 0 00000F56 EB03 jmp _.L150 652 _.L128: 0 00000F58 B80043 mov ax, 17152 654 _.L150: 0 00000F5B 8EC0 mov es, ax 0 00000F5D EB04 jmp _.L130 657 _.L129: 0 00000F5F 8E060000 mov es, word ptr [_LBA_WRITE_VERIFY] 659 _.L130: 0 00000F63 8C46F8 mov word ptr [bp-8], es 0 00000F66 8B7533 mov si, word ptr [di+51] 0 00000F69 81E60002 and si, 512 0 00000F6D 7403E9D300 jne _.L141 0 00000F72 E8FEFF call _ReadPCClock 0 00000F75 894567 mov word ptr [di+103], ax 0 00000F78 895569 mov word ptr [di+105], dx 0 00000F7B 8E46FA mov es, word ptr [bp-6] 0 00000F7E 8B5EFC mov bx, word ptr [bp-4] 0 00000F81 268B4714 mov ax, word ptr es:[bx+20] 0 00000F85 83F8FF cmp ax, -1 0 00000F88 8E46F8 mov es, word ptr [bp-8] 0 00000F8B 742E je _.L131 0 00000F8D 8946F8 mov word ptr [bp-8], ax 0 00000F90 89F1 mov cx, si 675 _.L132: 0 00000F92 36F6453301 test byte ptr ss:[di+51], 1 0 00000F97 7433 je _.L133 0 00000F99 8D5D37 lea bx, [55+di] 679 _.L134: 0 00000F9C 368B7708 mov si, word ptr ss:[bx+8] 0 00000FA0 85F6 test si, si 0 00000FA2 742D je _.L135 0 00000FA4 8976F6 mov word ptr [bp-10], si 0 00000FA7 31DB xor bx, bx 685 _.L148: 0 00000FA9 39CB cmp bx, cx 0 00000FAB 7508 jne _.L143 0 00000FAD 8B46F6 mov ax, word ptr [bp-10] 0 00000FB0 3B46F8 cmp ax, word ptr [bp-8] 0 00000FB3 772B ja _.L145 691 _.L143: 0 00000FB5 B80804 mov ax, 1032 0 00000FB8 E98000 jmp _.L126 694 _.L131: 0 00000FBB 8E5EFA mov ds, word ptr [bp-6] 0 00000FBE 8B5EFC mov bx, word ptr [bp-4] 0 00000FC1 8B471A mov ax, word ptr [bx+26] 0 00000FC4 8946F8 mov word ptr [bp-8], ax 0 00000FC7 8B4F1C mov cx, word ptr [bx+28] 0 00000FCA EBC6 jmp _.L132 701 _.L133: 0 00000FCC 8D5D06 lea bx, [6+di] 0 00000FCF EBCB jmp _.L134 704 _.L135: 0 00000FD1 368B4715 mov ax, word ptr ss:[bx+21] 0 00000FD5 8946F6 mov word ptr [bp-10], ax 0 00000FD8 368B5F17 mov bx, word ptr ss:[bx+23] 0 00000FDC 39CB cmp bx, cx 0 00000FDE 76C9 jbe _.L148 710 _.L145: 0 00000FE0 8E5EFA mov ds, word ptr [bp-6] 0 00000FE3 8B76FC mov si, word ptr [bp-4] 0 00000FE6 8E5C12 mov ds, word ptr [si+18] 0 00000FE9 8CD8 mov ax, ds 0 00000FEB 31D2 xor dx, dx 0 00000FED 0346F8 add ax, word ptr [bp-8] 0 00000FF0 11CA adc dx, cx 0 00000FF2 39DA cmp dx, bx 0 00000FF4 77BF ja _.L143 0 00000FF6 7505 jne _.L146 0 00000FF8 3B46F6 cmp ax, word ptr [bp-10] 0 00000FFB 77B8 ja _.L143 723 _.L146: 0 00000FFD 8D46FE lea ax, [-2+bp] 0 00001000 50 push ax 0 00001001 1E push ds 0 00001002 368B858400 mov ax, word ptr ss:[di+132] 0 00001007 368B958600 mov dx, word ptr ss:[di+134] 0 0000100C 0346F8 add ax, word ptr [bp-8] 0 0000100F 11CA adc dx, cx 0 00001011 52 push dx 0 00001012 50 push ax 0 00001013 8E5EFA mov ds, word ptr [bp-6] 0 00001016 8B5EFC mov bx, word ptr [bp-4] 0 00001019 FF7710 push word ptr [bx+16] 0 0000101C FF770E push word ptr [bx+14] 0 0000101F 06 push es 0 00001020 57 push di 0 00001021 16 push ss 0 00001022 1F pop ds 0 00001023 E82AFC call _LBA_Transfer 0 00001026 8B56FE mov dx, word ptr [bp-2] 0 00001029 8E46FA mov es, word ptr [bp-6] 0 0000102C 8B5EFC mov bx, word ptr [bp-4] 0 0000102F 26895712 mov word ptr es:[bx+18], dx 0 00001033 85C0 test ax, ax 0 00001035 7413 je _.L144 0 00001037 50 push ax 0 00001038 E838FA call _dskerr 750 _.L126: 0 0000103B 89EC mov sp, bp 0 0000103D 5D pop bp 0 0000103E 5F pop di 0 0000103F 5E pop si 0 00001040 16 push ss 0 00001041 1F pop ds 0 00001042 C20600 ret 6 758 _.L141: 0 00001045 B80C81 mov ax, -32500 0 00001048 EBF1 jmp _.L126 761 _.L144: 0 0000104A B80001 mov ax, 256 0 0000104D EBEC jmp _.L126 764 .size _blockio, .-_blockio 765 .type _diskchange, @function 766 _diskchange: 0 0000104F 56 push si 0 00001050 55 push bp 0 00001051 89E5 mov bp, sp 0 00001053 8B7606 mov si, word ptr [bp+6] 0 00001056 8B4433 mov ax, word ptr [si+51] 0 00001059 A801 test al, 1 0 0000105B 740A je _.L152 774 _.L161: 0 0000105D B80100 mov ax, 1 776 _.L151: 0 00001060 89EC mov sp, bp 0 00001062 5D pop bp 0 00001063 5E pop si 0 00001064 C20200 ret 2 781 _.L152: 0 00001067 83E030 and ax, 48 0 0000106A 83F810 cmp ax, 16 0 0000106D 7426 je _.L154 785 _.L157: 0 0000106F F6443302 test byte ptr [si+51], 2 0 00001073 752E jne _.L155 788 _.L156: 0 00001075 E8FEFF call _ReadPCClock 0 00001078 91 xchg cx, ax 0 00001079 89D3 mov bx, dx 0 0000107B 8B5467 mov dx, word ptr [si+103] 0 0000107E 8B4469 mov ax, word ptr [si+105] 0 00001081 29D1 sub cx, dx 0 00001083 19C3 sbb bx, ax 0 00001085 B80100 mov ax, 1 0 00001088 85DB test bx, bx 0 0000108A 7505 jne _.L159 0 0000108C 83F924 cmp cx, 36 0 0000108F 76CF jbe _.L151 801 _.L159: 0 00001091 31C0 xor ax, ax 0 00001093 EBCB jmp _.L151 804 _.L154: 0 00001095 56 push si 0 00001096 E80DFB call _play_dj.part.2 0 00001099 83F8FF cmp ax, -1 0 0000109C 75D1 jne _.L157 809 _.L160: 0 0000109E B8FFFF mov ax, -1 0 000010A1 EBBD jmp _.L151 812 _.L155: 0 000010A3 8A4404 mov al, byte ptr [si+4] 0 000010A6 30E4 xor ah, ah 0 000010A8 50 push ax 0 000010A9 E8FEFF call _fl_diskchanged 0 000010AC 83F801 cmp ax, 1 0 000010AF 74ED je _.L160 0 000010B1 85C0 test ax, ax 0 000010B3 75C0 jne _.L156 0 000010B5 EBA6 jmp _.L161 822 .size _diskchange, .-_diskchange === Switch to base=012B40h -> ".RODATA.STR1.1" 823 .section .rodata.str1.1 824 _.LC4: 0 000018ED 4E4F204E414D4520 .string "NO NAME " 0 000018F5 20202000 826 _.LC5: 0 000018F9 4641543F3F202020 .string "FAT?? " 0 00001901 00 === Switch to base=002270h -> ".TEXT" 828 .text 829 .type _getbpb, @function 830 _getbpb: 0 000010B7 56 push si 0 000010B8 57 push di 0 000010B9 55 push bp 0 000010BA 89E5 mov bp, sp 0 000010BC 1E push ds 0 000010BD 1E push ds 0 000010BE 8B7608 mov si, word ptr [bp+8] 0 000010C1 56 push si 0 000010C2 E88AFF call _diskchange 0 000010C5 83F801 cmp ax, 1 0 000010C8 7404 je _.L170 0 000010CA 804C3340 or byte ptr [si+51], 64 843 _.L170: 0 000010CE 8D46FE lea ax, [-2+bp] 0 000010D1 50 push ax 0 000010D2 B80100 mov ax, 1 0 000010D5 50 push ax 0 000010D6 FFB48600 push word ptr [si+134] 0 000010DA FFB48400 push word ptr [si+132] 0 000010DE BF0000 mov di, offset _DiskTransferBuffer 0 000010E1 16 push ss 0 000010E2 57 push di 0 000010E3 B80042 mov ax, 16896 0 000010E6 50 push ax 0 000010E7 56 push si 0 000010E8 E865FB call _LBA_Transfer 0 000010EB 8946FC mov word ptr [bp-4], ax 0 000010EE 85C0 test ax, ax 0 000010F0 740B je _.L171 0 000010F2 894608 mov word ptr [bp+8], ax 0 000010F5 89EC mov sp, bp 0 000010F7 5D pop bp 0 000010F8 5F pop di 0 000010F9 5E pop si 0 000010FA E976F9 jmp _dskerr 866 _.L171: 0 000010FD 8D4406 lea ax, [6+si] 0 00001100 8B4D0B mov cx, word ptr [di+11] 0 00001103 894C06 mov word ptr [si+6], cx 0 00001106 803EFE0155 cmp byte ptr [_DiskTransferBuffer+510], 85 0 0000110B BA2900 mov dx, 41 0 0000110E 750D jne _.L172 0 00001110 803EFF01AA cmp byte ptr [_DiskTransferBuffer+511], -86 0 00001115 7506 jne _.L172 0 00001117 F7C1FF01 test cx, 511 0 0000111B 7414 je _.L173 877 _.L172: 0 0000111D 52 push dx 0 0000111E 83C637 add si, 55 0 00001121 56 push si 0 00001122 50 push ax 0 00001123 E8FEFF call _memcpy 883 _.L169: 0 00001126 8B46FC mov ax, word ptr [bp-4] 0 00001129 89EC mov sp, bp 0 0000112B 5D pop bp 0 0000112C 5F pop di 0 0000112D 5E pop si 0 0000112E C20200 ret 2 890 _.L173: 0 00001131 806434FD and byte ptr [si+52], -3 0 00001135 52 push dx 0 00001136 BA0B00 mov dx, offset _DiskTransferBuffer+11 0 00001139 52 push dx 0 0000113A 50 push ax 0 0000113B E8FEFF call _memcpy 0 0000113E 837C1100 cmp word ptr [si+17], 0 0 00001142 753A jne _.L175 0 00001144 8A4542 mov al, byte ptr [di+66] 0 00001147 BF4300 mov di, offset _DiskTransferBuffer+67 901 _.L176: 0 0000114A 88C4 mov ah, al 0 0000114C 80C4D8 add ah, -40 0 0000114F 80FC01 cmp ah, 1 0 00001152 B90B00 mov cx, 11 0 00001155 772F ja _.L177 0 00001157 8B15 mov dx, word ptr [di] 0 00001159 8B5D02 mov bx, word ptr [di+2] 0 0000115C 895477 mov word ptr [si+119], dx 0 0000115F 895C79 mov word ptr [si+121], bx 0 00001162 3C29 cmp al, 41 0 00001164 742C je _.L178 913 _.L179: 0 00001166 51 push cx 0 00001167 16 push ss 0 00001168 B86900 mov ax, offset _.LC4 0 0000116B 50 push ax 0 0000116C 8D446B lea ax, [107+si] 0 0000116F 16 push ss 0 00001170 50 push ax 0 00001171 E8FEFF call _fmemcpy 0 00001174 B80800 mov ax, 8 0 00001177 50 push ax 0 00001178 16 push ss 0 00001179 B87500 mov ax, offset _.LC5 0 0000117C EB2A jmp _.L188 927 _.L175: 0 0000117E 8A4526 mov al, byte ptr [di+38] 0 00001181 BF2700 mov di, offset _DiskTransferBuffer+39 0 00001184 EBC4 jmp _.L176 931 _.L177: 0 00001186 C744770000 mov word ptr [si+119], 0 0 0000118B C744790000 mov word ptr [si+121], 0 0 00001190 EBD4 jmp _.L179 935 _.L178: 0 00001192 51 push cx 0 00001193 8D4504 lea ax, [4+di] 0 00001196 16 push ss 0 00001197 50 push ax 0 00001198 8D446B lea ax, [107+si] 0 0000119B 16 push ss 0 0000119C 50 push ax 0 0000119D E8FEFF call _fmemcpy 0 000011A0 B80800 mov ax, 8 0 000011A3 50 push ax 0 000011A4 8D450F lea ax, [15+di] 0 000011A7 16 push ss 948 _.L188: 0 000011A8 50 push ax 0 000011A9 8D447B lea ax, [123+si] 0 000011AC 16 push ss 0 000011AD 50 push ax 0 000011AE E8FEFF call _fmemcpy 0 000011B1 8B440E mov ax, word ptr [si+14] 0 000011B4 85C0 test ax, ax 0 000011B6 7521 jne _.L181 0 000011B8 8B4C1B mov cx, word ptr [si+27] 0 000011BB 8B5C1D mov bx, word ptr [si+29] 959 _.L182: 0 000011BE 8B4415 mov ax, word ptr [si+21] 0 000011C1 F76413 mul word ptr [si+19] 0 000011C4 85C0 test ax, ax 0 000011C6 7516 jne _.L183 0 000011C8 E8FEFF call _ReadPCClock 0 000011CB 894467 mov word ptr [si+103], ax 0 000011CE 895469 mov word ptr [si+105], dx 0 000011D1 C746FC0C81 mov word ptr [bp-4], -32500 0 000011D6 E94DFF jmp _.L169 969 _.L181: 0 000011D9 91 xchg cx, ax 0 000011DA 31DB xor bx, bx 0 000011DC EBE0 jmp _.L182 973 _.L183: 0 000011DE 89C7 mov di, ax 0 000011E0 4F dec di 0 000011E1 31D2 xor dx, dx 0 000011E3 01F9 add cx, di 0 000011E5 11D3 adc bx, dx 0 000011E7 52 push dx 0 000011E8 50 push ax 0 000011E9 53 push bx 0 000011EA 51 push cx 0 000011EB E8FEFF call ___udivsi3 0 000011EE 894435 mov word ptr [si+53], ax 0 000011F1 E8FEFF call _ReadPCClock 0 000011F4 894467 mov word ptr [si+103], ax 0 000011F7 895469 mov word ptr [si+105], dx 0 000011FA E929FF jmp _.L169 989 .size _getbpb, .-_getbpb 990 .type _bldbpb, @function 991 _bldbpb: 0 000011FD 56 push si 0 000011FE 57 push di 0 000011FF 55 push bp 0 00001200 89E5 mov bp, sp 0 00001202 1E push ds 0 00001203 8B5E08 mov bx, word ptr [bp+8] 0 00001206 895EFE mov word ptr [bp-2], bx 0 00001209 8B760A mov si, word ptr [bp+10] 0 0000120C 8B7E0C mov di, word ptr [bp+12] 0 0000120F 57 push di 0 00001210 E8A4FE call _getbpb 0 00001213 85C0 test ax, ax 0 00001215 7513 jne _.L189 0 00001217 8D4506 lea ax, [6+di] 0 0000121A 8EC6 mov es, si 0 0000121C 8B5EFE mov bx, word ptr [bp-2] 0 0000121F 26894712 mov word ptr es:[bx+18], ax 0 00001223 268C5714 mov word ptr es:[bx+20], ss 0 00001227 B80001 mov ax, 256 1011 _.L189: 0 0000122A 89EC mov sp, bp 0 0000122C 5D pop bp 0 0000122D 5F pop di 0 0000122E 5E pop si 0 0000122F C20600 ret 6 1017 .size _bldbpb, .-_bldbpb 1018 .type _mediachk, @function 1019 _mediachk: 0 00001232 56 push si 0 00001233 57 push di 0 00001234 55 push bp 0 00001235 89E5 mov bp, sp 0 00001237 83EC06 sub sp, 6 0 0000123A 8B7E08 mov di, word ptr [bp+8] 0 0000123D 8B460A mov ax, word ptr [bp+10] 0 00001240 8946FE mov word ptr [bp-2], ax 0 00001243 8B760C mov si, word ptr [bp+12] 0 00001246 8B4433 mov ax, word ptr [si+51] 0 00001249 89C2 mov dx, ax 0 0000124B 81E20001 and dx, 256 0 0000124F 7410 je _.L193 0 00001251 80E4FE and ah, -2 0 00001254 894433 mov word ptr [si+51], ax 1035 _.L200: 0 00001257 8E46FE mov es, word ptr [bp-2] 0 0000125A 26C6450EFF mov byte ptr es:[di+14], -1 0 0000125F EB11 jmp _.L202 1039 _.L193: 0 00001261 A840 test al, 64 0 00001263 7418 je _.L195 0 00001265 83E0BF and ax, -65 0 00001268 894433 mov word ptr [si+51], ax 0 0000126B 8E46FE mov es, word ptr [bp-2] 0 0000126E 2688550E mov byte ptr es:[di+14], dl 1046 _.L202: 0 00001272 B80001 mov ax, 256 1048 _.L192: 0 00001275 89EC mov sp, bp 0 00001277 5D pop bp 0 00001278 5F pop di 0 00001279 5E pop si 0 0000127A C20600 ret 6 1054 _.L195: 0 0000127D 56 push si 0 0000127E E8CEFD call _diskchange 0 00001281 8E46FE mov es, word ptr [bp-2] 0 00001284 2688450E mov byte ptr es:[di+14], al 0 00001288 84C0 test al, al 0 0000128A 75E6 jne _.L202 0 0000128C C45477 les dx, dword ptr [si+119] 0 0000128F 8956FA mov word ptr [bp-6], dx 0 00001292 8C46FC mov word ptr [bp-4], es 0 00001295 56 push si 0 00001296 E81EFE call _getbpb 0 00001299 85C0 test ax, ax 0 0000129B 75D8 jne _.L192 0 0000129D 8B56FA mov dx, word ptr [bp-6] 0 000012A0 395477 cmp word ptr [si+119], dx 0 000012A3 8B4EFC mov cx, word ptr [bp-4] 0 000012A6 75AF jne _.L200 0 000012A8 394C79 cmp word ptr [si+121], cx 0 000012AB 75AA jne _.L200 0 000012AD EBC3 jmp _.L202 1075 .size _mediachk, .-_mediachk 1076 .type _Genblkdev, @function 1077 _Genblkdev: 0 000012AF 56 push si 0 000012B0 57 push di 0 000012B1 55 push bp 0 000012B2 89E5 mov bp, sp 0 000012B4 83EC12 sub sp, 18 0 000012B7 C44608 les ax, dword ptr [bp+8] 0 000012BA 8946F6 mov word ptr [bp-10], ax 0 000012BD 8C46F4 mov word ptr [bp-12], es 0 000012C0 8B7E0C mov di, word ptr [bp+12] 0 000012C3 8B4533 mov ax, word ptr [di+51] 0 000012C6 8E46F4 mov es, word ptr [bp-12] 0 000012C9 8B5EF6 mov bx, word ptr [bp-10] 0 000012CC 268A570D mov dl, byte ptr es:[bx+13] 0 000012D0 80FA48 cmp dl, 72 0 000012D3 7436 je _.L257 0 000012D5 80FA08 cmp dl, 8 0 000012D8 752B jne _.L259 0 000012DA 31C9 xor cx, cx 1096 _.L204: 0 000012DC 8E46F4 mov es, word ptr [bp-12] 0 000012DF 8B5EF6 mov bx, word ptr [bp-10] 0 000012E2 268A570E mov dl, byte ptr es:[bx+14] 0 000012E6 80FA47 cmp dl, 71 0 000012E9 7503E92D05 je _.L206 0 000012EE 7603E9F100 ja _.L207 0 000012F3 80FA41 cmp dl, 65 0 000012F6 7503E90E02 je _.L208 0 000012FB 7713 ja _.L209 0 000012FD 80FA40 cmp dl, 64 0 00001300 7503E9A901 je _.L210 1108 _.L259: 0 00001305 B80381 mov ax, -32509 0 00001308 E9A702 jmp _.L203 1111 _.L257: 0 0000130B B90100 mov cx, 1 0 0000130E EBCC jmp _.L204 1114 _.L209: 0 00001310 80FA42 cmp dl, 66 0 00001313 7503E96F02 je _.L211 0 00001318 80FA46 cmp dl, 70 0 0000131B 75E8 jne _.L259 0 0000131D 8E46F4 mov es, word ptr [bp-12] 0 00001320 8B5EF6 mov bx, word ptr [bp-10] 0 00001323 268B4713 mov ax, word ptr es:[bx+19] 0 00001327 8946F0 mov word ptr [bp-16], ax 0 0000132A 268B4715 mov ax, word ptr es:[bx+21] 0 0000132E 8946F6 mov word ptr [bp-10], ax 0 00001331 57 push di 0 00001332 E882FD call _getbpb 0 00001335 85C0 test ax, ax 0 00001337 7403E97602 jne _.L203 0 0000133C 8B5511 mov dx, word ptr [di+17] 0 0000133F 85D2 test dx, dx 0 00001341 7403E9C904 jne _.L267 0 00001346 BB4200 mov bx, 66 1133 _.L247: 0 00001349 B80000 mov ax, offset _DiskTransferBuffer 0 0000134C 8EC0 mov es, ax 0 0000134E 96 xchg si, ax 0 0000134F 8A00 mov al, byte ptr [bx+si] 0 00001351 88C4 mov ah, al 0 00001353 80C4D8 add ah, -40 0 00001356 80FC01 cmp ah, 1 0 00001359 8C46F4 mov word ptr [bp-12], es 0 0000135C 7603E9A405 ja _.L268 0 00001361 85D2 test dx, dx 0 00001363 7403E9AD04 jne _.L269 0 00001368 BB4300 mov bx, 67 1146 _.L248: 0 0000136B 81C30000 add bx, offset _DiskTransferBuffer 0 0000136F 8E46F6 mov es, word ptr [bp-10] 0 00001372 8B76F0 mov si, word ptr [bp-16] 0 00001375 268B4C02 mov cx, word ptr es:[si+2] 0 00001379 268B5404 mov dx, word ptr es:[si+4] 0 0000137D 890F mov word ptr [bx], cx 0 0000137F 895702 mov word ptr [bx+2], dx 0 00001382 894D77 mov word ptr [di+119], cx 0 00001385 895579 mov word ptr [di+121], dx 0 00001388 3C29 cmp al, 41 0 0000138A 752E jne _.L249 0 0000138C 83C304 add bx, 4 0 0000138F B80B00 mov ax, 11 0 00001392 50 push ax 0 00001393 8946EE mov word ptr [bp-18], ax 0 00001396 8D7406 lea si, [6+si] 0 00001399 06 push es 0 0000139A 56 push si 0 0000139B 16 push ss 0 0000139C 53 push bx 0 0000139D 895EF0 mov word ptr [bp-16], bx 0 000013A0 8C56F6 mov word ptr [bp-10], ss 0 000013A3 E8FEFF call _fmemcpy 0 000013A6 8B46EE mov ax, word ptr [bp-18] 0 000013A9 50 push ax 0 000013AA 8B56F6 mov dx, word ptr [bp-10] 0 000013AD 52 push dx 0 000013AE 8B5EF0 mov bx, word ptr [bp-16] 0 000013B1 53 push bx 0 000013B2 8D456B lea ax, [107+di] 0 000013B5 16 push ss 0 000013B6 50 push ax 0 000013B7 E8FEFF call _fmemcpy 1180 _.L249: 0 000013BA 8D46FC lea ax, [-4+bp] 0 000013BD 50 push ax 0 000013BE B80100 mov ax, 1 0 000013C1 50 push ax 0 000013C2 36FFB58600 push word ptr ss:[di+134] 0 000013C7 36FFB58400 push word ptr ss:[di+132] 0 000013CC 16 push ss 0 000013CD FF76F4 push word ptr [bp-12] 0 000013D0 B80043 mov ax, 17152 0 000013D3 50 push ax 1191 _.L306: 0 000013D4 57 push di 0 000013D5 16 push ss 0 000013D6 1F pop ds 0 000013D7 E876F8 call _LBA_Transfer 0 000013DA 85C0 test ax, ax 0 000013DC 7503E9CE01 je _.L298 0 000013E1 E90002 jmp _.L299 1199 _.L207: 0 000013E4 80FA62 cmp dl, 98 0 000013E7 7503E9D702 je _.L213 0 000013EC 7603E98A00 ja _.L214 0 000013F1 80FA60 cmp dl, 96 0 000013F4 7503E94D04 je _.L215 0 000013F9 80FA61 cmp dl, 97 0 000013FC 7403E904FF jne _.L259 0 00001401 8E46F4 mov es, word ptr [bp-12] 0 00001404 8B5EF6 mov bx, word ptr [bp-10] 0 00001407 268E4713 mov es, word ptr es:[bx+19] 0 0000140B 8E5EF4 mov ds, word ptr [bp-12] 0 0000140E 8E5F15 mov ds, word ptr [bx+21] 0 00001411 8D46FC lea ax, [-4+bp] 0 00001414 50 push ax 0 00001415 8CC3 mov bx, es 0 00001417 FF7707 push word ptr [bx+7] 0 0000141A 8B4703 mov ax, word ptr [bx+3] 0 0000141D 89C3 mov bx, ax 0 0000141F 99 cwd 0 00001420 368B4515 mov ax, word ptr ss:[di+21] 0 00001424 8946F6 mov word ptr [bp-10], ax 0 00001427 897EF4 mov word ptr [bp-12], di 0 0000142A 92 xchg dx, ax 0 0000142B F766F6 mul word ptr [bp-10] 0 0000142E 91 xchg cx, ax 0 0000142F 8B46F6 mov ax, word ptr [bp-10] 0 00001432 F7E3 mul bx 0 00001434 93 xchg bx, ax 0 00001435 89D6 mov si, dx 0 00001437 01CE add si, cx 0 00001439 8CC7 mov di, es 0 0000143B 8B4501 mov ax, word ptr [di+1] 0 0000143E 99 cwd 0 0000143F 89D1 mov cx, dx 0 00001441 01D8 add ax, bx 0 00001443 8946F6 mov word ptr [bp-10], ax 0 00001446 11F1 adc cx, si 0 00001448 8B7EF4 mov di, word ptr [bp-12] 0 0000144B 368B7513 mov si, word ptr ss:[di+19] 0 0000144F 91 xchg cx, ax 0 00001450 F7E6 mul si 0 00001452 91 xchg cx, ax 0 00001453 8B5EF6 mov bx, word ptr [bp-10] 0 00001456 96 xchg si, ax 0 00001457 F7E3 mul bx 0 00001459 93 xchg bx, ax 0 0000145A 89D6 mov si, dx 0 0000145C 01CE add si, cx 0 0000145E 8CC7 mov di, es 0 00001460 8B4505 mov ax, word ptr [di+5] 0 00001463 89C1 mov cx, ax 0 00001465 99 cwd 0 00001466 92 xchg dx, ax 0 00001467 01D9 add cx, bx 0 00001469 11F0 adc ax, si 0 0000146B 50 push ax 0 0000146C 51 push cx 0 0000146D 8CC3 mov bx, es 0 0000146F FF770B push word ptr [bx+11] 0 00001472 FF7709 push word ptr [bx+9] 0 00001475 B80042 mov ax, 16896 0 00001478 E90501 jmp _.L307 1262 _.L214: 0 0000147B 80FA66 cmp dl, 102 0 0000147E 7503E92D04 je _.L217 0 00001483 80FA67 cmp dl, 103 0 00001486 7403E97AFE jne _.L259 0 0000148B 8E46F4 mov es, word ptr [bp-12] 0 0000148E 8B5EF6 mov bx, word ptr [bp-10] 0 00001491 268B5F13 mov bx, word ptr es:[bx+19] 0 00001495 8B7EF6 mov di, word ptr [bp-10] 0 00001498 268B5515 mov dx, word ptr es:[di+21] 0 0000149C B109 mov cl, 9 0 0000149E D3E8 shr ax, cl 0 000014A0 83F001 xor ax, 1 0 000014A3 2401 and al, 1 0 000014A5 8EC2 mov es, dx 0 000014A7 26884701 mov byte ptr es:[bx+1], al 0 000014AB E90101 jmp _.L298 1279 _.L210: 0 000014AE 8E46F4 mov es, word ptr [bp-12] 0 000014B1 8B5EF6 mov bx, word ptr [bp-10] 0 000014B4 268B5F13 mov bx, word ptr es:[bx+19] 0 000014B8 8B76F6 mov si, word ptr [bp-10] 0 000014BB 268B7415 mov si, word ptr es:[si+21] 0 000014BF 8EC6 mov es, si 0 000014C1 268A5701 mov dl, byte ptr es:[bx+1] 0 000014C5 885532 mov byte ptr [di+50], dl 0 000014C8 268B5702 mov dx, word ptr es:[bx+2] 0 000014CC 8956F6 mov word ptr [bp-10], dx 0 000014CF 83E203 and dx, 3 0 000014D2 83E0FC and ax, -4 0 000014D5 09D0 or ax, dx 0 000014D7 0D8001 or ax, 384 0 000014DA 894533 mov word ptr [di+51], ax 0 000014DD 268B4704 mov ax, word ptr es:[bx+4] 0 000014E1 894535 mov word ptr [di+53], ax 0 000014E4 26F60701 test byte ptr es:[bx], 1 0 000014E8 7515 jne _.L219 0 000014EA 8D4537 lea ax, [55+di] 1300 _.L220: 0 000014ED 85C9 test cx, cx 0 000014EF 7513 jne _.L260 0 000014F1 BA1F00 mov dx, 31 1304 _.L221: 0 000014F4 52 push dx 0 000014F5 83C307 add bx, 7 0 000014F8 56 push si 0 000014F9 53 push bx 0 000014FA 16 push ss 1310 _.L301: 0 000014FB 50 push ax 0 000014FC E9A103 jmp _.L300 1313 _.L219: 0 000014FF 8D4506 lea ax, [6+di] 0 00001502 EBE9 jmp _.L220 1316 _.L260: 0 00001504 BA2900 mov dx, 41 0 00001507 EBEB jmp _.L221 1319 _.L208: 0 00001509 8E46F4 mov es, word ptr [bp-12] 0 0000150C 8B5EF6 mov bx, word ptr [bp-10] 0 0000150F 268E4713 mov es, word ptr es:[bx+19] 0 00001513 8E5EF4 mov ds, word ptr [bp-12] 0 00001516 8E5F15 mov ds, word ptr [bx+21] 0 00001519 8D46FC lea ax, [-4+bp] 0 0000151C 50 push ax 0 0000151D 8CC3 mov bx, es 0 0000151F FF7707 push word ptr [bx+7] 0 00001522 8B4703 mov ax, word ptr [bx+3] 0 00001525 89C3 mov bx, ax 0 00001527 99 cwd 0 00001528 368B4515 mov ax, word ptr ss:[di+21] 0 0000152C 8946F6 mov word ptr [bp-10], ax 0 0000152F 897EF4 mov word ptr [bp-12], di 0 00001532 92 xchg dx, ax 0 00001533 F766F6 mul word ptr [bp-10] 0 00001536 91 xchg cx, ax 0 00001537 8B46F6 mov ax, word ptr [bp-10] 0 0000153A F7E3 mul bx 0 0000153C 93 xchg bx, ax 0 0000153D 89D6 mov si, dx 0 0000153F 01CE add si, cx 0 00001541 8CC7 mov di, es 0 00001543 8B4501 mov ax, word ptr [di+1] 0 00001546 99 cwd 0 00001547 89D1 mov cx, dx 0 00001549 01D8 add ax, bx 0 0000154B 8946F6 mov word ptr [bp-10], ax 0 0000154E 11F1 adc cx, si 0 00001550 8B7EF4 mov di, word ptr [bp-12] 0 00001553 368B7513 mov si, word ptr ss:[di+19] 0 00001557 91 xchg cx, ax 0 00001558 F7E6 mul si 0 0000155A 91 xchg cx, ax 0 0000155B 8B5EF6 mov bx, word ptr [bp-10] 0 0000155E 96 xchg si, ax 0 0000155F F7E3 mul bx 0 00001561 93 xchg bx, ax 0 00001562 89D6 mov si, dx 0 00001564 01CE add si, cx 0 00001566 8CC7 mov di, es 0 00001568 8B4505 mov ax, word ptr [di+5] 0 0000156B 89C1 mov cx, ax 0 0000156D 99 cwd 0 0000156E 92 xchg dx, ax 0 0000156F 01D9 add cx, bx 0 00001571 11F0 adc ax, si 0 00001573 50 push ax 0 00001574 51 push cx 0 00001575 8CC3 mov bx, es 0 00001577 FF770B push word ptr [bx+11] 0 0000157A FF7709 push word ptr [bx+9] 0 0000157D B80043 mov ax, 17152 1374 _.L307: 0 00001580 50 push ax 0 00001581 8B7EF4 mov di, word ptr [bp-12] 0 00001584 E94DFE jmp _.L306 1378 _.L211: 0 00001587 8E46F4 mov es, word ptr [bp-12] 0 0000158A 8B5EF6 mov bx, word ptr [bp-10] 0 0000158D 268B5F13 mov bx, word ptr es:[bx+19] 0 00001591 8B76F6 mov si, word ptr [bp-10] 0 00001594 268B5415 mov dx, word ptr es:[si+21] 0 00001598 8956F0 mov word ptr [bp-16], dx 0 0000159B 89C2 mov dx, ax 0 0000159D 81E27FFF and dx, -129 0 000015A1 895533 mov word ptr [di+51], dx 0 000015A4 A801 test al, 1 0 000015A6 7412 je _.L223 0 000015A8 8E46F0 mov es, word ptr [bp-16] 0 000015AB 26C60701 mov byte ptr es:[bx], 1 1392 _.L298: 0 000015AF B80001 mov ax, 256 1394 _.L203: 0 000015B2 89EC mov sp, bp 0 000015B4 5D pop bp 0 000015B5 5F pop di 0 000015B6 5E pop si 0 000015B7 C20600 ret 6 1400 _.L223: 0 000015BA A880 test al, -128 0 000015BC 7503E9CB00 je _.L226 0 000015C1 895EEE mov word ptr [bp-18], bx 0 000015C4 36FF7513 push word ptr ss:[di+19] 0 000015C8 36FF7535 push word ptr ss:[di+53] 0 000015CC 8A4504 mov al, byte ptr [di+4] 0 000015CF 30E4 xor ah, ah 0 000015D1 50 push ax 0 000015D2 E8FEFF call _fl_setmediatype 0 000015D5 83F80C cmp ax, 12 0 000015D8 8B5EEE mov bx, word ptr [bp-18] 0 000015DB 750D jne _.L227 0 000015DD 8E46F0 mov es, word ptr [bp-16] 0 000015E0 26C60702 mov byte ptr es:[bx], 2 1415 _.L299: 0 000015E4 50 push ax 0 000015E5 E88BF4 call _dskerr 0 000015E8 EBC8 jmp _.L203 1419 _.L227: 0 000015EA 3D8000 cmp ax, 128 0 000015ED 7509 jne _.L228 1422 _.L302: 0 000015EF 8E46F0 mov es, word ptr [bp-16] 0 000015F2 26C60703 mov byte ptr es:[bx], 3 0 000015F6 EBEC jmp _.L299 1426 _.L228: 0 000015F8 85C0 test ax, ax 0 000015FA 7503E98D00 je _.L226 0 000015FF 8E46F0 mov es, word ptr [bp-16] 0 00001602 26F60701 test byte ptr es:[bx], 1 0 00001606 7421 je _.L230 0 00001608 895EEE mov word ptr [bp-18], bx 0 0000160B 16 push ss 0 0000160C B80000 mov ax, offset _DiskTransferBuffer 0 0000160F 50 push ax 0 00001610 B80100 mov ax, 1 0 00001613 50 push ax 0 00001614 50 push ax 0 00001615 31C0 xor ax, ax 0 00001617 50 push ax 0 00001618 50 push ax 0 00001619 8A4504 mov al, byte ptr [di+4] 0 0000161C 30E4 xor ah, ah 0 0000161E 50 push ax 0 0000161F E8FEFF call _fl_read 0 00001622 85C0 test ax, ax 0 00001624 8B5EEE mov bx, word ptr [bp-18] 0 00001627 75C6 jne _.L302 1449 _.L230: 0 00001629 8B5535 mov dx, word ptr [di+53] 0 0000162C 8B7513 mov si, word ptr [di+19] 0 0000162F 8A6532 mov ah, byte ptr [di+50] 0 00001632 83FA28 cmp dx, 40 0 00001635 7510 jne _.L231 0 00001637 88E0 mov al, ah 0 00001639 FEC0 inc al 0 0000163B 8D4CF8 lea cx, [-8+si] 0 0000163E 83F902 cmp cx, 1+1 0 00001641 7304 jnc _.L231 0 00001643 3C03 cmp al, 2+1 0 00001645 7233 jc _.L232 1462 _.L231: 0 00001647 80C402 add ah, 2 0 0000164A 80FC09 cmp ah, 9 0 0000164D 7503E9B902 je _.L234 0 00001652 83FA50 cmp dx, 80 0 00001655 7516 jne _.L235 0 00001657 83FE0F cmp si, 15 0 0000165A 7506 jne _.L256 0 0000165C B003 mov al, 3 0 0000165E 38C4 cmp ah, al 0 00001660 7418 je _.L232 1473 _.L256: 0 00001662 83FE09 cmp si, 9 0 00001665 7506 jne _.L235 0 00001667 B004 mov al, 4 0 00001669 38C4 cmp ah, al 0 0000166B 740D je _.L232 1479 _.L235: 0 0000166D 8E46F0 mov es, word ptr [bp-16] 0 00001670 26C60702 mov byte ptr es:[bx], 2 0 00001674 B80881 mov ax, -32504 0 00001677 E938FF jmp _.L203 1484 _.L232: 0 0000167A 895EEE mov word ptr [bp-18], bx 0 0000167D 30E4 xor ah, ah 0 0000167F 50 push ax 0 00001680 8A4504 mov al, byte ptr [di+4] 0 00001683 30E4 xor ah, ah 0 00001685 50 push ax 0 00001686 E8FEFF call _fl_setdisktype 0 00001689 8B5EEE mov bx, word ptr [bp-18] 1493 _.L226: 0 0000168C 8E46F0 mov es, word ptr [bp-16] 0 0000168F 26F60701 test byte ptr es:[bx], 1 0 00001693 7403E917FF jne _.L298 0 00001698 C646FF02 mov byte ptr [bp-1], 2 0 0000169C 268B4703 mov ax, word ptr es:[bx+3] 0 000016A0 8846FC mov byte ptr [bp-4], al 0 000016A3 268B4701 mov ax, word ptr es:[bx+1] 0 000016A7 8846FD mov byte ptr [bp-3], al 0 000016AA 26F60702 test byte ptr es:[bx], 2 0 000016AE 7503E9B700 je _.L264 0 000016B3 268B4705 mov ax, word ptr es:[bx+5] 1505 _.L238: 0 000016B7 8946EE mov word ptr [bp-18], ax 1507 _.L239: 0 000016BA 837EEE00 cmp word ptr [bp-18], 0 0 000016BE 7E03E9AD00 jg _.L243 1510 _.L213: 0 000016C3 8E46F4 mov es, word ptr [bp-12] 0 000016C6 8B5EF6 mov bx, word ptr [bp-10] 0 000016C9 268B4713 mov ax, word ptr es:[bx+19] 0 000016CD 8946F0 mov word ptr [bp-16], ax 0 000016D0 268B4715 mov ax, word ptr es:[bx+21] 0 000016D4 8946F4 mov word ptr [bp-12], ax 0 000016D7 8EC0 mov es, ax 0 000016D9 8B5EF0 mov bx, word ptr [bp-16] 0 000016DC 26803F00 cmp byte ptr es:[bx], 0 0 000016E0 7503E92401 je _.L244 0 000016E5 268B4705 mov ax, word ptr es:[bx+5] 0 000016E9 36F76544 mul word ptr ss:[di+68] 1523 _.L245: 0 000016ED 8D56FC lea dx, [-4+bp] 0 000016F0 52 push dx 0 000016F1 50 push ax 0 000016F2 8E46F4 mov es, word ptr [bp-12] 0 000016F5 8B5EF0 mov bx, word ptr [bp-16] 0 000016F8 268B4703 mov ax, word ptr es:[bx+3] 0 000016FC 89C3 mov bx, ax 0 000016FE 99 cwd 0 000016FF 8B4515 mov ax, word ptr [di+21] 0 00001702 8946F6 mov word ptr [bp-10], ax 0 00001705 897EEE mov word ptr [bp-18], di 0 00001708 92 xchg dx, ax 0 00001709 F766F6 mul word ptr [bp-10] 0 0000170C 91 xchg cx, ax 0 0000170D 8B46F6 mov ax, word ptr [bp-10] 0 00001710 F7E3 mul bx 0 00001712 93 xchg bx, ax 0 00001713 89D6 mov si, dx 0 00001715 01CE add si, cx 0 00001717 8B7EF0 mov di, word ptr [bp-16] 0 0000171A 268B4501 mov ax, word ptr es:[di+1] 0 0000171E 89C1 mov cx, ax 0 00001720 99 cwd 0 00001721 92 xchg dx, ax 0 00001722 01D9 add cx, bx 0 00001724 11F0 adc ax, si 0 00001726 8B7EEE mov di, word ptr [bp-18] 0 00001729 8B7513 mov si, word ptr [di+19] 0 0000172C F7E6 mul si 0 0000172E 93 xchg bx, ax 0 0000172F 91 xchg cx, ax 0 00001730 F7E6 mul si 0 00001732 8946F6 mov word ptr [bp-10], ax 0 00001735 8956F8 mov word ptr [bp-8], dx 0 00001738 015EF8 add word ptr [bp-8], bx 0 0000173B 8B958400 mov dx, word ptr [di+132] 0 0000173F 8B9D8600 mov bx, word ptr [di+134] 0 00001743 01C2 add dx, ax 0 00001745 135EF8 adc bx, word ptr [bp-8] 0 00001748 53 push bx 0 00001749 52 push dx 0 0000174A 1E push ds 0 0000174B B80000 mov ax, offset _DiskTransferBuffer 0 0000174E 50 push ax 0 0000174F B80044 mov ax, 17408 0 00001752 50 push ax 0 00001753 57 push di 0 00001754 E8F9F4 call _LBA_Transfer 0 00001757 85C0 test ax, ax 0 00001759 7403E986FE jne _.L299 0 0000175E 8E46F4 mov es, word ptr [bp-12] 0 00001761 8B5EF0 mov bx, word ptr [bp-16] 0 00001764 268807 mov byte ptr es:[bx], al 0 00001767 E945FE jmp _.L298 1578 _.L264: 0 0000176A B80100 mov ax, 1 0 0000176D E947FF jmp _.L238 1581 _.L243: 0 00001770 8A46FC mov al, byte ptr [bp-4] 0 00001773 30E4 xor ah, ah 0 00001775 363B4535 cmp ax, word ptr ss:[di+53] 0 00001779 7603E98500 ja _.L265 0 0000177E C646FE01 mov byte ptr [bp-2], 1 0 00001782 B80000 mov ax, offset _DiskTransferBuffer 1588 _.L240: 0 00001785 8B7513 mov si, word ptr [di+19] 0 00001788 8A56FE mov dl, byte ptr [bp-2] 0 0000178B 30F6 xor dh, dh 0 0000178D 39F2 cmp dx, si 0 0000178F 765B jbe _.L241 0 00001791 8D46FA lea ax, [-6+bp] 0 00001794 50 push ax 0 00001795 56 push si 0 00001796 8A46FC mov al, byte ptr [bp-4] 0 00001799 8846F0 mov byte ptr [bp-16], al 0 0000179C C646F100 mov byte ptr [bp-15], 0 0 000017A0 8B46F0 mov ax, word ptr [bp-16] 0 000017A3 36F76515 mul word ptr ss:[di+21] 0 000017A7 8946F0 mov word ptr [bp-16], ax 0 000017AA 8956F2 mov word ptr [bp-14], dx 0 000017AD 8A46FD mov al, byte ptr [bp-3] 0 000017B0 30E4 xor ah, ah 0 000017B2 0346F0 add ax, word ptr [bp-16] 0 000017B5 93 xchg bx, ax 0 000017B6 89D1 mov cx, dx 0 000017B8 83D100 adc cx, 0 0 000017BB 91 xchg cx, ax 0 000017BC F7E6 mul si 0 000017BE 91 xchg cx, ax 0 000017BF 93 xchg bx, ax 0 000017C0 F7E6 mul si 0 000017C2 01CA add dx, cx 0 000017C4 8B8D8400 mov cx, word ptr [di+132] 0 000017C8 8B9D8600 mov bx, word ptr [di+134] 0 000017CC 01C1 add cx, ax 0 000017CE 11D3 adc bx, dx 0 000017D0 53 push bx 0 000017D1 51 push cx 0 000017D2 16 push ss 0 000017D3 B80000 mov ax, offset _DiskTransferBuffer 0 000017D6 50 push ax 0 000017D7 B8FFFF mov ax, -1 0 000017DA 50 push ax 0 000017DB 57 push di 0 000017DC E871F4 call _LBA_Transfer 0 000017DF 85C0 test ax, ax 0 000017E1 7403E9FEFD jne _.L299 0 000017E6 FF4EEE dec word ptr [bp-18] 0 000017E9 E9CEFE jmp _.L239 1633 _.L241: 0 000017EC 89C6 mov si, ax 0 000017EE 83C604 add si, 4 0 000017F1 BA0400 mov dx, 4 0 000017F4 52 push dx 0 000017F5 8D56FC lea dx, [-4+bp] 0 000017F8 52 push dx 0 000017F9 50 push ax 0 000017FA E8FEFF call _memcpy 0 000017FD FE46FE inc byte ptr [bp-2] 0 00001800 96 xchg si, ax 0 00001801 EB82 jmp _.L240 1645 _.L265: 0 00001803 B80C81 mov ax, -32500 0 00001806 E9A9FD jmp _.L203 1648 _.L244: 0 00001809 8B4544 mov ax, word ptr [di+68] 0 0000180C E9DEFE jmp _.L245 1651 _.L267: 0 0000180F BB2600 mov bx, 38 0 00001812 E934FB jmp _.L247 1654 _.L269: 0 00001815 BB2700 mov bx, 39 0 00001818 E950FB jmp _.L248 1657 _.L206: 0 0000181B 80E4FD and ah, -3 0 0000181E 8E46F4 mov es, word ptr [bp-12] 0 00001821 8B5EF6 mov bx, word ptr [bp-10] 0 00001824 268B5F13 mov bx, word ptr es:[bx+19] 0 00001828 8B76F6 mov si, word ptr [bp-10] 0 0000182B 268B5415 mov dx, word ptr es:[si+21] 0 0000182F 8EC2 mov es, dx 0 00001831 26807F0101 cmp byte ptr es:[bx+1], 1 0 00001836 19D2 sbb dx, dx 0 00001838 F7DA neg dx 0 0000183A B109 mov cl, 9 0 0000183C D3E2 shl dx, cl 0 0000183E 09D0 or ax, dx 0 00001840 894533 mov word ptr [di+51], ax 0 00001843 E969FD jmp _.L298 1673 _.L215: 0 00001846 8E46F4 mov es, word ptr [bp-12] 0 00001849 8B5EF6 mov bx, word ptr [bp-10] 0 0000184C 268B5F13 mov bx, word ptr es:[bx+19] 0 00001850 8B76F6 mov si, word ptr [bp-10] 0 00001853 268B7415 mov si, word ptr es:[si+21] 0 00001857 8A5532 mov dl, byte ptr [di+50] 0 0000185A 8EC6 mov es, si 0 0000185C 26885701 mov byte ptr es:[bx+1], dl 0 00001860 83E003 and ax, 3 0 00001863 26894702 mov word ptr es:[bx+2], ax 0 00001867 30D2 xor dl, dl 0 00001869 36807D3201 cmp byte ptr ss:[di+50], 1 0 0000186E 750B jne _.L252 0 00001870 36837D3528 cmp word ptr ss:[di+53], 40 0 00001875 9F lahf 0 00001876 D0E4 shl ah, 1 0 00001878 99 cwd 0 00001879 F6DA neg dl 1692 _.L252: 0 0000187B 8EC6 mov es, si 0 0000187D 26885706 mov byte ptr es:[bx+6], dl 0 00001881 8B4535 mov ax, word ptr [di+53] 0 00001884 26894704 mov word ptr es:[bx+4], ax 0 00001888 26F60701 test byte ptr es:[bx], 1 0 0000188C 7518 jne _.L253 0 0000188E 8D4537 lea ax, [55+di] 1700 _.L254: 0 00001891 85C9 test cx, cx 0 00001893 7516 jne _.L272 0 00001895 BA1F00 mov dx, 31 1704 _.L255: 0 00001898 52 push dx 0 00001899 16 push ss 0 0000189A 50 push ax 0 0000189B 83C307 add bx, 7 0 0000189E 56 push si 0 0000189F 53 push bx 1711 _.L300: 0 000018A0 E8FEFF call _fmemcpy 0 000018A3 E909FD jmp _.L298 1714 _.L253: 0 000018A6 8D4506 lea ax, [6+di] 0 000018A9 EBE6 jmp _.L254 1717 _.L272: 0 000018AB BA2900 mov dx, 41 0 000018AE EBE8 jmp _.L255 1720 _.L217: 0 000018B0 8E46F4 mov es, word ptr [bp-12] 0 000018B3 8B5EF6 mov bx, word ptr [bp-10] 0 000018B6 268B7713 mov si, word ptr es:[bx+19] 0 000018BA 268B4715 mov ax, word ptr es:[bx+21] 0 000018BE 8946F6 mov word ptr [bp-10], ax 0 000018C1 57 push di 0 000018C2 E8F2F7 call _getbpb 0 000018C5 85C0 test ax, ax 0 000018C7 7403E9E6FC jne _.L203 0 000018CC 8B5577 mov dx, word ptr [di+119] 0 000018CF 8B4579 mov ax, word ptr [di+121] 0 000018D2 8E46F6 mov es, word ptr [bp-10] 0 000018D5 26895402 mov word ptr es:[si+2], dx 0 000018D9 8E46F6 mov es, word ptr [bp-10] 0 000018DC 26894404 mov word ptr es:[si+4], ax 0 000018E0 B80B00 mov ax, 11 0 000018E3 50 push ax 0 000018E4 8D456B lea ax, [107+di] 0 000018E7 16 push ss 0 000018E8 50 push ax 0 000018E9 8D4406 lea ax, [6+si] 0 000018EC FF76F6 push word ptr [bp-10] 0 000018EF 50 push ax 0 000018F0 E8FEFF call _fmemcpy 0 000018F3 B80800 mov ax, 8 0 000018F6 50 push ax 0 000018F7 8D457B lea ax, [123+di] 0 000018FA 16 push ss 0 000018FB 50 push ax 0 000018FC 8D4411 lea ax, [17+si] 0 000018FF FF76F6 push word ptr [bp-10] 0 00001902 E9F6FB jmp _.L301 1753 _.L268: 0 00001905 B80781 mov ax, -32505 0 00001908 E9A7FC jmp _.L203 1756 _.L234: 0 0000190B B404 mov ah, 4 0 0000190D 83FA50 cmp dx, 80 0 00001910 7403E958FD jne _.L235 0 00001915 E94AFD jmp _.L256 1761 .size _Genblkdev, .-_Genblkdev 1762 .global _getddt 1763 .type _getddt, @function 1764 _getddt: 0 00001918 55 push bp 0 00001919 89E5 mov bp, sp 0 0000191B B88800 mov ax, 136 0 0000191E F76604 mul word ptr [bp+4] 0 00001921 050200 add ax, offset _Dyn+2 0 00001924 5D pop bp 0 00001925 C20200 ret 2 1772 .size _getddt, .-_getddt 1773 .global _blk_driver 1774 .type _blk_driver, @function 1775 _blk_driver: 0 00001928 56 push si 0 00001929 55 push bp 0 0000192A 89E5 mov bp, sp 0 0000192C C47608 les si, dword ptr [bp+8] 0 0000192F 8CC1 mov cx, es 0 00001931 268A4401 mov al, byte ptr es:[si+1] 0 00001935 BA0000 mov dx, offset _blk_dev@OZSEG16 0 00001938 8EC2 mov es, dx 0 0000193A 263A060A00 cmp al, byte ptr es:[_blk_dev+10] 0 0000193F 7209 jc _.L311 0 00001941 8EC1 mov es, cx 0 00001943 26807C0200 cmp byte ptr es:[si+2], 0 0 00001948 7524 jne _.L313 1789 _.L311: 0 0000194A 8EC1 mov es, cx 0 0000194C 268A5402 mov dl, byte ptr es:[si+2] 0 00001950 80FA1A cmp dl, 26 0 00001953 771E ja _.L314 0 00001955 30F6 xor dh, dh 0 00001957 D1E2 shl dx, 1 0 00001959 89D3 mov bx, dx 0 0000195B B488 mov ah, -120 0 0000195D F6E4 mul ah 0 0000195F 050200 add ax, offset _Dyn+2 0 00001962 50 push ax 0 00001963 51 push cx 0 00001964 56 push si 0 00001965 FF970000 call word ptr [bx+_dispatch] 1804 _.L310: 0 00001969 89EC mov sp, bp 0 0000196B 5D pop bp 0 0000196C 5E pop si 0 0000196D CB retf 1809 _.L313: 0 0000196E B80181 mov ax, -32511 0 00001971 EBF6 jmp _.L310 1812 _.L314: 0 00001973 B80C81 mov ax, -32500 0 00001976 EBF1 jmp _.L310 1815 .size _blk_driver, .-_blk_driver === Switch to base=000790h -> ".DATA" 1816 .data 1817 .type _dap.2610, @object 1818 .size _dap.2610, 16 1819 _dap.2610: 0 000011B2 10 .byte 16 0 000011B3 00 .byte 0 0 000011B4 00 .byte 0 0 000011B5 00 .byte 0 0 000011B6 0000 .hword 0 0 000011B8 0000 .hword 0 0 000011BA 0000 .hword 0 0 000011BC 0000 .hword 0 0 000011BE 0000 .hword 0 0 000011C0 0000 .hword 0 1830 .type _template_string, @object 1831 .size _template_string, 29 1832 _template_string: 0 000011C2 52656D6F76652064 .string "Remove diskette in drive X:\n" 0 000011CA 69736B6574746520 0 000011D2 696E206472697665 0 000011DA 20583A0A00 === Switch to base=012B40h -> ".RODATA" 1834 .section .rodata 1835 .p2align 1 1836 .type _dispatch, @object 1837 .size _dispatch, 52 1838 _dispatch: 0 00001600 6E00 .hword _blk_error 0 00001602 4608 .hword _mediachk 0 00001604 1108 .hword _bldbpb 0 00001606 6E00 .hword _blk_error 0 00001608 3805 .hword _blockio 0 0000160A 1C00 .hword _blk_nondr 0 0000160C 8100 .hword _blk_noerr 0 0000160E 8100 .hword _blk_noerr 0 00001610 3805 .hword _blockio 0 00001612 3805 .hword _blockio 0 00001614 8100 .hword _blk_noerr 0 00001616 8100 .hword _blk_noerr 0 00001618 6E00 .hword _blk_error 0 0000161A 0000 .hword _blk_Open 0 0000161C 0E00 .hword _blk_Close 0 0000161E 2200 .hword _blk_Media 0 00001620 8100 .hword _blk_noerr 0 00001622 6E00 .hword _blk_error 0 00001624 6E00 .hword _blk_error 0 00001626 C308 .hword _Genblkdev 0 00001628 6E00 .hword _blk_error 0 0000162A 6E00 .hword _blk_error 0 0000162C 6E00 .hword _blk_error 0 0000162E E700 .hword _Getlogdev 0 00001630 5B01 .hword _Setlogdev 0 00001632 3800 .hword _IoctlQueblk 1865 .global _DiskTransferBuffer === Switch to base=012B40h -> ".BSS" 1866 .bss 1867 .p2align 0 1868 .type _DiskTransferBuffer, @object 1869 .size _DiskTransferBuffer, 512 1870 _DiskTransferBuffer: 0 00000B00 0000000000000000 .skip 512,0 0 00000B08 0000000000000000 0 00000B10 0000000000000000 0 00000B18 0000000000000000 0 00000B20 0000000000000000 0 00000B28 0000000000000000 0 00000B30 0000000000000000 0 00000B38 0000000000000000 0 00000B40 0000000000000000 0 00000B48 0000000000000000 0 00000B50 0000000000000000 0 00000B58 0000000000000000 0 00000B60 0000000000000000 0 00000B68 0000000000000000 0 00000B70 0000000000000000 0 00000B78 0000000000000000 0 00000B80 0000000000000000 0 00000B88 0000000000000000 0 00000B90 0000000000000000 0 00000B98 0000000000000000 0 00000BA0 0000000000000000 0 00000BA8 0000000000000000 0 00000BB0 0000000000000000 0 00000BB8 0000000000000000 0 00000BC0 0000000000000000 0 00000BC8 0000000000000000 0 00000BD0 0000000000000000 0 00000BD8 0000000000000000 0 00000BE0 0000000000000000 0 00000BE8 0000000000000000 0 00000BF0 0000000000000000 0 00000BF8 0000000000000000 0 00000C00 0000000000000000 0 00000C08 0000000000000000 0 00000C10 0000000000000000 0 00000C18 0000000000000000 0 00000C20 0000000000000000 0 00000C28 0000000000000000 0 00000C30 0000000000000000 0 00000C38 0000000000000000 0 00000C40 0000000000000000 0 00000C48 0000000000000000 0 00000C50 0000000000000000 0 00000C58 0000000000000000 0 00000C60 0000000000000000 0 00000C68 0000000000000000 0 00000C70 0000000000000000 0 00000C78 0000000000000000 0 00000C80 0000000000000000 0 00000C88 0000000000000000 0 00000C90 0000000000000000 0 00000C98 0000000000000000 0 00000CA0 0000000000000000 0 00000CA8 0000000000000000 0 00000CB0 0000000000000000 0 00000CB8 0000000000000000 0 00000CC0 0000000000000000 0 00000CC8 0000000000000000 0 00000CD0 0000000000000000 0 00000CD8 0000000000000000 0 00000CE0 0000000000000000 0 00000CE8 0000000000000000 0 00000CF0 0000000000000000 0 00000CF8 0000000000000000 1872 .global _LBA_WRITE_VERIFY === Switch to base=000790h -> ".DATA" 1873 .data 0 000011DF 00 .p2align 1 1875 .type _LBA_WRITE_VERIFY, @object 1876 .size _LBA_WRITE_VERIFY, 2 1877 _LBA_WRITE_VERIFY: 0 000011E0 0243 .hword 17154 1879 .ident "GCC: (GNU) 6.3.0" === Trace listing source: dyninit.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=dyninit.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccw0O154.s output file : dyninit.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:23.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=012B40h -> ".RODATA.STR1.1" 5 .section .rodata.str1.1,"aMS",@progbits,1 6 _.LC0: 0 00000D0A 50414E49433A4479 .string "PANIC:Dyn %lu\n" 0 00000D12 6E20256C750A00 === Switch to base=002270h -> ".TEXT" 8 .text 9 .global _DynAlloc 10 .type _DynAlloc, @function 11 _DynAlloc: 0 000033D9 56 push si 0 000033DA 57 push di 0 000033DB 55 push bp 0 000033DC 89E5 mov bp, sp 0 000033DE 83EC06 sub sp, 6 0 000033E1 8B460A mov ax, word ptr [bp+10] 0 000033E4 F7660C mul word ptr [bp+12] 0 000033E7 8946FE mov word ptr [bp-2], ax 0 000033EA 31C9 xor cx, cx 0 000033EC 8B16[0200] mov dx, word ptr [_LoL+2] 0 000033F0 BE[0000] mov si, offset ___ia16_near_alias.0 0 000033F3 8EC2 mov es, dx 0 000033F5 268E1C mov ds, word ptr es:[si] 0 000033F8 8B46FE mov ax, word ptr [bp-2] 0 000033FB 89CF mov di, cx 0 000033FD 8CD9 mov cx, ds 0 000033FF 89FB mov bx, di 0 00003401 01C1 add cx, ax 0 00003403 11FF adc di, di 0 00003405 39DF cmp di, bx 0 00003407 7410 je _.L6 0 00003409 57 push di 0 0000340A 51 push cx 0 0000340B B8[0000] mov ax, offset _.LC0 0 0000340E 50 push ax 0 0000340F 16 push ss 0 00003410 1F pop ds 0 00003411 E8[FEFF] call _init_printf 0 00003414 83C406 add sp, 6 41 _.L4: 0 00003417 EBFE jmp _.L4 43 _.L6: 0 00003419 8CDB mov bx, ds 0 0000341B 8D4002 lea ax, [2+bx+si] 0 0000341E FF76FE push word ptr [bp-2] 0 00003421 57 push di 0 00003422 52 push dx 0 00003423 8956FA mov word ptr [bp-6], dx 0 00003426 50 push ax 0 00003427 8946FC mov word ptr [bp-4], ax 0 0000342A 16 push ss 0 0000342B 1F pop ds 0 0000342C E8[FEFF] call _init_fmemset 0 0000342F 8B56FA mov dx, word ptr [bp-6] 0 00003432 8EC2 mov es, dx 0 00003434 8B4EFE mov cx, word ptr [bp-2] 0 00003437 26030C add cx, word ptr es:[si] 0 0000343A 26890C mov word ptr es:[si], cx 0 0000343D 8B46FC mov ax, word ptr [bp-4] 0 00003440 89EC mov sp, bp 0 00003442 5D pop bp 0 00003443 5F pop di 0 00003444 5E pop si 0 00003445 C20600 ret 6 66 .size _DynAlloc, .-_DynAlloc 67 .global _DynFree 68 .type _DynFree, @function 69 _DynFree: 0 00003448 89E3 mov bx, sp 0 0000344A 8B4702 mov ax, word ptr [bx+2] 0 0000344D 2D[0200] sub ax, offset ___ia16_near_alias.1+2 0 00003450 8E06[0200] mov es, word ptr [_LoL+2] 0 00003454 26A3[0000] mov word ptr es:[___ia16_near_alias.1], ax 0 00003458 C20200 ret 2 76 .size _DynFree, .-_DynFree 77 .global _DynLast 78 .type _DynLast, @function 79 _DynLast: 0 0000345B 8B16[0200] mov dx, word ptr [_LoL+2] 0 0000345F 8EC2 mov es, dx 0 00003461 26A1[0000] mov ax, word ptr es:[___ia16_near_alias.2] 0 00003465 05[0200] add ax, offset ___ia16_near_alias.2+2 0 00003468 C3 ret 85 .size _DynLast, .-_DynLast 86 .weakref ___ia16_near_alias.2,_Dyn 87 .weakref ___ia16_near_alias.1,_Dyn 88 .weakref ___ia16_near_alias.0,_Dyn 89 .ident "GCC: (GNU) 6.3.0" === Trace listing source: entry.lst 1 ; 2 ; File: 3 ; entry.asm 4 ; Description: 5 ; System call entry code 6 ; 7 ; Copyright (c) 1998 8 ; Pasquale J. Villani 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; You should have received a copy of the GNU General Public 24 ; License along with DOS-C; see the file COPYING. If not, 25 ; write to the Free Software Foundation, 675 Mass Ave, 26 ; Cambridge, MA 02139, USA. 27 ; 28 ; $Id: entry.asm 1701 2012-01-16 22:06:21Z perditionc $ 29 ; 30 31 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 32 %include "stacks.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; stacks.inc 4 <1> ; Description: 5 <1> ; Macro support for register stack frame 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Id: stacks.inc 1591 2011-05-06 01:46:55Z bartoldeman $ 29 <1> ; 30 <1> 31 <1> ; 32 <1> ; Standard stack frame used throughout DOS-C 33 <1> ; 34 <1> ; MS-DOS specific 35 <1> ; 36 <1> ; +---------------+ 37 <1> ; | irp hi | 26 38 <1> ; +---------------+ 39 <1> ; | irp low | 24 40 <1> ; +---------------+ 41 <1> ; | flags | 22 42 <1> ; +---------------+ 43 <1> ; | cs | 20 44 <1> ; +---------------+ 45 <1> ; | ip | 18 46 <1> ; +---------------+ 47 <1> ; | es | 16 48 <1> ; +---------------+ 49 <1> ; | ds | 14 50 <1> ; +---------------+ 51 <1> ; | bp | 12 52 <1> ; +---------------+ 53 <1> ; | di | 10 54 <1> ; +---------------+ 55 <1> ; | si | 8 56 <1> ; +---------------+ 57 <1> ; | dx | 6 58 <1> ; +---------------+ 59 <1> ; | cx | 4 60 <1> ; +---------------+ 61 <1> ; | bx | 2 62 <1> ; +---------------+ 63 <1> ; | ax | 0 64 <1> ; +---------------+ 65 <1> ; 66 <1> 67 <1> ;; Note: The order of the pushed registers _must_ match with the definition 68 <1> ;; of the "iregs" structure within PCB.H, because a pointer to the last 69 <1> ;; pushed register is used as a pointer to a "iregs" structure within the 70 <1> ;; called C sources! -- 2000/03/22 ska 71 <1> 72 <1> ; Don't use `struc RegFrame' etc. here because it interferes with segment 73 <1> ; definitions. 74 <1> reg_ax equ 0 75 <1> reg_bx equ 2 76 <1> reg_cx equ 4 77 <1> reg_dx equ 6 78 <1> reg_si equ 8 79 <1> reg_di equ 10 80 <1> reg_bp equ 12 81 <1> reg_ds equ 14 82 <1> reg_es equ 16 83 <1> reg_ip equ 18 84 <1> reg_cs equ 20 85 <1> reg_flags equ 22 86 <1> irp_low equ 24 87 <1> irp_hi equ 26 88 <1> 89 <1> %macro PUSH$ALL 0 90 <1> push es 91 <1> push ds 92 <1> push bp 93 <1> push di 94 <1> push si 95 <1> push dx 96 <1> push cx 97 <1> push bx 98 <1> push ax 99 <1> %endmacro 100 <1> 101 <1> %macro POP$ALL 0 102 <1> pop ax 103 <1> pop bx 104 <1> pop cx 105 <1> pop dx 106 <1> pop si 107 <1> pop di 108 <1> pop bp 109 <1> pop ds 110 <1> pop es 111 <1> %endmacro 112 <1> 113 <1> ; I386.inc - 10/25/01 by tom ehlert 114 <1> ; 115 <1> ; compiling the kernel for 386 will (sometimes) change the 116 <1> ; high part of (some) registers, which will be (sometimes) be used 117 <1> ; later 118 <1> ; 119 <1> ; assumption: 120 <1> ; we have never seen MSVC to use anything but eax, ecx, edx, 121 <1> ; nor have we seen Borland C to use anything but eax, ebx, edx, 122 <1> ; so we only protect eax, ebx or ecx, edx to conserve stack space 123 <1> ; 124 <1> ; to save even more stack space, we save only HIGH part of regs 125 <1> ; at some expense of slower execution. it's easier anyway :-) 126 <1> ; 127 <1> ; WATCOM only uses FS: and GS: (using -zff and -zgf) and never 128 <1> ; any high part of the 386 registers 129 <1> ; 130 <1> 131 <1> 132 <1> %IF XCPU < 386 133 <1> ; no need to save/restore anything 134 <1> 135 <1> ; error 1 2 3 136 <1> %macro Protect386Registers 0 137 <1> %endmacro 138 <1> 139 <1> %assign Size386Registers 0 140 <1> 141 <1> %macro RestoreSP 0 142 <1> mov sp, bp 143 <1> %endmacro 144 <1> 145 <1> %macro Restore386Registers 0 146 <1> %endmacro 147 <1> 148 <1> %ELSE 149 <1> %ifdef WATCOM 150 <1> 151 <1> %macro Protect386Registers 0 152 <1> push fs 153 <1> push gs 154 <1> %endmacro 155 <1> 156 <1> %assign Size386Registers 4 157 <1> 158 <1> %macro RestoreSP 0 159 <1> lea sp, [bp - Size386Registers] 160 <1> %endmacro 161 <1> 162 <1> %macro Restore386Registers 0 163 <1> pop gs 164 <1> pop fs 165 <1> %endmacro 166 <1> 167 <1> %else 168 <1> 169 <1> %macro Protect386Registers 0 170 <1> push eax 171 <1> pop ax 172 <1> %ifdef MSCL8 173 <1> push ecx 174 <1> pop cx 175 <1> %else ;BC5 176 <1> push ebx 177 <1> pop bx 178 <1> %endif 179 <1> push edx 180 <1> pop dx 181 <1> %endmacro 182 <1> 183 <1> %assign Size386Registers 6 184 <1> 185 <1> %macro RestoreSP 0 186 <1> lea sp, [bp - Size386Registers] 187 <1> %endmacro 188 <1> 189 <1> %macro Restore386Registers 0 190 <1> push dx 191 <1> pop edx 192 <1> %ifdef MSCL8 193 <1> push cx 194 <1> pop ecx 195 <1> %else ;BC5 196 <1> push bx 197 <1> pop ebx 198 <1> %endif 199 <1> push ax 200 <1> pop eax 201 <1> %endmacro 202 <1> 203 <1> %endif 204 <1> %ENDIF 205 <1> 206 <1> ; macros to define stack arguments 207 <1> ; arg a, {b,4}, c 208 <1> ; defines a and c as "word" arguments and b as a "dword" argument 209 <1> ; for STDCALL defines .a as [bp+4], .b as [bp+6] and .c as [bp+10] 210 <1> ; for PASCAL defines .a as [bp+10], .b as [bp+6] and .c as [bp+4] 211 <1> ; 212 <1> ; popargs bx, {dx,ax}, cx pops these arguments of the stack (for PASCAL 213 <1> ; in reverse order). Here dx,ax is a dword argument dx:ax where dx is 214 <1> ; the high word. The caller is responsible for dealing with instruction 215 <1> ; pointer (ip) on the stack. 216 <1> 217 <1> %ifdef gcc 218 <1> %define STDCALL 219 <1> %else 220 <1> %define PASCAL 221 <1> %endif 222 <1> 223 <1> %macro definearg 1-2 2 224 <1> %xdefine .%1 bp+.argloc 225 <1> %assign .argloc .argloc+%2 226 <1> %endmacro 227 <1> 228 <1> %macro arg 1-* 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 239 <1> %endmacro 240 <1> 241 <1> %macro multipop 1-* 242 <1> %rep %0 243 <1> %rotate -1 244 <1> pop %1 245 <1> %endrep 246 <1> %endmacro 247 <1> 248 <1> %macro popargs 1-* 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 258 <1> %endmacro 33 === Switch to base=002270h -> "HMA_TEXT" 34 segment HMA_TEXT 35 extern _int21_syscall 36 extern _int21_service 37 extern _int2526_handler 38 extern _error_tos 39 extern _char_api_tos 40 extern _disk_api_tos 41 extern _user_r 42 extern _ErrorMode 43 extern _InDOS 44 extern _term_type 45 extern _abort_progress 46 %IFDEF WIN31SUPPORT 47 extern _winInstanced 48 %ENDIF ; WIN31SUPPORT 49 extern _cu_psp 50 extern _MachineId 51 extern critical_sp 52 53 extern int21regs_seg 54 extern int21regs_off 55 56 extern _Int21AX 57 58 extern _DGROUP_ 59 60 global reloc_call_cpm_entry 61 global reloc_call_int20_handler 62 global reloc_call_int21_handler 63 global reloc_call_low_int25_handler 64 global reloc_call_low_int26_handler 65 global reloc_call_int27_handler 66 67 ; 68 ; MS-DOS CP/M style entry point 69 ; 70 ; VOID FAR 71 ; cpm_entry(iregs UserRegs) 72 ; 73 ; For CP/M compatibility allow a program to invoke any DOS API function 74 ; between 0 and 24h by doing a near call to psp:0005h which embeds a far call 75 ; to absolute address 0:00C0h (int vector 30h & 31h) or FFFF:00D0 (hma). 76 ; 0:00C0h contains the jmp instruction to reloc_call_cpm_entry which should 77 ; be duplicated in hma to ensure correct operation with either state of A20 line. 78 ; Note: int 31h is also used for DPMI but only in protected mode. 79 ; Upon entry the stack has a near return offset (desired return address offset) 80 ; and far return seg:offset (desired return segment of PSP, and useless offset 81 ; which if used will return to the data, not code, at offset 0ah after far call 82 ; in psp). We convert it to a normal call and correct the stack to appear same 83 ; as if invoked via an int 21h call including proper return address. 84 ; 85 reloc_call_cpm_entry: 86 ; Stack is: 87 ; return offset 88 ; psp seg 89 ; 000ah 90 ; 0 000000D5 83C402 add sp, byte 2 ; remove unneeded far return offset 0ah 0 000000D8 9C pushf ; start setting up int 21h stack 93 ; 94 ; now stack is 95 ; return offset 96 ; psp seg 97 ; flags 98 ; 0 000000D9 55 push bp 0 000000DA 89E5 mov bp,sp ; set up reference frame 101 ; 102 ; reference frame stack is 103 ; return offset bp + 6 104 ; psp seg bp + 4 105 ; flags bp + 2 106 ; bp <--- bp 107 ; 0 000000DC 50 push ax 0 000000DD 8B4602 mov ax,[2+bp] ; get the flags 0 000000E0 874606 xchg ax,[6+bp] ; swap with return address 0 000000E3 894602 mov [2+bp],ax 0 000000E6 58 pop ax ; restore working registers 0 000000E7 5D pop bp 114 ; 115 ; Done. Stack is 116 ; flags 117 ; psp seg (alias .COM cs) 118 ; return offset 119 ; 0 000000E8 80F924 cmp cl,024h ; restrict calls to functions 0-24h 0 000000EB 7705 ja cpm_error 0 000000ED 88CC mov ah,cl ; get the call # from cl to ah 0 000000EF E9B400 jmp reloc_call_int21_handler ; do the system call 0 000000F2 B000 cpm_error: mov al,0 0 000000F4 CF iret ; cleanup stack and return to caller 126 127 ; 128 ; interrupt zero divide handler: 129 ; print a message 'Interrupt divide by zero' 130 ; Terminate the current process 131 ; 132 ; VOID INRPT far 133 ; int20_handler(iregs UserRegs) 134 ; 135 0 000000F5 B10C print_hex: mov cl, 12 137 hex_loop: 0 000000F7 89D0 mov ax, dx 0 000000F9 D3E8 shr ax, cl 0 000000FB 240F and al, 0fh 0 000000FD 3C0A cmp al, 10 0 000000FF 1C69 sbb al, 69h 0 00000101 2F das 0 00000102 BB7000 mov bx, 0070h 0 00000105 B40E mov ah, 0eh 0 00000107 CD10 int 10h 0 00000109 80E904 sub cl, 4 0 0000010C 73E9 jae hex_loop 0 0000010E C3 ret 150 0 0000010F 0D0A496E7465727275 divide_by_zero_message db 0dh,0ah,'Interrupt divide by zero, stack:',0dh,0ah,0 0 00000118 707420646976696465 0 00000121 206279207A65726F2C 0 0000012A 20737461636B3A0D0A 0 00000133 00 152 153 global reloc_call_int0_handler 154 reloc_call_int0_handler: 155 0 00000134 BE[3A00] mov si,divide_by_zero_message 157 158 zero_message_loop: 0 00000137 2E8A04 mov al, [cs:si] 0 0000013A 84C0 test al,al 0 0000013C 740A je zero_done 162 0 0000013E 46 inc si 0 0000013F BB7000 mov bx, 0070h 0 00000142 B40E mov ah, 0eh 166 0 00000144 CD10 int 10h 168 0 00000146 EBEF jmp short zero_message_loop 170 171 zero_done: 0 00000148 89E5 mov bp, sp 0 0000014A 31F6 xor si, si ; print 13 words of stack for debugging LUDIV etc. 174 stack_loop: 0 0000014C 8B12 mov dx, [bp+si] 0 0000014E E8A4FF call print_hex 0 00000151 B020 mov al, ' ' 0 00000153 CD10 int 10h 0 00000155 46 inc si 0 00000156 46 inc si 0 00000157 83FE1A cmp si, byte 13*2 0 0000015A 72F0 jb stack_loop 0 0000015C B00D mov al, 0dh 0 0000015E CD10 int 10h 0 00000160 B00A mov al, 0ah 0 00000162 CD10 int 10h 187 0 00000164 B87F4C mov ax,04c7fh ; terminate with errorlevel 127 0 00000167 CD21 int 21h 0 00000169 FB sti 0 0000016A F4 thats_it: hlt 0 0000016B EBFD jmp short thats_it ; it might be command.com that nukes 193 0 0000016D 0D0A496E76616C6964 invalid_opcode_message db 0dh,0ah,'Invalid Opcode at ',0 0 00000176 204F70636F64652061 0 0000017F 742000 195 196 global reloc_call_int6_handler 197 reloc_call_int6_handler: 198 0 00000182 BE[9800] mov si,invalid_opcode_message 0 00000185 EBB0 jmp short zero_message_loop 201 202 global reloc_call_int19_handler 203 reloc_call_int19_handler: 204 ; from Japheth's public domain code (JEMFBHLP.ASM) 205 ; restores int 10,13,15,19,1b and then calls the original int 19. 0 00000187 FC cld 0 00000188 31C0 xor ax,ax 0 0000018A 8EC0 mov es,ax 0 0000018C B070 mov al,70h 0 0000018E 8ED8 mov ds,ax 0 00000190 BE0001 mov si,100h 0 00000193 B90500 mov cx,5 0 00000196 FA cli 0 00000197 AC nextitem: lodsb 0 00000198 89C7 mov di,ax 216 %if XCPU >= 186 217 shl di,2 218 %else 0 0000019A D1E7 shl di,1 0 0000019C D1E7 shl di,1 221 %endif 0 0000019E A5 movsw 0 0000019F A5 movsw 0 000001A0 E2F5 loop nextitem 0 000001A2 CD19 int 19h 226 227 ; 228 ; Terminate the current process 229 ; 230 ; VOID INRPT far 231 ; int20_handler(iregs UserRegs) 232 ; 233 reloc_call_int20_handler: 0 000001A4 B400 mov ah,0 ; terminate through int 21h 235 236 237 ; 238 ; MS-DOS system call entry point 239 ; 240 ; VOID INRPT far 241 ; int21_handler(iregs UserRegs) 242 ; 243 reloc_call_int21_handler: 0 000001A6 80FC25 cmp ah,25h 0 000001A9 743D je int21_func25 0 000001AB 80FC35 cmp ah,35h 0 000001AE 744E je int21_func35 248 ; 249 ; Create the stack frame for C call. This is done to 250 ; preserve machine state and provide a C structure for 251 ; access to registers. 252 ; 253 ; Since this is an interrupt routine, CS, IP and flags were 254 ; pushed onto the stack by the processor, completing the 255 ; stack frame. 256 ; 257 ; NB: stack frame is MS-DOS dependent and not compatible 258 ; with compiler interrupt stack frames. 259 ; 0 000001B0 FB sti 261 PUSH$ALL 0 000001B1 06 push es 0 000001B2 1E push ds 0 000001B3 55 push bp 0 000001B4 57 push di 0 000001B5 56 push si 0 000001B6 52 push dx 0 000001B7 51 push cx 0 000001B8 53 push bx 0 000001B9 50 push ax 0 000001BA 89E5 mov bp,sp 263 ; 264 ; Create kernel reference frame. 265 ; 266 ; NB: At this point, SS != DS and won't be set that way 267 ; until later when which stack to run on is determined. 268 ; 0 000001BC 2E8B16[0000] mov dx,[cs:_DGROUP_] 0 000001C1 8EDA mov ds,dx 0 000001C3 C606[0000]00 mov byte [_term_type], 0 ; reset termination type 272 int21_reentry: ; entered here from int 24h abort, ds = dx => DGROUP 273 Protect386Registers 0 000001C8 80FC33 cmp ah,33h 0 000001CB 740F je int21_user 0 000001CD 80FC50 cmp ah,50h 0 000001D0 740A je int21_user 0 000001D2 80FC51 cmp ah,51h 0 000001D5 7405 je int21_user 0 000001D7 80FC62 cmp ah,62h 0 000001DA 7530 jne int21_1 282 283 int21_user: 284 %IFNDEF WIN31SUPPORT 0 000001DC E88500 call end_dos_crit_sect 286 %ENDIF ; NOT WIN31SUPPORT 287 0 000001DF 16 push ss 0 000001E0 55 push bp 0 000001E1 E8[0000] call _int21_syscall 0 000001E4 59 pop cx 0 000001E5 59 pop cx 0 000001E6 EB72 jmp short int21_ret 294 295 int21_func25: 0 000001E8 06 push es 0 000001E9 53 push bx 0 000001EA 31DB xor bx,bx 0 000001EC 8EC3 mov es,bx 0 000001EE 88C3 mov bl,al 0 000001F0 D1E3 shl bx,1 0 000001F2 D1E3 shl bx,1 0 000001F4 268917 mov [es:bx],dx 0 000001F7 268C5F02 mov [es:bx+2],ds 0 000001FB 5B pop bx 0 000001FC 07 pop es 0 000001FD CF iret 308 309 int21_func35: 0 000001FE 31DB xor bx,bx 0 00000200 8EC3 mov es,bx 0 00000202 88C3 mov bl,al 0 00000204 D1E3 shl bx,1 0 00000206 D1E3 shl bx,1 0 00000208 26C41F les bx,[es:bx] 0 0000020B CF iret 317 318 ; 319 ; normal entry, use one of our 4 stacks 320 ; 321 ; DX=DGROUP 322 ; CX=STACK 323 ; SI=userSS 324 ; BX=userSP 325 326 327 int21_1: 0 0000020C 8CD6 mov si,ss ; save user stack, to be retored later 329 330 331 ; 332 ; Now DS is set, let's save our stack for rentry (???TE) 333 ; 334 ; I don't know who needs that, but ... (TE) 335 ; 0 0000020E 8C16[0200] mov word [_user_r+2],ss 0 00000212 892E[0000] mov word [_user_r],bp ; store and init 338 339 ; 340 ; Decide which stack to run on. 341 ; 342 ; Unlike previous versions of DOS-C, we need to do this here 343 ; to guarantee the user stack for critical error handling. 344 ; We need to do the int 24h from this stack location. 345 ; 346 ; There are actually four stacks to run on. The first is the 347 ; user stack which is determined by system call number in 348 ; AH. The next is the error stack determined by _ErrorMode. 349 ; Then there's the character stack also determined by system 350 ; call number. Finally, all others run on the disk stack. 351 ; They are evaluated in that order. 352 0 00000216 803E[0000]00 cmp byte [_ErrorMode],0 0 0000021B 7410 je int21_2 355 356 int21_onerrorstack: 0 0000021D B9[0000] mov cx,_error_tos 358 359 0 00000220 FA cli 0 00000221 8ED2 mov ss,dx 0 00000223 89CC mov sp,cx 0 00000225 FB sti 364 0 00000226 56 push si ; user SS:SP 0 00000227 55 push bp 367 0 00000228 E8[0000] call _int21_service 0 0000022B EB26 jmp short int21_exit_nodec 370 371 372 int21_2: 373 %IFDEF WIN31SUPPORT ; begin critical section 374 ; should be called as needed, but we just 375 ; mark the whole int21 api as critical 376 call begin_dos_crit_sect 377 %ENDIF ; WIN31SUPPORT 0 0000022D FE06[0000] inc byte [_InDOS] 0 00000231 B9[0000] mov cx,_char_api_tos 0 00000234 08E4 or ah,ah 0 00000236 7405 jz int21_3 382 %IFDEF WIN31SUPPORT ; testing, this function call crashes 383 cmp ah,06h 384 je int21_3 385 %ENDIF ; WIN31SUPPORT 0 00000238 80FC0C cmp ah,0ch 0 0000023B 7606 jbe int21_normalentry 388 389 int21_3: 390 %IFNDEF WIN31SUPPORT 0 0000023D E82400 call end_dos_crit_sect 392 %ENDIF ; NOT WIN31SUPPORT 0 00000240 B9[0000] mov cx,_disk_api_tos 394 395 int21_normalentry: 396 0 00000243 FA cli 0 00000244 8ED2 mov ss,dx 0 00000246 89CC mov sp,cx 0 00000248 FB sti 401 402 ; 403 ; Push the far pointer to the register frame for 404 ; int21_syscall and remainder of kernel. 405 ; 406 0 00000249 56 push si ; user SS:SP 0 0000024A 55 push bp 0 0000024B E8[0000] call _int21_service 410 411 int21_exit: 412 %IFDEF WIN31SUPPORT 413 call end_dos_crit_sect ; release all critical sections 414 %if 0 415 push ax 416 mov ax, 8101h ; Leave Critical Section 417 int 2ah 418 pop ax 419 %endif 420 %ENDIF ; WIN31SUPPORT 421 422 ; tiny chance DOS re-entered between clearing InDOS and restoring user stack, 423 ; so we disable interrupts until user stack restored; see SF bug# 215 0 0000024E FA cli 0 0000024F FE0E[0000] dec byte [_InDOS] 426 ; 427 ; Recover registers from system call. Registers and flags 428 ; were modified by the system call. 429 ; 430 431 432 int21_exit_nodec: 0 00000253 5D pop bp ; get back user stack 0 00000254 5E pop si 435 436 global _int21_iret 437 _int21_iret: 0 00000255 FA cli 0 00000256 8ED6 mov ss,si 440 RestoreSP 0 00000258 89EC mov sp, bp 441 442 int21_ret: 443 Restore386Registers 444 POP$ALL 0 0000025A 58 pop ax 0 0000025B 5B pop bx 0 0000025C 59 pop cx 0 0000025D 5A pop dx 0 0000025E 5E pop si 0 0000025F 5F pop di 0 00000260 5D pop bp 0 00000261 1F pop ds 0 00000262 07 pop es 445 446 ; 447 ; ... and return. 448 ; 0 00000263 CF iret 450 %IFDEF WIN31SUPPORT 451 ; 452 ; begin DOS Critical Section 1 453 ; 454 ; 455 begin_dos_crit_sect: 456 ; we only enable critical sections if Windows is active 457 ; we currently use winInstanced, but may need to use separate patchable location 458 cmp word [_winInstanced], 0 459 jz skip_crit_sect 460 push ax 461 mov ax, 8001h ; Enter Critical Section 462 int 2ah 463 pop ax 464 skip_crit_sect: 465 ret 466 %ENDIF ; WIN31SUPPORT 467 ; 468 ; end Dos Critical Section 0 thur 7 469 ; 470 ; 471 end_dos_crit_sect: 0 00000264 A3[0000] mov [_Int21AX],ax ; needed! 0 00000267 50 push ax ; This must be here!!! 0 00000268 B482 mov ah,82h ; re-enrty sake before disk stack 0 0000026A CD2A int 2ah ; Calling Server Hook! 0 0000026C 58 pop ax 0 0000026D C3 ret 478 479 ; 480 ; Terminate the current process 481 ; 482 ; VOID INRPT far 483 ; int27_handler(iregs UserRegs) 484 ; 485 reloc_call_int27_handler: 486 ; 487 ; First convert the memory to paragraphs 488 ; 0 0000026E 83C20F add dx,byte 0fh ; round up 0 00000271 D1DA rcr dx,1 0 00000273 D1EA shr dx,1 0 00000275 D1EA shr dx,1 0 00000277 D1EA shr dx,1 494 ; 495 ; ... then use the standard system call 496 ; 0 00000279 B80031 mov ax,3100h 0 0000027C E927FF jmp reloc_call_int21_handler ; terminate through int 21h 499 500 ; 501 ; 502 503 reloc_call_low_int26_handler: 0 0000027F FB sti 0 00000280 9C pushf 0 00000281 50 push ax 0 00000282 B82600 mov ax,026h 0 00000285 EB06 jmp short int2526 509 reloc_call_low_int25_handler: 0 00000287 FB sti 0 00000288 9C pushf 0 00000289 50 push ax 0 0000028A B82500 mov ax,025h 514 int2526: 0 0000028D 51 push cx 0 0000028E 52 push dx 0 0000028F 53 push bx 0 00000290 54 push sp 0 00000291 55 push bp 0 00000292 56 push si 0 00000293 57 push di 0 00000294 1E push ds 0 00000295 06 push es 524 0 00000296 89E1 mov cx, sp ; save stack frame 0 00000298 8CD2 mov dx, ss 527 0 0000029A FC cld 0 0000029B 2E8B1E[0000] mov bx, [cs:_DGROUP_] 0 000002A0 8EDB mov ds, bx 531 532 ; setup our local stack 0 000002A2 FA cli 0 000002A3 8ED3 mov ss,bx 0 000002A5 BC[0000] mov sp,_disk_api_tos 0 000002A8 FB sti 537 538 Protect386Registers 539 0 000002A9 52 push dx 0 000002AA 51 push cx ; save user stack 542 0 000002AB 52 push dx ; SS:SP -> user stack 0 000002AC 51 push cx 0 000002AD 50 push ax ; was set on entry = 25,26 0 000002AE E8[0000] call _int2526_handler 0 000002B1 83C406 add sp, byte 6 548 0 000002B4 59 pop cx 0 000002B5 5A pop dx ; restore user stack 551 552 Restore386Registers 553 554 ; restore foreground stack here 0 000002B6 FA cli 0 000002B7 8ED2 mov ss, dx 0 000002B9 89CC mov sp, cx 558 0 000002BB 07 pop es 0 000002BC 1F pop ds 0 000002BD 5F pop di 0 000002BE 5E pop si 0 000002BF 5D pop bp 0 000002C0 5B pop bx ; pop off sp value 0 000002C1 5B pop bx 0 000002C2 5A pop dx 0 000002C3 59 pop cx 0 000002C4 58 pop ax 0 000002C5 9D popf 0 000002C6 CB retf ; Bug-compatiblity with MS-DOS. 571 ; This function is supposed to leave the original 572 ; flag image on the stack. 573 574 575 576 CONTINUE equ 00h 577 RETRY equ 01h 578 ABORT equ 02h 579 FAIL equ 03h 580 581 OK_IGNORE equ 20h 582 OK_RETRY equ 10h 583 OK_FAIL equ 08h 584 585 PSP_PARENT equ 16h 586 PSP_USERSP equ 2eh 587 PSP_USERSS equ 30h 588 589 590 591 ; 592 ; COUNT 593 ; CriticalError(COUNT nFlag, COUNT nDrive, COUNT nError, struct dhdr FAR *lpDevice); 594 ; 595 global _CriticalError 596 _CriticalError: 597 ; 598 ; Skip critical error routine if handler is active 599 ; 0 000002C7 803E[0000]00 cmp byte [_ErrorMode],0 0 000002CC 7404 je CritErr05 ; Jump if equal 602 0 000002CE B80300 mov ax,FAIL 0 000002D1 C3 retn 605 ; 606 ; Do local error processing 607 ; 608 CritErr05: 609 ; 610 ; C Entry 611 ; 0 000002D2 55 push bp 0 000002D3 89E5 mov bp,sp 0 000002D5 56 push si 0 000002D6 57 push di 616 Protect386Registers 617 618 ; 619 ; Get parameters 620 ; 0 000002D7 8A6604 mov ah,byte [bp+4] ; nFlags 0 000002DA 8A4606 mov al,byte [bp+6] ; nDrive 0 000002DD 8B7E08 mov di,word [bp+8] ; nError 624 ; 625 ; make cx:si point to dev header 626 ; after registers restored use bp:si 627 ; 0 000002E0 8B760A mov si,word [bp+10] ; lpDevice Offset 0 000002E3 8B4E0C mov cx,word [bp+12] ; lpDevice segment 630 ; 631 ; Now save real ss:sp and retry info in internal stack 632 ; 0 000002E6 FA cli 0 000002E7 8E06[0000] mov es,[_cu_psp] 0 000002EB 26FF363000 push word [es:PSP_USERSS] 0 000002F0 26FF362E00 push word [es:PSP_USERSP] 0 000002F5 FF36[0000] push word [_MachineId] 0 000002F9 FF36[0000] push word [int21regs_seg] 0 000002FD FF36[0000] push word [int21regs_off] 0 00000301 FF36[0200] push word [_user_r+2] 0 00000305 FF36[0000] push word [_user_r] 0 00000309 8926[0000] mov [critical_sp],sp 643 ; 644 ; do some clean up because user may never return 645 ; 0 0000030D FE06[0000] inc byte [_ErrorMode] 0 00000311 FE0E[0000] dec byte [_InDOS] 648 ; 649 ; switch to user's stack 650 ; 0 00000315 268B2E2E00 mov bp,[es:PSP_USERSP] 0 0000031A 268E163000 mov ss,[es:PSP_USERSS] 653 RestoreSP 0 0000031F 89EC mov sp, bp 654 Restore386Registers 0 00000321 89CD mov bp,cx 656 ; 657 ; and call critical error handler 658 ; 0 00000323 CD24 int 24h ; DOS Critical error handler 660 661 ; 662 ; recover context 663 ; 0 00000325 FC cld 0 00000326 FA cli 666 Protect386Registers 667 ; ecm: The extended stack frame must be restored here 668 ; in case the response isn't Abort. The int 21h handler 669 ; will expect the extended stack frame to be still 670 ; intact, but the stack written by the int 24h (even 671 ; only the int instruction) will have overwritten it. 672 0 00000327 2E8B2E[0000] mov bp, [cs:_DGROUP_] 0 0000032C 8EDD mov ds,bp 0 0000032E 8ED5 mov ss,bp 0 00000330 8B26[0000] mov sp,[critical_sp] 0 00000334 8F06[0000] pop word [_user_r] 0 00000338 8F06[0200] pop word [_user_r+2] 0 0000033C 8F06[0000] pop word [int21regs_off] 0 00000340 8F06[0000] pop word [int21regs_seg] 0 00000344 8F06[0000] pop word [_MachineId] 0 00000348 8E06[0000] mov es,[_cu_psp] 0 0000034C 268F062E00 pop word [es:PSP_USERSP] 0 00000351 268F063000 pop word [es:PSP_USERSS] 0 00000356 89E5 mov bp, sp 0 00000358 8A6608 mov ah, byte [bp + 4 + 4 + Size386Registers] 687 ; restore old AH from nFlags 688 ; ecm: One 4 is the displacement of nFlags from the 689 ; usual bp, the other 4 accounts for the si and di 690 ; on the stack, the Size386Registers is added to 691 ; skip the fs and gs (OpenWatcom 386 build) or high 692 ; words that are a part of the stack frame, if any. 0 0000035B FB sti ; Enable interrupts 694 ; 695 ; clear flags 696 ; 0 0000035C C606[0000]00 mov byte [_ErrorMode],0 0 00000361 FE06[0000] inc byte [_InDOS] 699 ; 700 ; Check for ignore and force fail if not ok 0 00000365 3C00 cmp al,CONTINUE 0 00000367 7507 jne CritErr10 ; not ignore, keep testing 0 00000369 F6C420 test ah,OK_IGNORE 0 0000036C 7502 jnz CritErr10 0 0000036E B003 mov al,FAIL 706 ; 707 ; Check for retry and force fail if not ok 708 ; 709 CritErr10: 0 00000370 3C01 cmp al,RETRY 0 00000372 7507 jne CritErr20 ; not retry, keep testing 0 00000374 F6C410 test ah,OK_RETRY 0 00000377 7502 jnz CritErr20 0 00000379 B003 mov al,FAIL 715 ; 716 ; You know the drill, but now it's different. 717 ; check for fail and force abort if not ok 718 ; 719 CritErr20: 0 0000037B 3C03 cmp al,FAIL 0 0000037D 7507 jne CritErr30 ; not fail, do exit processing 0 0000037F F6C408 test ah,OK_FAIL 0 00000382 7502 jnz CritErr30 0 00000384 B002 mov al,ABORT 725 ; 726 ; OK, if it's abort we do extra processing. Otherwise just 727 ; exit. 728 ; 729 CritErr30: 0 00000386 3C02 cmp al,ABORT 0 00000388 7406 je CritErrAbort ; process abort 732 733 CritErrExit: 0 0000038A 30E4 xor ah,ah ; clear out top for return 735 736 Restore386Registers 0 0000038C 5F pop di 0 0000038D 5E pop si 0 0000038E 5D pop bp 0 0000038F C3 ret 741 742 ; 743 ; Abort processing. 744 ; 745 CritErrAbort: 0 00000390 F606[0000]FF test byte [_abort_progress], -1 0 00000395 B003 mov al, FAIL 0 00000397 75F1 jnz CritErrExit 749 %if 0 750 mov ax,[_cu_psp] 751 mov es,ax 752 cmp ax,[es:PSP_PARENT] 753 mov al,FAIL 754 jz CritErrExit 755 ; ecm: This check is done by (E)DR-DOS, but not MS-DOS. 756 ; Therefore, disable it and terminate the self-parented 757 ; process here like any other. 758 %endif 0 00000399 FA cli 0 0000039A A1[0200] mov ax,word [_user_r+2] ;Get frame 0 0000039D 8B2E[0000] mov bp,word [_user_r] 0 000003A1 8ED0 mov ss,ax 0 000003A3 89EC mov sp,bp 0 000003A5 C606[0000]01 mov byte [_ErrorMode],1 ; flag abort 0 000003AA B8004C mov ax,4C00h 0 000003AD 894600 mov [bp+reg_ax],ax 0 000003B0 FB sti 0 000003B1 C606[0000]02 mov byte [_term_type], 2 ; set int 24h abort error 0 000003B6 8CDA mov dx, ds 0 000003B8 E90DFE jmp int21_reentry ; restart the system call === Trace listing source: error.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=error.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccRBkWFR.s output file : error.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:21.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=012B40h -> ".RODATA.STR1.1" 5 .section .rodata.str1.1,"aMS",@progbits,1 6 _.LC0: 0 00001902 0A50414E49433A20 .string "\nPANIC: " 0 0000190A 00 8 _.LC1: 0 0000190B 0A53797374656D20 .string "\nSystem halted" 0 00001913 68616C74656400 === Switch to base=002270h -> ".TEXT" 10 .text 11 .global _panic 12 .type _panic, @function 13 _panic: 0 00002DF3 55 push bp 0 00002DF4 89E5 mov bp, sp 0 00002DF6 B8[0000] mov ax, offset _.LC0 0 00002DF9 50 push ax 0 00002DFA E8[FEFF] call _put_string 0 00002DFD FF7604 push word ptr [bp+4] 0 00002E00 E8[FEFF] call _put_string 0 00002E03 B8[0900] mov ax, offset _.LC1 0 00002E06 50 push ax 0 00002E07 E8[FEFF] call _put_string 24 _.L2: 0 00002E0A EBFE jmp _.L2 26 .size _panic, .-_panic 27 .global _char_error 28 .type _char_error, @function 29 _char_error: 0 00002E0C 55 push bp 0 00002E0D 89E5 mov bp, sp 0 00002E0F 8B5E04 mov bx, word ptr [bp+4] 0 00002E12 8A4703 mov al, byte ptr [bx+3] 0 00002E15 30E4 xor ah, ah 0 00002E17 89C2 mov dx, ax 0 00002E19 83C213 add dx, 19 0 00002E1C 8916[0000] mov word ptr [_CritErrCode], dx 0 00002E20 FF7608 push word ptr [bp+8] 0 00002E23 FF7606 push word ptr [bp+6] 0 00002E26 50 push ax 0 00002E27 31C0 xor ax, ax 0 00002E29 50 push ax 0 00002E2A B8B800 mov ax, 184 0 00002E2D 50 push ax 0 00002E2E E8[FEFF] call _CriticalError 0 00002E31 89EC mov sp, bp 0 00002E33 5D pop bp 0 00002E34 C20600 ret 6 49 .size _char_error, .-_char_error 50 .global _block_error 51 .type _block_error, @function 52 _block_error: 0 00002E37 55 push bp 0 00002E38 89E5 mov bp, sp 0 00002E3A C54E08 lds cx, dword ptr [bp+8] 0 00002E3D 8B5E04 mov bx, word ptr [bp+4] 0 00002E40 368A4703 mov al, byte ptr ss:[bx+3] 0 00002E44 30E4 xor ah, ah 0 00002E46 89C2 mov dx, ax 0 00002E48 83C213 add dx, 19 0 00002E4B 368916[0000] mov word ptr ss:[_CritErrCode], dx 0 00002E50 837E0C01 cmp word ptr [bp+12], 1 0 00002E54 7415 je _.L8 0 00002E56 BA3800 mov dx, 56 65 _.L7: 0 00002E59 1E push ds 0 00002E5A 51 push cx 0 00002E5B 50 push ax 0 00002E5C FF7606 push word ptr [bp+6] 0 00002E5F 52 push dx 0 00002E60 16 push ss 0 00002E61 1F pop ds 0 00002E62 E8[FEFF] call _CriticalError 0 00002E65 89EC mov sp, bp 0 00002E67 5D pop bp 0 00002E68 C20A00 ret 10 77 _.L8: 0 00002E6B BA3900 mov dx, 57 0 00002E6E EBE9 jmp _.L7 80 .size _block_error, .-_block_error 81 .ident "GCC: (GNU) 6.3.0" === Trace listing source: execrh.lst 1 ; 2 ; File: 3 ; execrh.asm 4 ; Description: 5 ; request handler for calling device drivers 6 ; 7 ; Copyright (c) 1995, 1998 8 ; Pasquale J. Villani 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; You should have received a copy of the GNU General Public 24 ; License along with DOS-C; see the file COPYING. If not, 25 ; write to the Free Software Foundation, 675 Mass Ave, 26 ; Cambridge, MA 02139, USA. 27 ; 28 ; $Id: execrh.asm 1184 2006-05-20 20:49:59Z mceric $ 29 ; 30 31 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 32 %include "stacks.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; stacks.inc 4 <1> ; Description: 5 <1> ; Macro support for register stack frame 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Id: stacks.inc 1591 2011-05-06 01:46:55Z bartoldeman $ 29 <1> ; 30 <1> 31 <1> ; 32 <1> ; Standard stack frame used throughout DOS-C 33 <1> ; 34 <1> ; MS-DOS specific 35 <1> ; 36 <1> ; +---------------+ 37 <1> ; | irp hi | 26 38 <1> ; +---------------+ 39 <1> ; | irp low | 24 40 <1> ; +---------------+ 41 <1> ; | flags | 22 42 <1> ; +---------------+ 43 <1> ; | cs | 20 44 <1> ; +---------------+ 45 <1> ; | ip | 18 46 <1> ; +---------------+ 47 <1> ; | es | 16 48 <1> ; +---------------+ 49 <1> ; | ds | 14 50 <1> ; +---------------+ 51 <1> ; | bp | 12 52 <1> ; +---------------+ 53 <1> ; | di | 10 54 <1> ; +---------------+ 55 <1> ; | si | 8 56 <1> ; +---------------+ 57 <1> ; | dx | 6 58 <1> ; +---------------+ 59 <1> ; | cx | 4 60 <1> ; +---------------+ 61 <1> ; | bx | 2 62 <1> ; +---------------+ 63 <1> ; | ax | 0 64 <1> ; +---------------+ 65 <1> ; 66 <1> 67 <1> ;; Note: The order of the pushed registers _must_ match with the definition 68 <1> ;; of the "iregs" structure within PCB.H, because a pointer to the last 69 <1> ;; pushed register is used as a pointer to a "iregs" structure within the 70 <1> ;; called C sources! -- 2000/03/22 ska 71 <1> 72 <1> ; Don't use `struc RegFrame' etc. here because it interferes with segment 73 <1> ; definitions. 74 <1> reg_ax equ 0 75 <1> reg_bx equ 2 76 <1> reg_cx equ 4 77 <1> reg_dx equ 6 78 <1> reg_si equ 8 79 <1> reg_di equ 10 80 <1> reg_bp equ 12 81 <1> reg_ds equ 14 82 <1> reg_es equ 16 83 <1> reg_ip equ 18 84 <1> reg_cs equ 20 85 <1> reg_flags equ 22 86 <1> irp_low equ 24 87 <1> irp_hi equ 26 88 <1> 89 <1> %macro PUSH$ALL 0 90 <1> push es 91 <1> push ds 92 <1> push bp 93 <1> push di 94 <1> push si 95 <1> push dx 96 <1> push cx 97 <1> push bx 98 <1> push ax 99 <1> %endmacro 100 <1> 101 <1> %macro POP$ALL 0 102 <1> pop ax 103 <1> pop bx 104 <1> pop cx 105 <1> pop dx 106 <1> pop si 107 <1> pop di 108 <1> pop bp 109 <1> pop ds 110 <1> pop es 111 <1> %endmacro 112 <1> 113 <1> ; I386.inc - 10/25/01 by tom ehlert 114 <1> ; 115 <1> ; compiling the kernel for 386 will (sometimes) change the 116 <1> ; high part of (some) registers, which will be (sometimes) be used 117 <1> ; later 118 <1> ; 119 <1> ; assumption: 120 <1> ; we have never seen MSVC to use anything but eax, ecx, edx, 121 <1> ; nor have we seen Borland C to use anything but eax, ebx, edx, 122 <1> ; so we only protect eax, ebx or ecx, edx to conserve stack space 123 <1> ; 124 <1> ; to save even more stack space, we save only HIGH part of regs 125 <1> ; at some expense of slower execution. it's easier anyway :-) 126 <1> ; 127 <1> ; WATCOM only uses FS: and GS: (using -zff and -zgf) and never 128 <1> ; any high part of the 386 registers 129 <1> ; 130 <1> 131 <1> 132 <1> %IF XCPU < 386 133 <1> ; no need to save/restore anything 134 <1> 135 <1> ; error 1 2 3 136 <1> %macro Protect386Registers 0 137 <1> %endmacro 138 <1> 139 <1> %assign Size386Registers 0 140 <1> 141 <1> %macro RestoreSP 0 142 <1> mov sp, bp 143 <1> %endmacro 144 <1> 145 <1> %macro Restore386Registers 0 146 <1> %endmacro 147 <1> 148 <1> %ELSE 149 <1> %ifdef WATCOM 150 <1> 151 <1> %macro Protect386Registers 0 152 <1> push fs 153 <1> push gs 154 <1> %endmacro 155 <1> 156 <1> %assign Size386Registers 4 157 <1> 158 <1> %macro RestoreSP 0 159 <1> lea sp, [bp - Size386Registers] 160 <1> %endmacro 161 <1> 162 <1> %macro Restore386Registers 0 163 <1> pop gs 164 <1> pop fs 165 <1> %endmacro 166 <1> 167 <1> %else 168 <1> 169 <1> %macro Protect386Registers 0 170 <1> push eax 171 <1> pop ax 172 <1> %ifdef MSCL8 173 <1> push ecx 174 <1> pop cx 175 <1> %else ;BC5 176 <1> push ebx 177 <1> pop bx 178 <1> %endif 179 <1> push edx 180 <1> pop dx 181 <1> %endmacro 182 <1> 183 <1> %assign Size386Registers 6 184 <1> 185 <1> %macro RestoreSP 0 186 <1> lea sp, [bp - Size386Registers] 187 <1> %endmacro 188 <1> 189 <1> %macro Restore386Registers 0 190 <1> push dx 191 <1> pop edx 192 <1> %ifdef MSCL8 193 <1> push cx 194 <1> pop ecx 195 <1> %else ;BC5 196 <1> push bx 197 <1> pop ebx 198 <1> %endif 199 <1> push ax 200 <1> pop eax 201 <1> %endmacro 202 <1> 203 <1> %endif 204 <1> %ENDIF 205 <1> 206 <1> ; macros to define stack arguments 207 <1> ; arg a, {b,4}, c 208 <1> ; defines a and c as "word" arguments and b as a "dword" argument 209 <1> ; for STDCALL defines .a as [bp+4], .b as [bp+6] and .c as [bp+10] 210 <1> ; for PASCAL defines .a as [bp+10], .b as [bp+6] and .c as [bp+4] 211 <1> ; 212 <1> ; popargs bx, {dx,ax}, cx pops these arguments of the stack (for PASCAL 213 <1> ; in reverse order). Here dx,ax is a dword argument dx:ax where dx is 214 <1> ; the high word. The caller is responsible for dealing with instruction 215 <1> ; pointer (ip) on the stack. 216 <1> 217 <1> %ifdef gcc 218 <1> %define STDCALL 219 <1> %else 220 <1> %define PASCAL 221 <1> %endif 222 <1> 223 <1> %macro definearg 1-2 2 224 <1> %xdefine .%1 bp+.argloc 225 <1> %assign .argloc .argloc+%2 226 <1> %endmacro 227 <1> 228 <1> %macro arg 1-* 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 239 <1> %endmacro 240 <1> 241 <1> %macro multipop 1-* 242 <1> %rep %0 243 <1> %rotate -1 244 <1> pop %1 245 <1> %endrep 246 <1> %endmacro 247 <1> 248 <1> %macro popargs 1-* 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 258 <1> %endmacro 33 === Switch to base=002270h -> "HMA_TEXT" 34 segment HMA_TEXT 35 ; EXECRH 36 ; Execute Device Request 37 ; 38 ; execrh(rhp, dhp) 39 ; request far *rhp; 40 ; struct dhdr far *dhp; 41 ; 42 ; 43 ; The stack is very critical in here. 44 ; 45 global EXECRH 46 global INIT_EXECRH 47 48 %macro EXECRHM 0 49 push bp ; perform c entry 50 mov bp,sp 51 push si 52 push ds ; sp=bp-8 53 54 arg {rhp,4}, {dhp,4} 55 lds si,[.dhp] ; ds:si = device header 56 les bx,[.rhp] ; es:bx = request header 57 58 59 mov ax, [si+6] ; construct strategy address 60 mov [.dhp], ax 61 62 push si ; the bloody fucking RTSND.DOS 63 push di ; driver destroys SI,DI (tom 14.2.03) 64 65 call far[.dhp] ; call far the strategy 66 67 pop di 68 pop si 69 70 ; Protect386Registers ; old free-EMM386 versions destroy regs in their INIT method 71 72 mov ax,[si+8] ; construct 'interrupt' address 73 mov [.dhp],ax ; construct interrupt address 74 call far[.dhp] ; call far the interrupt 75 76 ; Restore386Registers ; less stack load and better performance... 77 78 sti ; damm driver turn off ints 79 cld ; has gone backwards 80 pop ds 81 pop si 82 pop bp 83 ret 8 84 %endmacro 85 86 EXECRH: 87 EXECRHM 0 000004DC 55 push bp 0 000004DD 89E5 mov bp,sp 0 000004DF 56 push si 0 000004E0 1E push ds 53 <1> 54 <1> arg {rhp,4}, {dhp,4} 229 <2> %assign .argloc 4 230 <2> %rep %0 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 238 <2> %endrep 231 <3> %ifdef PASCAL 232 <3> %rotate -1 233 <3> %endif 234 <3> definearg %1 224 <4> %xdefine .%1 bp+.argloc 225 <4> %assign .argloc .argloc+%2 235 <3> %ifdef STDCALL 236 <3> %rotate 1 237 <3> %endif 231 <3> %ifdef PASCAL 232 <3> %rotate -1 233 <3> %endif 234 <3> definearg %1 224 <4> %xdefine .%1 bp+.argloc 225 <4> %assign .argloc .argloc+%2 235 <3> %ifdef STDCALL 236 <3> %rotate 1 237 <3> %endif 0 000004E1 C57608 lds si,[.dhp] 0 000004E4 C45E04 les bx,[.rhp] 57 <1> 58 <1> 0 000004E7 8B4406 mov ax, [si+6] 0 000004EA 894608 mov [.dhp], ax 61 <1> 0 000004ED 56 push si 0 000004EE 57 push di 64 <1> 0 000004EF FF5E08 call far[.dhp] 66 <1> 0 000004F2 5F pop di 0 000004F3 5E pop si 69 <1> 70 <1> 71 <1> 0 000004F4 8B4408 mov ax,[si+8] 0 000004F7 894608 mov [.dhp],ax 0 000004FA FF5E08 call far[.dhp] 75 <1> 76 <1> 77 <1> 0 000004FD FB sti 0 000004FE FC cld 0 000004FF 1F pop ds 0 00000500 5E pop si 0 00000501 5D pop bp 0 00000502 C20800 ret 8 88 89 %ifndef WATCOM 90 === Switch to base=00E0E0h -> "INIT_TEXT" 91 segment INIT_TEXT 92 93 INIT_EXECRH: 94 EXECRHM 0 00000176 55 push bp 0 00000177 89E5 mov bp,sp 0 00000179 56 push si 0 0000017A 1E push ds 53 <1> 54 <1> arg {rhp,4}, {dhp,4} 229 <2> %assign .argloc 4 230 <2> %rep %0 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 238 <2> %endrep 231 <3> %ifdef PASCAL 232 <3> %rotate -1 233 <3> %endif 234 <3> definearg %1 224 <4> %xdefine .%1 bp+.argloc 225 <4> %assign .argloc .argloc+%2 235 <3> %ifdef STDCALL 236 <3> %rotate 1 237 <3> %endif 231 <3> %ifdef PASCAL 232 <3> %rotate -1 233 <3> %endif 234 <3> definearg %1 224 <4> %xdefine .%1 bp+.argloc 225 <4> %assign .argloc .argloc+%2 235 <3> %ifdef STDCALL 236 <3> %rotate 1 237 <3> %endif 0 0000017B C57608 lds si,[.dhp] 0 0000017E C45E04 les bx,[.rhp] 57 <1> 58 <1> 0 00000181 8B4406 mov ax, [si+6] 0 00000184 894608 mov [.dhp], ax 61 <1> 0 00000187 56 push si 0 00000188 57 push di 64 <1> 0 00000189 FF5E08 call far[.dhp] 66 <1> 0 0000018C 5F pop di 0 0000018D 5E pop si 69 <1> 70 <1> 71 <1> 0 0000018E 8B4408 mov ax,[si+8] 0 00000191 894608 mov [.dhp],ax 0 00000194 FF5E08 call far[.dhp] 75 <1> 76 <1> 77 <1> 0 00000197 FB sti 0 00000198 FC cld 0 00000199 1F pop ds 0 0000019A 5E pop si 0 0000019B 5D pop bp 0 0000019C C20800 ret 8 95 96 %endif === Trace listing source: fatdir.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=fatdir.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccxvgzC3.s output file : fatdir.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:21.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _swap_deleted, @function 7 _swap_deleted: 0 00004664 89E3 mov bx, sp 0 00004666 8B5F02 mov bx, word ptr [bx+2] 0 00004669 8A07 mov al, byte ptr [bx] 0 0000466B 88C4 mov ah, al 0 0000466D 80C41B add ah, 27 0 00004670 F6C4DF test ah, -33 0 00004673 7504 jne _.L1 0 00004675 34E0 xor al, -32 0 00004677 8807 mov byte ptr [bx], al 17 _.L1: 0 00004679 C20200 ret 2 19 .size _swap_deleted, .-_swap_deleted 20 .global _dir_init_fnode 21 .type _dir_init_fnode, @function 22 _dir_init_fnode: 0 0000467C 56 push si 0 0000467D 55 push bp 0 0000467E 89E5 mov bp, sp 0 00004680 8B5E06 mov bx, word ptr [bp+6] 0 00004683 8B5608 mov dx, word ptr [bp+8] 0 00004686 8B460A mov ax, word ptr [bp+10] 0 00004689 C64739FF mov byte ptr [bx+57], -1 0 0000468D C74702[0000] mov word ptr [bx+2], offset _sda_tmp_dm 0 00004692 81FB[3A00] cmp bx, offset _fnode+58 0 00004696 7506 jne _.L5 0 00004698 C706[3C000000] mov word ptr [_fnode+60], offset _sda_tmp_dm_ren 34 _.L5: 0 0000469E C7472D0000 mov word ptr [bx+45], 0 0 000046A3 C7472F0000 mov word ptr [bx+47], 0 0 000046A8 C747310000 mov word ptr [bx+49], 0 0 000046AD C747330000 mov word ptr [bx+51], 0 0 000046B2 89D1 mov cx, dx 0 000046B4 09C1 or cx, ax 0 000046B6 7512 jne _.L6 0 000046B8 C47729 les si, dword ptr [bx+41] 0 000046BB 26837C0F00 cmp word ptr es:[si+15], 0 0 000046C0 7508 jne _.L6 0 000046C2 268B5435 mov dx, word ptr es:[si+53] 0 000046C6 268B4437 mov ax, word ptr es:[si+55] 47 _.L6: 0 000046CA 8B7702 mov si, word ptr [bx+2] 0 000046CD 89540F mov word ptr [si+15], dx 0 000046D0 894411 mov word ptr [si+17], ax 0 000046D3 895735 mov word ptr [bx+53], dx 0 000046D6 894737 mov word ptr [bx+55], ax 0 000046D9 5D pop bp 0 000046DA 5E pop si 0 000046DB C20600 ret 6 56 .size _dir_init_fnode, .-_dir_init_fnode 57 .global _dir_read 58 .type _dir_read, @function 59 _dir_read: 0 000046DE 56 push si 0 000046DF 57 push di 0 000046E0 55 push bp 0 000046E1 89E5 mov bp, sp 0 000046E3 83EC08 sub sp, 8 0 000046E6 8B7608 mov si, word ptr [bp+8] 0 000046E9 36C55C29 lds bx, dword ptr ss:[si+41] 0 000046ED 8B4702 mov ax, word ptr [bx+2] 0 000046F0 8946FA mov word ptr [bp-6], ax 0 000046F3 368B7C02 mov di, word ptr ss:[si+2] 0 000046F7 368B450D mov ax, word ptr ss:[di+13] 0 000046FB 8946FE mov word ptr [bp-2], ax 0 000046FE 83F8FF cmp ax, -1 0 00004701 750D jne _.L9 74 _.L12: 0 00004703 B8E7FF mov ax, -25 76 _.L8: 0 00004706 89EC mov sp, bp 0 00004708 5D pop bp 0 00004709 5F pop di 0 0000470A 5E pop si 0 0000470B 16 push ss 0 0000470C 1F pop ds 0 0000470D C20200 ret 2 84 _.L9: 0 00004710 368B4511 mov ax, word ptr ss:[di+17] 0 00004714 360B450F or ax, word ptr ss:[di+15] 0 00004718 97 xchg di, ax 0 00004719 8B46FE mov ax, word ptr [bp-2] 0 0000471C 7403E99800 jne _.L11 0 00004721 3B4709 cmp ax, word ptr [bx+9] 0 00004724 73DD jnc _.L12 0 00004726 8B46FA mov ax, word ptr [bp-6] 0 00004729 B105 mov cl, 5 0 0000472B D3E8 shr ax, cl 0 0000472D 91 xchg cx, ax 0 0000472E 8B46FE mov ax, word ptr [bp-2] 0 00004731 31D2 xor dx, dx 0 00004733 F7F1 div cx 0 00004735 034711 add ax, word ptr [bx+17] 0 00004738 36894424 mov word ptr ss:[si+36], ax 0 0000473C 36897C26 mov word ptr ss:[si+38], di 102 _.L13: 0 00004740 31C0 xor ax, ax 0 00004742 50 push ax 0 00004743 36C45C29 les bx, dword ptr ss:[si+41] 0 00004747 268A07 mov al, byte ptr es:[bx] 0 0000474A 98 cbw 0 0000474B 50 push ax 0 0000474C 36FF7426 push word ptr ss:[si+38] 0 00004750 36FF7424 push word ptr ss:[si+36] 0 00004754 16 push ss 0 00004755 1F pop ds 0 00004756 E8[FEFF] call _getblk 0 00004759 93 xchg bx, ax 0 0000475A 8956FC mov word ptr [bp-4], dx 0 0000475D 89D0 mov ax, dx 0 0000475F 09D8 or ax, bx 0 00004761 7503E9C900 je _.L15 0 00004766 8EC2 mov es, dx 0 00004768 268A4705 mov al, byte ptr es:[bx+5] 0 0000476C 8846F8 mov byte ptr [bp-8], al 0 0000476F 24F5 and al, -11 0 00004771 0C24 or al, 36 0 00004773 26884705 mov byte ptr es:[bx+5], al 0 00004777 B105 mov cl, 5 0 00004779 8B7EFA mov di, word ptr [bp-6] 0 0000477C D3EF shr di, cl 0 0000477E 8B46FE mov ax, word ptr [bp-2] 0 00004781 31D2 xor dx, dx 0 00004783 F7F7 div di 0 00004785 885428 mov byte ptr [si+40], dl 0 00004788 89F0 mov ax, si 0 0000478A 83C004 add ax, 4 0 0000478D 8946FE mov word ptr [bp-2], ax 0 00004790 B82000 mov ax, 32 0 00004793 50 push ax 0 00004794 30F6 xor dh, dh 0 00004796 89D7 mov di, dx 0 00004798 D3E7 shl di, cl 0 0000479A 8D5914 lea bx, [20+bx+di] 0 0000479D FF76FC push word ptr [bp-4] 0 000047A0 53 push bx 0 000047A1 16 push ss 0 000047A2 FF76FE push word ptr [bp-2] 0 000047A5 E8[FEFF] call _fmemcpy 0 000047A8 FF76FE push word ptr [bp-2] 0 000047AB E8B6FE call _swap_deleted 0 000047AE 36807C0401 cmp byte ptr ss:[si+4], 1 0 000047B3 19C0 sbb ax, ax 0 000047B5 40 inc ax 0 000047B6 E94DFF jmp _.L8 152 _.L11: 0 000047B9 B10B mov cl, 11 0 000047BB D3E8 shr ax, cl 0 000047BD 8B56FE mov dx, word ptr [bp-2] 0 000047C0 B105 mov cl, 5 0 000047C2 D3E2 shl dx, cl 0 000047C4 3689542D mov word ptr ss:[si+45], dx 0 000047C8 3689442F mov word ptr ss:[si+47], ax 0 000047CC B80100 mov ax, 1 0 000047CF 50 push ax 0 000047D0 56 push si 0 000047D1 16 push ss 0 000047D2 1F pop ds 0 000047D3 E8[FEFF] call _map_cluster 0 000047D6 89C7 mov di, ax 0 000047D8 85C0 test ax, ax 0 000047DA 7403E924FF jne _.L12 0 000047DF 36C45C29 les bx, dword ptr ss:[si+41] 0 000047E3 895EF8 mov word ptr [bp-8], bx 0 000047E6 8C46FC mov word ptr [bp-4], es 0 000047E9 50 push ax 0 000047EA FF76FA push word ptr [bp-6] 0 000047ED 36FF742F push word ptr ss:[si+47] 0 000047F1 36FF742D push word ptr ss:[si+45] 0 000047F5 E8[FEFF] call ___udivsi3 0 000047F8 8E46FC mov es, word ptr [bp-4] 0 000047FB 8B5EF8 mov bx, word ptr [bp-8] 0 000047FE 26224704 and al, byte ptr es:[bx+4] 0 00004802 8846F8 mov byte ptr [bp-8], al 0 00004805 06 push es 0 00004806 53 push bx 0 00004807 36FF7437 push word ptr ss:[si+55] 0 0000480B 36FF7435 push word ptr ss:[si+53] 0 0000480F E8[FEFF] call _clus2phys 0 00004812 91 xchg cx, ax 0 00004813 89D3 mov bx, dx 0 00004815 8A46F8 mov al, byte ptr [bp-8] 0 00004818 8846FC mov byte ptr [bp-4], al 0 0000481B 8A46FC mov al, byte ptr [bp-4] 0 0000481E 30E4 xor ah, ah 0 00004820 89FA mov dx, di 0 00004822 01C1 add cx, ax 0 00004824 11DA adc dx, bx 0 00004826 894C24 mov word ptr [si+36], cx 0 00004829 895426 mov word ptr [si+38], dx 0 0000482C E911FF jmp _.L13 198 _.L15: 0 0000482F B8ECFF mov ax, -20 0 00004832 E9D1FE jmp _.L8 201 .size _dir_read, .-_dir_read 202 .global _dir_write_update 203 .type _dir_write_update, @function 204 _dir_write_update: 0 00004835 56 push si 0 00004836 57 push di 0 00004837 55 push bp 0 00004838 89E5 mov bp, sp 0 0000483A 83EC08 sub sp, 8 0 0000483D 8B7E08 mov di, word ptr [bp+8] 0 00004840 837E0A00 cmp word ptr [bp+10], 0 0 00004844 740D je _.L18 0 00004846 8B05 mov ax, word ptr [di] 0 00004848 254040 and ax, 16448 0 0000484B 83F840 cmp ax, 64 0 0000484E 7503E9C300 je _.L19 217 _.L18: 0 00004853 31C0 xor ax, ax 0 00004855 50 push ax 0 00004856 C45D29 les bx, dword ptr [di+41] 0 00004859 268A07 mov al, byte ptr es:[bx] 0 0000485C 98 cbw 0 0000485D 50 push ax 0 0000485E FF7526 push word ptr [di+38] 0 00004861 FF7524 push word ptr [di+36] 0 00004864 E8[FEFF] call _getblk 0 00004867 8946FC mov word ptr [bp-4], ax 0 0000486A 09D0 or ax, dx 0 0000486C 8956FA mov word ptr [bp-6], dx 0 0000486F 7503E9AD00 je _.L17 0 00004874 89F8 mov ax, di 0 00004876 83C004 add ax, 4 0 00004879 8946FE mov word ptr [bp-2], ax 0 0000487C 50 push ax 0 0000487D E8E4FD call _swap_deleted 0 00004880 8A4528 mov al, byte ptr [di+40] 0 00004883 30E4 xor ah, ah 0 00004885 B105 mov cl, 5 0 00004887 D3E0 shl ax, cl 0 00004889 93 xchg bx, ax 0 0000488A 8B76FC mov si, word ptr [bp-4] 0 0000488D 8D5814 lea bx, [20+bx+si] 0 00004890 837E0A00 cmp word ptr [bp+10], 0 0 00004894 8B56FA mov dx, word ptr [bp-6] 0 00004897 7503E98D00 je _.L22 0 0000489C B80B00 mov ax, 11 0 0000489F 50 push ax 0 000048A0 16 push ss 0 000048A1 FF76FE push word ptr [bp-2] 0 000048A4 52 push dx 0 000048A5 8956F8 mov word ptr [bp-8], dx 0 000048A8 53 push bx 0 000048A9 895EFA mov word ptr [bp-6], bx 0 000048AC E8[FEFF] call _fmemcpy 0 000048AF 8A450F mov al, byte ptr [di+15] 0 000048B2 8B56F8 mov dx, word ptr [bp-8] 0 000048B5 8EC2 mov es, dx 0 000048B7 8B5EFA mov bx, word ptr [bp-6] 0 000048BA 2688470B mov byte ptr es:[bx+11], al 0 000048BE 8B451A mov ax, word ptr [di+26] 0 000048C1 26894716 mov word ptr es:[bx+22], ax 0 000048C5 8B451C mov ax, word ptr [di+28] 0 000048C8 26894718 mov word ptr es:[bx+24], ax 0 000048CC 8B451E mov ax, word ptr [di+30] 0 000048CF 2689471A mov word ptr es:[bx+26], ax 0 000048D3 C47529 les si, dword ptr [di+41] 0 000048D6 26837C0F00 cmp word ptr es:[si+15], 0 0 000048DB 7509 jne _.L23 0 000048DD 8B4518 mov ax, word ptr [di+24] 0 000048E0 8EC2 mov es, dx 0 000048E2 26894714 mov word ptr es:[bx+20], ax 272 _.L23: 0 000048E6 8B4520 mov ax, word ptr [di+32] 0 000048E9 8B4D22 mov cx, word ptr [di+34] 0 000048EC 8EC2 mov es, dx 0 000048EE 2689471C mov word ptr es:[bx+28], ax 0 000048F2 26894F1E mov word ptr es:[bx+30], cx 278 _.L24: 0 000048F6 8956FA mov word ptr [bp-6], dx 0 000048F9 FF76FE push word ptr [bp-2] 0 000048FC E865FD call _swap_deleted 0 000048FF 8B56FA mov dx, word ptr [bp-6] 0 00004902 8EC2 mov es, dx 0 00004904 8B5EFC mov bx, word ptr [bp-4] 0 00004907 268A4705 mov al, byte ptr es:[bx+5] 0 0000490B 8846FE mov byte ptr [bp-2], al 0 0000490E 24F5 and al, -11 0 00004910 0C64 or al, 100 0 00004912 26884705 mov byte ptr es:[bx+5], al 290 _.L19: 0 00004916 C45D29 les bx, dword ptr [di+41] 0 00004919 268A07 mov al, byte ptr es:[bx] 0 0000491C 98 cbw 0 0000491D 50 push ax 0 0000491E E8[FEFF] call _flush_buffers 296 _.L17: 0 00004921 89EC mov sp, bp 0 00004923 5D pop bp 0 00004924 5F pop di 0 00004925 5E pop si 0 00004926 C20400 ret 4 302 _.L22: 0 00004929 B82000 mov ax, 32 0 0000492C 50 push ax 0 0000492D 16 push ss 0 0000492E FF76FE push word ptr [bp-2] 0 00004931 52 push dx 0 00004932 8956FA mov word ptr [bp-6], dx 0 00004935 53 push bx 0 00004936 E8[FEFF] call _fmemcpy 0 00004939 8B56FA mov dx, word ptr [bp-6] 0 0000493C EBB8 jmp _.L24 313 .size _dir_write_update, .-_dir_write_update 314 .global _dos_findnext 315 .type _dos_findnext, @function 316 _dos_findnext: 0 0000493E 56 push si 0 0000493F 57 push di 0 00004940 55 push bp 0 00004941 89E5 mov bp, sp 0 00004943 1E push ds 0 00004944 BF[0000] mov di, offset _sda_tmp_dm 0 00004947 8A05 mov al, byte ptr [di] 0 00004949 30E4 xor ah, ah 0 0000494B 50 push ax 0 0000494C E8[FEFF] call _get_dpb 0 0000494F BE[0000] mov si, offset _fnode 0 00004952 894429 mov word ptr [si+41], ax 0 00004955 89542B mov word ptr [si+43], dx 0 00004958 52 push dx 0 00004959 50 push ax 0 0000495A E8[FEFF] call _media_check 0 0000495D 85C0 test ax, ax 0 0000495F 7D09 jge _.L34 335 _.L41: 0 00004961 B8EEFF mov ax, -18 337 _.L33: 0 00004964 89EC mov sp, bp 0 00004966 5D pop bp 0 00004967 5F pop di 0 00004968 5E pop si 0 00004969 C3 ret 343 _.L34: 0 0000496A FF36[1100] push word ptr [_sda_tmp_dm+17] 0 0000496E FF36[0F00] push word ptr [_sda_tmp_dm+15] 0 00004972 56 push si 0 00004973 E8[FEFF] call _dir_init_fnode 348 _.L36: 0 00004976 56 push si 0 00004977 E8[FEFF] call _dir_read 0 0000497A 83F801 cmp ax, 1 0 0000497D 75E2 jne _.L41 0 0000497F FF450D inc word ptr [di+13] 0 00004982 807C0405 cmp byte ptr [si+4], 5 0 00004986 74EE je _.L36 0 00004988 8B440F mov ax, word ptr [si+15] 0 0000498B F7D0 not ax 0 0000498D A80F test al, 15 0 0000498F 74E5 je _.L36 0 00004991 B80B00 mov ax, 11 0 00004994 50 push ax 0 00004995 BA[0400] mov dx, offset _fnode+4 0 00004998 52 push dx 0 00004999 8956FE mov word ptr [bp-2], dx 0 0000499C B8[0100] mov ax, offset _sda_tmp_dm+1 0 0000499F 50 push ax 0 000049A0 E8[FEFF] call _fcmp_wild 0 000049A3 85C0 test ax, ax 0 000049A5 8B56FE mov dx, word ptr [bp-2] 0 000049A8 74CC je _.L36 0 000049AA 8A450C mov al, byte ptr [di+12] 0 000049AD 249E and al, -98 0 000049AF 3C08 cmp al, 8 0 000049B1 8A640F mov ah, byte ptr [si+15] 0 000049B4 8866FE mov byte ptr [bp-2], ah 0 000049B7 7516 jne _.L38 0 000049B9 F646FE08 test byte ptr [bp-2], 8 0 000049BD 74B7 je _.L36 379 _.L39: 0 000049BF B82000 mov ax, 32 0 000049C2 50 push ax 0 000049C3 52 push dx 0 000049C4 B8[0000] mov ax, offset _SearchDir 0 000049C7 50 push ax 0 000049C8 E8[FEFF] call _memcpy 0 000049CB 31C0 xor ax, ax 0 000049CD EB95 jmp _.L33 388 _.L38: 0 000049CF 8A66FE mov ah, byte ptr [bp-2] 0 000049D2 80E41E and ah, 30 0 000049D5 8866FE mov byte ptr [bp-2], ah 0 000049D8 C646FF00 mov byte ptr [bp-1], 0 0 000049DC 30E4 xor ah, ah 0 000049DE F7D0 not ax 0 000049E0 8546FE test ax, word ptr [bp-2] 0 000049E3 7591 jne _.L36 0 000049E5 EBD8 jmp _.L39 398 .size _dos_findnext, .-_dos_findnext 399 .global _dos_findfirst 400 .type _dos_findfirst, @function 401 _dos_findfirst: 0 000049E7 56 push si 0 000049E8 55 push bp 0 000049E9 89E5 mov bp, sp 0 000049EB 8B7608 mov si, word ptr [bp+8] 0 000049EE 807C0300 cmp byte ptr [si+3], 0 0 000049F2 7438 je _.L55 0 000049F4 B8[0000] mov ax, offset _fnode 0 000049F7 50 push ax 0 000049F8 56 push si 0 000049F9 E8[FEFF] call _split_path 0 000049FC 85C0 test ax, ax 0 000049FE 7431 je _.L56 0 00004A00 8B5606 mov dx, word ptr [bp+6] 0 00004A03 83E29E and dx, -98 0 00004A06 83FA08 cmp dx, 8 0 00004A09 7508 jne _.L54 0 00004A0B 31D2 xor dx, dx 0 00004A0D 52 push dx 0 00004A0E 52 push dx 0 00004A0F 50 push ax 0 00004A10 E8[FEFF] call _dir_init_fnode 423 _.L54: 0 00004A13 BB[0000] mov bx, offset _sda_tmp_dm 0 00004A16 8A04 mov al, byte ptr [si] 0 00004A18 04BF add al, -65 0 00004A1A 8807 mov byte ptr [bx], al 0 00004A1C 8A4606 mov al, byte ptr [bp+6] 0 00004A1F 88470C mov byte ptr [bx+12], al 0 00004A22 E8[FEFF] call _dos_findnext 431 _.L52: 0 00004A25 89EC mov sp, bp 0 00004A27 5D pop bp 0 00004A28 5E pop si 0 00004A29 C20400 ret 4 436 _.L55: 0 00004A2C B8EEFF mov ax, -18 0 00004A2F EBF4 jmp _.L52 439 _.L56: 0 00004A31 B8FDFF mov ax, -3 0 00004A34 EBEF jmp _.L52 442 .size _dos_findfirst, .-_dos_findfirst 443 .global _ConvertName83ToNameSZ 444 .type _ConvertName83ToNameSZ, @function 445 _ConvertName83ToNameSZ: 0 00004A36 56 push si 0 00004A37 57 push di 0 00004A38 55 push bp 0 00004A39 89E5 mov bp, sp 0 00004A3B 83EC08 sub sp, 8 0 00004A3E 8B7608 mov si, word ptr [bp+8] 0 00004A41 8B460A mov ax, word ptr [bp+10] 0 00004A44 8946FE mov word ptr [bp-2], ax 0 00004A47 C47E0C les di, dword ptr [bp+12] 0 00004A4A 268A0D mov cl, byte ptr es:[di] 0 00004A4D 884EF9 mov byte ptr [bp-7], cl 0 00004A50 B80800 mov ax, 8 0 00004A53 50 push ax 0 00004A54 8946FA mov word ptr [bp-6], ax 0 00004A57 06 push es 0 00004A58 8C46FC mov word ptr [bp-4], es 0 00004A5B 57 push di 0 00004A5C FF76FE push word ptr [bp-2] 0 00004A5F 56 push si 0 00004A60 E8[FEFF] call _fmemcpy 0 00004A63 BA0900 mov dx, 9 0 00004A66 C446FA les ax, dword ptr [bp-6] 0 00004A69 8A4EF9 mov cl, byte ptr [bp-7] 469 _.L59: 0 00004A6C 48 dec ax 0 00004A6D 4A dec dx 0 00004A6E 7505 jne _.L61 0 00004A70 B8FFFF mov ax, -1 0 00004A73 EB0C jmp _.L60 475 _.L61: 0 00004A75 89C3 mov bx, ax 0 00004A77 01F3 add bx, si 0 00004A79 8E5EFE mov ds, word ptr [bp-2] 0 00004A7C 803F20 cmp byte ptr [bx], 32 0 00004A7F 74EB je _.L59 481 _.L60: 0 00004A81 93 xchg bx, ax 0 00004A82 8D5801 lea bx, [1+bx+si] 0 00004A85 89DE mov si, bx 0 00004A87 80F92E cmp cl, 46 0 00004A8A 7412 je _.L62 0 00004A8C 83C708 add di, 8 0 00004A8F 897EFC mov word ptr [bp-4], di 0 00004A92 B90400 mov cx, 4 0 00004A95 B80300 mov ax, 3 491 _.L63: 0 00004A98 89C2 mov dx, ax 0 00004A9A 4A dec dx 0 00004A9B 49 dec cx 0 00004A9C 7511 jne _.L65 496 _.L62: 0 00004A9E 8E46FE mov es, word ptr [bp-2] 0 00004AA1 26C60400 mov byte ptr es:[si], 0 0 00004AA5 89EC mov sp, bp 0 00004AA7 5D pop bp 0 00004AA8 5F pop di 0 00004AA9 5E pop si 0 00004AAA 16 push ss 0 00004AAB 1F pop ds 0 00004AAC C20800 ret 8 506 _.L65: 0 00004AAF 89D7 mov di, dx 0 00004AB1 037EFC add di, word ptr [bp-4] 0 00004AB4 26803D20 cmp byte ptr es:[di], 32 0 00004AB8 7503 jne _.L64 0 00004ABA 92 xchg dx, ax 0 00004ABB EBDB jmp _.L63 513 _.L64: 0 00004ABD 8D7701 lea si, [1+bx] 0 00004AC0 8E5EFE mov ds, word ptr [bp-2] 0 00004AC3 C6072E mov byte ptr [bx], 46 0 00004AC6 50 push ax 0 00004AC7 8946FA mov word ptr [bp-6], ax 0 00004ACA 06 push es 0 00004ACB FF76FC push word ptr [bp-4] 0 00004ACE FF76FE push word ptr [bp-2] 0 00004AD1 56 push si 0 00004AD2 16 push ss 0 00004AD3 1F pop ds 0 00004AD4 E8[FEFF] call _fmemcpy 0 00004AD7 8B46FA mov ax, word ptr [bp-6] 0 00004ADA 01C6 add si, ax 0 00004ADC EBC0 jmp _.L62 529 .size _ConvertName83ToNameSZ, .-_ConvertName83ToNameSZ 530 .global _ConvertNameSZToName83 531 .type _ConvertNameSZToName83, @function 532 _ConvertNameSZToName83: 0 00004ADE 56 push si 0 00004ADF 57 push di 0 00004AE0 55 push bp 0 00004AE1 89E5 mov bp, sp 0 00004AE3 8B7E08 mov di, word ptr [bp+8] 0 00004AE6 B80B00 mov ax, 11 0 00004AE9 50 push ax 0 00004AEA B82000 mov ax, 32 0 00004AED 50 push ax 0 00004AEE 57 push di 0 00004AEF E8[FEFF] call _memset 0 00004AF2 8B460A mov ax, word ptr [bp+10] 0 00004AF5 31DB xor bx, bx 546 _.L74: 0 00004AF7 89C6 mov si, ax 0 00004AF9 8A14 mov dl, byte ptr [si] 0 00004AFB 80FA2E cmp dl, 46 0 00004AFE 741A je _.L75 0 00004B00 84D2 test dl, dl 0 00004B02 740E je _.L71 0 00004B04 80FA5C cmp dl, 92 0 00004B07 7409 je _.L71 0 00004B09 8811 mov byte ptr [bx+di], dl 556 _.L72: 0 00004B0B 43 inc bx 0 00004B0C 40 inc ax 0 00004B0D 83FB0A cmp bx, 10 0 00004B10 7EE5 jle _.L74 561 _.L71: 0 00004B12 89EC mov sp, bp 0 00004B14 5D pop bp 0 00004B15 5F pop di 0 00004B16 5E pop si 0 00004B17 C20400 ret 4 567 _.L75: 0 00004B1A BB0700 mov bx, 7 0 00004B1D EBEC jmp _.L72 570 .size _ConvertNameSZToName83, .-_ConvertNameSZToName83 571 .global _dir_open 572 .type _dir_open, @function 573 _dir_open: 0 00004B1F 56 push si 0 00004B20 57 push di 0 00004B21 55 push bp 0 00004B22 89E5 mov bp, sp 0 00004B24 1E push ds 0 00004B25 1E push ds 0 00004B26 8B7E08 mov di, word ptr [bp+8] 0 00004B29 8B760C mov si, word ptr [bp+12] 0 00004B2C 8A05 mov al, byte ptr [di] 0 00004B2E 98 cbw 0 00004B2F 83C0BF add ax, -65 0 00004B32 50 push ax 0 00004B33 E8[FEFF] call _get_dpb 0 00004B36 894429 mov word ptr [si+41], ax 0 00004B39 89542B mov word ptr [si+43], dx 0 00004B3C 31C0 xor ax, ax 0 00004B3E 50 push ax 0 00004B3F 50 push ax 0 00004B40 8946FE mov word ptr [bp-2], ax 0 00004B43 56 push si 0 00004B44 E8[FEFF] call _dir_init_fnode 0 00004B47 8B5C02 mov bx, word ptr [si+2] 0 00004B4A 8B46FE mov ax, word ptr [bp-2] 0 00004B4D 89470D mov word ptr [bx+13], ax 0 00004B50 83C702 add di, 2 0 00004B53 8B4402 mov ax, word ptr [si+2] 0 00004B56 40 inc ax 0 00004B57 8946FE mov word ptr [bp-2], ax 602 _.L85: 0 00004B5A 803D00 cmp byte ptr [di], 0 0 00004B5D 741C je _.L99 0 00004B5F 8D4501 lea ax, [1+di] 0 00004B62 807D0100 cmp byte ptr [di+1], 0 0 00004B66 7413 je _.L99 0 00004B68 50 push ax 0 00004B69 FF76FE push word ptr [bp-2] 0 00004B6C E8[FEFF] call _ConvertNameSZToName83 0 00004B6F 97 xchg di, ax 0 00004B70 837E0A00 cmp word ptr [bp+10], 0 0 00004B74 741A je _.L101 0 00004B76 803D00 cmp byte ptr [di], 0 0 00004B79 7515 jne _.L101 616 _.L99: 0 00004B7B 96 xchg si, ax 0 00004B7C 89EC mov sp, bp 0 00004B7E 5D pop bp 0 00004B7F 5F pop di 0 00004B80 5E pop si 0 00004B81 C20600 ret 6 623 _.L93: 0 00004B84 F6440F08 test byte ptr [si+15], 8 0 00004B88 7413 je _.L90 626 _.L92: 0 00004B8A 8B5C02 mov bx, word ptr [si+2] 0 00004B8D FF470D inc word ptr [bx+13] 629 _.L101: 0 00004B90 56 push si 0 00004B91 E8[FEFF] call _dir_read 0 00004B94 83F801 cmp ax, 1 0 00004B97 74EB je _.L93 634 _.L95: 0 00004B99 31F6 xor si, si 0 00004B9B EBDE jmp _.L99 637 _.L90: 0 00004B9D 8D5404 lea dx, [4+si] 0 00004BA0 52 push dx 0 00004BA1 8956FC mov word ptr [bp-4], dx 0 00004BA4 FF76FE push word ptr [bp-2] 0 00004BA7 E8[FEFF] call _fcbmatch 0 00004BAA 85C0 test ax, ax 0 00004BAC 8B56FC mov dx, word ptr [bp-4] 0 00004BAF 74D9 je _.L92 0 00004BB1 F6440F10 test byte ptr [si+15], 16 0 00004BB5 74E2 je _.L95 0 00004BB7 52 push dx 0 00004BB8 FF742B push word ptr [si+43] 0 00004BBB FF7429 push word ptr [si+41] 0 00004BBE E8[FEFF] call _getdstart 0 00004BC1 52 push dx 0 00004BC2 50 push ax 0 00004BC3 56 push si 0 00004BC4 E8[FEFF] call _dir_init_fnode 0 00004BC7 8B5C02 mov bx, word ptr [si+2] 0 00004BCA C7470D0000 mov word ptr [bx+13], 0 0 00004BCF EB89 jmp _.L85 659 .size _dir_open, .-_dir_open 660 .ident "GCC: (GNU) 6.3.0" === Trace listing source: fatfs.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=fatfs.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/cc4hA1hs.s output file : fatfs.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:21.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _sft_to_fnode, @function 7 _sft_to_fnode: 0 00004BD1 56 push si 0 00004BD2 57 push di 0 00004BD3 55 push bp 0 00004BD4 89E5 mov bp, sp 0 00004BD6 1E push ds 0 00004BD7 1E push ds 0 00004BD8 FF7608 push word ptr [bp+8] 0 00004BDB E8[FEFF] call _idx_to_sft 0 00004BDE 93 xchg bx, ax 0 00004BDF BE[0000] mov si, offset _fnode 0 00004BE2 8A4608 mov al, byte ptr [bp+8] 0 00004BE5 884439 mov byte ptr [si+57], al 0 00004BE8 8EC2 mov es, dx 0 00004BEA 268B4705 mov ax, word ptr es:[bx+5] 0 00004BEE 8904 mov word ptr [si], ax 0 00004BF0 268A4704 mov al, byte ptr es:[bx+4] 0 00004BF4 88440F mov byte ptr [si+15], al 0 00004BF7 B80B00 mov ax, 11 0 00004BFA 50 push ax 0 00004BFB 8D4720 lea ax, [32+bx] 0 00004BFE 895EFC mov word ptr [bp-4], bx 0 00004C01 52 push dx 0 00004C02 8956FE mov word ptr [bp-2], dx 0 00004C05 50 push ax 0 00004C06 16 push ss 0 00004C07 B8[0400] mov ax, offset _fnode+4 0 00004C0A 50 push ax 0 00004C0B E8[FEFF] call _fmemcpy 0 00004C0E 8B56FE mov dx, word ptr [bp-2] 0 00004C11 8EC2 mov es, dx 0 00004C13 8B5EFC mov bx, word ptr [bp-4] 0 00004C16 268B470D mov ax, word ptr es:[bx+13] 0 00004C1A 89441A mov word ptr [si+26], ax 0 00004C1D 268B470F mov ax, word ptr es:[bx+15] 0 00004C21 89441C mov word ptr [si+28], ax 0 00004C24 268B4711 mov ax, word ptr es:[bx+17] 0 00004C28 268B4F13 mov cx, word ptr es:[bx+19] 0 00004C2C 894420 mov word ptr [si+32], ax 0 00004C2F 894C22 mov word ptr [si+34], cx 0 00004C32 268B7F07 mov di, word ptr es:[bx+7] 0 00004C36 268B4709 mov ax, word ptr es:[bx+9] 0 00004C3A 897C29 mov word ptr [si+41], di 0 00004C3D 89442B mov word ptr [si+43], ax 0 00004C40 268E5F2B mov ds, word ptr es:[bx+43] 0 00004C44 268B4F2D mov cx, word ptr es:[bx+45] 0 00004C48 368C5C1E mov word ptr ss:[si+30], ds 0 00004C4C 8EC0 mov es, ax 0 00004C4E 26837D0F00 cmp word ptr es:[di+15], 0 0 00004C53 7504 jne _.L2 0 00004C55 36894C18 mov word ptr ss:[si+24], cx 58 _.L2: 0 00004C59 8EC2 mov es, dx 0 00004C5B 268A471F mov al, byte ptr es:[bx+31] 0 00004C5F 36884428 mov byte ptr ss:[si+40], al 0 00004C63 268B471B mov ax, word ptr es:[bx+27] 0 00004C67 268B4F1D mov cx, word ptr es:[bx+29] 0 00004C6B 36894424 mov word ptr ss:[si+36], ax 0 00004C6F 36894C26 mov word ptr ss:[si+38], cx 0 00004C73 268B4715 mov ax, word ptr es:[bx+21] 0 00004C77 268B4F17 mov cx, word ptr es:[bx+23] 0 00004C7B 3689442D mov word ptr ss:[si+45], ax 0 00004C7F 36894C2F mov word ptr ss:[si+47], cx 0 00004C83 268B4735 mov ax, word ptr es:[bx+53] 0 00004C87 268B4F37 mov cx, word ptr es:[bx+55] 0 00004C8B 36894435 mov word ptr ss:[si+53], ax 0 00004C8F 36894C37 mov word ptr ss:[si+55], cx 0 00004C93 268B470B mov ax, word ptr es:[bx+11] 0 00004C97 268B5719 mov dx, word ptr es:[bx+25] 0 00004C9B 36895431 mov word ptr ss:[si+49], dx 0 00004C9F 36894433 mov word ptr ss:[si+51], ax 0 00004CA3 B8[0000] mov ax, offset _fnode 0 00004CA6 89EC mov sp, bp 0 00004CA8 5D pop bp 0 00004CA9 5F pop di 0 00004CAA 5E pop si 0 00004CAB 16 push ss 0 00004CAC 1F pop ds 0 00004CAD C20200 ret 2 86 .size _sft_to_fnode, .-_sft_to_fnode 87 .type _find_free, @function 88 _find_free: 0 00004CB0 56 push si 0 00004CB1 55 push bp 0 00004CB2 89E5 mov bp, sp 0 00004CB4 8B7606 mov si, word ptr [bp+6] 93 _.L5: 0 00004CB7 56 push si 0 00004CB8 E8[FEFF] call _dir_read 0 00004CBB 83F801 cmp ax, 1 0 00004CBE 740F je _.L7 0 00004CC0 F7D0 not ax 0 00004CC2 D1E0 shl ax, 1 0 00004CC4 19C0 sbb ax, ax 0 00004CC6 F7D8 neg ax 102 _.L4: 0 00004CC8 89EC mov sp, bp 0 00004CCA 5D pop bp 0 00004CCB 5E pop si 0 00004CCC C20200 ret 2 107 _.L7: 0 00004CCF 807C0405 cmp byte ptr [si+4], 5 0 00004CD3 74F3 je _.L4 0 00004CD5 8B5C02 mov bx, word ptr [si+2] 0 00004CD8 FF470D inc word ptr [bx+13] 0 00004CDB EBDA jmp _.L5 113 .size _find_free, .-_find_free 114 .type _wipe_out_clusters, @function 115 _wipe_out_clusters: 0 00004CDD 56 push si 0 00004CDE 57 push di 0 00004CDF 55 push bp 0 00004CE0 89E5 mov bp, sp 0 00004CE2 83EC08 sub sp, 8 0 00004CE5 8B5E08 mov bx, word ptr [bp+8] 0 00004CE8 8B460A mov ax, word ptr [bp+10] 0 00004CEB 8946FE mov word ptr [bp-2], ax 0 00004CEE 8B760C mov si, word ptr [bp+12] 0 00004CF1 8B7E0E mov di, word ptr [bp+14] 126 _.L11: 0 00004CF4 83FEFF cmp si, -1 0 00004CF7 751D jne _.L22 0 00004CF9 81FFFF0F cmp di, 4095 0 00004CFD 7517 jne _.L22 0 00004CFF 8E46FE mov es, word ptr [bp-2] 0 00004D02 26837F0F00 cmp word ptr es:[bx+15], 0 0 00004D07 7505 jne _.L10 0 00004D09 06 push es 0 00004D0A 53 push bx 0 00004D0B E8[FEFF] call _write_fsinfo 137 _.L10: 0 00004D0E 89EC mov sp, bp 0 00004D10 5D pop bp 0 00004D11 5F pop di 0 00004D12 5E pop si 0 00004D13 C20800 ret 8 143 _.L22: 0 00004D16 57 push di 0 00004D17 56 push si 0 00004D18 FF76FE push word ptr [bp-2] 0 00004D1B 53 push bx 0 00004D1C 895EFA mov word ptr [bp-6], bx 0 00004D1F E8[FEFF] call _next_cluster 0 00004D22 89C1 mov cx, ax 0 00004D24 8956FC mov word ptr [bp-4], dx 0 00004D27 85D2 test dx, dx 0 00004D29 8B5EFA mov bx, word ptr [bp-6] 0 00004D2C 7505 jne _.L12 0 00004D2E 83F801 cmp ax, 1 0 00004D31 76DB jbe _.L10 157 _.L12: 0 00004D33 894EF8 mov word ptr [bp-8], cx 0 00004D36 31C0 xor ax, ax 0 00004D38 50 push ax 0 00004D39 50 push ax 0 00004D3A 57 push di 0 00004D3B 56 push si 0 00004D3C FF76FE push word ptr [bp-2] 0 00004D3F 53 push bx 0 00004D40 895EFA mov word ptr [bp-6], bx 0 00004D43 E8[FEFF] call _link_fat 0 00004D46 09D0 or ax, dx 0 00004D48 75C4 jne _.L10 0 00004D4A 8E46FE mov es, word ptr [bp-2] 0 00004D4D 8B5EFA mov bx, word ptr [bp-6] 0 00004D50 26837F0F00 cmp word ptr es:[bx+15], 0 0 00004D55 8B4EF8 mov cx, word ptr [bp-8] 0 00004D58 752C jne _.L16 0 00004D5A 268B5739 mov dx, word ptr es:[bx+57] 0 00004D5E 268B473B mov ax, word ptr es:[bx+59] 0 00004D62 39F8 cmp ax, di 0 00004D64 770A ja _.L23 0 00004D66 7504 jne _.L20 0 00004D68 39F2 cmp dx, si 0 00004D6A 7704 ja _.L23 182 _.L20: 0 00004D6C 09C2 or dx, ax 0 00004D6E 750E jne _.L17 185 _.L23: 0 00004D70 8E46FE mov es, word ptr [bp-2] 0 00004D73 26897739 mov word ptr es:[bx+57], si 0 00004D77 8E46FE mov es, word ptr [bp-2] 0 00004D7A 26897F3B mov word ptr es:[bx+59], di 190 _.L17: 0 00004D7E 89CE mov si, cx 0 00004D80 8B7EFC mov di, word ptr [bp-4] 0 00004D83 E96EFF jmp _.L11 194 _.L16: 0 00004D86 8E46FE mov es, word ptr [bp-2] 0 00004D89 268B471D mov ax, word ptr es:[bx+29] 0 00004D8D 85C0 test ax, ax 0 00004D8F 7404 je _.L21 0 00004D91 39F0 cmp ax, si 0 00004D93 76E9 jbe _.L17 201 _.L21: 0 00004D95 8E46FE mov es, word ptr [bp-2] 0 00004D98 2689771D mov word ptr es:[bx+29], si 0 00004D9C EBE0 jmp _.L17 205 .size _wipe_out_clusters, .-_wipe_out_clusters 206 .type _find_fat_free, @function 207 _find_fat_free: 0 00004D9E 56 push si 0 00004D9F 57 push di 0 00004DA0 55 push bp 0 00004DA1 89E5 mov bp, sp 0 00004DA3 83EC0C sub sp, 12 0 00004DA6 8B7608 mov si, word ptr [bp+8] 0 00004DA9 8B5C29 mov bx, word ptr [si+41] 0 00004DAC 8B442B mov ax, word ptr [si+43] 0 00004DAF 8946FE mov word ptr [bp-2], ax 0 00004DB2 8EC0 mov es, ax 0 00004DB4 268B470D mov ax, word ptr es:[bx+13] 0 00004DB8 8946FC mov word ptr [bp-4], ax 0 00004DBB C746FA0000 mov word ptr [bp-6], 0 0 00004DC0 26837F0F00 cmp word ptr es:[bx+15], 0 0 00004DC5 7403E99A00 jne _.L34 0 00004DCA 268B7F39 mov di, word ptr es:[bx+57] 0 00004DCE 268B4F3B mov cx, word ptr es:[bx+59] 0 00004DD2 89F8 mov ax, di 0 00004DD4 09C8 or ax, cx 0 00004DD6 7504 jne _.L35 0 00004DD8 BF0200 mov di, 2 0 00004DDB 91 xchg cx, ax 230 _.L35: 0 00004DDC 8E46FE mov es, word ptr [bp-2] 0 00004DDF 268B472D mov ax, word ptr es:[bx+45] 0 00004DE3 8946FC mov word ptr [bp-4], ax 0 00004DE6 268B472F mov ax, word ptr es:[bx+47] 0 00004DEA 8946FA mov word ptr [bp-6], ax 236 _.L37: 0 00004DED 89FE mov si, di 0 00004DEF 89CA mov dx, cx 239 _.L48: 0 00004DF1 894EF4 mov word ptr [bp-12], cx 0 00004DF4 52 push dx 0 00004DF5 8956F6 mov word ptr [bp-10], dx 0 00004DF8 56 push si 0 00004DF9 FF76FE push word ptr [bp-2] 0 00004DFC 53 push bx 0 00004DFD 895EF8 mov word ptr [bp-8], bx 0 00004E00 E8[FEFF] call _is_free_cluster 0 00004E03 85C0 test ax, ax 0 00004E05 8B5EF8 mov bx, word ptr [bp-8] 0 00004E08 8B56F6 mov dx, word ptr [bp-10] 0 00004E0B 756C jne _.L46 0 00004E0D 83C601 add si, 1 0 00004E10 83D200 adc dx, 0 0 00004E13 3B56FA cmp dx, word ptr [bp-6] 0 00004E16 8B4EF4 mov cx, word ptr [bp-12] 0 00004E19 7707 ja _.L47 0 00004E1B 750A jne _.L39 0 00004E1D 3B76FC cmp si, word ptr [bp-4] 0 00004E20 7605 jbe _.L39 260 _.L47: 0 00004E22 BE0200 mov si, 2 0 00004E25 31D2 xor dx, dx 263 _.L39: 0 00004E27 39F7 cmp di, si 0 00004E29 75C6 jne _.L48 0 00004E2B 39D1 cmp cx, dx 0 00004E2D 75C2 jne _.L48 0 00004E2F 31C0 xor ax, ax 0 00004E31 89C1 mov cx, ax 0 00004E33 BEFFFF mov si, -1 0 00004E36 BAFF0F mov dx, 4095 272 _.L38: 0 00004E39 8E46FE mov es, word ptr [bp-2] 0 00004E3C 26837F0F00 cmp word ptr es:[bx+15], 0 0 00004E41 753C jne _.L42 0 00004E43 8956FC mov word ptr [bp-4], dx 0 00004E46 26894739 mov word ptr es:[bx+57], ax 0 00004E4A 8E46FE mov es, word ptr [bp-2] 0 00004E4D 26894F3B mov word ptr es:[bx+59], cx 0 00004E51 FF76FE push word ptr [bp-2] 0 00004E54 53 push bx 0 00004E55 E8[FEFF] call _write_fsinfo 0 00004E58 8B56FC mov dx, word ptr [bp-4] 284 _.L33: 0 00004E5B 96 xchg si, ax 0 00004E5C 89EC mov sp, bp 0 00004E5E 5D pop bp 0 00004E5F 5F pop di 0 00004E60 5E pop si 0 00004E61 C20200 ret 2 291 _.L34: 0 00004E64 8E46FE mov es, word ptr [bp-2] 0 00004E67 268B7F1D mov di, word ptr es:[bx+29] 0 00004E6B 85FF test di, di 0 00004E6D 7405 je _.L45 296 _.L50: 0 00004E6F 31C9 xor cx, cx 0 00004E71 E979FF jmp _.L37 299 _.L45: 0 00004E74 BF0200 mov di, 2 0 00004E77 EBF6 jmp _.L50 302 _.L46: 0 00004E79 89F0 mov ax, si 0 00004E7B 89D1 mov cx, dx 0 00004E7D EBBA jmp _.L38 306 _.L42: 0 00004E7F 8E46FE mov es, word ptr [bp-2] 0 00004E82 2689471D mov word ptr es:[bx+29], ax 0 00004E86 EBD3 jmp _.L33 310 .size _find_fat_free, .-_find_fat_free === Switch to base=012B40h -> ".RODATA.STR1.1" 311 .section .rodata.str1.1,"aMS",@progbits,1 312 _.LC0: 0 0000191F 4641542063686169 .string "FAT chain size bad!\n" 0 00001927 6E2073697A652062 0 0000192F 6164210A00 === Switch to base=002270h -> ".TEXT" 314 .text 315 .type _extend, @function 316 _extend: 0 00004E88 56 push si 0 00004E89 57 push di 0 00004E8A 55 push bp 0 00004E8B 89E5 mov bp, sp 0 00004E8D 1E push ds 0 00004E8E 8B7608 mov si, word ptr [bp+8] 0 00004E91 56 push si 0 00004E92 E809FF call _find_fat_free 0 00004E95 89C7 mov di, ax 0 00004E97 89D1 mov cx, dx 0 00004E99 83F8FF cmp ax, -1 0 00004E9C 750E jne _.L52 0 00004E9E 81FAFF0F cmp dx, 4095 0 00004EA2 7508 jne _.L52 331 _.L61: 0 00004EA4 BFFFFF mov di, -1 0 00004EA7 B9FF0F mov cx, 4095 0 00004EAA EB39 jmp _.L51 335 _.L52: 0 00004EAC B8FF0F mov ax, 4095 0 00004EAF 50 push ax 0 00004EB0 B8FFFF mov ax, -1 0 00004EB3 50 push ax 0 00004EB4 51 push cx 0 00004EB5 894EFE mov word ptr [bp-2], cx 0 00004EB8 57 push di 0 00004EB9 FF742B push word ptr [si+43] 0 00004EBC FF7429 push word ptr [si+41] 0 00004EBF E8[FEFF] call _link_fat 0 00004EC2 09D0 or ax, dx 0 00004EC4 8B4EFE mov cx, word ptr [bp-2] 0 00004EC7 75DB jne _.L61 0 00004EC9 8B4435 mov ax, word ptr [si+53] 0 00004ECC 8B5437 mov dx, word ptr [si+55] 0 00004ECF 89C3 mov bx, ax 0 00004ED1 09D3 or bx, dx 0 00004ED3 751B jne _.L55 0 00004ED5 C45C29 les bx, dword ptr [si+41] 0 00004ED8 897C1E mov word ptr [si+30], di 0 00004EDB 26837F0F00 cmp word ptr es:[bx+15], 0 0 00004EE0 7503 jne _.L51 0 00004EE2 894C18 mov word ptr [si+24], cx 359 _.L51: 0 00004EE5 97 xchg di, ax 0 00004EE6 89CA mov dx, cx 0 00004EE8 89EC mov sp, bp 0 00004EEA 5D pop bp 0 00004EEB 5F pop di 0 00004EEC 5E pop si 0 00004EED C20200 ret 2 367 _.L55: 0 00004EF0 894EFE mov word ptr [bp-2], cx 0 00004EF3 52 push dx 0 00004EF4 50 push ax 0 00004EF5 FF742B push word ptr [si+43] 0 00004EF8 FF7429 push word ptr [si+41] 0 00004EFB E8[FEFF] call _next_cluster 0 00004EFE 83F8FF cmp ax, -1 0 00004F01 8B4EFE mov cx, word ptr [bp-2] 0 00004F04 7506 jne _.L58 0 00004F06 81FAFF0F cmp dx, 4095 0 00004F0A 7409 je _.L59 379 _.L58: 0 00004F0C B8[0000] mov ax, offset _.LC0 0 00004F0F 50 push ax 0 00004F10 E8[FEFF] call _put_string 0 00004F13 EB8F jmp _.L61 384 _.L59: 0 00004F15 51 push cx 0 00004F16 894EFE mov word ptr [bp-2], cx 0 00004F19 57 push di 0 00004F1A FF7437 push word ptr [si+55] 0 00004F1D FF7435 push word ptr [si+53] 0 00004F20 FF742B push word ptr [si+43] 0 00004F23 FF7429 push word ptr [si+41] 0 00004F26 E8[FEFF] call _link_fat 0 00004F29 09D0 or ax, dx 0 00004F2B 8B4EFE mov cx, word ptr [bp-2] 0 00004F2E 7403E971FF jne _.L61 0 00004F33 EBB0 jmp _.L51 397 .size _extend, .-_extend 398 .type _rqblockio, @function 399 _rqblockio: 0 00004F35 56 push si 0 00004F36 57 push di 0 00004F37 55 push bp 0 00004F38 89E5 mov bp, sp 0 00004F3A 1E push ds 0 00004F3B 1E push ds 0 00004F3C 8B5E0A mov bx, word ptr [bp+10] 0 00004F3F 8B460C mov ax, word ptr [bp+12] 0 00004F42 8946FE mov word ptr [bp-2], ax 0 00004F45 31FF xor di, di 410 _.L63: 411 _.L64: 0 00004F47 BE[0000] mov si, offset _MediaReqHdr 0 00004F4A C606[0000]1E mov byte ptr [_MediaReqHdr], 30 0 00004F4F 8E46FE mov es, word ptr [bp-2] 0 00004F52 268A4701 mov al, byte ptr es:[bx+1] 0 00004F56 884401 mov byte ptr [si+1], al 0 00004F59 8A4608 mov al, byte ptr [bp+8] 0 00004F5C 884402 mov byte ptr [si+2], al 0 00004F5F 268A4717 mov al, byte ptr es:[bx+23] 0 00004F63 88440D mov byte ptr [si+13], al 0 00004F66 893E[0300] mov word ptr [_MediaReqHdr+3], di 0 00004F6A 807E0802 cmp byte ptr [bp+8], 2 0 00004F6E 7508 jne _.L65 0 00004F70 C7440E[0000] mov word ptr [si+14], offset _DiskTransferBuffer 0 00004F75 8C5410 mov word ptr [si+16], ss 426 _.L65: 0 00004F78 8E46FE mov es, word ptr [bp-2] 0 00004F7B 26FF7715 push word ptr es:[bx+21] 0 00004F7F 26FF7713 push word ptr es:[bx+19] 0 00004F83 895EFC mov word ptr [bp-4], bx 0 00004F86 16 push ss 0 00004F87 B8[0000] mov ax, offset _MediaReqHdr 0 00004F8A 50 push ax 0 00004F8B E8[FEFF] call _execrh 0 00004F8E 8B4403 mov ax, word ptr [si+3] 0 00004F91 85C0 test ax, ax 0 00004F93 8B5EFC mov bx, word ptr [bp-4] 0 00004F96 7C05 jl _.L76 0 00004F98 F6C401 test ah, 1 0 00004F9B 753B jne _.L70 441 _.L76: 0 00004F9D 57 push di 0 00004F9E 8E46FE mov es, word ptr [bp-2] 0 00004FA1 26FF7715 push word ptr es:[bx+21] 0 00004FA5 26FF7713 push word ptr es:[bx+19] 0 00004FA9 268A07 mov al, byte ptr es:[bx] 0 00004FAC 895EFC mov word ptr [bp-4], bx 0 00004FAF 98 cbw 0 00004FB0 50 push ax 0 00004FB1 B8[0000] mov ax, offset _MediaReqHdr 0 00004FB4 50 push ax 0 00004FB5 E8[FEFF] call _block_error 0 00004FB8 83F801 cmp ax, 1 0 00004FBB 8B5EFC mov bx, word ptr [bp-4] 0 00004FBE 7487 je _.L64 0 00004FC0 7F0C jg _.L68 0 00004FC2 85C0 test ax, ax 0 00004FC4 75D7 jne _.L76 459 _.L62: 0 00004FC6 89EC mov sp, bp 0 00004FC8 5D pop bp 0 00004FC9 5F pop di 0 00004FCA 5E pop si 0 00004FCB C20600 ret 6 465 _.L68: 0 00004FCE 83F803 cmp ax, 3 0 00004FD1 7FCA jg _.L76 0 00004FD3 B8F1FF mov ax, -15 0 00004FD6 EBEE jmp _.L62 470 _.L70: 0 00004FD8 31C0 xor ax, ax 0 00004FDA EBEA jmp _.L62 473 .size _rqblockio, .-_rqblockio 474 .type _wipe_out, @function 475 _wipe_out: 0 00004FDC 56 push si 0 00004FDD 55 push bp 0 00004FDE 89E5 mov bp, sp 0 00004FE0 8B5E06 mov bx, word ptr [bp+6] 0 00004FE3 C47729 les si, dword ptr [bx+41] 0 00004FE6 8CC2 mov dx, es 0 00004FE8 26837C0F00 cmp word ptr es:[si+15], 0 0 00004FED 8B4F1E mov cx, word ptr [bx+30] 0 00004FF0 7418 je _.L82 0 00004FF2 31C0 xor ax, ax 486 _.L83: 0 00004FF4 89CB mov bx, cx 0 00004FF6 09C3 or bx, ax 0 00004FF8 85DB test bx, bx 0 00004FFA 7407 je _.L81 0 00004FFC 50 push ax 0 00004FFD 51 push cx 0 00004FFE 52 push dx 0 00004FFF 56 push si 0 00005000 E8DAFC call _wipe_out_clusters 496 _.L81: 0 00005003 89EC mov sp, bp 0 00005005 5D pop bp 0 00005006 5E pop si 0 00005007 C20200 ret 2 501 _.L82: 0 0000500A 8B4718 mov ax, word ptr [bx+24] 0 0000500D EBE5 jmp _.L83 504 .size _wipe_out, .-_wipe_out 505 .type _fnode_to_sft, @function 506 _fnode_to_sft: 0 0000500F 56 push si 0 00005010 57 push di 0 00005011 55 push bp 0 00005012 89E5 mov bp, sp 0 00005014 1E push ds 0 00005015 1E push ds 0 00005016 8B7608 mov si, word ptr [bp+8] 0 00005019 8A4439 mov al, byte ptr [si+57] 0 0000501C 30E4 xor ah, ah 0 0000501E 50 push ax 0 0000501F E8[FEFF] call _idx_to_sft 0 00005022 93 xchg bx, ax 0 00005023 8B04 mov ax, word ptr [si] 0 00005025 8EC2 mov es, dx 0 00005027 26894705 mov word ptr es:[bx+5], ax 0 0000502B 8A440F mov al, byte ptr [si+15] 0 0000502E 26884704 mov byte ptr es:[bx+4], al 0 00005032 B80B00 mov ax, 11 0 00005035 50 push ax 0 00005036 8D4404 lea ax, [4+si] 0 00005039 16 push ss 0 0000503A 50 push ax 0 0000503B 8D4720 lea ax, [32+bx] 0 0000503E 895EFC mov word ptr [bp-4], bx 0 00005041 52 push dx 0 00005042 8956FE mov word ptr [bp-2], dx 0 00005045 50 push ax 0 00005046 E8[FEFF] call _fmemcpy 0 00005049 8B441A mov ax, word ptr [si+26] 0 0000504C 8B56FE mov dx, word ptr [bp-2] 0 0000504F 8EC2 mov es, dx 0 00005051 8B5EFC mov bx, word ptr [bp-4] 0 00005054 2689470D mov word ptr es:[bx+13], ax 0 00005058 8B441C mov ax, word ptr [si+28] 0 0000505B 2689470F mov word ptr es:[bx+15], ax 0 0000505F 8B4420 mov ax, word ptr [si+32] 0 00005062 8B4C22 mov cx, word ptr [si+34] 0 00005065 26894711 mov word ptr es:[bx+17], ax 0 00005069 26894F13 mov word ptr es:[bx+19], cx 0 0000506D C47C29 les di, dword ptr [si+41] 0 00005070 26837D0F00 cmp word ptr es:[di+15], 0 0 00005075 8B4C1E mov cx, word ptr [si+30] 0 00005078 7461 je _.L91 0 0000507A 31C0 xor ax, ax 551 _.L92: 0 0000507C 8EC2 mov es, dx 0 0000507E 26894F2B mov word ptr es:[bx+43], cx 0 00005082 2689472D mov word ptr es:[bx+45], ax 0 00005086 8A4428 mov al, byte ptr [si+40] 0 00005089 2688471F mov byte ptr es:[bx+31], al 0 0000508D 8B4424 mov ax, word ptr [si+36] 0 00005090 8B4C26 mov cx, word ptr [si+38] 0 00005093 2689471B mov word ptr es:[bx+27], ax 0 00005097 26894F1D mov word ptr es:[bx+29], cx 0 0000509B 8B4429 mov ax, word ptr [si+41] 0 0000509E 8B4C2B mov cx, word ptr [si+43] 0 000050A1 26894707 mov word ptr es:[bx+7], ax 0 000050A5 26894F09 mov word ptr es:[bx+9], cx 0 000050A9 8B442D mov ax, word ptr [si+45] 0 000050AC 8B4C2F mov cx, word ptr [si+47] 0 000050AF 26894715 mov word ptr es:[bx+21], ax 0 000050B3 26894F17 mov word ptr es:[bx+23], cx 0 000050B7 8B4435 mov ax, word ptr [si+53] 0 000050BA 8B4C37 mov cx, word ptr [si+55] 0 000050BD 26894735 mov word ptr es:[bx+53], ax 0 000050C1 26894F37 mov word ptr es:[bx+55], cx 0 000050C5 8B4431 mov ax, word ptr [si+49] 0 000050C8 26894719 mov word ptr es:[bx+25], ax 0 000050CC 8B4433 mov ax, word ptr [si+51] 0 000050CF 2689470B mov word ptr es:[bx+11], ax 0 000050D3 89EC mov sp, bp 0 000050D5 5D pop bp 0 000050D6 5F pop di 0 000050D7 5E pop si 0 000050D8 C20200 ret 2 582 _.L91: 0 000050DB 8B4418 mov ax, word ptr [si+24] 0 000050DE EB9C jmp _.L92 585 .size _fnode_to_sft, .-_fnode_to_sft 586 .type _merge_file_changes, @function 587 _merge_file_changes: 0 000050E0 56 push si 0 000050E1 57 push di 0 000050E2 55 push bp 0 000050E3 89E5 mov bp, sp 0 000050E5 83EC0C sub sp, 12 0 000050E8 8B7E08 mov di, word ptr [bp+8] 0 000050EB 31F6 xor si, si 0 000050ED 56 push si 0 000050EE E8[FEFF] call _IsShareInstalled 0 000050F1 39F0 cmp ax, si 0 000050F3 7505 jne _.L95 599 _.L114: 0 000050F5 31C0 xor ax, ax 0 000050F7 E9D300 jmp _.L94 602 _.L95: 0 000050FA 8EC6 mov es, si 0 000050FC A1[0000] mov ax, word ptr [_sfthead] 0 000050FF 8946FE mov word ptr [bp-2], ax 0 00005102 8B16[0200] mov dx, word ptr [_sfthead+2] 0 00005106 89F1 mov cx, si 608 _.L97: 0 00005108 837EFEFF cmp word ptr [bp-2], -1 0 0000510C 7505 jne _.L108 0 0000510E 83FAFF cmp dx, -1 0 00005111 74E2 je _.L114 613 _.L108: 0 00005113 8EDA mov ds, dx 0 00005115 8B5EFE mov bx, word ptr [bp-2] 0 00005118 8B4704 mov ax, word ptr [bx+4] 0 0000511B 8946FA mov word ptr [bp-6], ax 0 0000511E 83C306 add bx, 6 619 _.L98: 0 00005121 FF4EFA dec word ptr [bp-6] 0 00005124 790F jns _.L107 0 00005126 8B5EFE mov bx, word ptr [bp-2] 0 00005129 8EDA mov ds, dx 0 0000512B 8B07 mov ax, word ptr [bx] 0 0000512D 8946FE mov word ptr [bp-2], ax 0 00005130 8B5702 mov dx, word ptr [bx+2] 0 00005133 EBD3 jmp _.L97 628 _.L107: 0 00005135 368A4539 mov al, byte ptr ss:[di+57] 0 00005139 30E4 xor ah, ah 0 0000513B 39C8 cmp ax, cx 0 0000513D 7503E91E01 je _.L100 0 00005142 8EDA mov ds, dx 0 00005144 833F00 cmp word ptr [bx], 0 0 00005147 7503E91401 je _.L100 0 0000514C 368B4529 mov ax, word ptr ss:[di+41] 0 00005150 96 xchg si, ax 0 00005151 368B452B mov ax, word ptr ss:[di+43] 0 00005155 8946FC mov word ptr [bp-4], ax 0 00005158 89F0 mov ax, si 0 0000515A 397707 cmp word ptr [bx+7], si 0 0000515D 7403E9FE00 jne _.L100 0 00005162 8B46FC mov ax, word ptr [bp-4] 0 00005165 394709 cmp word ptr [bx+9], ax 0 00005168 7403E9F300 jne _.L100 0 0000516D 36F6450F08 test byte ptr ss:[di+15], 8 0 00005172 7403E9E900 jne _.L100 0 00005177 F6470408 test byte ptr [bx+4], 8 0 0000517B 7403E9E000 jne _.L100 0 00005180 368A4528 mov al, byte ptr ss:[di+40] 0 00005184 3A471F cmp al, byte ptr [bx+31] 0 00005187 7403E9D400 jne _.L100 0 0000518C 368B4524 mov ax, word ptr ss:[di+36] 0 00005190 3B471B cmp ax, word ptr [bx+27] 0 00005193 7403E9C800 jne _.L100 0 00005198 368B4526 mov ax, word ptr ss:[di+38] 0 0000519C 3B471D cmp ax, word ptr [bx+29] 0 0000519F 7403E9BC00 jne _.L100 0 000051A4 837E0AFF cmp word ptr [bp+10], -1 0 000051A8 752D jne _.L102 0 000051AA 895EF4 mov word ptr [bp-12], bx 0 000051AD 8956F6 mov word ptr [bp-10], dx 0 000051B0 06 push es 0 000051B1 8C46F8 mov word ptr [bp-8], es 0 000051B4 51 push cx 0 000051B5 894EFC mov word ptr [bp-4], cx 0 000051B8 16 push ss 0 000051B9 1F pop ds 0 000051BA E8[FEFF] call _DosCloseSft 0 000051BD 85C0 test ax, ax 0 000051BF 8B4EFC mov cx, word ptr [bp-4] 0 000051C2 C456F6 les dx, dword ptr [bp-10] 0 000051C5 8B5EF4 mov bx, word ptr [bp-12] 0 000051C8 7503E99300 je _.L100 675 _.L94: 0 000051CD 89EC mov sp, bp 0 000051CF 5D pop bp 0 000051D0 5F pop di 0 000051D1 5E pop si 0 000051D2 16 push ss 0 000051D3 1F pop ds 0 000051D4 C20400 ret 4 683 _.L102: 0 000051D7 837E0A00 cmp word ptr [bp+10], 0 0 000051DB 7445 je _.L103 0 000051DD 8EDA mov ds, dx 0 000051DF F6470203 test byte ptr [bx+2], 3 0 000051E3 747B je _.L100 0 000051E5 8EC2 mov es, dx 0 000051E7 26C54F2B lds cx, dword ptr es:[bx+43] 0 000051EB 36894D1E mov word ptr ss:[di+30], cx 0 000051EF 8E46FC mov es, word ptr [bp-4] 0 000051F2 26837C0F00 cmp word ptr es:[si+15], 0 0 000051F7 7504 jne _.L104 0 000051F9 368C5D18 mov word ptr ss:[di+24], ds 696 _.L104: 0 000051FD 8EC2 mov es, dx 0 000051FF 268B4711 mov ax, word ptr es:[bx+17] 0 00005203 268B4F13 mov cx, word ptr es:[bx+19] 0 00005207 36894520 mov word ptr ss:[di+32], ax 0 0000520B 36894D22 mov word ptr ss:[di+34], cx 0 0000520F 268B470F mov ax, word ptr es:[bx+15] 0 00005213 3689451C mov word ptr ss:[di+28], ax 0 00005217 268B470D mov ax, word ptr es:[bx+13] 0 0000521B 3689451A mov word ptr ss:[di+26], ax 0 0000521F E9D3FE jmp _.L114 707 _.L103: 0 00005222 8E5EFC mov ds, word ptr [bp-4] 0 00005225 837C0F00 cmp word ptr [si+15], 0 0 00005229 368E5D1E mov ds, word ptr ss:[di+30] 0 0000522D 7438 je _.L105 0 0000522F 8B460A mov ax, word ptr [bp+10] 713 _.L106: 0 00005232 8CC6 mov si, es 0 00005234 8EC2 mov es, dx 0 00005236 268C5F2B mov word ptr es:[bx+43], ds 0 0000523A 8EDA mov ds, dx 0 0000523C 89472D mov word ptr [bx+45], ax 0 0000523F 368E5D20 mov ds, word ptr ss:[di+32] 0 00005243 368B4522 mov ax, word ptr ss:[di+34] 0 00005247 268C5F11 mov word ptr es:[bx+17], ds 0 0000524B 8EDA mov ds, dx 0 0000524D 894713 mov word ptr [bx+19], ax 0 00005250 368B451C mov ax, word ptr ss:[di+28] 0 00005254 89470F mov word ptr [bx+15], ax 0 00005257 368B451A mov ax, word ptr ss:[di+26] 0 0000525B 89470D mov word ptr [bx+13], ax 0 0000525E 8EC6 mov es, si 729 _.L100: 0 00005260 83C33B add bx, 59 0 00005263 41 inc cx 0 00005264 E9BAFE jmp _.L98 733 _.L105: 0 00005267 368B4518 mov ax, word ptr ss:[di+24] 0 0000526B EBC5 jmp _.L106 736 .size _merge_file_changes, .-_merge_file_changes 737 .global _getdstart 738 .type _getdstart, @function 739 _getdstart: 0 0000526D 56 push si 0 0000526E 55 push bp 0 0000526F 89E5 mov bp, sp 0 00005271 8B760A mov si, word ptr [bp+10] 0 00005274 C45E06 les bx, dword ptr [bp+6] 0 00005277 26837F0F00 cmp word ptr es:[bx+15], 0 0 0000527C 8B441A mov ax, word ptr [si+26] 0 0000527F 7407 je _.L116 0 00005281 31D2 xor dx, dx 749 _.L115: 0 00005283 5D pop bp 0 00005284 5E pop si 0 00005285 C20600 ret 6 753 _.L116: 0 00005288 8B5414 mov dx, word ptr [si+20] 0 0000528B EBF6 jmp _.L115 756 .size _getdstart, .-_getdstart 757 .global _setdstart 758 .type _setdstart, @function 759 _setdstart: 0 0000528D 56 push si 0 0000528E 55 push bp 0 0000528F 89E5 mov bp, sp 0 00005291 8B760A mov si, word ptr [bp+10] 0 00005294 8B460E mov ax, word ptr [bp+14] 0 00005297 8B560C mov dx, word ptr [bp+12] 0 0000529A 89541A mov word ptr [si+26], dx 0 0000529D C45E06 les bx, dword ptr [bp+6] 0 000052A0 26837F0F00 cmp word ptr es:[bx+15], 0 0 000052A5 7503 jne _.L119 0 000052A7 894414 mov word ptr [si+20], ax 771 _.L119: 0 000052AA 5D pop bp 0 000052AB 5E pop si 0 000052AC C20A00 ret 10 775 .size _setdstart, .-_setdstart 776 .global _clus2phys 777 .type _clus2phys, @function 778 _clus2phys: 0 000052AF 56 push si 0 000052B0 57 push di 0 000052B1 55 push bp 0 000052B2 89E5 mov bp, sp 0 000052B4 8B4608 mov ax, word ptr [bp+8] 0 000052B7 8B4E0A mov cx, word ptr [bp+10] 0 000052BA C45E0C les bx, dword ptr [bp+12] 0 000052BD 8CC2 mov dx, es 0 000052BF 26837F0F00 cmp word ptr es:[bx+15], 0 0 000052C4 7528 jne _.L123 0 000052C6 268B7729 mov si, word ptr es:[bx+41] 0 000052CA 268B7F2B mov di, word ptr es:[bx+43] 791 _.L124: 0 000052CE 83C0FE add ax, -2 0 000052D1 83D1FF adc cx, -1 0 000052D4 8EC2 mov es, dx 0 000052D6 268A5705 mov dl, byte ptr es:[bx+5] 0 000052DA 30F6 xor dh, dh 0 000052DC 52 push dx 0 000052DD 51 push cx 0 000052DE 50 push ax 0 000052DF E8[FEFF] call ___ashlsi3 0 000052E2 01F0 add ax, si 0 000052E4 11FA adc dx, di 0 000052E6 89EC mov sp, bp 0 000052E8 5D pop bp 0 000052E9 5F pop di 0 000052EA 5E pop si 0 000052EB C20800 ret 8 808 _.L123: 0 000052EE 268B770B mov si, word ptr es:[bx+11] 0 000052F2 31FF xor di, di 0 000052F4 EBD8 jmp _.L124 812 .size _clus2phys, .-_clus2phys 813 .type _clear_dir, @function 814 _clear_dir: 0 000052F6 56 push si 0 000052F7 57 push di 0 000052F8 55 push bp 0 000052F9 89E5 mov bp, sp 0 000052FB 83EC0A sub sp, 10 0 000052FE C4460A les ax, dword ptr [bp+10] 0 00005301 8946F8 mov word ptr [bp-8], ax 0 00005304 8C46F6 mov word ptr [bp-10], es 0 00005307 31FF xor di, di 0 00005309 897EFC mov word ptr [bp-4], di 825 _.L127: 0 0000530C 897EFA mov word ptr [bp-6], di 0 0000530F 8B5E08 mov bx, word ptr [bp+8] 0 00005312 8B7729 mov si, word ptr [bx+41] 0 00005315 8B472B mov ax, word ptr [bx+43] 0 00005318 8946FE mov word ptr [bp-2], ax 0 0000531B 8EC0 mov es, ax 0 0000531D 268A4404 mov al, byte ptr es:[si+4] 0 00005321 30E4 xor ah, ah 0 00005323 39C7 cmp di, ax 0 00005325 7E0A jle _.L132 0 00005327 31C0 xor ax, ax 837 _.L126: 0 00005329 89EC mov sp, bp 0 0000532B 5D pop bp 0 0000532C 5F pop di 0 0000532D 5E pop si 0 0000532E C20600 ret 6 843 _.L132: 0 00005331 FF76FE push word ptr [bp-2] 0 00005334 56 push si 0 00005335 FF76F6 push word ptr [bp-10] 0 00005338 FF76F8 push word ptr [bp-8] 0 0000533B E8[FEFF] call _clus2phys 0 0000533E 91 xchg cx, ax 0 0000533F 89D3 mov bx, dx 0 00005341 B80100 mov ax, 1 0 00005344 50 push ax 0 00005345 8E46FE mov es, word ptr [bp-2] 0 00005348 268A04 mov al, byte ptr es:[si] 0 0000534B 98 cbw 0 0000534C 50 push ax 0 0000534D 01F9 add cx, di 0 0000534F 135EFC adc bx, word ptr [bp-4] 0 00005352 53 push bx 0 00005353 51 push cx 0 00005354 E8[FEFF] call _getblk 0 00005357 89C6 mov si, ax 0 00005359 09D0 or ax, dx 0 0000535B 7437 je _.L133 0 0000535D B80002 mov ax, 512 0 00005360 50 push ax 0 00005361 31C0 xor ax, ax 0 00005363 50 push ax 0 00005364 8D4414 lea ax, [20+si] 0 00005367 52 push dx 0 00005368 8956FE mov word ptr [bp-2], dx 0 0000536B 50 push ax 0 0000536C E8[FEFF] call _fmemset 0 0000536F 8B56FE mov dx, word ptr [bp-2] 0 00005372 8EC2 mov es, dx 0 00005374 268A4405 mov al, byte ptr es:[si+5] 0 00005378 837EFA00 cmp word ptr [bp-6], 0 0 0000537C 7510 jne _.L130 0 0000537E 0C60 or al, 96 880 _.L135: 0 00005380 26884405 mov byte ptr es:[si+5], al 0 00005384 83C701 add di, 1 0 00005387 8356FC00 adc word ptr [bp-4], 0 0 0000538B E97EFF jmp _.L127 885 _.L130: 0 0000538E 0C61 or al, 97 0 00005390 8EC2 mov es, dx 0 00005392 EBEC jmp _.L135 889 _.L133: 0 00005394 B8FBFF mov ax, -5 0 00005397 EB90 jmp _.L126 892 .size _clear_dir, .-_clear_dir 893 .type _extend_dir, @function 894 _extend_dir: 0 00005399 56 push si 0 0000539A 57 push di 0 0000539B 55 push bp 0 0000539C 89E5 mov bp, sp 0 0000539E 8B7608 mov si, word ptr [bp+8] 0 000053A1 56 push si 0 000053A2 E8E3FA call _extend 0 000053A5 83F8FF cmp ax, -1 0 000053A8 7512 jne _.L137 0 000053AA 81FAFF0F cmp dx, 4095 0 000053AE 750C jne _.L137 906 _.L139: 0 000053B0 BFE4FF mov di, -28 908 _.L136: 0 000053B3 97 xchg di, ax 0 000053B4 89EC mov sp, bp 0 000053B6 5D pop bp 0 000053B7 5F pop di 0 000053B8 5E pop si 0 000053B9 C20200 ret 2 915 _.L137: 0 000053BC 52 push dx 0 000053BD 50 push ax 0 000053BE 56 push si 0 000053BF E834FF call _clear_dir 0 000053C2 89C7 mov di, ax 0 000053C4 85C0 test ax, ax 0 000053C6 75EB jne _.L136 0 000053C8 56 push si 0 000053C9 E8E4F8 call _find_free 0 000053CC 85C0 test ax, ax 0 000053CE 74E0 je _.L139 0 000053D0 C45C29 les bx, dword ptr [si+41] 0 000053D3 268A07 mov al, byte ptr es:[bx] 0 000053D6 98 cbw 0 000053D7 50 push ax 0 000053D8 E8[FEFF] call _flush_buffers 0 000053DB 85C0 test ax, ax 0 000053DD 75D4 jne _.L136 0 000053DF BFFBFF mov di, -5 0 000053E2 EBCF jmp _.L136 936 .size _extend_dir, .-_extend_dir 937 .global _get_dpb 938 .type _get_dpb, @function 939 _get_dpb: 0 000053E4 55 push bp 0 000053E5 89E5 mov bp, sp 0 000053E7 FF7604 push word ptr [bp+4] 0 000053EA E8[FEFF] call _get_cds 0 000053ED 89C3 mov bx, ax 0 000053EF 09D0 or ax, dx 0 000053F1 7419 je _.L151 0 000053F3 8EC2 mov es, dx 0 000053F5 26837F4300 cmp word ptr es:[bx+67], 0 0 000053FA 7C0E jl _.L149 0 000053FC 268B4745 mov ax, word ptr es:[bx+69] 0 00005400 268B5747 mov dx, word ptr es:[bx+71] 952 _.L145: 0 00005404 89EC mov sp, bp 0 00005406 5D pop bp 0 00005407 C20200 ret 2 956 _.L149: 0 0000540A 31C0 xor ax, ax 958 _.L151: 0 0000540C 89C2 mov dx, ax 0 0000540E EBF4 jmp _.L145 961 .size _get_dpb, .-_get_dpb 962 .global _fcmp_wild 963 .type _fcmp_wild, @function 964 _fcmp_wild: 0 00005410 57 push di 0 00005411 55 push bp 0 00005412 89E5 mov bp, sp 0 00005414 31DB xor bx, bx 969 _.L153: 0 00005416 395E0A cmp word ptr [bp+10], bx 0 00005419 7508 jne _.L156 0 0000541B B80100 mov ax, 1 973 _.L152: 0 0000541E 5D pop bp 0 0000541F 5F pop di 0 00005420 C20600 ret 6 977 _.L156: 0 00005423 8B7E06 mov di, word ptr [bp+6] 0 00005426 8A01 mov al, byte ptr [bx+di] 0 00005428 3C3F cmp al, 63 0 0000542A 7407 je _.L154 0 0000542C 8B7E08 mov di, word ptr [bp+8] 0 0000542F 3A01 cmp al, byte ptr [bx+di] 0 00005431 7503 jne _.L157 985 _.L154: 0 00005433 43 inc bx 0 00005434 EBE0 jmp _.L153 988 _.L157: 0 00005436 31C0 xor ax, ax 0 00005438 EBE4 jmp _.L152 991 .size _fcmp_wild, .-_fcmp_wild 992 .global _split_path 993 .type _split_path, @function 994 _split_path: 0 0000543A 57 push di 0 0000543B 55 push bp 0 0000543C 89E5 mov bp, sp 0 0000543E 8B7E06 mov di, word ptr [bp+6] 0 00005441 57 push di 0 00005442 E8[FEFF] call _strlen 0 00005445 93 xchg bx, ax 0 00005446 8079FF5C cmp byte ptr [bx+di-1], 92 0 0000544A 7412 je _.L164 0 0000544C FF7608 push word ptr [bp+8] 0 0000544F B80100 mov ax, 1 0 00005452 50 push ax 0 00005453 57 push di 0 00005454 E8[FEFF] call _dir_open 1009 _.L162: 0 00005457 89EC mov sp, bp 0 00005459 5D pop bp 0 0000545A 5F pop di 0 0000545B C20400 ret 4 1014 _.L164: 0 0000545E 31C0 xor ax, ax 0 00005460 EBF5 jmp _.L162 1017 .size _split_path, .-_split_path 1018 .type _alloc_find_free, @function 1019 _alloc_find_free: 0 00005462 56 push si 0 00005463 55 push bp 0 00005464 89E5 mov bp, sp 0 00005466 FF7606 push word ptr [bp+6] 0 00005469 FF7608 push word ptr [bp+8] 0 0000546C E8[FEFF] call _split_path 0 0000546F 89C6 mov si, ax 0 00005471 50 push ax 0 00005472 E83BF8 call _find_free 0 00005475 85C0 test ax, ax 0 00005477 7516 jne _.L169 0 00005479 8B5C02 mov bx, word ptr [si+2] 0 0000547C 8B4711 mov ax, word ptr [bx+17] 0 0000547F 0B470F or ax, word ptr [bx+15] 0 00005482 740F je _.L170 0 00005484 56 push si 0 00005485 E811FF call _extend_dir 1037 _.L166: 0 00005488 89EC mov sp, bp 0 0000548A 5D pop bp 0 0000548B 5E pop si 0 0000548C C20400 ret 4 1042 _.L169: 0 0000548F 31C0 xor ax, ax 0 00005491 EBF5 jmp _.L166 1045 _.L170: 0 00005493 B8FCFF mov ax, -4 0 00005496 EBF0 jmp _.L166 1048 .size _alloc_find_free, .-_alloc_find_free 1049 .global _dir_exists 1050 .type _dir_exists, @function 1051 _dir_exists: 0 00005498 55 push bp 0 00005499 89E5 mov bp, sp 0 0000549B B8[0000] mov ax, offset _fnode 0 0000549E 50 push ax 0 0000549F FF7604 push word ptr [bp+4] 0 000054A2 E8[FEFF] call _split_path 0 000054A5 83F801 cmp ax, 1 0 000054A8 19C0 sbb ax, ax 0 000054AA 40 inc ax 0 000054AB 89EC mov sp, bp 0 000054AD 5D pop bp 0 000054AE C20200 ret 2 1064 .size _dir_exists, .-_dir_exists 1065 .global _fcbmatch 1066 .type _fcbmatch, @function 1067 _fcbmatch: 0 000054B1 55 push bp 0 000054B2 89E5 mov bp, sp 0 000054B4 B80B00 mov ax, 11 0 000054B7 50 push ax 0 000054B8 FF7606 push word ptr [bp+6] 0 000054BB FF7604 push word ptr [bp+4] 0 000054BE E8[FEFF] call _memcmp 0 000054C1 83F801 cmp ax, 1 0 000054C4 19C0 sbb ax, ax 0 000054C6 F7D8 neg ax 0 000054C8 89EC mov sp, bp 0 000054CA 5D pop bp 0 000054CB C20400 ret 4 1081 .size _fcbmatch, .-_fcbmatch 1082 .type _find_fname, @function 1083 _find_fname: 0 000054CE 56 push si 0 000054CF 55 push bp 0 000054D0 89E5 mov bp, sp 0 000054D2 FF760A push word ptr [bp+10] 0 000054D5 FF7606 push word ptr [bp+6] 0 000054D8 E8[FEFF] call _split_path 0 000054DB 89C6 mov si, ax 0 000054DD 85C0 test ax, ax 0 000054DF 752C jne _.L178 0 000054E1 B8FDFF mov ax, -3 0 000054E4 EB33 jmp _.L176 1095 _.L180: 0 000054E6 8B4402 mov ax, word ptr [si+2] 0 000054E9 40 inc ax 0 000054EA 50 push ax 0 000054EB 8D4404 lea ax, [4+si] 0 000054EE 50 push ax 0 000054EF E8[FEFF] call _fcbmatch 0 000054F2 85C0 test ax, ax 0 000054F4 7411 je _.L179 0 000054F6 8B4608 mov ax, word ptr [bp+8] 0 000054F9 83C821 or ax, 33 0 000054FC F7D0 not ax 0 000054FE 8A540F mov dl, byte ptr [si+15] 0 00005501 30F6 xor dh, dh 0 00005503 21D0 and ax, dx 0 00005505 7412 je _.L176 1111 _.L179: 0 00005507 8B5C02 mov bx, word ptr [si+2] 0 0000550A FF470D inc word ptr [bx+13] 1114 _.L178: 0 0000550D 56 push si 0 0000550E E8[FEFF] call _dir_read 0 00005511 83F801 cmp ax, 1 0 00005514 74D0 je _.L180 0 00005516 B8FEFF mov ax, -2 1120 _.L176: 0 00005519 89EC mov sp, bp 0 0000551B 5D pop bp 0 0000551C 5E pop si 0 0000551D C20600 ret 6 1125 .size _find_fname, .-_find_fname 1126 .global _remove_lfn_entries 1127 .type _remove_lfn_entries, @function 1128 _remove_lfn_entries: 0 00005520 56 push si 0 00005521 57 push di 0 00005522 55 push bp 0 00005523 89E5 mov bp, sp 0 00005525 8B7608 mov si, word ptr [bp+8] 0 00005528 8B5C02 mov bx, word ptr [si+2] 0 0000552B 8B7F0D mov di, word ptr [bx+13] 1136 _.L195: 0 0000552E 8B5C02 mov bx, word ptr [si+2] 0 00005531 8B470D mov ax, word ptr [bx+13] 0 00005534 85C0 test ax, ax 0 00005536 742E je _.L191 0 00005538 48 dec ax 0 00005539 89470D mov word ptr [bx+13], ax 0 0000553C 56 push si 0 0000553D E8[FEFF] call _dir_read 0 00005540 85C0 test ax, ax 0 00005542 7F0B jg _.L192 1147 _.L194: 0 00005544 B8FBFF mov ax, -5 1149 _.L190: 0 00005547 89EC mov sp, bp 0 00005549 5D pop bp 0 0000554A 5F pop di 0 0000554B 5E pop si 0 0000554C C20200 ret 2 1155 _.L192: 0 0000554F 807C0F0F cmp byte ptr [si+15], 15 0 00005553 7511 jne _.L191 0 00005555 C6440405 mov byte ptr [si+4], 5 0 00005559 31C0 xor ax, ax 0 0000555B 50 push ax 0 0000555C 56 push si 0 0000555D E8[FEFF] call _dir_write_update 0 00005560 85C0 test ax, ax 0 00005562 75CA jne _.L195 0 00005564 EBDE jmp _.L194 1166 _.L191: 0 00005566 8B5C02 mov bx, word ptr [si+2] 0 00005569 897F0D mov word ptr [bx+13], di 0 0000556C 56 push si 0 0000556D E8[FEFF] call _dir_read 0 00005570 85C0 test ax, ax 0 00005572 7ED0 jle _.L194 0 00005574 31C0 xor ax, ax 0 00005576 EBCF jmp _.L190 1175 .size _remove_lfn_entries, .-_remove_lfn_entries 1176 .type _delete_dir_entry, @function 1177 _delete_dir_entry: 0 00005578 56 push si 0 00005579 57 push di 0 0000557A 55 push bp 0 0000557B 89E5 mov bp, sp 0 0000557D 8B7608 mov si, word ptr [bp+8] 0 00005580 56 push si 0 00005581 E8[FEFF] call _remove_lfn_entries 0 00005584 85C0 test ax, ax 0 00005586 7C14 jl _.L203 0 00005588 56 push si 0 00005589 E850FA call _wipe_out 0 0000558C C6440405 mov byte ptr [si+4], 5 0 00005590 31FF xor di, di 0 00005592 57 push di 0 00005593 56 push si 0 00005594 E8[FEFF] call _dir_write_update 0 00005597 39F8 cmp ax, di 0 00005599 7409 je _.L205 0 0000559B 97 xchg di, ax 1197 _.L203: 0 0000559C 89EC mov sp, bp 0 0000559E 5D pop bp 0 0000559F 5F pop di 0 000055A0 5E pop si 0 000055A1 C20200 ret 2 1203 _.L205: 0 000055A4 B8FBFF mov ax, -5 0 000055A7 EBF3 jmp _.L203 1206 .size _delete_dir_entry, .-_delete_dir_entry 1207 .global _dos_merge_file_changes 1208 .type _dos_merge_file_changes, @function 1209 _dos_merge_file_changes: 0 000055A9 55 push bp 0 000055AA 89E5 mov bp, sp 0 000055AC FF7604 push word ptr [bp+4] 0 000055AF E81FF6 call _sft_to_fnode 0 000055B2 31D2 xor dx, dx 0 000055B4 52 push dx 0 000055B5 50 push ax 0 000055B6 E827FB call _merge_file_changes 0 000055B9 89EC mov sp, bp 0 000055BB 5D pop bp 0 000055BC C20200 ret 2 1221 .size _dos_merge_file_changes, .-_dos_merge_file_changes 1222 .global _dos_delete 1223 .type _dos_delete, @function 1224 _dos_delete: 0 000055BF 56 push si 0 000055C0 55 push bp 0 000055C1 89E5 mov bp, sp 0 000055C3 BE[0000] mov si, offset _fnode 0 000055C6 56 push si 0 000055C7 FF7608 push word ptr [bp+8] 0 000055CA FF7606 push word ptr [bp+6] 0 000055CD E8FEFE call _find_fname 0 000055D0 85C0 test ax, ax 0 000055D2 750A jne _.L209 0 000055D4 F6440F11 test byte ptr [si+15], 17 0 000055D8 750B jne _.L211 0 000055DA 56 push si 0 000055DB E89AFF call _delete_dir_entry 1239 _.L209: 0 000055DE 89EC mov sp, bp 0 000055E0 5D pop bp 0 000055E1 5E pop si 0 000055E2 C20400 ret 4 1244 _.L211: 0 000055E5 B8FBFF mov ax, -5 0 000055E8 EBF4 jmp _.L209 1247 .size _dos_delete, .-_dos_delete 1248 .global _dos_rmdir 1249 .type _dos_rmdir, @function 1250 _dos_rmdir: 0 000055EA 56 push si 0 000055EB 57 push di 0 000055EC 55 push bp 0 000055ED 89E5 mov bp, sp 0 000055EF 8B7E08 mov di, word ptr [bp+8] 0 000055F2 8A05 mov al, byte ptr [di] 0 000055F4 98 cbw 0 000055F5 83C0BF add ax, -65 0 000055F8 50 push ax 0 000055F9 E8[FEFF] call _get_cds 0 000055FC 52 push dx 0 000055FD 50 push ax 0 000055FE 16 push ss 0 000055FF 57 push di 0 00005600 E8[FEFF] call _fstrcmp 0 00005603 85C0 test ax, ax 0 00005605 7503E98D00 je _.L222 0 0000560A 807D025C cmp byte ptr [di+2], 92 0 0000560E 7511 jne _.L215 0 00005610 807D0300 cmp byte ptr [di+3], 0 0 00005614 750B jne _.L215 1272 _.L217: 0 00005616 B8FBFF mov ax, -5 1274 _.L213: 0 00005619 89EC mov sp, bp 0 0000561B 5D pop bp 0 0000561C 5F pop di 0 0000561D 5E pop si 0 0000561E C20200 ret 2 1280 _.L215: 0 00005621 B8[0000] mov ax, offset _fnode 0 00005624 50 push ax 0 00005625 31C0 xor ax, ax 0 00005627 50 push ax 0 00005628 57 push di 0 00005629 E8[FEFF] call _dir_open 0 0000562C 89C6 mov si, ax 0 0000562E 85C0 test ax, ax 0 00005630 7505 jne _.L216 1290 _.L221: 0 00005632 B8FDFF mov ax, -3 0 00005635 EBE2 jmp _.L213 1293 _.L216: 0 00005637 8A440F mov al, byte ptr [si+15] 0 0000563A A8CE test al, -50 0 0000563C 75D8 jne _.L217 0 0000563E 56 push si 0 0000563F E8[FEFF] call _dir_read 0 00005642 807C042E cmp byte ptr [si+4], 46 0 00005646 75CE jne _.L217 0 00005648 807C0520 cmp byte ptr [si+5], 32 0 0000564C 75C8 jne _.L217 0 0000564E 8B5C02 mov bx, word ptr [si+2] 0 00005651 FF470D inc word ptr [bx+13] 0 00005654 56 push si 0 00005655 E8[FEFF] call _dir_read 0 00005658 807C042E cmp byte ptr [si+4], 46 0 0000565C 75B8 jne _.L217 0 0000565E 807C052E cmp byte ptr [si+5], 46 1310 _.L225: 0 00005662 75B2 jne _.L217 1312 _.L219: 0 00005664 8B5C02 mov bx, word ptr [si+2] 0 00005667 FF470D inc word ptr [bx+13] 0 0000566A 56 push si 0 0000566B E8[FEFF] call _dir_read 0 0000566E 83F801 cmp ax, 1 0 00005671 7418 je _.L220 0 00005673 56 push si 0 00005674 B83700 mov ax, 55 0 00005677 50 push ax 0 00005678 57 push di 0 00005679 E852FE call _find_fname 0 0000567C 85C0 test ax, ax 0 0000567E 75B2 jne _.L221 0 00005680 897608 mov word ptr [bp+8], si 0 00005683 89EC mov sp, bp 0 00005685 5D pop bp 0 00005686 5F pop di 0 00005687 5E pop si 0 00005688 E9EDFE jmp _delete_dir_entry 1332 _.L220: 0 0000568B 807C0405 cmp byte ptr [si+4], 5 0 0000568F 74D3 je _.L219 0 00005691 807C0F0F cmp byte ptr [si+15], 15 0 00005695 EBCB jmp _.L225 1337 _.L222: 0 00005697 B8F0FF mov ax, -16 0 0000569A E97CFF jmp _.L213 1340 .size _dos_rmdir, .-_dos_rmdir 1341 .global _dos_rename 1342 .type _dos_rename, @function 1343 _dos_rename: 0 0000569D 56 push si 0 0000569E 57 push di 0 0000569F 55 push bp 0 000056A0 89E5 mov bp, sp 0 000056A2 1E push ds 0 000056A3 8B7608 mov si, word ptr [bp+8] 0 000056A6 8A04 mov al, byte ptr [si] 0 000056A8 98 cbw 0 000056A9 83C0BF add ax, -65 0 000056AC 50 push ax 0 000056AD E8[FEFF] call _get_cds 0 000056B0 52 push dx 0 000056B1 50 push ax 0 000056B2 16 push ss 0 000056B3 56 push si 0 000056B4 E8[FEFF] call _fstrcmp 0 000056B7 85C0 test ax, ax 0 000056B9 7503E9CC00 je _.L232 0 000056BE B8[0000] mov ax, offset _fnode 0 000056C1 50 push ax 0 000056C2 FF760C push word ptr [bp+12] 0 000056C5 56 push si 0 000056C6 E805FE call _find_fname 0 000056C9 89C7 mov di, ax 0 000056CB 85C0 test ax, ax 0 000056CD 7521 jne _.L226 0 000056CF BA[3A00] mov dx, offset _fnode+58 0 000056D2 52 push dx 0 000056D3 8956FE mov word ptr [bp-2], dx 0 000056D6 FF760C push word ptr [bp+12] 0 000056D9 FF760A push word ptr [bp+10] 0 000056DC E8EFFD call _find_fname 0 000056DF 83F8FE cmp ax, -2 0 000056E2 8B56FE mov dx, word ptr [bp-2] 0 000056E5 7412 je _.L228 0 000056E7 89C7 mov di, ax 0 000056E9 85C0 test ax, ax 1381 _.L242: 0 000056EB 7503 jne _.L226 1383 _.L229: 0 000056ED BFFBFF mov di, -5 1385 _.L226: 0 000056F0 97 xchg di, ax 0 000056F1 89EC mov sp, bp 0 000056F3 5D pop bp 0 000056F4 5F pop di 0 000056F5 5E pop si 0 000056F6 C20600 ret 6 1392 _.L228: 0 000056F9 BB[0000] mov bx, offset _fnode 0 000056FC 8B773C mov si, word ptr [bx+60] 0 000056FF 8B5F02 mov bx, word ptr [bx+2] 0 00005702 8B470F mov ax, word ptr [bx+15] 0 00005705 3B440F cmp ax, word ptr [si+15] 0 00005708 7534 jne _.L230 0 0000570A 8B4711 mov ax, word ptr [bx+17] 0 0000570D 3B4411 cmp ax, word ptr [si+17] 0 00005710 752C jne _.L230 0 00005712 B8[0000] mov ax, offset _fnode 0 00005715 50 push ax 0 00005716 E8[FEFF] call _remove_lfn_entries 0 00005719 85C0 test ax, ax 0 0000571B 7C79 jl _.L236 0 0000571D BB[0000] mov bx, offset _fnode 1408 _.L231: 0 00005720 B80B00 mov ax, 11 0 00005723 50 push ax 0 00005724 46 inc si 0 00005725 56 push si 0 00005726 8D4704 lea ax, [4+bx] 0 00005729 895EFE mov word ptr [bp-2], bx 0 0000572C 50 push ax 0 0000572D E8[FEFF] call _memcpy 0 00005730 31C0 xor ax, ax 0 00005732 50 push ax 0 00005733 8B5EFE mov bx, word ptr [bp-2] 0 00005736 53 push bx 0 00005737 E8[FEFF] call _dir_write_update 0 0000573A 85C0 test ax, ax 0 0000573C EBAD jmp _.L242 1424 _.L230: 0 0000573E BB[0000] mov bx, offset _fnode 0 00005741 F6470F10 test byte ptr [bx+15], 16 0 00005745 75A6 jne _.L229 0 00005747 FF760A push word ptr [bp+10] 0 0000574A 52 push dx 0 0000574B E814FD call _alloc_find_free 0 0000574E 8946FE mov word ptr [bp-2], ax 0 00005751 85C0 test ax, ax 0 00005753 753B jne _.L235 0 00005755 B8[0000] mov ax, offset _fnode 0 00005758 50 push ax 0 00005759 E8[FEFF] call _remove_lfn_entries 0 0000575C 85C0 test ax, ax 0 0000575E 7C36 jl _.L236 0 00005760 B82000 mov ax, 32 0 00005763 50 push ax 0 00005764 B8[0400] mov ax, offset _fnode+4 0 00005767 50 push ax 0 00005768 B8[3E00] mov ax, offset _fnode+62 0 0000576B 50 push ax 0 0000576C E8[FEFF] call _memcpy 0 0000576F C606[0400]05 mov byte ptr [_fnode+4], 5 0 00005774 FF76FE push word ptr [bp-2] 0 00005777 B8[0000] mov ax, offset _fnode 0 0000577A 50 push ax 0 0000577B E8[FEFF] call _dir_write_update 0 0000577E 85C0 test ax, ax 0 00005780 7503E968FF je _.L229 0 00005785 BB[3A00] mov bx, offset _fnode+58 0 00005788 EB96 jmp _.L231 1455 _.L232: 0 0000578A BFF0FF mov di, -16 0 0000578D E960FF jmp _.L226 1458 _.L235: 0 00005790 8B7EFE mov di, word ptr [bp-2] 0 00005793 E95AFF jmp _.L226 1461 _.L236: 0 00005796 97 xchg di, ax 0 00005797 E956FF jmp _.L226 1464 .size _dos_rename, .-_dos_rename 1465 .global _dos_getdate 1466 .type _dos_getdate, @function 1467 _dos_getdate: 0 0000579A 55 push bp 0 0000579B 89E5 mov bp, sp 0 0000579D 1E push ds 0 0000579E 1E push ds 0 0000579F 8D46FC lea ax, [-4+bp] 0 000057A2 50 push ax 0 000057A3 E8[FEFF] call _DosGetDate 0 000057A6 8A46FF mov al, byte ptr [bp-1] 0 000057A9 B105 mov cl, 5 0 000057AB D3E0 shl ax, cl 0 000057AD 25E001 and ax, 480 0 000057B0 8A56FE mov dl, byte ptr [bp-2] 0 000057B3 80E21F and dl, 31 0 000057B6 08D0 or al, dl 0 000057B8 8B56FC mov dx, word ptr [bp-4] 0 000057BB 81C244F8 add dx, -1980 0 000057BF B109 mov cl, 9 0 000057C1 D3E2 shl dx, cl 0 000057C3 09D0 or ax, dx 0 000057C5 89EC mov sp, bp 0 000057C7 5D pop bp 0 000057C8 C3 ret 1490 .size _dos_getdate, .-_dos_getdate 1491 .global _dos_gettime 1492 .type _dos_gettime, @function 1493 _dos_gettime: 0 000057C9 55 push bp 0 000057CA 89E5 mov bp, sp 0 000057CC 1E push ds 0 000057CD 1E push ds 0 000057CE 8D46FC lea ax, [-4+bp] 0 000057D1 50 push ax 0 000057D2 E8[FEFF] call _DosGetTime 0 000057D5 8A46FD mov al, byte ptr [bp-3] 0 000057D8 B10B mov cl, 11 0 000057DA D3E0 shl ax, cl 0 000057DC 8A56FC mov dl, byte ptr [bp-4] 0 000057DF 30F6 xor dh, dh 0 000057E1 B105 mov cl, 5 0 000057E3 D3E2 shl dx, cl 0 000057E5 09D0 or ax, dx 0 000057E7 8A56FF mov dl, byte ptr [bp-1] 0 000057EA D0EA shr dl, 1 0 000057EC 08D0 or al, dl 0 000057EE 89EC mov sp, bp 0 000057F0 5D pop bp 0 000057F1 C3 ret 1515 .size _dos_gettime, .-_dos_gettime 1516 .type _init_direntry, @function 1517 _init_direntry: 0 000057F2 56 push si 0 000057F3 57 push di 0 000057F4 55 push bp 0 000057F5 89E5 mov bp, sp 0 000057F7 1E push ds 0 000057F8 8B7608 mov si, word ptr [bp+8] 0 000057FB 8B560C mov dx, word ptr [bp+12] 0 000057FE 8956FE mov word ptr [bp-2], dx 0 00005801 8B7E0E mov di, word ptr [bp+14] 0 00005804 B82000 mov ax, 32 0 00005807 50 push ax 0 00005808 31C0 xor ax, ax 0 0000580A 50 push ax 0 0000580B 56 push si 0 0000580C E8[FEFF] call _memset 0 0000580F B80B00 mov ax, 11 0 00005812 50 push ax 0 00005813 FF7610 push word ptr [bp+16] 0 00005816 56 push si 0 00005817 E8[FEFF] call _memcpy 0 0000581A 897C14 mov word ptr [si+20], di 0 0000581D 8B56FE mov dx, word ptr [bp-2] 0 00005820 89541A mov word ptr [si+26], dx 0 00005823 8B460A mov ax, word ptr [bp+10] 0 00005826 88440B mov byte ptr [si+11], al 0 00005829 E8[FEFF] call _dos_gettime 0 0000582C 894416 mov word ptr [si+22], ax 0 0000582F 89440E mov word ptr [si+14], ax 0 00005832 E8[FEFF] call _dos_getdate 0 00005835 894418 mov word ptr [si+24], ax 0 00005838 894410 mov word ptr [si+16], ax 0 0000583B 89EC mov sp, bp 0 0000583D 5D pop bp 0 0000583E 5F pop di 0 0000583F 5E pop si 0 00005840 C20A00 ret 10 1554 .size _init_direntry, .-_init_direntry 1555 .global _dos_open 1556 .type _dos_open, @function 1557 _dos_open: 0 00005843 56 push si 0 00005844 57 push di 0 00005845 55 push bp 0 00005846 89E5 mov bp, sp 0 00005848 1E push ds 0 00005849 FF760E push word ptr [bp+14] 0 0000584C E882F3 call _sft_to_fnode 0 0000584F 89C6 mov si, ax 0 00005851 50 push ax 0 00005852 8B460C mov ax, word ptr [bp+12] 0 00005855 83C837 or ax, 55 0 00005858 50 push ax 0 00005859 FF7608 push word ptr [bp+8] 0 0000585C E86FFC call _find_fname 0 0000585F 85C0 test ax, ax 0 00005861 7403E9C900 jne _.L250 0 00005866 8A440F mov al, byte ptr [si+15] 0 00005869 8846FE mov byte ptr [bp-2], al 0 0000586C F6460B02 test byte ptr [bp+11], 2 0 00005870 7503E98300 je _.L251 0 00005875 A819 test al, 25 0 00005877 740C je _.L252 1580 _.L254: 0 00005879 BFFBFF mov di, -5 1582 _.L249: 0 0000587C 97 xchg di, ax 0 0000587D 89EC mov sp, bp 0 0000587F 5D pop bp 0 00005880 5F pop di 0 00005881 5E pop si 0 00005882 C20800 ret 8 1589 _.L252: 0 00005885 8B560C mov dx, word ptr [bp+12] 0 00005888 F7D2 not dx 0 0000588A 83E2DF and dx, -33 0 0000588D 8A46FE mov al, byte ptr [bp-2] 0 00005890 30E4 xor ah, ah 0 00005892 85C2 test dx, ax 0 00005894 75E3 jne _.L254 0 00005896 56 push si 0 00005897 E842F7 call _wipe_out 0 0000589A BF0300 mov di, 3 1600 _.L255: 0 0000589D 8A460E mov al, byte ptr [bp+14] 0 000058A0 884439 mov byte ptr [si+57], al 0 000058A3 C7442D0000 mov word ptr [si+45], 0 0 000058A8 C7442F0000 mov word ptr [si+47], 0 0 000058AD C744310000 mov word ptr [si+49], 0 0 000058B2 C744330000 mov word ptr [si+51], 0 0 000058B7 8B04 mov ax, word ptr [si] 0 000058B9 80E4BF and ah, -65 0 000058BC 83C840 or ax, 64 0 000058BF 8904 mov word ptr [si], ax 0 000058C1 83FF01 cmp di, 1 0 000058C4 B80000 mov ax, 0 0 000058C7 7403E98C00 jne _.L257 1614 _.L260: 0 000058CC 83FF01 cmp di, 1 0 000058CF 9F lahf 0 000058D0 D0E4 shl ah, 1 0 000058D2 99 cwd 0 000058D3 F7DA neg dx 0 000058D5 52 push dx 0 000058D6 56 push si 0 000058D7 E806F8 call _merge_file_changes 0 000058DA C45C29 les bx, dword ptr [si+41] 0 000058DD 26837F0F00 cmp word ptr es:[bx+15], 0 0 000058E2 8B541E mov dx, word ptr [si+30] 0 000058E5 7503E99400 je _.L273 0 000058EA 31C0 xor ax, ax 1628 _.L261: 0 000058EC 895435 mov word ptr [si+53], dx 0 000058EF 894437 mov word ptr [si+55], ax 0 000058F2 56 push si 0 000058F3 E819F7 call _fnode_to_sft 0 000058F6 EB84 jmp _.L249 1634 _.L251: 0 000058F8 F6460B01 test byte ptr [bp+11], 1 0 000058FC 7503E98300 je _.L262 0 00005901 837E0A00 cmp word ptr [bp+10], 0 0 00005905 7D0A jge _.L256 0 00005907 F646FE01 test byte ptr [bp-2], 1 0 0000590B 7404 je _.L256 0 0000590D 80660AFC and byte ptr [bp+10], -4 1642 _.L256: 0 00005911 F646FE18 test byte ptr [bp-2], 24 0 00005915 7403E95FFF jne _.L254 0 0000591A F646FE01 test byte ptr [bp-2], 1 0 0000591E 7409 je _.L263 0 00005920 F6460A03 test byte ptr [bp+10], 3 0 00005924 7403E950FF jne _.L254 1649 _.L263: 0 00005929 BF0100 mov di, 1 0 0000592C E96EFF jmp _.L255 1652 _.L250: 0 0000592F 89C7 mov di, ax 0 00005931 83F8FE cmp ax, -2 0 00005934 7403E943FF jne _.L249 0 00005939 F6460B04 test byte ptr [bp+11], 4 0 0000593D 7503E93AFF je _.L249 0 00005942 FF7608 push word ptr [bp+8] 0 00005945 56 push si 0 00005946 E819FB call _alloc_find_free 0 00005949 89C7 mov di, ax 0 0000594B 85C0 test ax, ax 0 0000594D 7403E92AFF jne _.L249 0 00005952 BF0200 mov di, 2 0 00005955 E945FF jmp _.L255 1666 _.L257: 0 00005958 8B5402 mov dx, word ptr [si+2] 0 0000595B 42 inc dx 0 0000595C 52 push dx 0 0000595D 50 push ax 0 0000595E 50 push ax 0 0000595F 8946FE mov word ptr [bp-2], ax 0 00005962 FF760C push word ptr [bp+12] 0 00005965 8D5404 lea dx, [4+si] 0 00005968 52 push dx 0 00005969 E886FE call _init_direntry 0 0000596C 8B46FE mov ax, word ptr [bp-2] 0 0000596F 50 push ax 0 00005970 56 push si 0 00005971 E8[FEFF] call _dir_write_update 0 00005974 85C0 test ax, ax 0 00005976 7403E951FF jne _.L260 0 0000597B E9FBFE jmp _.L254 1684 _.L273: 0 0000597E 8B4418 mov ax, word ptr [si+24] 0 00005981 E968FF jmp _.L261 1687 _.L262: 0 00005984 BFB0FF mov di, -80 0 00005987 E9F2FE jmp _.L249 1690 .size _dos_open, .-_dos_open 1691 .global _dos_close 1692 .type _dos_close, @function 1693 _dos_close: 0 0000598A 56 push si 0 0000598B 55 push bp 0 0000598C 89E5 mov bp, sp 0 0000598E FF7606 push word ptr [bp+6] 0 00005991 E83DF2 call _sft_to_fnode 0 00005994 96 xchg si, ax 0 00005995 8B04 mov ax, word ptr [si] 0 00005997 A840 test al, 64 0 00005999 7518 jne _.L276 0 0000599B F6C440 test ah, 64 0 0000599E 750C jne _.L277 0 000059A0 E8[FEFF] call _dos_gettime 0 000059A3 89441A mov word ptr [si+26], ax 0 000059A6 E8[FEFF] call _dos_getdate 0 000059A9 89441C mov word ptr [si+28], ax 1709 _.L277: 0 000059AC 31C0 xor ax, ax 0 000059AE 50 push ax 0 000059AF 56 push si 0 000059B0 E82DF7 call _merge_file_changes 1714 _.L276: 0 000059B3 C64439FF mov byte ptr [si+57], -1 0 000059B7 B80100 mov ax, 1 0 000059BA 50 push ax 0 000059BB 56 push si 0 000059BC E8[FEFF] call _dir_write_update 0 000059BF 31D2 xor dx, dx 0 000059C1 39D0 cmp ax, dx 0 000059C3 7503 jne _.L275 0 000059C5 BAFAFF mov dx, -6 1724 _.L275: 0 000059C8 92 xchg dx, ax 0 000059C9 89EC mov sp, bp 0 000059CB 5D pop bp 0 000059CC 5E pop si 0 000059CD C20200 ret 2 1730 .size _dos_close, .-_dos_close === Switch to base=012B40h -> ".RODATA.STR1.1" 1731 .section .rodata.str1.1 1732 _.LC1: 0 00001934 2E20202020202020 .string ". " 0 0000193C 20202000 === Switch to base=002270h -> ".TEXT" 1734 .text 1735 .global _dos_mkdir 1736 .type _dos_mkdir, @function 1737 _dos_mkdir: 0 000059D0 56 push si 0 000059D1 57 push di 0 000059D2 55 push bp 0 000059D3 89E5 mov bp, sp 0 000059D5 83EC0E sub sp, 14 0 000059D8 FF7608 push word ptr [bp+8] 0 000059DB E8[FEFF] call _strlen 0 000059DE 83F842 cmp ax, 66 0 000059E1 7603E95D01 ja _.L291 0 000059E6 BE[0000] mov si, offset _fnode 0 000059E9 56 push si 0 000059EA B83700 mov ax, 55 0 000059ED 50 push ax 0 000059EE FF7608 push word ptr [bp+8] 0 000059F1 E8DAFA call _find_fname 0 000059F4 89C7 mov di, ax 0 000059F6 83F8FE cmp ax, -2 0 000059F9 7410 je _.L283 0 000059FB 85C0 test ax, ax 1757 _.L304: 0 000059FD 7503 jne _.L281 1759 _.L286: 0 000059FF BFFBFF mov di, -5 1761 _.L281: 0 00005A02 97 xchg di, ax 0 00005A03 89EC mov sp, bp 0 00005A05 5D pop bp 0 00005A06 5F pop di 0 00005A07 5E pop si 0 00005A08 C20200 ret 2 1768 _.L283: 0 00005A0B 8B5C02 mov bx, word ptr [si+2] 0 00005A0E C4470F les ax, dword ptr [bx+15] 0 00005A11 8946FA mov word ptr [bp-6], ax 0 00005A14 8C46F8 mov word ptr [bp-8], es 0 00005A17 FF7608 push word ptr [bp+8] 0 00005A1A 56 push si 0 00005A1B E844FA call _alloc_find_free 0 00005A1E 89C7 mov di, ax 0 00005A20 85C0 test ax, ax 0 00005A22 75DE jne _.L281 0 00005A24 56 push si 0 00005A25 E876F3 call _find_fat_free 0 00005A28 8946FE mov word ptr [bp-2], ax 0 00005A2B 8956FC mov word ptr [bp-4], dx 0 00005A2E 83F8FF cmp ax, -1 0 00005A31 750B jne _.L284 0 00005A33 81FAFF0F cmp dx, 4095 0 00005A37 7505 jne _.L284 1787 _.L285: 0 00005A39 BFE4FF mov di, -28 0 00005A3C EBC4 jmp _.L281 1790 _.L284: 0 00005A3E 8B4402 mov ax, word ptr [si+2] 0 00005A41 40 inc ax 0 00005A42 50 push ax 0 00005A43 FF76FC push word ptr [bp-4] 0 00005A46 FF76FE push word ptr [bp-2] 0 00005A49 B81000 mov ax, 16 0 00005A4C 50 push ax 0 00005A4D B8[0400] mov ax, offset _fnode+4 0 00005A50 50 push ax 0 00005A51 E89EFD call _init_direntry 0 00005A54 B8FF0F mov ax, 4095 0 00005A57 50 push ax 0 00005A58 B8FFFF mov ax, -1 0 00005A5B 50 push ax 0 00005A5C FF76FC push word ptr [bp-4] 0 00005A5F FF76FE push word ptr [bp-2] 0 00005A62 FF36[2B00] push word ptr [_fnode+43] 0 00005A66 FF36[2900] push word ptr [_fnode+41] 0 00005A6A E8[FEFF] call _link_fat 0 00005A6D 8946F6 mov word ptr [bp-10], ax 0 00005A70 09D0 or ax, dx 0 00005A72 8956F4 mov word ptr [bp-12], dx 0 00005A75 75C2 jne _.L285 0 00005A77 FF76FC push word ptr [bp-4] 0 00005A7A FF76FE push word ptr [bp-2] 0 00005A7D 56 push si 0 00005A7E E875F8 call _clear_dir 0 00005A81 89C7 mov di, ax 0 00005A83 85C0 test ax, ax 0 00005A85 8B56F4 mov dx, word ptr [bp-12] 0 00005A88 7403E975FF jne _.L281 0 00005A8D 8956F2 mov word ptr [bp-14], dx 0 00005A90 50 push ax 0 00005A91 56 push si 0 00005A92 E8[FEFF] call _dir_write_update 0 00005A95 85C0 test ax, ax 0 00005A97 7503E963FF je _.L286 0 00005A9C FF76FC push word ptr [bp-4] 0 00005A9F FF76FE push word ptr [bp-2] 0 00005AA2 56 push si 0 00005AA3 E8[FEFF] call _dir_init_fnode 0 00005AA6 8B5C02 mov bx, word ptr [si+2] 0 00005AA9 897F0D mov word ptr [bx+13], di 0 00005AAC 56 push si 0 00005AAD E800F2 call _find_free 0 00005AB0 B9[1500] mov cx, offset _.LC1 0 00005AB3 51 push cx 0 00005AB4 894EF4 mov word ptr [bp-12], cx 0 00005AB7 FF76FC push word ptr [bp-4] 0 00005ABA FF76FE push word ptr [bp-2] 0 00005ABD B81000 mov ax, 16 0 00005AC0 50 push ax 0 00005AC1 B8[0400] mov ax, offset _fnode+4 0 00005AC4 50 push ax 0 00005AC5 E82AFD call _init_direntry 0 00005AC8 57 push di 0 00005AC9 56 push si 0 00005ACA E8[FEFF] call _dir_write_update 0 00005ACD 85C0 test ax, ax 0 00005ACF 8B4EF4 mov cx, word ptr [bp-12] 0 00005AD2 894EFE mov word ptr [bp-2], cx 0 00005AD5 7503E925FF je _.L286 0 00005ADA 56 push si 0 00005ADB E8D2F1 call _find_free 0 00005ADE 85C0 test ax, ax 0 00005AE0 8B56F2 mov dx, word ptr [bp-14] 0 00005AE3 742F je _.L287 1858 _.L290: 0 00005AE5 C45C29 les bx, dword ptr [si+41] 0 00005AE8 26837F0F00 cmp word ptr es:[bx+15], 0 0 00005AED 7437 je _.L288 1862 _.L289: 0 00005AEF FF76FE push word ptr [bp-2] 0 00005AF2 FF76F8 push word ptr [bp-8] 0 00005AF5 FF76FA push word ptr [bp-6] 0 00005AF8 B81000 mov ax, 16 0 00005AFB 50 push ax 0 00005AFC B8[0400] mov ax, offset _fnode+4 0 00005AFF 50 push ax 0 00005B00 E8EFFC call _init_direntry 0 00005B03 C606[0500]2E mov byte ptr [_fnode+5], 46 0 00005B08 31C0 xor ax, ax 0 00005B0A 50 push ax 0 00005B0B 56 push si 0 00005B0C E8[FEFF] call _dir_write_update 0 00005B0F 85C0 test ax, ax 0 00005B11 E9E9FE jmp _.L304 1878 _.L287: 0 00005B14 8956FC mov word ptr [bp-4], dx 0 00005B17 56 push si 0 00005B18 E87EF8 call _extend_dir 0 00005B1B 85C0 test ax, ax 0 00005B1D 8B56FC mov dx, word ptr [bp-4] 0 00005B20 74C3 je _.L290 0 00005B22 97 xchg di, ax 0 00005B23 E9DCFE jmp _.L281 1887 _.L288: 0 00005B26 8B4EFA mov cx, word ptr [bp-6] 0 00005B29 26394F35 cmp word ptr es:[bx+53], cx 0 00005B2D 75C0 jne _.L289 0 00005B2F 8B46F8 mov ax, word ptr [bp-8] 0 00005B32 26394737 cmp word ptr es:[bx+55], ax 0 00005B36 75B7 jne _.L289 0 00005B38 8B46F6 mov ax, word ptr [bp-10] 0 00005B3B 8946FA mov word ptr [bp-6], ax 0 00005B3E 8956F8 mov word ptr [bp-8], dx 0 00005B41 EBAC jmp _.L289 1898 _.L291: 0 00005B43 BFFDFF mov di, -3 0 00005B46 E9B9FE jmp _.L281 1901 .size _dos_mkdir, .-_dos_mkdir 1902 .global _map_cluster 1903 .type _map_cluster, @function 1904 _map_cluster: 0 00005B49 56 push si 0 00005B4A 57 push di 0 00005B4B 55 push bp 0 00005B4C 89E5 mov bp, sp 0 00005B4E 83EC0A sub sp, 10 0 00005B51 8B7E08 mov di, word ptr [bp+8] 0 00005B54 8B4537 mov ax, word ptr [di+55] 0 00005B57 0B4535 or ax, word ptr [di+53] 0 00005B5A 752B jne _.L306 0 00005B5C 837E0A01 cmp word ptr [bp+10], 1 0 00005B60 750B jne _.L307 1916 _.L316: 0 00005B62 B8E7FF mov ax, -25 1918 _.L305: 0 00005B65 89EC mov sp, bp 0 00005B67 5D pop bp 0 00005B68 5F pop di 0 00005B69 5E pop si 0 00005B6A C20400 ret 4 1924 _.L307: 0 00005B6D 57 push di 0 00005B6E E817F3 call _extend 0 00005B71 83F8FF cmp ax, -1 0 00005B74 750B jne _.L309 0 00005B76 81FAFF0F cmp dx, 4095 0 00005B7A 7505 jne _.L309 1931 _.L319: 0 00005B7C B8E4FF mov ax, -28 0 00005B7F EBE4 jmp _.L305 1934 _.L309: 0 00005B81 894535 mov word ptr [di+53], ax 0 00005B84 895537 mov word ptr [di+55], dx 1937 _.L306: 0 00005B87 8B7529 mov si, word ptr [di+41] 0 00005B8A 8B452B mov ax, word ptr [di+43] 0 00005B8D 8946FE mov word ptr [bp-2], ax 0 00005B90 8EC0 mov es, ax 0 00005B92 268B4402 mov ax, word ptr es:[si+2] 0 00005B96 31C9 xor cx, cx 0 00005B98 51 push cx 0 00005B99 894EF8 mov word ptr [bp-8], cx 0 00005B9C 50 push ax 0 00005B9D FF752F push word ptr [di+47] 0 00005BA0 FF752D push word ptr [di+45] 0 00005BA3 E8[FEFF] call ___udivsi3 0 00005BA6 8E46FE mov es, word ptr [bp-2] 0 00005BA9 268A4C05 mov cl, byte ptr es:[si+5] 0 00005BAD 884EFC mov byte ptr [bp-4], cl 0 00005BB0 C646FD00 mov byte ptr [bp-3], 0 0 00005BB4 FF76FC push word ptr [bp-4] 0 00005BB7 52 push dx 0 00005BB8 50 push ax 0 00005BB9 E8[FEFF] call ___lshrsi3 0 00005BBC 8946FC mov word ptr [bp-4], ax 0 00005BBF 8956FA mov word ptr [bp-6], dx 0 00005BC2 395533 cmp word ptr [di+51], dx 0 00005BC5 770A ja _.L322 0 00005BC7 7527 jne _.L315 0 00005BC9 8B46FC mov ax, word ptr [bp-4] 0 00005BCC 394531 cmp word ptr [di+49], ax 0 00005BCF 761F jbe _.L315 1966 _.L322: 0 00005BD1 807D39FF cmp byte ptr [di+57], -1 0 00005BD5 752E jne _.L312 0 00005BD7 8B5D02 mov bx, word ptr [di+2] 0 00005BDA 8B470F mov ax, word ptr [bx+15] 0 00005BDD 8B5711 mov dx, word ptr [bx+17] 1972 _.L313: 0 00005BE0 894535 mov word ptr [di+53], ax 0 00005BE3 895537 mov word ptr [di+55], dx 0 00005BE6 C745310000 mov word ptr [di+49], 0 0 00005BEB C745330000 mov word ptr [di+51], 0 1977 _.L315: 0 00005BF0 8B46FC mov ax, word ptr [bp-4] 0 00005BF3 394531 cmp word ptr [di+49], ax 0 00005BF6 7523 jne _.L321 0 00005BF8 8B46FA mov ax, word ptr [bp-6] 0 00005BFB 394533 cmp word ptr [di+51], ax 0 00005BFE 751B jne _.L321 0 00005C00 31C0 xor ax, ax 0 00005C02 E960FF jmp _.L305 1986 _.L312: 0 00005C05 8E46FE mov es, word ptr [bp-2] 0 00005C08 26837C0F00 cmp word ptr es:[si+15], 0 0 00005C0D 8B451E mov ax, word ptr [di+30] 0 00005C10 7404 je _.L314 0 00005C12 31D2 xor dx, dx 0 00005C14 EBCA jmp _.L313 1993 _.L314: 0 00005C16 8B5518 mov dx, word ptr [di+24] 0 00005C19 EBC5 jmp _.L313 1996 _.L321: 0 00005C1B FF7537 push word ptr [di+55] 0 00005C1E FF7535 push word ptr [di+53] 0 00005C21 FF752B push word ptr [di+43] 0 00005C24 FF7529 push word ptr [di+41] 0 00005C27 E8[FEFF] call _next_cluster 0 00005C2A 89C6 mov si, ax 0 00005C2C 89D3 mov bx, dx 0 00005C2E 85D2 test dx, dx 0 00005C30 7508 jne _.L323 0 00005C32 83F801 cmp ax, 1 0 00005C35 7703E928FF jbe _.L316 2008 _.L323: 0 00005C3A 83FEFF cmp si, -1 0 00005C3D 7572 jne _.L318 0 00005C3F 81FBFF0F cmp bx, 4095 0 00005C43 756C jne _.L318 0 00005C45 837E0A01 cmp word ptr [bp+10], 1 0 00005C49 7503E914FF je _.L316 0 00005C4E 57 push di 0 00005C4F E836F2 call _extend 0 00005C52 89C6 mov si, ax 0 00005C54 89D3 mov bx, dx 0 00005C56 83F8FF cmp ax, -1 0 00005C59 7509 jne _.L324 0 00005C5B 81FAFF0F cmp dx, 4095 0 00005C5F 7503E918FF je _.L319 2023 _.L324: 0 00005C64 895EF6 mov word ptr [bp-10], bx 0 00005C67 8B4531 mov ax, word ptr [di+49] 0 00005C6A 8B4D33 mov cx, word ptr [di+51] 0 00005C6D 83C002 add ax, 2 0 00005C70 8946FE mov word ptr [bp-2], ax 0 00005C73 83D100 adc cx, 0 0 00005C76 C45D29 les bx, dword ptr [di+41] 0 00005C79 268B4702 mov ax, word ptr es:[bx+2] 0 00005C7D 93 xchg bx, ax 0 00005C7E 91 xchg cx, ax 0 00005C7F 89DA mov dx, bx 0 00005C81 F7E2 mul dx 0 00005C83 91 xchg cx, ax 0 00005C84 8B46FE mov ax, word ptr [bp-2] 0 00005C87 F7E3 mul bx 0 00005C89 01D1 add cx, dx 0 00005C8B 8B5D29 mov bx, word ptr [di+41] 0 00005C8E 268A5F05 mov bl, byte ptr es:[bx+5] 0 00005C92 885EFE mov byte ptr [bp-2], bl 0 00005C95 C646FF00 mov byte ptr [bp-1], 0 0 00005C99 FF76FE push word ptr [bp-2] 0 00005C9C 51 push cx 0 00005C9D 50 push ax 0 00005C9E E8[FEFF] call ___ashlsi3 0 00005CA1 894520 mov word ptr [di+32], ax 0 00005CA4 895522 mov word ptr [di+34], dx 0 00005CA7 FF76F8 push word ptr [bp-8] 0 00005CAA 57 push di 0 00005CAB E832F4 call _merge_file_changes 0 00005CAE 8B5EF6 mov bx, word ptr [bp-10] 2054 _.L318: 0 00005CB1 897535 mov word ptr [di+53], si 0 00005CB4 895D37 mov word ptr [di+55], bx 0 00005CB7 8B4531 mov ax, word ptr [di+49] 0 00005CBA 8B5533 mov dx, word ptr [di+51] 0 00005CBD 83C001 add ax, 1 0 00005CC0 83D200 adc dx, 0 0 00005CC3 894531 mov word ptr [di+49], ax 0 00005CC6 895533 mov word ptr [di+51], dx 0 00005CC9 E924FF jmp _.L315 2064 .size _map_cluster, .-_map_cluster 2065 .global _rwblock 2066 .type _rwblock, @function 2067 _rwblock: 0 00005CCC 56 push si 0 00005CCD 57 push di 0 00005CCE 55 push bp 0 00005CCF 89E5 mov bp, sp 0 00005CD1 83EC1C sub sp, 28 0 00005CD4 8B460A mov ax, word ptr [bp+10] 0 00005CD7 8946FE mov word ptr [bp-2], ax 0 00005CDA 8B760C mov si, word ptr [bp+12] 0 00005CDD FF7608 push word ptr [bp+8] 0 00005CE0 E8EEEE call _sft_to_fnode 0 00005CE3 97 xchg di, ax 0 00005CE4 837E1002 cmp word ptr [bp+16], 2 0 00005CE8 7403E99404 jne _.L330 0 00005CED 36804D0F20 or byte ptr ss:[di+15], 32 0 00005CF2 368125BFBF and word ptr ss:[di], -16449 0 00005CF7 8B452F mov ax, word ptr [di+47] 0 00005CFA 363B4522 cmp ax, word ptr ss:[di+34] 0 00005CFE 770B ja _.L387 0 00005D00 7524 jne _.L331 0 00005D02 8B452D mov ax, word ptr [di+45] 0 00005D05 363B4520 cmp ax, word ptr ss:[di+32] 0 00005D09 761B jbe _.L331 2090 _.L387: 0 00005D0B B80200 mov ax, 2 0 00005D0E 50 push ax 0 00005D0F 57 push di 0 00005D10 E8[FEFF] call _map_cluster 0 00005D13 85C0 test ax, ax 0 00005D15 756A jne _.L333 0 00005D17 36C4552D les dx, dword ptr ss:[di+45] 0 00005D1B 895520 mov word ptr [di+32], dx 0 00005D1E 8C4522 mov word ptr [di+34], es 0 00005D21 50 push ax 0 00005D22 57 push di 0 00005D23 E8BAF3 call _merge_file_changes 2103 _.L331: 0 00005D26 837E0E00 cmp word ptr [bp+14], 0 0 00005D2A 7403E95B04 jne _.L380 0 00005D2F 8B752D mov si, word ptr [di+45] 0 00005D32 8B452F mov ax, word ptr [di+47] 0 00005D35 8946FE mov word ptr [bp-2], ax 0 00005D38 897520 mov word ptr [di+32], si 0 00005D3B 894522 mov word ptr [di+34], ax 0 00005D3E 36C44529 les ax, dword ptr ss:[di+41] 0 00005D42 8946FC mov word ptr [bp-4], ax 0 00005D45 8C46FA mov word ptr [bp-6], es 0 00005D48 8B46FE mov ax, word ptr [bp-2] 0 00005D4B 09F0 or ax, si 0 00005D4D 85C0 test ax, ax 0 00005D4F 7439 je _.L334 0 00005D51 89F2 mov dx, si 0 00005D53 83C2FF add dx, -1 0 00005D56 8B46FE mov ax, word ptr [bp-2] 0 00005D59 83D0FF adc ax, -1 0 00005D5C 89552D mov word ptr [di+45], dx 0 00005D5F 89452F mov word ptr [di+47], ax 2124 _.L336: 0 00005D62 B80100 mov ax, 1 0 00005D65 50 push ax 0 00005D66 57 push di 0 00005D67 E8[FEFF] call _map_cluster 0 00005D6A 85C0 test ax, ax 0 00005D6C 7429 je _.L339 2131 _.L341: 0 00005D6E B8FBFF mov ax, -5 2133 _.L340: 0 00005D71 89752D mov word ptr [di+45], si 0 00005D74 8B56FE mov dx, word ptr [bp-2] 0 00005D77 89552F mov word ptr [di+47], dx 0 00005D7A 85C0 test ax, ax 0 00005D7C 7403E93D02 jne _.L383 2139 _.L333: 0 00005D81 57 push di 0 00005D82 E88AF2 call _fnode_to_sft 0 00005D85 31C0 xor ax, ax 0 00005D87 E98204 jmp _.L421 2144 _.L334: 0 00005D8A 8B4537 mov ax, word ptr [di+55] 0 00005D8D 360B4535 or ax, word ptr ss:[di+53] 0 00005D91 75CF jne _.L336 2148 _.L337: 0 00005D93 31C0 xor ax, ax 0 00005D95 EBDA jmp _.L340 2151 _.L339: 0 00005D97 8B4535 mov ax, word ptr [di+53] 0 00005D9A 8946F4 mov word ptr [bp-12], ax 0 00005D9D 8E4537 mov es, word ptr [di+55] 0 00005DA0 06 push es 0 00005DA1 8C46F6 mov word ptr [bp-10], es 0 00005DA4 50 push ax 0 00005DA5 FF76FA push word ptr [bp-6] 0 00005DA8 FF76FC push word ptr [bp-4] 0 00005DAB E8[FEFF] call _next_cluster 0 00005DAE 8946F8 mov word ptr [bp-8], ax 0 00005DB1 89D1 mov cx, dx 0 00005DB3 85D2 test dx, dx 0 00005DB5 8E46F6 mov es, word ptr [bp-10] 0 00005DB8 7505 jne _.L388 0 00005DBA 83F801 cmp ax, 1 0 00005DBD 76AF jbe _.L341 2168 _.L388: 0 00005DBF 8B4522 mov ax, word ptr [di+34] 0 00005DC2 360B4520 or ax, word ptr ss:[di+32] 0 00005DC6 7561 jne _.L343 0 00005DC8 894535 mov word ptr [di+53], ax 0 00005DCB 894537 mov word ptr [di+55], ax 0 00005DCE 89451E mov word ptr [di+30], ax 0 00005DD1 89C2 mov dx, ax 0 00005DD3 8946F6 mov word ptr [bp-10], ax 0 00005DD6 8E5EFA mov ds, word ptr [bp-6] 0 00005DD9 8B5EFC mov bx, word ptr [bp-4] 0 00005DDC 837F0F00 cmp word ptr [bx+15], 0 0 00005DE0 7504 jne _.L344 0 00005DE2 36894518 mov word ptr ss:[di+24], ax 2182 _.L344: 0 00005DE6 894EF2 mov word ptr [bp-14], cx 0 00005DE9 FF76F6 push word ptr [bp-10] 0 00005DEC 52 push dx 0 00005DED 06 push es 0 00005DEE FF76F4 push word ptr [bp-12] 0 00005DF1 FF76FA push word ptr [bp-6] 0 00005DF4 FF76FC push word ptr [bp-4] 0 00005DF7 16 push ss 0 00005DF8 1F pop ds 0 00005DF9 E8[FEFF] call _link_fat 0 00005DFC 09D0 or ax, dx 0 00005DFE 7403E96BFF jne _.L341 0 00005E03 8B4EF2 mov cx, word ptr [bp-14] 0 00005E06 51 push cx 0 00005E07 FF76F8 push word ptr [bp-8] 0 00005E0A FF76FA push word ptr [bp-6] 0 00005E0D FF76FC push word ptr [bp-4] 0 00005E10 E8CAEE call _wipe_out_clusters 0 00005E13 36C45D29 les bx, dword ptr ss:[di+41] 0 00005E17 268A07 mov al, byte ptr es:[bx] 0 00005E1A 98 cbw 0 00005E1B 50 push ax 0 00005E1C E8[FEFF] call _flush_buffers 0 00005E1F 85C0 test ax, ax 0 00005E21 7403E96DFF jne _.L337 0 00005E26 E945FF jmp _.L341 2209 _.L343: 0 00005E29 837EF8FF cmp word ptr [bp-8], -1 0 00005E2D 7509 jne _.L389 0 00005E2F 81F9FF0F cmp cx, 4095 0 00005E33 7503E95BFF je _.L337 2214 _.L389: 0 00005E38 BAFFFF mov dx, -1 0 00005E3B B8FF0F mov ax, 4095 0 00005E3E 8946F6 mov word ptr [bp-10], ax 0 00005E41 EBA3 jmp _.L344 2219 _.L350: 0 00005E43 C746E40100 mov word ptr [bp-28], 1 0 00005E48 E98403 jmp _.L351 2222 _.L353: 0 00005E4B FF7610 push word ptr [bp+16] 0 00005E4E 57 push di 0 00005E4F E8[FEFF] call _map_cluster 0 00005E52 85C0 test ax, ax 0 00005E54 7403E9AC03 jne _.L422 0 00005E59 837E1002 cmp word ptr [bp+16], 2 0 00005E5D 7505 jne _.L356 0 00005E5F 50 push ax 0 00005E60 57 push di 0 00005E61 E87CF2 call _merge_file_changes 2233 _.L356: 0 00005E64 8B752D mov si, word ptr [di+45] 0 00005E67 8B452F mov ax, word ptr [di+47] 0 00005E6A 8946F4 mov word ptr [bp-12], ax 0 00005E6D 8B4529 mov ax, word ptr [di+41] 0 00005E70 8946EA mov word ptr [bp-22], ax 0 00005E73 8B452B mov ax, word ptr [di+43] 0 00005E76 8946E8 mov word ptr [bp-24], ax 0 00005E79 8EC0 mov es, ax 0 00005E7B 8B5EEA mov bx, word ptr [bp-22] 0 00005E7E 268A4704 mov al, byte ptr es:[bx+4] 0 00005E82 8846E7 mov byte ptr [bp-25], al 0 00005E85 31C0 xor ax, ax 0 00005E87 50 push ax 0 00005E88 FF76FA push word ptr [bp-6] 0 00005E8B FF76F4 push word ptr [bp-12] 0 00005E8E 56 push si 0 00005E8F E8[FEFF] call ___udivsi3 0 00005E92 2246E7 and al, byte ptr [bp-25] 0 00005E95 8846E6 mov byte ptr [bp-26], al 0 00005E98 31C0 xor ax, ax 0 00005E9A 50 push ax 0 00005E9B FF76FA push word ptr [bp-6] 0 00005E9E FF76F4 push word ptr [bp-12] 0 00005EA1 56 push si 0 00005EA2 E8[FEFF] call ___umodsi3 0 00005EA5 8946FC mov word ptr [bp-4], ax 0 00005EA8 FF76E8 push word ptr [bp-24] 0 00005EAB FF76EA push word ptr [bp-22] 0 00005EAE 36FF7537 push word ptr ss:[di+55] 0 00005EB2 36FF7535 push word ptr ss:[di+53] 0 00005EB6 E8[FEFF] call _clus2phys 0 00005EB9 89C1 mov cx, ax 0 00005EBB 89D3 mov bx, dx 0 00005EBD 8A46E6 mov al, byte ptr [bp-26] 0 00005EC0 30E4 xor ah, ah 0 00005EC2 31D2 xor dx, dx 0 00005EC4 01C8 add ax, cx 0 00005EC6 8946EE mov word ptr [bp-18], ax 0 00005EC9 11DA adc dx, bx 0 00005ECB 8956EC mov word ptr [bp-20], dx 0 00005ECE 837EFC00 cmp word ptr [bp-4], 0 0 00005ED2 7403E95D01 jne _.L357 0 00005ED7 8936[0000] mov word ptr [_startoffset.2545], si 0 00005EDB 8B46F4 mov ax, word ptr [bp-12] 0 00005EDE A3[0200] mov word ptr [_startoffset.2545+2], ax 0 00005EE1 8B46F6 mov ax, word ptr [bp-10] 0 00005EE4 837E1001 cmp word ptr [bp+16], 1 0 00005EE8 751B jne _.L358 0 00005EEA 8B4520 mov ax, word ptr [di+32] 0 00005EED 8B5522 mov dx, word ptr [di+34] 0 00005EF0 91 xchg cx, ax 0 00005EF1 29F1 sub cx, si 0 00005EF3 1B56F4 sbb dx, word ptr [bp-12] 0 00005EF6 3956FC cmp word ptr [bp-4], dx 0 00005EF9 7507 jne _.L386 0 00005EFB 89C8 mov ax, cx 0 00005EFD 394EF6 cmp word ptr [bp-10], cx 0 00005F00 7703 ja _.L358 2292 _.L386: 0 00005F02 8B46F6 mov ax, word ptr [bp-10] 2294 _.L358: 0 00005F05 31D2 xor dx, dx 0 00005F07 F776FA div word ptr [bp-6] 0 00005F0A 8946FE mov word ptr [bp-2], ax 0 00005F0D 85C0 test ax, ax 0 00005F0F 7503E92001 je _.L357 0 00005F14 8A46E7 mov al, byte ptr [bp-25] 0 00005F17 30E4 xor ah, ah 0 00005F19 40 inc ax 0 00005F1A 8A56E6 mov dl, byte ptr [bp-26] 0 00005F1D 30F6 xor dh, dh 0 00005F1F 29D0 sub ax, dx 0 00005F21 8B56FE mov dx, word ptr [bp-2] 0 00005F24 8956FC mov word ptr [bp-4], dx 0 00005F27 39C2 cmp dx, ax 0 00005F29 7603 jbe _.L360 0 00005F2B 8946FC mov word ptr [bp-4], ax 2311 _.L360: 0 00005F2E 8B46FA mov ax, word ptr [bp-6] 0 00005F31 F766FC mul word ptr [bp-4] 0 00005F34 01F0 add ax, si 0 00005F36 BA0000 mov dx, 0 0 00005F39 1356F4 adc dx, word ptr [bp-12] 0 00005F3C 89452D mov word ptr [di+45], ax 0 00005F3F 89552F mov word ptr [di+47], dx 2319 _.L361: 0 00005F42 8B46FC mov ax, word ptr [bp-4] 0 00005F45 3B46FE cmp ax, word ptr [bp-2] 0 00005F48 730B jnc _.L365 0 00005F4A FF7610 push word ptr [bp+16] 0 00005F4D 57 push di 0 00005F4E E8[FEFF] call _map_cluster 0 00005F51 85C0 test ax, ax 0 00005F53 7472 je _.L362 2328 _.L365: 0 00005F55 8B46FC mov ax, word ptr [bp-4] 0 00005F58 F766FA mul word ptr [bp-6] 0 00005F5B 8946FE mov word ptr [bp-2], ax 0 00005F5E FF7610 push word ptr [bp+16] 0 00005F61 36C45D29 les bx, dword ptr ss:[di+41] 0 00005F65 268A07 mov al, byte ptr es:[bx] 0 00005F68 98 cbw 0 00005F69 50 push ax 0 00005F6A 8B46EE mov ax, word ptr [bp-18] 0 00005F6D 83C0FF add ax, -1 0 00005F70 8B56EC mov dx, word ptr [bp-20] 0 00005F73 83D2FF adc dx, -1 0 00005F76 8B4EFC mov cx, word ptr [bp-4] 0 00005F79 01C8 add ax, cx 0 00005F7B 83D200 adc dx, 0 0 00005F7E 52 push dx 0 00005F7F 50 push ax 0 00005F80 FF76EC push word ptr [bp-20] 0 00005F83 FF76EE push word ptr [bp-18] 0 00005F86 E8[FEFF] call _DeleteBlockInBufferCache 0 00005F89 FF76E4 push word ptr [bp-28] 0 00005F8C 8B4EFC mov cx, word ptr [bp-4] 0 00005F8F 51 push cx 0 00005F90 FF76F0 push word ptr [bp-16] 0 00005F93 FF76F2 push word ptr [bp-14] 0 00005F96 FF76EC push word ptr [bp-20] 0 00005F99 FF76EE push word ptr [bp-18] 0 00005F9C 36C45D29 les bx, dword ptr ss:[di+41] 0 00005FA0 268A07 mov al, byte ptr es:[bx] 0 00005FA3 98 cbw 0 00005FA4 50 push ax 0 00005FA5 E8[FEFF] call _dskxfer 0 00005FA8 85C0 test ax, ax 0 00005FAA 7503E98401 je _.L364 0 00005FAF 36C406[0000] les ax, dword ptr ss:[_startoffset.2545] 0 00005FB4 89452D mov word ptr [di+45], ax 0 00005FB7 8C452F mov word ptr [di+47], es 0 00005FBA 57 push di 0 00005FBB E851F0 call _fnode_to_sft 2368 _.L383: 0 00005FBE B8FBFF mov ax, -5 2370 _.L420: 0 00005FC1 BAFFFF mov dx, -1 0 00005FC4 E94702 jmp _.L329 2373 _.L362: 0 00005FC7 8946EA mov word ptr [bp-22], ax 0 00005FCA 8B7529 mov si, word ptr [di+41] 0 00005FCD 8B452B mov ax, word ptr [di+43] 0 00005FD0 8946F4 mov word ptr [bp-12], ax 0 00005FD3 50 push ax 0 00005FD4 56 push si 0 00005FD5 36FF7537 push word ptr ss:[di+55] 0 00005FD9 36FF7535 push word ptr ss:[di+53] 0 00005FDD E8[FEFF] call _clus2phys 0 00005FE0 8B4EFC mov cx, word ptr [bp-4] 0 00005FE3 8B5EEA mov bx, word ptr [bp-22] 0 00005FE6 034EEE add cx, word ptr [bp-18] 0 00005FE9 135EEC adc bx, word ptr [bp-20] 0 00005FEC 39C8 cmp ax, cx 0 00005FEE 7403E962FF jne _.L365 0 00005FF3 39DA cmp dx, bx 0 00005FF5 7403E95BFF jne _.L365 0 00005FFA 8E46F4 mov es, word ptr [bp-12] 0 00005FFD 268A5C04 mov bl, byte ptr es:[si+4] 0 00006001 30FF xor bh, bh 0 00006003 8B76FC mov si, word ptr [bp-4] 0 00006006 8D5801 lea bx, [1+bx+si] 0 00006009 8B46FE mov ax, word ptr [bp-2] 0 0000600C 8946FC mov word ptr [bp-4], ax 0 0000600F 39D8 cmp ax, bx 0 00006011 7603 jbe _.L366 0 00006013 895EFC mov word ptr [bp-4], bx 2401 _.L366: 0 00006016 8B46FA mov ax, word ptr [bp-6] 0 00006019 F766FC mul word ptr [bp-4] 0 0000601C 8B16[0000] mov dx, word ptr [_startoffset.2545] 0 00006020 8B0E[0200] mov cx, word ptr [_startoffset.2545+2] 0 00006024 01C2 add dx, ax 0 00006026 B80000 mov ax, 0 0 00006029 11C1 adc cx, ax 0 0000602B 89552D mov word ptr [di+45], dx 0 0000602E 894D2F mov word ptr [di+47], cx 0 00006031 E90EFF jmp _.L361 2412 _.L357: 0 00006034 31C0 xor ax, ax 0 00006036 50 push ax 0 00006037 8E46E8 mov es, word ptr [bp-24] 0 0000603A 8B5EEA mov bx, word ptr [bp-22] 0 0000603D 268A07 mov al, byte ptr es:[bx] 0 00006040 98 cbw 0 00006041 50 push ax 0 00006042 FF76EC push word ptr [bp-20] 0 00006045 FF76EE push word ptr [bp-18] 0 00006048 E8[FEFF] call _getblk 0 0000604B 8946F4 mov word ptr [bp-12], ax 0 0000604E 96 xchg si, ax 0 0000604F 09D6 or si, dx 0 00006051 7503E9AF01 je _.L422 0 00006056 8B76FA mov si, word ptr [bp-6] 0 00006059 2B76FC sub si, word ptr [bp-4] 0 0000605C 8976FE mov word ptr [bp-2], si 0 0000605F 3B76F6 cmp si, word ptr [bp-10] 0 00006062 7606 jbe _.L369 0 00006064 8B46F6 mov ax, word ptr [bp-10] 0 00006067 8946FE mov word ptr [bp-2], ax 2434 _.L369: 0 0000606A 837E1001 cmp word ptr [bp+16], 1 0 0000606E 756F jne _.L370 0 00006070 8B5D20 mov bx, word ptr [di+32] 0 00006073 8B4522 mov ax, word ptr [di+34] 0 00006076 8B4D2D mov cx, word ptr [di+45] 0 00006079 8B752F mov si, word ptr [di+47] 0 0000607C 8976EE mov word ptr [bp-18], si 0 0000607F 89DE mov si, bx 0 00006081 29CE sub si, cx 0 00006083 8976EC mov word ptr [bp-20], si 0 00006086 1B46EE sbb ax, word ptr [bp-18] 0 00006089 85C0 test ax, ax 0 0000608B 770C ja _.L371 0 0000608D 7505 jne _.L393 0 0000608F 3B76FE cmp si, word ptr [bp-2] 0 00006092 7705 ja _.L371 2451 _.L393: 0 00006094 29CB sub bx, cx 0 00006096 895EFE mov word ptr [bp-2], bx 2454 _.L371: 0 00006099 FF76FE push word ptr [bp-2] 0 0000609C 8B5EFC mov bx, word ptr [bp-4] 0 0000609F 8B76F4 mov si, word ptr [bp-12] 0 000060A2 8D4014 lea ax, [20+bx+si] 0 000060A5 52 push dx 0 000060A6 8956FC mov word ptr [bp-4], dx 0 000060A9 50 push ax 0 000060AA FF76F0 push word ptr [bp-16] 0 000060AD FF76F2 push word ptr [bp-14] 0 000060B0 E8[FEFF] call _fmemcpy 0 000060B3 817EFE0002 cmp word ptr [bp-2], 512 0 000060B8 8B56FC mov dx, word ptr [bp-4] 0 000060BB 7456 je _.L373 0 000060BD 837E1001 cmp word ptr [bp+16], 1 0 000060C1 755A jne _.L374 0 000060C3 8B46FE mov ax, word ptr [bp-2] 0 000060C6 8B5D2D mov bx, word ptr [di+45] 0 000060C9 8B4D2F mov cx, word ptr [di+47] 0 000060CC 01D8 add ax, bx 0 000060CE BB0000 mov bx, 0 0 000060D1 11D9 adc cx, bx 0 000060D3 36394520 cmp word ptr ss:[di+32], ax 0 000060D7 7544 jne _.L374 0 000060D9 36394D22 cmp word ptr ss:[di+34], cx 0 000060DD EB32 jmp _.L419 2480 _.L370: 0 000060DF 837E1002 cmp word ptr [bp+16], 2 0 000060E3 75B4 jne _.L371 0 000060E5 FF76FE push word ptr [bp-2] 0 000060E8 FF76F0 push word ptr [bp-16] 0 000060EB FF76F2 push word ptr [bp-14] 0 000060EE 8B5EFC mov bx, word ptr [bp-4] 0 000060F1 8B76F4 mov si, word ptr [bp-12] 0 000060F4 8D4014 lea ax, [20+bx+si] 0 000060F7 52 push dx 0 000060F8 8956FC mov word ptr [bp-4], dx 0 000060FB 50 push ax 0 000060FC E8[FEFF] call _fmemcpy 0 000060FF 8B56FC mov dx, word ptr [bp-4] 0 00006102 8EC2 mov es, dx 0 00006104 8B5EF4 mov bx, word ptr [bp-12] 0 00006107 26804F0560 or byte ptr es:[bx+5], 96 0 0000610C 817EFE0002 cmp word ptr [bp-2], 512 2498 _.L419: 0 00006111 750A jne _.L374 2500 _.L373: 0 00006113 8EC2 mov es, dx 0 00006115 8B5EF4 mov bx, word ptr [bp-12] 0 00006118 26804F0501 or byte ptr es:[bx+5], 1 2504 _.L374: 0 0000611D 8B46FE mov ax, word ptr [bp-2] 0 00006120 8B4D2D mov cx, word ptr [di+45] 0 00006123 8B552F mov dx, word ptr [di+47] 0 00006126 01C8 add ax, cx 0 00006128 B90000 mov cx, 0 0 0000612B 11CA adc dx, cx 0 0000612D 89452D mov word ptr [di+45], ax 0 00006130 89552F mov word ptr [di+47], dx 2513 _.L364: 0 00006133 8B46FE mov ax, word ptr [bp-2] 0 00006136 0146F8 add word ptr [bp-8], ax 0 00006139 2946F6 sub word ptr [bp-10], ax 0 0000613C 8B46F2 mov ax, word ptr [bp-14] 0 0000613F 0346FE add ax, word ptr [bp-2] 0 00006142 FF76F0 push word ptr [bp-16] 0 00006145 50 push ax 0 00006146 E8[FEFF] call _adjust_far 0 00006149 8946F2 mov word ptr [bp-14], ax 0 0000614C 8956F0 mov word ptr [bp-16], dx 0 0000614F 837E1002 cmp word ptr [bp+16], 2 0 00006153 7403E98200 jne _.L352 0 00006158 8B552D mov dx, word ptr [di+45] 0 0000615B 8B452F mov ax, word ptr [di+47] 0 0000615E 36394522 cmp word ptr ss:[di+34], ax 0 00006162 7208 jc _.L394 0 00006164 750C jne _.L376 0 00006166 36395520 cmp word ptr ss:[di+32], dx 0 0000616A 7306 jnc _.L376 2533 _.L394: 0 0000616C 895520 mov word ptr [di+32], dx 0 0000616F 894522 mov word ptr [di+34], ax 2536 _.L376: 0 00006172 31C0 xor ax, ax 0 00006174 50 push ax 0 00006175 57 push di 0 00006176 E867EF call _merge_file_changes 0 00006179 EB5F jmp _.L352 2542 _.L384: 0 0000617B B8E4FF mov ax, -28 0 0000617E E940FE jmp _.L420 2545 _.L330: 0 00006181 837E0E00 cmp word ptr [bp+14], 0 0 00006185 7503E9F7FB je _.L333 2548 _.L380: 0 0000618A 8B4D2D mov cx, word ptr [di+45] 0 0000618D 8B5D2F mov bx, word ptr [di+47] 0 00006190 8B460E mov ax, word ptr [bp+14] 0 00006193 31D2 xor dx, dx 0 00006195 01C8 add ax, cx 0 00006197 11DA adc dx, bx 0 00006199 39D3 cmp bx, dx 0 0000619B 7706 ja _.L402 0 0000619D 750A jne _.L390 0 0000619F 39C1 cmp cx, ax 0 000061A1 7606 jbe _.L390 2560 _.L402: 0 000061A3 837E1002 cmp word ptr [bp+16], 2 0 000061A7 74D2 je _.L384 2563 _.L390: 0 000061A9 36C45D29 les bx, dword ptr ss:[di+41] 0 000061AD 268B4702 mov ax, word ptr es:[bx+2] 0 000061B1 8946FA mov word ptr [bp-6], ax 0 000061B4 56 push si 0 000061B5 FF76FE push word ptr [bp-2] 0 000061B8 E8[FEFF] call _adjust_far 0 000061BB 8946F2 mov word ptr [bp-14], ax 0 000061BE 8956F0 mov word ptr [bp-16], dx 0 000061C1 837E1001 cmp word ptr [bp+16], 1 0 000061C5 7403E979FC jne _.L350 0 000061CA C746E40200 mov word ptr [bp-28], 2 2575 _.L351: 0 000061CF 8B460E mov ax, word ptr [bp+14] 0 000061D2 8946F6 mov word ptr [bp-10], ax 0 000061D5 C746F80000 mov word ptr [bp-8], 0 2579 _.L352: 0 000061DA 8B46F8 mov ax, word ptr [bp-8] 0 000061DD 3B460E cmp ax, word ptr [bp+14] 0 000061E0 7323 jnc _.L422 0 000061E2 837E1001 cmp word ptr [bp+16], 1 0 000061E6 7403E960FC jne _.L353 0 000061EB 8B4522 mov ax, word ptr [di+34] 0 000061EE 363B452F cmp ax, word ptr ss:[di+47] 0 000061F2 7603E954FC ja _.L353 0 000061F7 750C jne _.L422 0 000061F9 8B4520 mov ax, word ptr [di+32] 0 000061FC 363B452D cmp ax, word ptr ss:[di+45] 0 00006200 7603E946FC ja _.L353 2592 _.L422: 0 00006205 57 push di 0 00006206 E806EE call _fnode_to_sft 0 00006209 8B46F8 mov ax, word ptr [bp-8] 2596 _.L421: 0 0000620C 31D2 xor dx, dx 2598 _.L329: 0 0000620E 89EC mov sp, bp 0 00006210 5D pop bp 0 00006211 5F pop di 0 00006212 5E pop si 0 00006213 C20A00 ret 10 2604 .size _rwblock, .-_rwblock 2605 .global _dos_free 2606 .type _dos_free, @function 2607 _dos_free: 0 00006216 56 push si 0 00006217 57 push di 0 00006218 55 push bp 0 00006219 89E5 mov bp, sp 0 0000621B 83EC0C sub sp, 12 0 0000621E 8B5E08 mov bx, word ptr [bp+8] 0 00006221 8B460A mov ax, word ptr [bp+10] 0 00006224 8946FE mov word ptr [bp-2], ax 0 00006227 8EC0 mov es, ax 0 00006229 26837F0F00 cmp word ptr es:[bx+15], 0 0 0000622E 755C jne _.L424 0 00006230 268B771F mov si, word ptr es:[bx+31] 0 00006234 268B5721 mov dx, word ptr es:[bx+33] 0 00006238 83FEFF cmp si, -1 0 0000623B 7562 jne _.L423 0 0000623D 83FAFF cmp dx, -1 0 00006240 755D jne _.L423 0 00006242 268B472D mov ax, word ptr es:[bx+45] 0 00006246 8946FC mov word ptr [bp-4], ax 0 00006249 268B472F mov ax, word ptr es:[bx+47] 0 0000624D 8946FA mov word ptr [bp-6], ax 2629 _.L426: 0 00006250 31F6 xor si, si 0 00006252 89F2 mov dx, si 0 00006254 BF0200 mov di, 2 0 00006257 89F1 mov cx, si 2634 _.L428: 0 00006259 3B4EFA cmp cx, word ptr [bp-6] 0 0000625C 7707 ja _.L435 0 0000625E 7552 jne _.L432 0 00006260 3B7EFC cmp di, word ptr [bp-4] 0 00006263 764D jbe _.L432 2640 _.L435: 0 00006265 8E46FE mov es, word ptr [bp-2] 0 00006268 26837F0F00 cmp word ptr es:[bx+15], 0 0 0000626D 7403E99200 jne _.L434 0 00006272 2689771F mov word ptr es:[bx+31], si 0 00006276 8E46FE mov es, word ptr [bp-2] 0 00006279 26895721 mov word ptr es:[bx+33], dx 0 0000627D 8956FC mov word ptr [bp-4], dx 0 00006280 FF76FE push word ptr [bp-2] 0 00006283 53 push bx 0 00006284 E8[FEFF] call _write_fsinfo 0 00006287 8B56FC mov dx, word ptr [bp-4] 0 0000628A EB13 jmp _.L423 2653 _.L424: 0 0000628C 8E46FE mov es, word ptr [bp-2] 0 0000628F 268B570D mov dx, word ptr es:[bx+13] 0 00006293 268B471F mov ax, word ptr es:[bx+31] 0 00006297 83F8FF cmp ax, -1 0 0000629A 740C je _.L427 0 0000629C 96 xchg si, ax 0 0000629D 31D2 xor dx, dx 2661 _.L423: 0 0000629F 96 xchg si, ax 0 000062A0 89EC mov sp, bp 0 000062A2 5D pop bp 0 000062A3 5F pop di 0 000062A4 5E pop si 0 000062A5 C20400 ret 4 2668 _.L427: 0 000062A8 8956FC mov word ptr [bp-4], dx 0 000062AB C746FA0000 mov word ptr [bp-6], 0 0 000062B0 EB9E jmp _.L426 2672 _.L432: 0 000062B2 8956F4 mov word ptr [bp-12], dx 0 000062B5 51 push cx 0 000062B6 894EF6 mov word ptr [bp-10], cx 0 000062B9 57 push di 0 000062BA FF76FE push word ptr [bp-2] 0 000062BD 53 push bx 0 000062BE 895EF8 mov word ptr [bp-8], bx 0 000062C1 E8[FEFF] call _is_free_cluster 0 000062C4 85C0 test ax, ax 0 000062C6 8B5EF8 mov bx, word ptr [bp-8] 0 000062C9 8B4EF6 mov cx, word ptr [bp-10] 0 000062CC 8B56F4 mov dx, word ptr [bp-12] 0 000062CF 7421 je _.L429 0 000062D1 89F0 mov ax, si 0 000062D3 09D0 or ax, dx 0 000062D5 7515 jne _.L430 0 000062D7 8E46FE mov es, word ptr [bp-2] 0 000062DA 26837F0F00 cmp word ptr es:[bx+15], 0 0 000062DF 751A jne _.L431 0 000062E1 26897F39 mov word ptr es:[bx+57], di 0 000062E5 8E46FE mov es, word ptr [bp-2] 0 000062E8 26894F3B mov word ptr es:[bx+59], cx 2695 _.L430: 0 000062EC 83C601 add si, 1 0 000062EF 83D200 adc dx, 0 2698 _.L429: 0 000062F2 83C701 add di, 1 0 000062F5 83D100 adc cx, 0 0 000062F8 E95EFF jmp _.L428 2702 _.L431: 0 000062FB 8E46FE mov es, word ptr [bp-2] 0 000062FE 26897F1D mov word ptr es:[bx+29], di 0 00006302 EBE8 jmp _.L430 2706 _.L434: 0 00006304 8E46FE mov es, word ptr [bp-2] 0 00006307 2689771F mov word ptr es:[bx+31], si 0 0000630B EB92 jmp _.L423 2710 .size _dos_free, .-_dos_free 2711 .global _dos_cd 2712 .type _dos_cd, @function 2713 _dos_cd: 0 0000630D 56 push si 0 0000630E 57 push di 0 0000630F 55 push bp 0 00006310 89E5 mov bp, sp 0 00006312 B8[0000] mov ax, offset _fnode 0 00006315 50 push ax 0 00006316 31F6 xor si, si 0 00006318 56 push si 0 00006319 FF7608 push word ptr [bp+8] 0 0000631C E8[FEFF] call _dir_open 0 0000631F 39F0 cmp ax, si 0 00006321 7424 je _.L442 0 00006323 97 xchg di, ax 0 00006324 8B5E08 mov bx, word ptr [bp+8] 0 00006327 8A07 mov al, byte ptr [bx] 0 00006329 98 cbw 0 0000632A 83C0BF add ax, -65 0 0000632D 50 push ax 0 0000632E E8[FEFF] call _get_cds 0 00006331 8B5D02 mov bx, word ptr [di+2] 0 00006334 8B4F0F mov cx, word ptr [bx+15] 0 00006337 8EC2 mov es, dx 0 00006339 93 xchg bx, ax 0 0000633A 26894F49 mov word ptr es:[bx+73], cx 0 0000633E 96 xchg si, ax 2739 _.L440: 0 0000633F 89EC mov sp, bp 0 00006341 5D pop bp 0 00006342 5F pop di 0 00006343 5E pop si 0 00006344 C20200 ret 2 2745 _.L442: 0 00006347 B8FDFF mov ax, -3 0 0000634A EBF3 jmp _.L440 2748 .size _dos_cd, .-_dos_cd 2749 .global _dos_getfattr 2750 .type _dos_getfattr, @function 2751 _dos_getfattr: 0 0000634C 56 push si 0 0000634D 55 push bp 0 0000634E 89E5 mov bp, sp 0 00006350 BE[0000] mov si, offset _fnode 0 00006353 56 push si 0 00006354 B83700 mov ax, 55 0 00006357 50 push ax 0 00006358 FF7606 push word ptr [bp+6] 0 0000635B E870F1 call _find_fname 0 0000635E 85C0 test ax, ax 0 00006360 7505 jne _.L444 0 00006362 8A440F mov al, byte ptr [si+15] 0 00006365 30E4 xor ah, ah 2765 _.L444: 0 00006367 89EC mov sp, bp 0 00006369 5D pop bp 0 0000636A 5E pop si 0 0000636B C20200 ret 2 2770 .size _dos_getfattr, .-_dos_getfattr 2771 .global _dos_setfattr 2772 .type _dos_setfattr, @function 2773 _dos_setfattr: 0 0000636E 56 push si 0 0000636F 57 push di 0 00006370 55 push bp 0 00006371 89E5 mov bp, sp 0 00006373 F6460AC8 test byte ptr [bp+10], -56 0 00006377 7542 jne _.L448 0 00006379 BE[0000] mov si, offset _fnode 0 0000637C 56 push si 0 0000637D B83700 mov ax, 55 0 00006380 50 push ax 0 00006381 FF7608 push word ptr [bp+8] 0 00006384 E847F1 call _find_fname 0 00006387 89C7 mov di, ax 0 00006389 85C0 test ax, ax 0 0000638B 7531 jne _.L447 0 0000638D F6460A10 test byte ptr [bp+10], 16 0 00006391 7406 je _.L450 0 00006393 F6440F10 test byte ptr [si+15], 16 0 00006397 7422 je _.L448 2793 _.L450: 0 00006399 8A440F mov al, byte ptr [si+15] 0 0000639C 2418 and al, 24 0 0000639E 0A460A or al, byte ptr [bp+10] 0 000063A1 88440F mov byte ptr [si+15], al 0 000063A4 B8FFFF mov ax, -1 0 000063A7 50 push ax 0 000063A8 56 push si 0 000063A9 E834ED call _merge_file_changes 0 000063AC 89C7 mov di, ax 0 000063AE 85C0 test ax, ax 0 000063B0 750C jne _.L447 0 000063B2 50 push ax 0 000063B3 56 push si 0 000063B4 E8[FEFF] call _dir_write_update 0 000063B7 85C0 test ax, ax 0 000063B9 7503 jne _.L447 2810 _.L448: 0 000063BB BFFBFF mov di, -5 2812 _.L447: 0 000063BE 97 xchg di, ax 0 000063BF 89EC mov sp, bp 0 000063C1 5D pop bp 0 000063C2 5F pop di 0 000063C3 5E pop si 0 000063C4 C20400 ret 4 2819 .size _dos_setfattr, .-_dos_setfattr 2820 .global _dpb16to32 2821 .type _dpb16to32, @function 2822 _dpb16to32: 0 000063C7 55 push bp 0 000063C8 89E5 mov bp, sp 0 000063CA C45E04 les bx, dword ptr [bp+4] 0 000063CD 26C747230000 mov word ptr es:[bx+35], 0 0 000063D3 26C74725FFFF mov word ptr es:[bx+37], -1 0 000063D9 26C74727FFFF mov word ptr es:[bx+39], -1 0 000063DF 26C747350000 mov word ptr es:[bx+53], 0 0 000063E5 26C747370000 mov word ptr es:[bx+55], 0 0 000063EB 268B570B mov dx, word ptr es:[bx+11] 0 000063EF 31C9 xor cx, cx 0 000063F1 26895729 mov word ptr es:[bx+41], dx 0 000063F5 26894F2B mov word ptr es:[bx+43], cx 0 000063F9 268B570D mov dx, word ptr es:[bx+13] 0 000063FD 2689572D mov word ptr es:[bx+45], dx 0 00006401 26894F2F mov word ptr es:[bx+47], cx 0 00006405 5D pop bp 0 00006406 C20400 ret 4 2840 .size _dpb16to32, .-_dpb16to32 2841 .global _bpb_to_dpb 2842 .type _bpb_to_dpb, @function 2843 _bpb_to_dpb: 0 00006409 56 push si 0 0000640A 57 push di 0 0000640B 55 push bp 0 0000640C 89E5 mov bp, sp 0 0000640E 83EC3C sub sp, 60 0 00006411 C4460C les ax, dword ptr [bp+12] 0 00006414 8946D4 mov word ptr [bp-44], ax 0 00006417 8C46D2 mov word ptr [bp-46], es 0 0000641A B82900 mov ax, 41 0 0000641D 50 push ax 0 0000641E FF760A push word ptr [bp+10] 0 00006421 FF7608 push word ptr [bp+8] 0 00006424 8D46D7 lea ax, [-41+bp] 0 00006427 16 push ss 0 00006428 50 push ax 0 00006429 E8[FEFF] call _fmemcpy 0 0000642C 8A46D9 mov al, byte ptr [bp-39] 0 0000642F 84C0 test al, al 0 00006431 7503E99B02 je _.L474 0 00006436 C746D00000 mov word ptr [bp-48], 0 2864 _.L462: 0 0000643B 88C2 mov dl, al 0 0000643D 30F6 xor dh, dh 0 0000643F 8A4ED0 mov cl, byte ptr [bp-48] 0 00006442 D3FA sar dx, cl 0 00006444 83FA01 cmp dx, 1 0 00006447 7E03E97F02 jg _.L463 2871 _.L461: 0 0000644C 8E46D2 mov es, word ptr [bp-46] 0 0000644F 8A66D0 mov ah, byte ptr [bp-48] 0 00006452 8B5ED4 mov bx, word ptr [bp-44] 0 00006455 26886705 mov byte ptr es:[bx+5], ah 0 00006459 8A66E1 mov ah, byte ptr [bp-31] 0 0000645C 8E46D2 mov es, word ptr [bp-46] 0 0000645F 8B5ED4 mov bx, word ptr [bp-44] 0 00006462 26886717 mov byte ptr es:[bx+23], ah 0 00006466 8B56D7 mov dx, word ptr [bp-41] 0 00006469 8956C6 mov word ptr [bp-58], dx 0 0000646C 8E46D2 mov es, word ptr [bp-46] 0 0000646F 8B5ED4 mov bx, word ptr [bp-44] 0 00006472 26895702 mov word ptr es:[bx+2], dx 0 00006476 FEC8 dec al 0 00006478 8E46D2 mov es, word ptr [bp-46] 0 0000647B 8B5ED4 mov bx, word ptr [bp-44] 0 0000647E 26884704 mov byte ptr es:[bx+4], al 0 00006482 8B4EDA mov cx, word ptr [bp-38] 0 00006485 8E46D2 mov es, word ptr [bp-46] 0 00006488 8B5ED4 mov bx, word ptr [bp-44] 0 0000648B 26894F06 mov word ptr es:[bx+6], cx 0 0000648F 8A46DC mov al, byte ptr [bp-36] 0 00006492 8E46D2 mov es, word ptr [bp-46] 0 00006495 8B5ED4 mov bx, word ptr [bp-44] 0 00006498 26884708 mov byte ptr es:[bx+8], al 0 0000649C 8B7EDD mov di, word ptr [bp-35] 0 0000649F 8E46D2 mov es, word ptr [bp-46] 0 000064A2 8B5ED4 mov bx, word ptr [bp-44] 0 000064A5 26897F09 mov word ptr es:[bx+9], di 0 000064A9 8B56DF mov dx, word ptr [bp-33] 0 000064AC 85D2 test dx, dx 0 000064AE 7403E92602 jne _.L464 0 000064B3 C456EC les dx, dword ptr [bp-20] 0 000064B6 8956CA mov word ptr [bp-54], dx 0 000064B9 8C46C8 mov word ptr [bp-56], es 2907 _.L465: 0 000064BC 8B56E2 mov dx, word ptr [bp-30] 0 000064BF 8956CC mov word ptr [bp-52], dx 0 000064C2 8E46D2 mov es, word ptr [bp-46] 0 000064C5 8B5ED4 mov bx, word ptr [bp-44] 0 000064C8 2689570F mov word ptr es:[bx+15], dx 0 000064CC 30E4 xor ah, ah 0 000064CE F766CC mul word ptr [bp-52] 0 000064D1 01C1 add cx, ax 0 000064D3 894EC4 mov word ptr [bp-60], cx 0 000064D6 8E46D2 mov es, word ptr [bp-46] 0 000064D9 8B5ED4 mov bx, word ptr [bp-44] 0 000064DC 26894F11 mov word ptr es:[bx+17], cx 0 000064E0 8B76C6 mov si, word ptr [bp-58] 0 000064E3 B105 mov cl, 5 0 000064E5 D3EE shr si, cl 0 000064E7 89F3 mov bx, si 0 000064E9 8D41FF lea ax, [-1+bx+di] 0 000064EC 31D2 xor dx, dx 0 000064EE F7F6 div si 0 000064F0 0346C4 add ax, word ptr [bp-60] 0 000064F3 8E46D2 mov es, word ptr [bp-46] 0 000064F6 8B5ED4 mov bx, word ptr [bp-44] 0 000064F9 2689470B mov word ptr es:[bx+11], ax 0 000064FD 96 xchg si, ax 0 000064FE 31FF xor di, di 0 00006500 8B46CA mov ax, word ptr [bp-54] 0 00006503 29F0 sub ax, si 0 00006505 8B56C8 mov dx, word ptr [bp-56] 0 00006508 19FA sbb dx, di 0 0000650A FF76D0 push word ptr [bp-48] 0 0000650D 52 push dx 0 0000650E 50 push ax 0 0000650F E8[FEFF] call ___lshrsi3 0 00006512 40 inc ax 0 00006513 89C6 mov si, ax 0 00006515 8E46D2 mov es, word ptr [bp-46] 0 00006518 8B5ED4 mov bx, word ptr [bp-44] 0 0000651B 2689470D mov word ptr es:[bx+13], ax 0 0000651F 8B5ECC mov bx, word ptr [bp-52] 0 00006522 8EDF mov ds, di 0 00006524 8B46C6 mov ax, word ptr [bp-58] 0 00006527 D1E8 shr ax, 1 0 00006529 F7E3 mul bx 0 0000652B 39FA cmp dx, di 0 0000652D 751F jne _.L466 0 0000652F 89C1 mov cx, ax 0 00006531 81FEF50F cmp si, 4085 0 00006535 7703E9AA01 jbe _.L468 0 0000653A 3DF50F cmp ax, 4085 0 0000653D 760F jbe _.L466 2958 _.L469: 0 0000653F 39F1 cmp cx, si 0 00006541 770B ja _.L466 0 00006543 49 dec cx 0 00006544 8E46D2 mov es, word ptr [bp-46] 0 00006547 8B7ED4 mov di, word ptr [bp-44] 0 0000654A 26894D0D mov word ptr es:[di+13], cx 2965 _.L466: 0 0000654E 8E46D2 mov es, word ptr [bp-46] 0 00006551 8B7ED4 mov di, word ptr [bp-44] 0 00006554 26C6451800 mov byte ptr es:[di+24], 0 0 00006559 8E46D2 mov es, word ptr [bp-46] 0 0000655C 8B7ED4 mov di, word ptr [bp-44] 0 0000655F 26C7451D0000 mov word ptr es:[di+29], 0 0 00006565 8E46D2 mov es, word ptr [bp-46] 0 00006568 8B7ED4 mov di, word ptr [bp-44] 0 0000656B 26C7451FFFFF mov word ptr es:[di+31], -1 0 00006571 837E1000 cmp word ptr [bp+16], 0 0 00006575 7503E94701 je _.L460 0 0000657A 837ECC00 cmp word ptr [bp-52], 0 0 0000657E 7503 jne _.L472 0 00006580 C55EF0 lds bx, dword ptr [bp-16] 2980 _.L472: 0 00006583 8E46D2 mov es, word ptr [bp-46] 0 00006586 8B7ED4 mov di, word ptr [bp-44] 0 00006589 26895D31 mov word ptr es:[di+49], bx 0 0000658D 8E46D2 mov es, word ptr [bp-46] 0 00006590 8B5ED4 mov bx, word ptr [bp-44] 0 00006593 268C5F33 mov word ptr es:[bx+51], ds 0 00006597 8E46D2 mov es, word ptr [bp-46] 0 0000659A 8B5ED4 mov bx, word ptr [bp-44] 0 0000659D 26C747390000 mov word ptr es:[bx+57], 0 0 000065A3 8E46D2 mov es, word ptr [bp-46] 0 000065A6 8B5ED4 mov bx, word ptr [bp-44] 0 000065A9 26C7473B0000 mov word ptr es:[bx+59], 0 0 000065AF 8E46D2 mov es, word ptr [bp-46] 0 000065B2 8B5ED4 mov bx, word ptr [bp-44] 0 000065B5 26C7471FFFFF mov word ptr es:[bx+31], -1 0 000065BB 8E46D2 mov es, word ptr [bp-46] 0 000065BE 8B5ED4 mov bx, word ptr [bp-44] 0 000065C1 26C74721FFFF mov word ptr es:[bx+33], -1 0 000065C7 FF76D2 push word ptr [bp-46] 0 000065CA FF76D4 push word ptr [bp-44] 0 000065CD 16 push ss 0 000065CE 1F pop ds 0 000065CF E8[FEFF] call _dpb16to32 0 000065D2 8E46D2 mov es, word ptr [bp-46] 0 000065D5 8B5ED4 mov bx, word ptr [bp-44] 0 000065D8 26837F0F00 cmp word ptr es:[bx+15], 0 0 000065DD 7403E9DF00 jne _.L460 0 000065E2 8B46F4 mov ax, word ptr [bp-12] 0 000065E5 26894723 mov word ptr es:[bx+35], ax 0 000065E9 8B46FC mov ax, word ptr [bp-4] 0 000065EC 8E46D2 mov es, word ptr [bp-46] 0 000065EF 8B5ED4 mov bx, word ptr [bp-44] 0 000065F2 26894725 mov word ptr es:[bx+37], ax 0 000065F6 8B46FE mov ax, word ptr [bp-2] 0 000065F9 8E46D2 mov es, word ptr [bp-46] 0 000065FC 8B5ED4 mov bx, word ptr [bp-44] 0 000065FF 26894727 mov word ptr es:[bx+39], ax 0 00006603 8E46D2 mov es, word ptr [bp-46] 0 00006606 8B5ED4 mov bx, word ptr [bp-44] 0 00006609 26C747090000 mov word ptr es:[bx+9], 0 0 0000660F 8E46D2 mov es, word ptr [bp-46] 0 00006612 8B5ED4 mov bx, word ptr [bp-44] 0 00006615 26C74711FFFF mov word ptr es:[bx+17], -1 0 0000661B 8E46D2 mov es, word ptr [bp-46] 0 0000661E 8B5ED4 mov bx, word ptr [bp-44] 0 00006621 26C7470D0000 mov word ptr es:[bx+13], 0 0 00006627 8E46D2 mov es, word ptr [bp-46] 0 0000662A 8B5ED4 mov bx, word ptr [bp-44] 0 0000662D 268A4708 mov al, byte ptr es:[bx+8] 0 00006631 8846CC mov byte ptr [bp-52], al 0 00006634 C646CD00 mov byte ptr [bp-51], 0 0 00006638 268B4731 mov ax, word ptr es:[bx+49] 0 0000663C 8946C6 mov word ptr [bp-58], ax 0 0000663F 268B4733 mov ax, word ptr es:[bx+51] 0 00006643 F766CC mul word ptr [bp-52] 0 00006646 91 xchg cx, ax 0 00006647 8B46CC mov ax, word ptr [bp-52] 0 0000664A F766C6 mul word ptr [bp-58] 0 0000664D 8946CC mov word ptr [bp-52], ax 0 00006650 8956CE mov word ptr [bp-50], dx 0 00006653 014ECE add word ptr [bp-50], cx 0 00006656 268B4F06 mov cx, word ptr es:[bx+6] 0 0000665A 31F6 xor si, si 0 0000665C 01C1 add cx, ax 0 0000665E 1376CE adc si, word ptr [bp-50] 0 00006661 26894F29 mov word ptr es:[bx+41], cx 0 00006665 8E46D2 mov es, word ptr [bp-46] 0 00006668 8B5ED4 mov bx, word ptr [bp-44] 0 0000666B 2689772B mov word ptr es:[bx+43], si 0 0000666F 8B46CA mov ax, word ptr [bp-54] 0 00006672 29C8 sub ax, cx 0 00006674 8B56C8 mov dx, word ptr [bp-56] 0 00006677 19F2 sbb dx, si 0 00006679 FF76D0 push word ptr [bp-48] 0 0000667C 52 push dx 0 0000667D 50 push ax 0 0000667E E8[FEFF] call ___lshrsi3 0 00006681 91 xchg cx, ax 0 00006682 89D6 mov si, dx 0 00006684 83C101 add cx, 1 0 00006687 83D600 adc si, 0 0 0000668A 8E46D2 mov es, word ptr [bp-46] 0 0000668D 8B5ED4 mov bx, word ptr [bp-44] 0 00006690 26894F2D mov word ptr es:[bx+45], cx 0 00006694 8E46D2 mov es, word ptr [bp-46] 0 00006697 8B5ED4 mov bx, word ptr [bp-44] 0 0000669A 2689772F mov word ptr es:[bx+47], si 0 0000669E 8B46F8 mov ax, word ptr [bp-8] 0 000066A1 8E46D2 mov es, word ptr [bp-46] 0 000066A4 8B5ED4 mov bx, word ptr [bp-44] 0 000066A7 26894735 mov word ptr es:[bx+53], ax 0 000066AB 8B46FA mov ax, word ptr [bp-6] 0 000066AE 8E46D2 mov es, word ptr [bp-46] 0 000066B1 8B5ED4 mov bx, word ptr [bp-44] 0 000066B4 26894737 mov word ptr es:[bx+55], ax 0 000066B8 FF76D2 push word ptr [bp-46] 0 000066BB FF76D4 push word ptr [bp-44] 0 000066BE E8[FEFF] call _read_fsinfo 3079 _.L460: 0 000066C1 89EC mov sp, bp 0 000066C3 5D pop bp 0 000066C4 5F pop di 0 000066C5 5E pop si 0 000066C6 16 push ss 0 000066C7 1F pop ds 0 000066C8 C20A00 ret 10 3087 _.L463: 0 000066CB FF46D0 inc word ptr [bp-48] 0 000066CE E96AFD jmp _.L462 3090 _.L474: 0 000066D1 C746D00800 mov word ptr [bp-48], 8 0 000066D6 E973FD jmp _.L461 3093 _.L464: 0 000066D9 8956CA mov word ptr [bp-54], dx 0 000066DC C746C80000 mov word ptr [bp-56], 0 0 000066E1 E9D8FD jmp _.L465 3097 _.L468: 0 000066E4 3DFF3F cmp ax, 16383 0 000066E7 7603E962FE ja _.L466 0 000066EC B102 mov cl, 2 0 000066EE D3E0 shl ax, cl 0 000066F0 B90300 mov cx, 3 0 000066F3 31D2 xor dx, dx 0 000066F5 F7F1 div cx 0 000066F7 91 xchg cx, ax 0 000066F8 E944FE jmp _.L469 3107 .size _bpb_to_dpb, .-_bpb_to_dpb 3108 .global _media_check 3109 .type _media_check, @function 3110 _media_check: 0 000066FB 56 push si 0 000066FC 57 push di 0 000066FD 55 push bp 0 000066FE 89E5 mov bp, sp 0 00006700 1E push ds 0 00006701 8B5E08 mov bx, word ptr [bp+8] 0 00006704 8B760A mov si, word ptr [bp+10] 0 00006707 89D8 mov ax, bx 0 00006709 09F0 or ax, si 0 0000670B 7503E98800 je _.L482 0 00006710 56 push si 0 00006711 53 push bx 0 00006712 895EFE mov word ptr [bp-2], bx 0 00006715 B001 mov al, 1 0 00006717 50 push ax 0 00006718 E81AE8 call _rqblockio 0 0000671B 85C0 test ax, ax 0 0000671D 7C7C jl _.L476 0 0000671F BF[0000] mov di, offset _MediaReqHdr 0 00006722 8EC6 mov es, si 0 00006724 8B5EFE mov bx, word ptr [bp-2] 0 00006727 268A4718 mov al, byte ptr es:[bx+24] 0 0000672B 360A450E or al, byte ptr ss:[di+14] 0 0000672F 744F je _.L480 0 00006731 3C01 cmp al, 1 0 00006733 745F je _.L484 3137 _.L479: 0 00006735 8EC6 mov es, si 0 00006737 268A07 mov al, byte ptr es:[bx] 0 0000673A 895EFE mov word ptr [bp-2], bx 0 0000673D 98 cbw 0 0000673E 50 push ax 0 0000673F E8[FEFF] call _setinvld 0 00006742 56 push si 0 00006743 8B5EFE mov bx, word ptr [bp-2] 0 00006746 53 push bx 0 00006747 B002 mov al, 2 0 00006749 50 push ax 0 0000674A E8E8E7 call _rqblockio 0 0000674D 85C0 test ax, ax 0 0000674F 7C4A jl _.L476 0 00006751 8E5D12 mov ds, word ptr [di+18] 0 00006754 368B4D14 mov cx, word ptr ss:[di+20] 0 00006758 B201 mov dl, 1 0 0000675A 8EC1 mov es, cx 0 0000675C 8CDB mov bx, ds 0 0000675E 26837F0B00 cmp word ptr es:[bx+11], 0 0 00006763 8B5EFE mov bx, word ptr [bp-2] 0 00006766 740A je _.L481 0 00006768 8CD0 mov ax, ss 0 0000676A 39F0 cmp ax, si 0 0000676C 9F lahf 0 0000676D D0E4 shl ah, 1 0 0000676F 99 cwd 0 00006770 F6DA neg dl 3166 _.L481: 0 00006772 30F6 xor dh, dh 0 00006774 52 push dx 0 00006775 56 push si 0 00006776 53 push bx 0 00006777 51 push cx 0 00006778 1E push ds 0 00006779 16 push ss 0 0000677A 1F pop ds 0 0000677B E8[FEFF] call _bpb_to_dpb 0 0000677E EB14 jmp _.L484 3177 _.L480: 0 00006780 8EC6 mov es, si 0 00006782 268A07 mov al, byte ptr es:[bx] 0 00006785 895EFE mov word ptr [bp-2], bx 0 00006788 98 cbw 0 00006789 50 push ax 0 0000678A E8[FEFF] call _dirty_buffers 0 0000678D 85C0 test ax, ax 0 0000678F 8B5EFE mov bx, word ptr [bp-2] 0 00006792 74A1 je _.L479 3187 _.L484: 0 00006794 31C0 xor ax, ax 0 00006796 EB03 jmp _.L476 3190 _.L482: 0 00006798 B8F1FF mov ax, -15 3192 _.L476: 0 0000679B 89EC mov sp, bp 0 0000679D 5D pop bp 0 0000679E 5F pop di 0 0000679F 5E pop si 0 000067A0 C20400 ret 4 3198 .size _media_check, .-_media_check 3199 .local _startoffset.2545 3200 .comm _startoffset.2545,4,2 3201 .ident "GCC: (GNU) 6.3.0" === Trace listing source: fattab.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=fattab.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccsnWqCP.s output file : fattab.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:21.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=012B40h -> ".RODATA.STR1.1" 5 .section .rodata.str1.1,"aMS",@progbits,1 6 _.LC0: 0 00001940 52756E2063686B64 .string "Run chkdsk: Bad FAT " 0 00001948 736B3A2042616420 0 00001950 4641542000 === Switch to base=002270h -> ".TEXT" 8 .text 9 .global _clusterMessage 10 .type _clusterMessage, @function 11 _clusterMessage: 0 000067A3 56 push si 0 000067A4 57 push di 0 000067A5 55 push bp 0 000067A6 89E5 mov bp, sp 0 000067A8 1E push ds 0 000067A9 1E push ds 0 000067AA 8B7E0A mov di, word ptr [bp+10] 0 000067AD 8B460C mov ax, word ptr [bp+12] 0 000067B0 8946FE mov word ptr [bp-2], ax 0 000067B3 B8[0000] mov ax, offset _.LC0 0 000067B6 50 push ax 0 000067B7 E8[FEFF] call _put_string 0 000067BA FF7608 push word ptr [bp+8] 0 000067BD E8[FEFF] call _put_string 0 000067C0 BA0400 mov dx, 4 0 000067C3 52 push dx 0 000067C4 8956FC mov word ptr [bp-4], dx 0 000067C7 BE1000 mov si, 16 0 000067CA 56 push si 0 000067CB FF76FE push word ptr [bp-2] 0 000067CE E8[FEFF] call _put_unsigned 0 000067D1 8B56FC mov dx, word ptr [bp-4] 0 000067D4 52 push dx 0 000067D5 56 push si 0 000067D6 57 push di 0 000067D7 E8[FEFF] call _put_unsigned 0 000067DA B80A00 mov ax, 10 0 000067DD 50 push ax 0 000067DE E8[FEFF] call _put_console 0 000067E1 89EC mov sp, bp 0 000067E3 5D pop bp 0 000067E4 5F pop di 0 000067E5 5E pop si 0 000067E6 C20600 ret 6 46 .size _clusterMessage, .-_clusterMessage === Switch to base=012B40h -> ".RODATA.STR1.1" 47 .section .rodata.str1.1 48 _.LC1: 0 00001955 492F4F3A20307800 .string "I/O: 0x" === Switch to base=002270h -> ".TEXT" 50 .text 51 .global _getFATblock 52 .type _getFATblock, @function 53 _getFATblock: 0 000067E9 56 push si 0 000067EA 57 push di 0 000067EB 55 push bp 0 000067EC 89E5 mov bp, sp 0 000067EE 1E push ds 0 000067EF 1E push ds 0 000067F0 8B7608 mov si, word ptr [bp+8] 0 000067F3 8B460A mov ax, word ptr [bp+10] 0 000067F6 8946FE mov word ptr [bp-2], ax 0 000067F9 8B4E0C mov cx, word ptr [bp+12] 0 000067FC 8B7E0E mov di, word ptr [bp+14] 0 000067FF 31C0 xor ax, ax 0 00006801 50 push ax 0 00006802 8E46FE mov es, word ptr [bp-2] 0 00006805 268A04 mov al, byte ptr es:[si] 0 00006808 98 cbw 0 00006809 50 push ax 0 0000680A 57 push di 0 0000680B 51 push cx 0 0000680C 894EFC mov word ptr [bp-4], cx 0 0000680F E8[FEFF] call _getblk 0 00006812 89C3 mov bx, ax 0 00006814 09D0 or ax, dx 0 00006816 8B4EFC mov cx, word ptr [bp-4] 0 00006819 7457 je _.L4 0 0000681B 8EC2 mov es, dx 0 0000681D 268A4705 mov al, byte ptr es:[bx+5] 0 00006821 8846FC mov byte ptr [bp-4], al 0 00006824 24F3 and al, -13 0 00006826 0C22 or al, 34 0 00006828 26884705 mov byte ptr es:[bx+5], al 0 0000682C 2689770D mov word ptr es:[bx+13], si 0 00006830 8B46FE mov ax, word ptr [bp-2] 0 00006833 2689470F mov word ptr es:[bx+15], ax 0 00006837 8E46FE mov es, word ptr [bp-2] 0 0000683A 268A4408 mov al, byte ptr es:[si+8] 0 0000683E 8EC2 mov es, dx 0 00006840 2688470A mov byte ptr es:[bx+10], al 0 00006844 8E46FE mov es, word ptr [bp-2] 0 00006847 268B440F mov ax, word ptr es:[si+15] 0 0000684B 8EC2 mov es, dx 0 0000684D 2689470B mov word ptr es:[bx+11], ax 0 00006851 8E46FE mov es, word ptr [bp-2] 0 00006854 26837C0F00 cmp word ptr es:[si+15], 0 0 00006859 750E jne _.L3 0 0000685B 26F6442380 test byte ptr es:[si+35], -128 0 00006860 7407 je _.L3 0 00006862 8EC2 mov es, dx 0 00006864 26C6470A01 mov byte ptr es:[bx+10], 1 103 _.L3: 0 00006869 93 xchg bx, ax 0 0000686A 89EC mov sp, bp 0 0000686C 5D pop bp 0 0000686D 5F pop di 0 0000686E 5E pop si 0 0000686F C20800 ret 8 110 _.L4: 0 00006872 8956FC mov word ptr [bp-4], dx 0 00006875 895EFE mov word ptr [bp-2], bx 0 00006878 57 push di 0 00006879 51 push cx 0 0000687A B8[1500] mov ax, offset _.LC1 0 0000687D 50 push ax 0 0000687E E8[FEFF] call _clusterMessage 0 00006881 8B56FC mov dx, word ptr [bp-4] 0 00006884 8B5EFE mov bx, word ptr [bp-2] 0 00006887 EBE0 jmp _.L3 121 .size _getFATblock, .-_getFATblock 122 .global _read_fsinfo 123 .type _read_fsinfo, @function 124 _read_fsinfo: 0 00006889 56 push si 0 0000688A 57 push di 0 0000688B 55 push bp 0 0000688C 89E5 mov bp, sp 0 0000688E 83EC06 sub sp, 6 0 00006891 8B5E08 mov bx, word ptr [bp+8] 0 00006894 8B460A mov ax, word ptr [bp+10] 0 00006897 8946FE mov word ptr [bp-2], ax 0 0000689A 8EC0 mov es, ax 0 0000689C 268B5725 mov dx, word ptr es:[bx+37] 0 000068A0 83FAFF cmp dx, -1 0 000068A3 7503E99100 je _.L11 0 000068A8 31C9 xor cx, cx 0 000068AA 51 push cx 0 000068AB 268A07 mov al, byte ptr es:[bx] 0 000068AE 895EFA mov word ptr [bp-6], bx 0 000068B1 98 cbw 0 000068B2 50 push ax 0 000068B3 51 push cx 0 000068B4 52 push dx 0 000068B5 E8[FEFF] call _getblk 0 000068B8 8EC2 mov es, dx 0 000068BA 89C3 mov bx, ax 0 000068BC 268A4F05 mov cl, byte ptr es:[bx+5] 0 000068C0 884EFC mov byte ptr [bp-4], cl 0 000068C3 80E1B1 and cl, -79 0 000068C6 80C920 or cl, 32 0 000068C9 26884F05 mov byte ptr es:[bx+5], cl 0 000068CD 268B8FFC01 mov cx, word ptr es:[bx+508] 0 000068D2 268BB7FE01 mov si, word ptr es:[bx+510] 0 000068D7 8E46FE mov es, word ptr [bp-2] 0 000068DA 8B5EFA mov bx, word ptr [bp-6] 0 000068DD 268B7F2D mov di, word ptr es:[bx+45] 0 000068E1 897EFC mov word ptr [bp-4], di 0 000068E4 268B7F2F mov di, word ptr es:[bx+47] 0 000068E8 39F7 cmp di, si 0 000068EA 770C ja _.L13 0 000068EC 7505 jne _.L21 0 000068EE 394EFC cmp word ptr [bp-4], cx 0 000068F1 7705 ja _.L13 165 _.L21: 0 000068F3 B9FFFF mov cx, -1 0 000068F6 89CE mov si, cx 168 _.L13: 0 000068F8 8E46FE mov es, word ptr [bp-2] 0 000068FB 26894F1F mov word ptr es:[bx+31], cx 0 000068FF 8E46FE mov es, word ptr [bp-2] 0 00006902 26897721 mov word ptr es:[bx+33], si 0 00006906 8EC2 mov es, dx 0 00006908 96 xchg si, ax 0 00006909 268B8C0002 mov cx, word ptr es:[si+512] 0 0000690E 268B840202 mov ax, word ptr es:[si+514] 0 00006913 39F8 cmp ax, di 0 00006915 7710 ja _.L22 0 00006917 7505 jne _.L18 0 00006919 3B4EFC cmp cx, word ptr [bp-4] 0 0000691C 7709 ja _.L22 182 _.L18: 0 0000691E 85C0 test ax, ax 0 00006920 7509 jne _.L15 0 00006922 83F901 cmp cx, 1 0 00006925 7704 ja _.L15 187 _.L22: 0 00006927 31C9 xor cx, cx 0 00006929 89C8 mov ax, cx 190 _.L15: 0 0000692B 8E46FE mov es, word ptr [bp-2] 0 0000692E 26894F39 mov word ptr es:[bx+57], cx 0 00006932 8E46FE mov es, word ptr [bp-2] 0 00006935 2689473B mov word ptr es:[bx+59], ax 195 _.L11: 0 00006939 89EC mov sp, bp 0 0000693B 5D pop bp 0 0000693C 5F pop di 0 0000693D 5E pop si 0 0000693E C20400 ret 4 201 .size _read_fsinfo, .-_read_fsinfo 202 .global _write_fsinfo 203 .type _write_fsinfo, @function 204 _write_fsinfo: 0 00006941 56 push si 0 00006942 57 push di 0 00006943 55 push bp 0 00006944 89E5 mov bp, sp 0 00006946 1E push ds 0 00006947 1E push ds 0 00006948 C45E08 les bx, dword ptr [bp+8] 0 0000694B 8CC6 mov si, es 0 0000694D 268B5725 mov dx, word ptr es:[bx+37] 0 00006951 83FAFF cmp dx, -1 0 00006954 7503E9AE00 je _.L30 0 00006959 31C9 xor cx, cx 0 0000695B 51 push cx 0 0000695C 268A07 mov al, byte ptr es:[bx] 0 0000695F 895EFC mov word ptr [bp-4], bx 0 00006962 98 cbw 0 00006963 50 push ax 0 00006964 51 push cx 0 00006965 52 push dx 0 00006966 E8[FEFF] call _getblk 0 00006969 8EC2 mov es, dx 0 0000696B 89C3 mov bx, ax 0 0000696D 268A4F05 mov cl, byte ptr es:[bx+5] 0 00006971 884EFF mov byte ptr [bp-1], cl 0 00006974 80E1F1 and cl, -15 0 00006977 88CD mov ch, cl 0 00006979 80CD20 or ch, 32 0 0000697C 26886F05 mov byte ptr es:[bx+5], ch 0 00006980 268B9FFC01 mov bx, word ptr es:[bx+508] 0 00006985 8EC6 mov es, si 0 00006987 89DF mov di, bx 0 00006989 8B5EFC mov bx, word ptr [bp-4] 0 0000698C 263B7F1F cmp di, word ptr es:[bx+31] 0 00006990 7533 jne _.L32 0 00006992 8EC2 mov es, dx 0 00006994 89C7 mov di, ax 0 00006996 268BBDFE01 mov di, word ptr es:[di+510] 0 0000699B 8EC6 mov es, si 0 0000699D 263B7F21 cmp di, word ptr es:[bx+33] 0 000069A1 7522 jne _.L32 0 000069A3 8EC2 mov es, dx 0 000069A5 89C7 mov di, ax 0 000069A7 268BBD0002 mov di, word ptr es:[di+512] 0 000069AC 8EC6 mov es, si 0 000069AE 263B7F39 cmp di, word ptr es:[bx+57] 0 000069B2 7511 jne _.L32 0 000069B4 8EC2 mov es, dx 0 000069B6 89C7 mov di, ax 0 000069B8 268BBD0202 mov di, word ptr es:[di+514] 0 000069BD 8EC6 mov es, si 0 000069BF 263B7F3B cmp di, word ptr es:[bx+59] 0 000069C3 740B je _.L33 257 _.L32: 0 000069C5 80C960 or cl, 96 0 000069C8 8EC2 mov es, dx 0 000069CA 89C7 mov di, ax 0 000069CC 26884D05 mov byte ptr es:[di+5], cl 262 _.L33: 0 000069D0 8EC6 mov es, si 0 000069D2 268B4F1F mov cx, word ptr es:[bx+31] 0 000069D6 8EC2 mov es, dx 0 000069D8 89C7 mov di, ax 0 000069DA 26898DFC01 mov word ptr es:[di+508], cx 0 000069DF 8EC6 mov es, si 0 000069E1 268B4F21 mov cx, word ptr es:[bx+33] 0 000069E5 8EC2 mov es, dx 0 000069E7 26898DFE01 mov word ptr es:[di+510], cx 0 000069EC 8EC6 mov es, si 0 000069EE 268B4F39 mov cx, word ptr es:[bx+57] 0 000069F2 8EC2 mov es, dx 0 000069F4 26898D0002 mov word ptr es:[di+512], cx 0 000069F9 8EC6 mov es, si 0 000069FB 268B4F3B mov cx, word ptr es:[bx+59] 0 000069FF 8EC2 mov es, dx 0 00006A01 93 xchg bx, ax 0 00006A02 26898F0202 mov word ptr es:[bx+514], cx 281 _.L30: 0 00006A07 89EC mov sp, bp 0 00006A09 5D pop bp 0 00006A0A 5F pop di 0 00006A0B 5E pop si 0 00006A0C C20400 ret 4 287 .size _write_fsinfo, .-_write_fsinfo === Switch to base=012B40h -> ".RODATA.STR1.1" 288 .section .rodata.str1.1 289 _.LC2: 0 0000195D 696E6465783A2030 .string "index: 0x" 0 00001965 7800 291 _.LC3: 0 00001967 77726974653A2030 .string "write: 0x" 0 0000196F 7800 293 _.LC4: 0 00001971 4261642044504221 .string "Bad DPB!\n" 0 00001979 0A00 === Switch to base=002270h -> ".TEXT" 295 .text 296 .global _link_fat 297 .type _link_fat, @function 298 _link_fat: 0 00006A0F 56 push si 0 00006A10 57 push di 0 00006A11 55 push bp 0 00006A12 89E5 mov bp, sp 0 00006A14 83EC14 sub sp, 20 0 00006A17 C44608 les ax, dword ptr [bp+8] 0 00006A1A 8946FE mov word ptr [bp-2], ax 0 00006A1D 8C46FC mov word ptr [bp-4], es 0 00006A20 8B460C mov ax, word ptr [bp+12] 0 00006A23 8946F4 mov word ptr [bp-12], ax 0 00006A26 8B760E mov si, word ptr [bp+14] 0 00006A29 C44610 les ax, dword ptr [bp+16] 0 00006A2C 8946FA mov word ptr [bp-6], ax 0 00006A2F 8C46F2 mov word ptr [bp-14], es 0 00006A32 8E46FC mov es, word ptr [bp-4] 0 00006A35 8B5EFE mov bx, word ptr [bp-2] 0 00006A38 268B470D mov ax, word ptr es:[bx+13] 0 00006A3C 268B5F0F mov bx, word ptr es:[bx+15] 0 00006A40 85DB test bx, bx 0 00006A42 7421 je _.L40 0 00006A44 89C1 mov cx, ax 0 00006A46 31D2 xor dx, dx 321 _.L41: 0 00006A48 85F6 test si, si 0 00006A4A 7529 jne _.L45 0 00006A4C 837EF401 cmp word ptr [bp-12], 1 0 00006A50 7727 ja _.L107 326 _.L88: 0 00006A52 56 push si 0 00006A53 FF76F4 push word ptr [bp-12] 0 00006A56 B8[1D00] mov ax, offset _.LC2 330 _.L121: 0 00006A59 50 push ax 0 00006A5A E8[FEFF] call _clusterMessage 333 _.L117: 0 00006A5D B80100 mov ax, 1 335 _.L118: 0 00006A60 31D2 xor dx, dx 0 00006A62 E95701 jmp _.L39 338 _.L40: 0 00006A65 8E46FC mov es, word ptr [bp-4] 0 00006A68 8B7EFE mov di, word ptr [bp-2] 0 00006A6B 268B4D2D mov cx, word ptr es:[di+45] 0 00006A6F 268B552F mov dx, word ptr es:[di+47] 0 00006A73 EBD3 jmp _.L41 344 _.L45: 0 00006A75 39D6 cmp si, dx 0 00006A77 77D9 ja _.L88 347 _.L107: 0 00006A79 39D6 cmp si, dx 0 00006A7B 7505 jne _.L47 0 00006A7D 394EF4 cmp word ptr [bp-12], cx 0 00006A80 77D0 ja _.L88 352 _.L47: 0 00006A82 817EF2FF0F cmp word ptr [bp-14], 4095 0 00006A87 771F ja _.L49 0 00006A89 7506 jne _.L97 0 00006A8B 837EFAF6 cmp word ptr [bp-6], -10 0 00006A8F 7717 ja _.L49 358 _.L97: 0 00006A91 3956F2 cmp word ptr [bp-14], dx 0 00006A94 7707 ja _.L98 0 00006A96 7510 jne _.L49 0 00006A98 394EFA cmp word ptr [bp-6], cx 0 00006A9B 760B jbe _.L49 364 _.L98: 0 00006A9D FF76F2 push word ptr [bp-14] 0 00006AA0 FF76FA push word ptr [bp-6] 0 00006AA3 B8[2700] mov ax, offset _.LC3 0 00006AA6 EBB1 jmp _.L121 369 _.L49: 0 00006AA8 8E46FC mov es, word ptr [bp-4] 0 00006AAB 8B7EFE mov di, word ptr [bp-2] 0 00006AAE 268B7D02 mov di, word ptr es:[di+2] 0 00006AB2 48 dec ax 0 00006AB3 3DF40F cmp ax, 4084 0 00006AB6 7603E90901 ja _.L54 0 00006ABB 8B4EF4 mov cx, word ptr [bp-12] 0 00006ABE D1E1 shl cx, 1 0 00006AC0 034EF4 add cx, word ptr [bp-12] 0 00006AC3 31F6 xor si, si 0 00006AC5 D1E7 shl di, 1 381 _.L55: 0 00006AC7 895EEE mov word ptr [bp-18], bx 0 00006ACA 31C0 xor ax, ax 0 00006ACC 50 push ax 0 00006ACD 57 push di 0 00006ACE 56 push si 0 00006ACF 51 push cx 0 00006AD0 894EF6 mov word ptr [bp-10], cx 0 00006AD3 E8[FEFF] call ___umodsi3 0 00006AD6 8946F0 mov word ptr [bp-16], ax 0 00006AD9 31C0 xor ax, ax 0 00006ADB 50 push ax 0 00006ADC 57 push di 0 00006ADD 56 push si 0 00006ADE 8B4EF6 mov cx, word ptr [bp-10] 0 00006AE1 51 push cx 0 00006AE2 E8[FEFF] call ___udivsi3 0 00006AE5 8946F6 mov word ptr [bp-10], ax 0 00006AE8 8E46FC mov es, word ptr [bp-4] 0 00006AEB 8B5EFE mov bx, word ptr [bp-2] 0 00006AEE 268B7706 mov si, word ptr es:[bx+6] 0 00006AF2 31C9 xor cx, cx 0 00006AF4 01C6 add si, ax 0 00006AF6 11D1 adc cx, dx 0 00006AF8 8B5EEE mov bx, word ptr [bp-18] 0 00006AFB 85DB test bx, bx 0 00006AFD 752D jne _.L57 0 00006AFF 8B5EFE mov bx, word ptr [bp-2] 0 00006B02 268B4723 mov ax, word ptr es:[bx+35] 0 00006B06 A880 test al, -128 0 00006B08 7422 je _.L57 0 00006B0A 83E00F and ax, 15 0 00006B0D 97 xchg di, ax 0 00006B0E 268B4731 mov ax, word ptr es:[bx+49] 0 00006B12 8946F6 mov word ptr [bp-10], ax 0 00006B15 268B4733 mov ax, word ptr es:[bx+51] 0 00006B19 F7E7 mul di 0 00006B1B 93 xchg bx, ax 0 00006B1C 8B46F6 mov ax, word ptr [bp-10] 0 00006B1F F7E7 mul di 0 00006B21 8956F8 mov word ptr [bp-8], dx 0 00006B24 015EF8 add word ptr [bp-8], bx 0 00006B27 01C6 add si, ax 0 00006B29 134EF8 adc cx, word ptr [bp-8] 425 _.L57: 0 00006B2C 51 push cx 0 00006B2D 56 push si 0 00006B2E FF76FC push word ptr [bp-4] 0 00006B31 FF76FE push word ptr [bp-2] 0 00006B34 E8[FEFF] call _getFATblock 0 00006B37 97 xchg di, ax 0 00006B38 8956F6 mov word ptr [bp-10], dx 0 00006B3B 92 xchg dx, ax 0 00006B3C 09F8 or ax, di 0 00006B3E 7503E91AFF je _.L117 0 00006B43 8E46FC mov es, word ptr [bp-4] 0 00006B46 8B5EFE mov bx, word ptr [bp-2] 0 00006B49 268B470D mov ax, word ptr es:[bx+13] 0 00006B4D 89C2 mov dx, ax 0 00006B4F 4A dec dx 0 00006B50 81FAF40F cmp dx, 4084 0 00006B54 7603E97F01 ja _.L59 0 00006B59 8B46F0 mov ax, word ptr [bp-16] 0 00006B5C D1E8 shr ax, 1 0 00006B5E 8946EE mov word ptr [bp-18], ax 0 00006B61 268B4702 mov ax, word ptr es:[bx+2] 0 00006B65 8946F0 mov word ptr [bp-16], ax 0 00006B68 48 dec ax 0 00006B69 3946EE cmp word ptr [bp-18], ax 0 00006B6C 7368 jnc _.L60 0 00006B6E 8B5EEE mov bx, word ptr [bp-18] 0 00006B71 8D4115 lea ax, [21+bx+di] 0 00006B74 8946EC mov word ptr [bp-20], ax 0 00006B77 8B56F6 mov dx, word ptr [bp-10] 455 _.L61: 0 00006B7A 8EC2 mov es, dx 0 00006B7C 8B5EEC mov bx, word ptr [bp-20] 0 00006B7F 268A07 mov al, byte ptr es:[bx] 0 00006B82 B108 mov cl, 8 0 00006B84 D3E0 shl ax, cl 0 00006B86 8E46F6 mov es, word ptr [bp-10] 0 00006B89 8B76EE mov si, word ptr [bp-18] 0 00006B8C 89FB mov bx, di 0 00006B8E 268A4814 mov cl, byte ptr es:[bx+si+20] 0 00006B92 08C8 or al, cl 0 00006B94 89C3 mov bx, ax 0 00006B96 F646F401 test byte ptr [bp-12], 1 0 00006B9A 7404 je _.L66 0 00006B9C B104 mov cl, 4 0 00006B9E D3E8 shr ax, cl 471 _.L66: 0 00006BA0 80E40F and ah, 15 0 00006BA3 837EFA01 cmp word ptr [bp-6], 1 0 00006BA7 7560 jne _.L68 0 00006BA9 3DF70F cmp ax, 4087 476 _.L123: 0 00006BAC 7603E9A401 ja _.L69 0 00006BB1 7403E9AAFE jne _.L118 0 00006BB6 B8F7FF mov ax, -9 480 _.L119: 0 00006BB9 BAFF0F mov dx, 4095 482 _.L39: 0 00006BBC 89EC mov sp, bp 0 00006BBE 5D pop bp 0 00006BBF 5F pop di 0 00006BC0 5E pop si 0 00006BC1 C20C00 ret 12 488 _.L54: 0 00006BC4 85DB test bx, bx 0 00006BC6 7408 je _.L56 0 00006BC8 D1EF shr di, 1 492 _.L115: 0 00006BCA 8B4EF4 mov cx, word ptr [bp-12] 0 00006BCD E9F7FE jmp _.L55 495 _.L56: 0 00006BD0 B102 mov cl, 2 0 00006BD2 D3EF shr di, cl 0 00006BD4 EBF4 jmp _.L115 499 _.L60: 0 00006BD6 46 inc si 0 00006BD7 31C0 xor ax, ax 0 00006BD9 50 push ax 0 00006BDA 56 push si 0 00006BDB FF76FC push word ptr [bp-4] 0 00006BDE FF76FE push word ptr [bp-2] 0 00006BE1 E8[FEFF] call _getFATblock 0 00006BE4 89C3 mov bx, ax 0 00006BE6 09D0 or ax, dx 0 00006BE8 7503E970FE je _.L117 0 00006BED 837EFA01 cmp word ptr [bp-6], 1 0 00006BF1 7506 jne _.L89 0 00006BF3 837EF200 cmp word ptr [bp-14], 0 0 00006BF7 7407 je _.L64 514 _.L89: 0 00006BF9 8EC2 mov es, dx 0 00006BFB 26804F0560 or byte ptr es:[bx+5], 96 517 _.L64: 0 00006C00 83C314 add bx, 20 0 00006C03 895EEC mov word ptr [bp-20], bx 0 00006C06 E971FF jmp _.L61 521 _.L68: 0 00006C09 83F801 cmp ax, 1 0 00006C0C 18C0 sbb al, al 0 00006C0E 8846F0 mov byte ptr [bp-16], al 0 00006C11 F65EF0 neg byte ptr [bp-16] 0 00006C14 8B46FA mov ax, word ptr [bp-6] 0 00006C17 80E40F and ah, 15 0 00006C1A 89D9 mov cx, bx 0 00006C1C F646F401 test byte ptr [bp-12], 1 0 00006C20 7503E9AA00 je _.L71 0 00006C25 83E10F and cx, 15 0 00006C28 89CE mov si, cx 0 00006C2A B104 mov cl, 4 0 00006C2C D3E0 shl ax, cl 535 _.L72: 0 00006C2E 09F0 or ax, si 0 00006C30 8E46F6 mov es, word ptr [bp-10] 0 00006C33 8B76EE mov si, word ptr [bp-18] 0 00006C36 89FB mov bx, di 0 00006C38 26884014 mov byte ptr es:[bx+si+20], al 0 00006C3C B108 mov cl, 8 0 00006C3E D3E8 shr ax, cl 0 00006C40 8EC2 mov es, dx 0 00006C42 8B5EEC mov bx, word ptr [bp-20] 0 00006C45 268807 mov byte ptr es:[bx], al 546 _.L73: 0 00006C48 8E46F6 mov es, word ptr [bp-10] 0 00006C4B 26804D0560 or byte ptr es:[di+5], 96 0 00006C50 8B46FA mov ax, word ptr [bp-6] 0 00006C53 0B46F2 or ax, word ptr [bp-14] 0 00006C56 7406 je _.L90 0 00006C58 F646F001 test byte ptr [bp-16], 1 0 00006C5C 746A je _.L87 554 _.L90: 0 00006C5E 807EF000 cmp byte ptr [bp-16], 0 0 00006C62 7503E91C01 je _.L86 0 00006C67 8B46FA mov ax, word ptr [bp-6] 0 00006C6A 0B46F2 or ax, word ptr [bp-14] 0 00006C6D 83F801 cmp ax, 1 0 00006C70 18C0 sbb al, al 0 00006C72 FEC0 inc al 0 00006C74 30E4 xor ah, ah 0 00006C76 F7D8 neg ax 564 _.L81: 0 00006C78 8E46FC mov es, word ptr [bp-4] 0 00006C7B 8B5EFE mov bx, word ptr [bp-2] 0 00006C7E 26837F0F00 cmp word ptr es:[bx+15], 0 0 00006C83 7403E90101 jne _.L82 0 00006C88 8B5EFE mov bx, word ptr [bp-2] 0 00006C8B 268B5F1F mov bx, word ptr es:[bx+31] 0 00006C8F 8B7EFE mov di, word ptr [bp-2] 0 00006C92 268B7521 mov si, word ptr es:[di+33] 0 00006C96 83FBFF cmp bx, -1 0 00006C99 7508 jne _.L91 0 00006C9B 83FEFF cmp si, -1 0 00006C9E 7503E9E600 je _.L82 577 _.L91: 0 00006CA3 89C1 mov cx, ax 0 00006CA5 99 cwd 0 00006CA6 92 xchg dx, ax 0 00006CA7 01D9 add cx, bx 0 00006CA9 11F0 adc ax, si 0 00006CAB 8E46FC mov es, word ptr [bp-4] 0 00006CAE 8B5EFE mov bx, word ptr [bp-2] 0 00006CB1 26894F1F mov word ptr es:[bx+31], cx 0 00006CB5 8E46FC mov es, word ptr [bp-4] 0 00006CB8 8B5EFE mov bx, word ptr [bp-2] 0 00006CBB 26894721 mov word ptr es:[bx+33], ax 0 00006CBF FF76FC push word ptr [bp-4] 0 00006CC2 FF76FE push word ptr [bp-2] 0 00006CC5 E8[FEFF] call _write_fsinfo 592 _.L87: 0 00006CC8 31C0 xor ax, ax 0 00006CCA 89C2 mov dx, ax 0 00006CCC E9EDFE jmp _.L39 596 _.L71: 0 00006CCF 81E100F0 and cx, -4096 0 00006CD3 89CE mov si, cx 0 00006CD5 E956FF jmp _.L72 600 _.L59: 0 00006CD8 050AF0 add ax, -4086 0 00006CDB 3DFFEF cmp ax, -4097 0 00006CDE 7731 ja _.L74 0 00006CE0 8B5EF0 mov bx, word ptr [bp-16] 0 00006CE3 D1E3 shl bx, 1 0 00006CE5 8D5914 lea bx, [20+bx+di] 0 00006CE8 8E46F6 mov es, word ptr [bp-10] 0 00006CEB 268B07 mov ax, word ptr es:[bx] 0 00006CEE 837EFA01 cmp word ptr [bp-6], 1 0 00006CF2 7506 jne _.L75 0 00006CF4 83F8F7 cmp ax, -9 0 00006CF7 E9B2FE jmp _.L123 613 _.L75: 0 00006CFA 8E46F6 mov es, word ptr [bp-10] 0 00006CFD 8B56FA mov dx, word ptr [bp-6] 0 00006D00 268917 mov word ptr es:[bx], dx 0 00006D03 83F801 cmp ax, 1 618 _.L116: 0 00006D06 18C0 sbb al, al 0 00006D08 8846F0 mov byte ptr [bp-16], al 0 00006D0B F65EF0 neg byte ptr [bp-16] 0 00006D0E E937FF jmp _.L73 623 _.L74: 0 00006D11 8E46FC mov es, word ptr [bp-4] 0 00006D14 8B5EFE mov bx, word ptr [bp-2] 0 00006D17 26837F0F00 cmp word ptr es:[bx+15], 0 0 00006D1C 755B jne _.L77 0 00006D1E 8B5EF0 mov bx, word ptr [bp-16] 0 00006D21 B102 mov cl, 2 0 00006D23 D3E3 shl bx, cl 0 00006D25 8D5914 lea bx, [20+bx+di] 0 00006D28 8E46F6 mov es, word ptr [bp-10] 0 00006D2B 268B07 mov ax, word ptr es:[bx] 0 00006D2E 268B5702 mov dx, word ptr es:[bx+2] 0 00006D32 8956F4 mov word ptr [bp-12], dx 0 00006D35 80E60F and dh, 15 0 00006D38 837EFA01 cmp word ptr [bp-6], 1 0 00006D3C 751D jne _.L78 0 00006D3E 837EF200 cmp word ptr [bp-14], 0 0 00006D42 7517 jne _.L78 0 00006D44 81FAFF0F cmp dx, 4095 0 00006D48 7403E96FFE jne _.L39 0 00006D4D 83F8F7 cmp ax, -9 0 00006D50 7703E967FE jbe _.L39 645 _.L69: 0 00006D55 B8FFFF mov ax, -1 0 00006D58 E95EFE jmp _.L119 648 _.L78: 0 00006D5B 8E46F6 mov es, word ptr [bp-10] 0 00006D5E 8B4EFA mov cx, word ptr [bp-6] 0 00006D61 26890F mov word ptr es:[bx], cx 0 00006D64 8B76F2 mov si, word ptr [bp-14] 0 00006D67 81E6FF0F and si, 4095 0 00006D6B 8E46F6 mov es, word ptr [bp-10] 0 00006D6E 26897702 mov word ptr es:[bx+2], si 0 00006D72 09C2 or dx, ax 0 00006D74 83FA01 cmp dx, 1 0 00006D77 EB8D jmp _.L116 659 _.L77: 0 00006D79 B8[3100] mov ax, offset _.LC4 0 00006D7C 50 push ax 0 00006D7D E8[FEFF] call _put_string 0 00006D80 E9DAFC jmp _.L117 664 _.L86: 0 00006D83 B80100 mov ax, 1 0 00006D86 E9EFFE jmp _.L81 667 _.L82: 0 00006D89 8E46FC mov es, word ptr [bp-4] 0 00006D8C 8B5EFE mov bx, word ptr [bp-2] 0 00006D8F 268B571F mov dx, word ptr es:[bx+31] 0 00006D93 83FAFF cmp dx, -1 0 00006D96 7503E92DFF je _.L87 0 00006D9B 01D0 add ax, dx 0 00006D9D 2689471F mov word ptr es:[bx+31], ax 0 00006DA1 E924FF jmp _.L87 676 .size _link_fat, .-_link_fat === Switch to base=012B40h -> ".RODATA.STR1.1" 677 .section .rodata.str1.1 678 _.LC5: 0 0000197B 76616C75653A2030 .string "value: 0x" 0 00001983 7800 === Switch to base=002270h -> ".TEXT" 680 .text 681 .global _next_cluster 682 .type _next_cluster, @function 683 _next_cluster: 0 00006DA4 56 push si 0 00006DA5 57 push di 0 00006DA6 55 push bp 0 00006DA7 89E5 mov bp, sp 0 00006DA9 83EC06 sub sp, 6 0 00006DAC 8B5E08 mov bx, word ptr [bp+8] 0 00006DAF 8B460A mov ax, word ptr [bp+10] 0 00006DB2 8946FE mov word ptr [bp-2], ax 0 00006DB5 31FF xor di, di 0 00006DB7 57 push di 0 00006DB8 BE0100 mov si, 1 0 00006DBB 56 push si 0 00006DBC FF760E push word ptr [bp+14] 0 00006DBF FF760C push word ptr [bp+12] 0 00006DC2 50 push ax 0 00006DC3 53 push bx 0 00006DC4 895EFA mov word ptr [bp-6], bx 0 00006DC7 E8[FEFF] call _link_fat 0 00006DCA 8946FC mov word ptr [bp-4], ax 0 00006DCD 89D1 mov cx, dx 0 00006DCF 92 xchg dx, ax 0 00006DD0 83C2FE add dx, -2 0 00006DD3 89C8 mov ax, cx 0 00006DD5 83D0FF adc ax, -1 0 00006DD8 3DFF0F cmp ax, 4095 0 00006DDB 7773 ja _.L124 0 00006DDD 8EDF mov ds, di 0 00006DDF 96 xchg si, ax 0 00006DE0 8B5EFA mov bx, word ptr [bp-6] 0 00006DE3 7505 jne _.L135 0 00006DE5 83FAF4 cmp dx, -12 0 00006DE8 7766 ja _.L124 716 _.L135: 0 00006DEA 8E46FE mov es, word ptr [bp-2] 0 00006DED 268B770D mov si, word ptr es:[bx+13] 0 00006DF1 26837F0F00 cmp word ptr es:[bx+15], 0 0 00006DF6 7432 je _.L127 0 00006DF8 31FF xor di, di 722 _.L128: 0 00006DFA 1E push ds 0 00006DFB 50 push ax 0 00006DFC 51 push cx 0 00006DFD 894EFA mov word ptr [bp-6], cx 0 00006E00 FF76FC push word ptr [bp-4] 0 00006E03 FF76FE push word ptr [bp-2] 0 00006E06 53 push bx 0 00006E07 16 push ss 0 00006E08 1F pop ds 0 00006E09 E8[FEFF] call _link_fat 0 00006E0C 85D2 test dx, dx 0 00006E0E 8B4EFA mov cx, word ptr [bp-6] 0 00006E11 7524 jne _.L136 0 00006E13 83F801 cmp ax, 1 0 00006E16 7730 ja _.L145 738 _.L129: 0 00006E18 52 push dx 0 00006E19 50 push ax 0 00006E1A B8[3B00] mov ax, offset _.LC5 0 00006E1D 50 push ax 0 00006E1E E8[FEFF] call _clusterMessage 0 00006E21 C746FC0100 mov word ptr [bp-4], 1 0 00006E26 31C9 xor cx, cx 0 00006E28 EB26 jmp _.L124 747 _.L127: 0 00006E2A 8E46FE mov es, word ptr [bp-2] 0 00006E2D 268B772D mov si, word ptr es:[bx+45] 0 00006E31 268B7F2F mov di, word ptr es:[bx+47] 0 00006E35 EBC3 jmp _.L128 752 _.L136: 0 00006E37 81FAFF0F cmp dx, 4095 0 00006E3B 7713 ja _.L124 0 00006E3D 7505 jne _.L139 0 00006E3F 83F8F6 cmp ax, -10 0 00006E42 770C ja _.L124 758 _.L139: 0 00006E44 39FA cmp dx, di 0 00006E46 77D0 ja _.L129 761 _.L145: 0 00006E48 39FA cmp dx, di 0 00006E4A 7504 jne _.L124 0 00006E4C 39F0 cmp ax, si 0 00006E4E 77C8 ja _.L129 766 _.L124: 0 00006E50 8B46FC mov ax, word ptr [bp-4] 0 00006E53 89CA mov dx, cx 0 00006E55 89EC mov sp, bp 0 00006E57 5D pop bp 0 00006E58 5F pop di 0 00006E59 5E pop si 0 00006E5A 16 push ss 0 00006E5B 1F pop ds 0 00006E5C C20800 ret 8 776 .size _next_cluster, .-_next_cluster 777 .global _is_free_cluster 778 .type _is_free_cluster, @function 779 _is_free_cluster: 0 00006E5F 55 push bp 0 00006E60 89E5 mov bp, sp 0 00006E62 31C0 xor ax, ax 0 00006E64 50 push ax 0 00006E65 B80100 mov ax, 1 0 00006E68 50 push ax 0 00006E69 FF760A push word ptr [bp+10] 0 00006E6C FF7608 push word ptr [bp+8] 0 00006E6F FF7606 push word ptr [bp+6] 0 00006E72 FF7604 push word ptr [bp+4] 0 00006E75 E8[FEFF] call _link_fat 0 00006E78 09D0 or ax, dx 0 00006E7A 9F lahf 0 00006E7B D0E4 shl ah, 1 0 00006E7D 99 cwd 0 00006E7E 30C0 xor al, al 0 00006E80 28D0 sub al, dl 0 00006E82 30E4 xor ah, ah 0 00006E84 89EC mov sp, bp 0 00006E86 5D pop bp 0 00006E87 C20800 ret 8 801 .size _is_free_cluster, .-_is_free_cluster 802 .ident "GCC: (GNU) 6.3.0" === Trace listing source: fcbfns.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=fcbfns.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccuDcYNa.s output file : fcbfns.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _ExtFcbToFcb, @function 7 _ExtFcbToFcb: 0 00006E8A 55 push bp 0 00006E8B 89E5 mov bp, sp 0 00006E8D C45E04 les bx, dword ptr [bp+4] 0 00006E90 8CC0 mov ax, es 0 00006E92 26803FFF cmp byte ptr es:[bx], -1 0 00006E96 7503 jne _.L2 0 00006E98 83C307 add bx, 7 15 _.L2: 0 00006E9B 891E[0000] mov word ptr [_sda_lpFcb], bx 0 00006E9F A3[0200] mov word ptr [_sda_lpFcb+2], ax 0 00006EA2 A1[0000] mov ax, word ptr [_sda_lpFcb] 0 00006EA5 8B16[0200] mov dx, word ptr [_sda_lpFcb+2] 0 00006EA9 5D pop bp 0 00006EAA C20400 ret 4 22 .size _ExtFcbToFcb, .-_ExtFcbToFcb 23 .type _FcbCalcRec, @function 24 _FcbCalcRec: 0 00006EAD 57 push di 0 00006EAE 55 push bp 0 00006EAF 89E5 mov bp, sp 0 00006EB1 1E push ds 0 00006EB2 1E push ds 0 00006EB3 FF7608 push word ptr [bp+8] 0 00006EB6 FF7606 push word ptr [bp+6] 0 00006EB9 E8CEFF call _ExtFcbToFcb 0 00006EBC 8EC2 mov es, dx 0 00006EBE 89C3 mov bx, ax 0 00006EC0 268B4F21 mov cx, word ptr es:[bx+33] 0 00006EC4 894EFE mov word ptr [bp-2], cx 0 00006EC7 268B4F23 mov cx, word ptr es:[bx+35] 0 00006ECB 89CB mov bx, cx 0 00006ECD B109 mov cl, 9 0 00006ECF D3E3 shl bx, cl 0 00006ED1 8B7EFE mov di, word ptr [bp-2] 0 00006ED4 B107 mov cl, 7 0 00006ED6 D3EF shr di, cl 0 00006ED8 89F9 mov cx, di 0 00006EDA 09D9 or cx, bx 0 00006EDC 93 xchg bx, ax 0 00006EDD 26894F0C mov word ptr es:[bx+12], cx 0 00006EE1 8A4EFE mov cl, byte ptr [bp-2] 0 00006EE4 80E17F and cl, 127 0 00006EE7 26884F20 mov byte ptr es:[bx+32], cl 0 00006EEB 89EC mov sp, bp 0 00006EED 5D pop bp 0 00006EEE 5F pop di 0 00006EEF C20400 ret 4 55 .size _FcbCalcRec, .-_FcbCalcRec 56 .type _CommonFcbInit.constprop.0, @function 57 _CommonFcbInit.constprop.0: 0 00006EF2 56 push si 0 00006EF3 55 push bp 0 00006EF4 89E5 mov bp, sp 0 00006EF6 1E push ds 0 00006EF7 1E push ds 0 00006EF8 8B760A mov si, word ptr [bp+10] 0 00006EFB FF7608 push word ptr [bp+8] 0 00006EFE FF7606 push word ptr [bp+6] 0 00006F01 E886FF call _ExtFcbToFcb 0 00006F04 89C3 mov bx, ax 0 00006F06 A3[0000] mov word ptr [_sda_lpFcb], ax 0 00006F09 8916[0200] mov word ptr [_sda_lpFcb+2], dx 0 00006F0D A0[0000] mov al, byte ptr [_default_drive] 0 00006F10 98 cbw 0 00006F11 40 inc ax 0 00006F12 8904 mov word ptr [si], ax 0 00006F14 8EC2 mov es, dx 0 00006F16 268A0F mov cl, byte ptr es:[bx] 0 00006F19 84C9 test cl, cl 0 00006F1B B8[0000] mov ax, offset __SecPathBuffer 0 00006F1E 741B je _.L8 0 00006F20 884EFE mov byte ptr [bp-2], cl 0 00006F23 8B4EFE mov cx, word ptr [bp-2] 0 00006F26 B500 mov ch, 0 0 00006F28 890C mov word ptr [si], cx 0 00006F2A 268A0F mov cl, byte ptr es:[bx] 0 00006F2D 80C140 add cl, 64 0 00006F30 96 xchg si, ax 0 00006F31 880C mov byte ptr [si], cl 0 00006F33 C606[0100]3A mov byte ptr [__SecPathBuffer+1], 58 0 00006F38 B8[0200] mov ax, offset __SecPathBuffer+2 89 _.L8: 0 00006F3B 8D4F01 lea cx, [1+bx] 0 00006F3E 895EFC mov word ptr [bp-4], bx 0 00006F41 52 push dx 0 00006F42 8956FE mov word ptr [bp-2], dx 0 00006F45 51 push cx 0 00006F46 16 push ss 0 00006F47 50 push ax 0 00006F48 E8[FEFF] call _ConvertName83ToNameSZ 0 00006F4B 8B5EFC mov bx, word ptr [bp-4] 0 00006F4E 93 xchg bx, ax 0 00006F4F 8B56FE mov dx, word ptr [bp-2] 0 00006F52 89EC mov sp, bp 0 00006F54 5D pop bp 0 00006F55 5E pop si 0 00006F56 C20600 ret 6 105 .size _CommonFcbInit.constprop.0, .-_CommonFcbInit.constprop.0 106 .global _FatGetDrvData 107 .type _FatGetDrvData, @function 108 _FatGetDrvData: 0 00006F59 56 push si 0 00006F5A 55 push bp 0 00006F5B 89E5 mov bp, sp 0 00006F5D 1E push ds 0 00006F5E FF760C push word ptr [bp+12] 0 00006F61 FF760A push word ptr [bp+10] 0 00006F64 31F6 xor si, si 0 00006F66 56 push si 0 00006F67 FF7606 push word ptr [bp+6] 0 00006F6A E8[FEFF] call _DosGetFree 0 00006F6D 8946FE mov word ptr [bp-2], ax 0 00006F70 89F0 mov ax, si 0 00006F72 89F2 mov dx, si 0 00006F74 837EFEFF cmp word ptr [bp-2], -1 0 00006F78 742B je _.L11 0 00006F7A 807E0600 cmp byte ptr [bp+6], 0 0 00006F7E 752C jne _.L13 0 00006F80 A0[0000] mov al, byte ptr [_default_drive] 0 00006F83 98 cbw 128 _.L14: 0 00006F84 50 push ax 0 00006F85 E8[FEFF] call _get_dpb 0 00006F88 8B5E08 mov bx, word ptr [bp+8] 0 00006F8B 8A4EFE mov cl, byte ptr [bp-2] 0 00006F8E 880F mov byte ptr [bx], cl 0 00006F90 89C1 mov cx, ax 0 00006F92 09D1 or cx, dx 0 00006F94 751E jne _.L15 0 00006F96 8B46FE mov ax, word ptr [bp-2] 0 00006F99 B108 mov cl, 8 0 00006F9B D3E8 shr ax, cl 0 00006F9D A2[0000] mov byte ptr [_mdb.2324], al 0 00006FA0 B8[0000] mov ax, offset _mdb.2324 0 00006FA3 8CD2 mov dx, ss 143 _.L11: 0 00006FA5 89EC mov sp, bp 0 00006FA7 5D pop bp 0 00006FA8 5E pop si 0 00006FA9 C20800 ret 8 148 _.L13: 0 00006FAC 8A4606 mov al, byte ptr [bp+6] 0 00006FAF 30E4 xor ah, ah 0 00006FB1 48 dec ax 0 00006FB2 EBD0 jmp _.L14 153 _.L15: 0 00006FB4 83C017 add ax, 23 0 00006FB7 EBEC jmp _.L11 156 .size _FatGetDrvData, .-_FatGetDrvData 157 .global _ParseSkipWh 158 .type _ParseSkipWh, @function 159 _ParseSkipWh: 0 00006FB9 55 push bp 0 00006FBA 89E5 mov bp, sp 0 00006FBC 8B5606 mov dx, word ptr [bp+6] 0 00006FBF 8B4604 mov ax, word ptr [bp+4] 164 _.L19: 0 00006FC2 8EC2 mov es, dx 0 00006FC4 89C3 mov bx, ax 0 00006FC6 268A0F mov cl, byte ptr es:[bx] 0 00006FC9 80F920 cmp cl, 32 0 00006FCC 7409 je _.L20 0 00006FCE 80F909 cmp cl, 9 0 00006FD1 7404 je _.L20 0 00006FD3 5D pop bp 0 00006FD4 C20400 ret 4 174 _.L20: 0 00006FD7 40 inc ax 0 00006FD8 EBE8 jmp _.L19 177 .size _ParseSkipWh, .-_ParseSkipWh === Switch to base=012B40h -> ".RODATA.STR1.1" 178 .section .rodata.str1.1,"aMS",@progbits,1 179 _.LC0: 0 00001985 2F5C225B5D3C3E7C .string "/\\\"[]<>|.:;,=+\t" 0 0000198D 2E3A3B2C3D2B0900 === Switch to base=002270h -> ".TEXT" 181 .text 182 .global _GetNameField 183 .type _GetNameField, @function 184 _GetNameField: 0 00006FDA 56 push si 0 00006FDB 57 push di 0 00006FDC 55 push bp 0 00006FDD 89E5 mov bp, sp 0 00006FDF 83EC0A sub sp, 10 0 00006FE2 8B560A mov dx, word ptr [bp+10] 0 00006FE5 8B7E0C mov di, word ptr [bp+12] 0 00006FE8 8B460E mov ax, word ptr [bp+14] 0 00006FEB 8946FE mov word ptr [bp-2], ax 0 00006FEE 8B7608 mov si, word ptr [bp+8] 0 00006FF1 31C9 xor cx, cx 196 _.L23: 0 00006FF3 8EC2 mov es, dx 0 00006FF5 268A04 mov al, byte ptr es:[si] 0 00006FF8 3C20 cmp al, 32 0 00006FFA 761E jbe _.L30 0 00006FFC 8956FA mov word ptr [bp-6], dx 0 00006FFF 894EFC mov word ptr [bp-4], cx 0 00007002 98 cbw 0 00007003 50 push ax 0 00007004 B8[0000] mov ax, offset _.LC0 0 00007007 50 push ax 0 00007008 E8[FEFF] call _strchr 0 0000700B 8B4EFC mov cx, word ptr [bp-4] 0 0000700E 3B4E10 cmp cx, word ptr [bp+16] 0 00007011 8B56FA mov dx, word ptr [bp-6] 0 00007014 7D04 jge _.L30 0 00007016 85C0 test ax, ax 0 00007018 7404 je _.L27 214 _.L30: 0 0000701A B020 mov al, 32 0 0000701C EB13 jmp _.L25 217 _.L27: 0 0000701E 8EC2 mov es, dx 0 00007020 268A04 mov al, byte ptr es:[si] 0 00007023 3C2A cmp al, 42 0 00007025 7528 jne _.L24 0 00007027 8B5E12 mov bx, word ptr [bp+18] 0 0000702A C7070100 mov word ptr [bx], 1 0 0000702E 46 inc si 0 0000702F B03F mov al, 63 226 _.L25: 0 00007031 8956FC mov word ptr [bp-4], dx 0 00007034 8B5610 mov dx, word ptr [bp+16] 0 00007037 29CA sub dx, cx 0 00007039 52 push dx 0 0000703A 98 cbw 0 0000703B 50 push ax 0 0000703C FF76FE push word ptr [bp-2] 0 0000703F 57 push di 0 00007040 E8[FEFF] call _fmemset 0 00007043 96 xchg si, ax 0 00007044 8B56FC mov dx, word ptr [bp-4] 0 00007047 89EC mov sp, bp 0 00007049 5D pop bp 0 0000704A 5F pop di 0 0000704B 5E pop si 0 0000704C C20C00 ret 12 243 _.L24: 0 0000704F 3C3F cmp al, 63 0 00007051 7507 jne _.L26 0 00007053 8B5E12 mov bx, word ptr [bp+18] 0 00007056 C7070100 mov word ptr [bx], 1 248 _.L26: 0 0000705A 894EF6 mov word ptr [bp-10], cx 0 0000705D 89F8 mov ax, di 0 0000705F 40 inc ax 0 00007060 8946FC mov word ptr [bp-4], ax 0 00007063 89F0 mov ax, si 0 00007065 40 inc ax 0 00007066 8946FA mov word ptr [bp-6], ax 0 00007069 8EC2 mov es, dx 0 0000706B 8956F8 mov word ptr [bp-8], dx 0 0000706E 26FF34 push word ptr es:[si] 0 00007071 E8[FEFF] call _DosUpFChar 0 00007074 8E46FE mov es, word ptr [bp-2] 0 00007077 268805 mov byte ptr es:[di], al 0 0000707A 8B4EF6 mov cx, word ptr [bp-10] 0 0000707D 41 inc cx 0 0000707E 8B7EFC mov di, word ptr [bp-4] 0 00007081 8B76FA mov si, word ptr [bp-6] 0 00007084 8B56F8 mov dx, word ptr [bp-8] 0 00007087 E969FF jmp _.L23 268 .size _GetNameField, .-_GetNameField === Switch to base=012B40h -> ".RODATA.STR1.1" 269 .section .rodata.str1.1 270 _.LC1: 0 00001995 3A3B2C3D2B200900 .string ":;,=+ \t" === Switch to base=002270h -> ".TEXT" 272 .text 273 .global _FcbParseFname 274 .type _FcbParseFname, @function 275 _FcbParseFname: 0 0000708A 56 push si 0 0000708B 57 push di 0 0000708C 55 push bp 0 0000708D 89E5 mov bp, sp 0 0000708F 83EC0E sub sp, 14 0 00007092 8B7608 mov si, word ptr [bp+8] 0 00007095 8B5E0A mov bx, word ptr [bp+10] 0 00007098 8B460C mov ax, word ptr [bp+12] 0 0000709B 8946F8 mov word ptr [bp-8], ax 0 0000709E 8B7E0E mov di, word ptr [bp+14] 0 000070A1 8B4610 mov ax, word ptr [bp+16] 0 000070A4 8946FA mov word ptr [bp-6], ax 0 000070A7 C746FC0000 mov word ptr [bp-4], 0 0 000070AC C746FE0000 mov word ptr [bp-2], 0 0 000070B1 F60401 test byte ptr [si], 1 0 000070B4 7420 je _.L37 292 _.L38: 0 000070B6 8E46F8 mov es, word ptr [bp-8] 0 000070B9 268A07 mov al, byte ptr es:[bx] 0 000070BC 84C0 test al, al 0 000070BE 7416 je _.L37 0 000070C0 895EF6 mov word ptr [bp-10], bx 0 000070C3 98 cbw 0 000070C4 50 push ax 0 000070C5 B8[1000] mov ax, offset _.LC1 0 000070C8 50 push ax 0 000070C9 E8[FEFF] call _strchr 0 000070CC 85C0 test ax, ax 0 000070CE 8B5EF6 mov bx, word ptr [bp-10] 0 000070D1 7403E9ED00 jne _.L39 306 _.L37: 0 000070D6 FF76F8 push word ptr [bp-8] 0 000070D9 53 push bx 0 000070DA E8[FEFF] call _ParseSkipWh 0 000070DD 93 xchg bx, ax 0 000070DE 8956F8 mov word ptr [bp-8], dx 0 000070E1 8EC2 mov es, dx 0 000070E3 268A07 mov al, byte ptr es:[bx] 0 000070E6 3C20 cmp al, 32 0 000070E8 7703E9DA00 jbe _.L40 0 000070ED 895EF6 mov word ptr [bp-10], bx 0 000070F0 98 cbw 0 000070F1 50 push ax 0 000070F2 B8[0000] mov ax, offset _.LC0 0 000070F5 50 push ax 0 000070F6 E8[FEFF] call _strchr 0 000070F9 85C0 test ax, ax 0 000070FB 8B5EF6 mov bx, word ptr [bp-10] 0 000070FE 7403E9C400 jne _.L40 0 00007103 8E46F8 mov es, word ptr [bp-8] 0 00007106 26807F013A cmp byte ptr es:[bx+1], 58 0 0000710B 7403E9B700 jne _.L40 0 00007110 26FF37 push word ptr es:[bx] 0 00007113 895EF2 mov word ptr [bp-14], bx 0 00007116 E8[FEFF] call _DosUpFChar 0 00007119 8846F4 mov byte ptr [bp-12], al 0 0000711C 04BF add al, -65 0 0000711E 30E4 xor ah, ah 0 00007120 50 push ax 0 00007121 E8[FEFF] call _get_cds 0 00007124 09D0 or ax, dx 0 00007126 9F lahf 0 00007127 D0E4 shl ah, 1 0 00007129 99 cwd 0 0000712A F6DA neg dl 0 0000712C 30F6 xor dh, dh 0 0000712E 8956F6 mov word ptr [bp-10], dx 0 00007131 8A4EF4 mov cl, byte ptr [bp-12] 0 00007134 80C1C0 add cl, -64 0 00007137 8E46FA mov es, word ptr [bp-6] 0 0000713A 26880D mov byte ptr es:[di], cl 0 0000713D 8B5EF2 mov bx, word ptr [bp-14] 0 00007140 83C302 add bx, 2 349 _.L41: 0 00007143 8E46FA mov es, word ptr [bp-6] 0 00007146 26C7450E0000 mov word ptr es:[di+14], 0 0 0000714C 8E46FA mov es, word ptr [bp-6] 0 0000714F 26C7450C0000 mov word ptr es:[di+12], 0 0 00007155 F60404 test byte ptr [si], 4 0 00007158 7518 jne _.L42 0 0000715A 895EF4 mov word ptr [bp-12], bx 0 0000715D B80800 mov ax, 8 0 00007160 50 push ax 0 00007161 B82000 mov ax, 32 0 00007164 50 push ax 0 00007165 8D4501 lea ax, [1+di] 0 00007168 FF76FA push word ptr [bp-6] 0 0000716B 50 push ax 0 0000716C E8[FEFF] call _fmemset 0 0000716F 8B5EF4 mov bx, word ptr [bp-12] 366 _.L42: 0 00007172 F60408 test byte ptr [si], 8 0 00007175 7518 jne _.L43 0 00007177 895EF4 mov word ptr [bp-12], bx 0 0000717A B80300 mov ax, 3 0 0000717D 50 push ax 0 0000717E B82000 mov ax, 32 0 00007181 50 push ax 0 00007182 8D4509 lea ax, [9+di] 0 00007185 FF76FA push word ptr [bp-6] 0 00007188 50 push ax 0 00007189 E8[FEFF] call _fmemset 0 0000718C 8B5EF4 mov bx, word ptr [bp-12] 379 _.L43: 0 0000718F 8E46F8 mov es, word ptr [bp-8] 0 00007192 26803F2E cmp byte ptr es:[bx], 46 0 00007196 7543 jne _.L44 0 00007198 8E46FA mov es, word ptr [bp-6] 0 0000719B 26C645012E mov byte ptr es:[di+1], 46 0 000071A0 8E46F8 mov es, word ptr [bp-8] 0 000071A3 8D4701 lea ax, [1+bx] 0 000071A6 26807F012E cmp byte ptr es:[bx+1], 46 0 000071AB 750B jne _.L46 0 000071AD 8E46FA mov es, word ptr [bp-6] 0 000071B0 26C645022E mov byte ptr es:[di+2], 46 0 000071B5 8D4702 lea ax, [2+bx] 392 _.L46: 0 000071B8 C60400 mov byte ptr [si], 0 394 _.L36: 0 000071BB 89EC mov sp, bp 0 000071BD 5D pop bp 0 000071BE 5F pop di 0 000071BF 5E pop si 0 000071C0 C20A00 ret 10 400 _.L39: 0 000071C3 43 inc bx 0 000071C4 E9EFFE jmp _.L38 403 _.L40: 0 000071C7 8A04 mov al, byte ptr [si] 0 000071C9 2402 and al, 2 0 000071CB 7506 jne _.L52 0 000071CD 8E46FA mov es, word ptr [bp-6] 0 000071D0 268805 mov byte ptr es:[di], al 409 _.L52: 0 000071D3 C746F60000 mov word ptr [bp-10], 0 0 000071D8 E968FF jmp _.L41 412 _.L44: 0 000071DB 8D46FC lea ax, [-4+bp] 0 000071DE 50 push ax 0 000071DF B80800 mov ax, 8 0 000071E2 50 push ax 0 000071E3 8D4501 lea ax, [1+di] 0 000071E6 FF76FA push word ptr [bp-6] 0 000071E9 50 push ax 0 000071EA FF76F8 push word ptr [bp-8] 0 000071ED 53 push bx 0 000071EE E8[FEFF] call _GetNameField 0 000071F1 93 xchg bx, ax 0 000071F2 8EC2 mov es, dx 0 000071F4 26803F2E cmp byte ptr es:[bx], 46 0 000071F8 7518 jne _.L48 0 000071FA 8D4701 lea ax, [1+bx] 0 000071FD 8D4EFE lea cx, [-2+bp] 0 00007200 51 push cx 0 00007201 B90300 mov cx, 3 0 00007204 51 push cx 0 00007205 8D4D09 lea cx, [9+di] 0 00007208 FF76FA push word ptr [bp-6] 0 0000720B 51 push cx 0 0000720C 52 push dx 0 0000720D 50 push ax 0 0000720E E8[FEFF] call _GetNameField 0 00007211 93 xchg bx, ax 439 _.L48: 0 00007212 837EF600 cmp word ptr [bp-10], 0 0 00007216 7406 je _.L49 0 00007218 C604FF mov byte ptr [si], -1 443 _.L50: 0 0000721B 93 xchg bx, ax 0 0000721C EB9D jmp _.L36 446 _.L49: 0 0000721E 8B56FE mov dx, word ptr [bp-2] 0 00007221 0B56FC or dx, word ptr [bp-4] 0 00007224 9F lahf 0 00007225 D0E4 shl ah, 1 0 00007227 99 cwd 0 00007228 FEC2 inc dl 0 0000722A 8814 mov byte ptr [si], dl 0 0000722C EBED jmp _.L50 455 .size _FcbParseFname, .-_FcbParseFname 456 .global _FcbReadWrite 457 .type _FcbReadWrite, @function 458 _FcbReadWrite: 0 0000722E 56 push si 0 0000722F 57 push di 0 00007230 55 push bp 0 00007231 89E5 mov bp, sp 0 00007233 83EC0A sub sp, 10 0 00007236 FF760A push word ptr [bp+10] 0 00007239 FF7608 push word ptr [bp+8] 0 0000723C E84BFC call _ExtFcbToFcb 0 0000723F 8946FE mov word ptr [bp-2], ax 0 00007242 8956FC mov word ptr [bp-4], dx 0 00007245 8EC2 mov es, dx 0 00007247 93 xchg bx, ax 0 00007248 268B7F0E mov di, word ptr es:[bx+14] 0 0000724C 89F8 mov ax, di 0 0000724E F7660C mul word ptr [bp+12] 0 00007251 8946F8 mov word ptr [bp-8], ax 0 00007254 8956FA mov word ptr [bp-6], dx 0 00007257 B002 mov al, 2 0 00007259 85D2 test dx, dx 0 0000725B 7554 jne _.L60 0 0000725D 8B56F8 mov dx, word ptr [bp-8] 0 00007260 0316[0000] add dx, word ptr [_dta] 0 00007264 724B jc _.L60 0 00007266 FF76FA push word ptr [bp-6] 0 00007269 268B570C mov dx, word ptr es:[bx+12] 0 0000726D 89D0 mov ax, dx 0 0000726F B109 mov cl, 9 0 00007271 D3E8 shr ax, cl 0 00007273 B107 mov cl, 7 0 00007275 D3E2 shl dx, cl 0 00007277 89D6 mov si, dx 0 00007279 268A5720 mov dl, byte ptr es:[bx+32] 0 0000727D 8856F6 mov byte ptr [bp-10], dl 0 00007280 8A56F6 mov dl, byte ptr [bp-10] 0 00007283 30F6 xor dh, dh 0 00007285 8B4EFA mov cx, word ptr [bp-6] 0 00007288 01D6 add si, dx 0 0000728A 11C1 adc cx, ax 0 0000728C 91 xchg cx, ax 0 0000728D F7E7 mul di 0 0000728F 91 xchg cx, ax 0 00007290 96 xchg si, ax 0 00007291 F7E7 mul di 0 00007293 01D1 add cx, dx 0 00007295 51 push cx 0 00007296 50 push ax 0 00007297 8B5EFE mov bx, word ptr [bp-2] 0 0000729A 268A4718 mov al, byte ptr es:[bx+24] 0 0000729E 98 cbw 0 0000729F 50 push ax 0 000072A0 E8[FEFF] call _SftSeek 0 000072A3 89C2 mov dx, ax 0 000072A5 F7DA neg dx 0 000072A7 8916[0000] mov word ptr [_CritErrCode], dx 0 000072AB 85C0 test ax, ax 0 000072AD 740A je _.L63 515 _.L70: 0 000072AF B001 mov al, 1 517 _.L60: 0 000072B1 89EC mov sp, bp 0 000072B3 5D pop bp 0 000072B4 5F pop di 0 000072B5 5E pop si 0 000072B6 C20800 ret 8 523 _.L63: 0 000072B9 8B460E mov ax, word ptr [bp+14] 0 000072BC 83E0FB and ax, -5 0 000072BF 50 push ax 0 000072C0 FF36[0200] push word ptr [_dta+2] 0 000072C4 FF36[0000] push word ptr [_dta] 0 000072C8 FF76F8 push word ptr [bp-8] 0 000072CB 8E46FC mov es, word ptr [bp-4] 0 000072CE 8B5EFE mov bx, word ptr [bp-2] 0 000072D1 268A4718 mov al, byte ptr es:[bx+24] 0 000072D5 98 cbw 0 000072D6 50 push ax 0 000072D7 E8[FEFF] call _DosRWSft 0 000072DA 89C3 mov bx, ax 0 000072DC 85D2 test dx, dx 0 000072DE 7D05 jge _.L64 0 000072E0 F7D8 neg ax 0 000072E2 A3[0000] mov word ptr [_CritErrCode], ax 541 _.L64: 0 000072E5 F6460E02 test byte ptr [bp+14], 2 0 000072E9 7429 je _.L66 0 000072EB 895EF6 mov word ptr [bp-10], bx 0 000072EE 8E46FC mov es, word ptr [bp-4] 0 000072F1 8B5EFE mov bx, word ptr [bp-2] 0 000072F4 268A4718 mov al, byte ptr es:[bx+24] 0 000072F8 98 cbw 0 000072F9 50 push ax 0 000072FA E8[FEFF] call _SftGetFsize 0 000072FD 8E46FC mov es, word ptr [bp-4] 0 00007300 8B5EFE mov bx, word ptr [bp-2] 0 00007303 26894710 mov word ptr es:[bx+16], ax 0 00007307 8E46FC mov es, word ptr [bp-4] 0 0000730A 8B5EFE mov bx, word ptr [bp-2] 0 0000730D 26895712 mov word ptr es:[bx+18], dx 0 00007311 8B5EF6 mov bx, word ptr [bp-10] 558 _.L66: 0 00007314 F6460E04 test byte ptr [bp+14], 4 0 00007318 742E je _.L67 0 0000731A 85FF test di, di 0 0000731C 742A je _.L67 0 0000731E 8D41FF lea ax, [-1+bx+di] 0 00007321 31D2 xor dx, dx 0 00007323 F7F7 div di 0 00007325 96 xchg si, ax 0 00007326 31C9 xor cx, cx 0 00007328 8E46FC mov es, word ptr [bp-4] 0 0000732B 8B7EFE mov di, word ptr [bp-2] 0 0000732E 268B4521 mov ax, word ptr es:[di+33] 0 00007332 268B5523 mov dx, word ptr es:[di+35] 0 00007336 01F0 add ax, si 0 00007338 11D1 adc cx, dx 0 0000733A 26894521 mov word ptr es:[di+33], ax 0 0000733E 8E46FC mov es, word ptr [bp-4] 0 00007341 8B7EFE mov di, word ptr [bp-2] 0 00007344 26894D23 mov word ptr es:[di+35], cx 578 _.L67: 0 00007348 8B46F8 mov ax, word ptr [bp-8] 0 0000734B 8E46FC mov es, word ptr [bp-4] 0 0000734E 29D8 sub ax, bx 0 00007350 752C jne _.L68 0 00007352 8B5EFE mov bx, word ptr [bp-2] 0 00007355 268A5720 mov dl, byte ptr es:[bx+32] 0 00007359 8856F8 mov byte ptr [bp-8], dl 0 0000735C FEC2 inc dl 0 0000735E 7807 js _.L69 0 00007360 26885720 mov byte ptr es:[bx+32], dl 0 00007364 E94AFF jmp _.L60 590 _.L69: 0 00007367 8E46FC mov es, word ptr [bp-4] 0 0000736A 8B5EFE mov bx, word ptr [bp-2] 0 0000736D 26884720 mov byte ptr es:[bx+32], al 0 00007371 8E46FC mov es, word ptr [bp-4] 0 00007374 8B5EFE mov bx, word ptr [bp-2] 0 00007377 26FF470C inc word ptr es:[bx+12] 0 0000737B E933FF jmp _.L60 598 _.L68: 0 0000737E 8B7EFE mov di, word ptr [bp-2] 0 00007381 31D2 xor dx, dx 0 00007383 26F7750E div word ptr es:[di+14] 0 00007387 85D2 test dx, dx 0 00007389 7503E921FF je _.L70 0 0000738E F6460E01 test byte ptr [bp+14], 1 0 00007392 7503E918FF je _.L70 0 00007397 52 push dx 0 00007398 31C0 xor ax, ax 0 0000739A 50 push ax 0 0000739B 93 xchg bx, ax 0 0000739C 0306[0000] add ax, word ptr [_dta] 0 000073A0 FF36[0200] push word ptr [_dta+2] 0 000073A4 50 push ax 0 000073A5 E8[FEFF] call _fmemset 0 000073A8 8E46FC mov es, word ptr [bp-4] 0 000073AB 8B5EFE mov bx, word ptr [bp-2] 0 000073AE 268A4720 mov al, byte ptr es:[bx+32] 0 000073B2 8846F8 mov byte ptr [bp-8], al 0 000073B5 FEC0 inc al 0 000073B7 7809 js _.L71 0 000073B9 26884720 mov byte ptr es:[bx+32], al 621 _.L90: 0 000073BD B003 mov al, 3 0 000073BF E9EFFE jmp _.L60 624 _.L71: 0 000073C2 8E46FC mov es, word ptr [bp-4] 0 000073C5 8B5EFE mov bx, word ptr [bp-2] 0 000073C8 26C6472000 mov byte ptr es:[bx+32], 0 0 000073CD 8E46FC mov es, word ptr [bp-4] 0 000073D0 8B5EFE mov bx, word ptr [bp-2] 0 000073D3 26FF470C inc word ptr es:[bx+12] 0 000073D7 EBE4 jmp _.L90 632 .size _FcbReadWrite, .-_FcbReadWrite 633 .global _FcbGetFileSize 634 .type _FcbGetFileSize, @function 635 _FcbGetFileSize: 0 000073D9 56 push si 0 000073DA 57 push di 0 000073DB 55 push bp 0 000073DC 89E5 mov bp, sp 0 000073DE 83EC08 sub sp, 8 0 000073E1 8D46FE lea ax, [-2+bp] 0 000073E4 50 push ax 0 000073E5 FF760A push word ptr [bp+10] 0 000073E8 FF7608 push word ptr [bp+8] 0 000073EB E804FB call _CommonFcbInit.constprop.0 0 000073EE 8946FC mov word ptr [bp-4], ax 0 000073F1 8956FA mov word ptr [bp-6], dx 0 000073F4 09D0 or ax, dx 0 000073F6 7504 jne _.L92 650 _.L97: 0 000073F8 B0FF mov al, -1 0 000073FA EB74 jmp _.L91 653 _.L92: 0 000073FC 8E46FA mov es, word ptr [bp-6] 0 000073FF 8B5EFC mov bx, word ptr [bp-4] 0 00007402 268B470E mov ax, word ptr es:[bx+14] 0 00007406 8946F8 mov word ptr [bp-8], ax 0 00007409 BE[0000] mov si, offset __SecPathBuffer 0 0000740C 8CD7 mov di, ss 0 0000740E 16 push ss 0 0000740F 56 push si 0 00007410 E8[FEFF] call _IsDevice 0 00007413 09D0 or ax, dx 0 00007415 75E1 jne _.L97 0 00007417 837EF801 cmp word ptr [bp-8], 1 0 0000741B 72DB jc _.L97 0 0000741D 31C0 xor ax, ax 0 0000741F 50 push ax 0 00007420 B80009 mov ax, 2304 0 00007423 50 push ax 0 00007424 57 push di 0 00007425 56 push si 0 00007426 E8[FEFF] call _DosOpenSft 0 00007429 89C6 mov si, ax 0 0000742B 85C0 test ax, ax 0 0000742D 7C49 jl _.L95 0 0000742F 50 push ax 0 00007430 E8[FEFF] call _SftGetFsize 0 00007433 93 xchg bx, ax 0 00007434 89D1 mov cx, dx 0 00007436 8B46F8 mov ax, word ptr [bp-8] 0 00007439 48 dec ax 0 0000743A 31FF xor di, di 0 0000743C 01D8 add ax, bx 0 0000743E 11F9 adc cx, di 0 00007440 57 push di 0 00007441 FF76F8 push word ptr [bp-8] 0 00007444 51 push cx 0 00007445 50 push ax 0 00007446 E8[FEFF] call ___udivsi3 0 00007449 8E46FA mov es, word ptr [bp-6] 0 0000744C 8B5EFC mov bx, word ptr [bp-4] 0 0000744F 26894721 mov word ptr es:[bx+33], ax 0 00007453 8E46FA mov es, word ptr [bp-6] 0 00007456 8B5EFC mov bx, word ptr [bp-4] 0 00007459 26895723 mov word ptr es:[bx+35], dx 0 0000745D 57 push di 0 0000745E 56 push si 0 0000745F E8[FEFF] call _DosCloseSft 0 00007462 89C2 mov dx, ax 0 00007464 F7DA neg dx 0 00007466 8916[0000] mov word ptr [_CritErrCode], dx 0 0000746A 83F801 cmp ax, 1 0 0000746D F5 cmc 0 0000746E 18C0 sbb al, al 706 _.L91: 0 00007470 89EC mov sp, bp 0 00007472 5D pop bp 0 00007473 5F pop di 0 00007474 5E pop si 0 00007475 C20400 ret 4 712 _.L95: 0 00007478 F7D8 neg ax 0 0000747A A3[0000] mov word ptr [_CritErrCode], ax 0 0000747D E978FF jmp _.L97 716 .size _FcbGetFileSize, .-_FcbGetFileSize 717 .global _FcbSetRandom 718 .type _FcbSetRandom, @function 719 _FcbSetRandom: 0 00007480 56 push si 0 00007481 57 push di 0 00007482 55 push bp 0 00007483 89E5 mov bp, sp 0 00007485 83EC06 sub sp, 6 0 00007488 FF760A push word ptr [bp+10] 0 0000748B FF7608 push word ptr [bp+8] 0 0000748E E8F9F9 call _ExtFcbToFcb 0 00007491 8EC2 mov es, dx 0 00007493 89C3 mov bx, ax 0 00007495 268B5F0C mov bx, word ptr es:[bx+12] 0 00007499 31FF xor di, di 0 0000749B 89DE mov si, bx 0 0000749D B109 mov cl, 9 0 0000749F D3EE shr si, cl 0 000074A1 8976FC mov word ptr [bp-4], si 0 000074A4 B107 mov cl, 7 0 000074A6 D3E3 shl bx, cl 0 000074A8 895EFE mov word ptr [bp-2], bx 0 000074AB 89C3 mov bx, ax 0 000074AD 268A4F20 mov cl, byte ptr es:[bx+32] 0 000074B1 884EFA mov byte ptr [bp-6], cl 0 000074B4 8A5EFA mov bl, byte ptr [bp-6] 0 000074B7 30FF xor bh, bh 0 000074B9 035EFE add bx, word ptr [bp-2] 0 000074BC 8B4EFC mov cx, word ptr [bp-4] 0 000074BF 11F9 adc cx, di 0 000074C1 89C7 mov di, ax 0 000074C3 26895D21 mov word ptr es:[di+33], bx 0 000074C7 93 xchg bx, ax 0 000074C8 26894F23 mov word ptr es:[bx+35], cx 0 000074CC 89EC mov sp, bp 0 000074CE 5D pop bp 0 000074CF 5F pop di 0 000074D0 5E pop si 0 000074D1 C20400 ret 4 756 .size _FcbSetRandom, .-_FcbSetRandom 757 .global _FcbRandomBlockIO 758 .type _FcbRandomBlockIO, @function 759 _FcbRandomBlockIO: 0 000074D4 56 push si 0 000074D5 57 push di 0 000074D6 55 push bp 0 000074D7 89E5 mov bp, sp 0 000074D9 83EC08 sub sp, 8 0 000074DC 8B7608 mov si, word ptr [bp+8] 0 000074DF 8B7E0A mov di, word ptr [bp+10] 0 000074E2 57 push di 0 000074E3 56 push si 0 000074E4 E8C6F9 call _FcbCalcRec 0 000074E7 57 push di 0 000074E8 56 push si 0 000074E9 E89EF9 call _ExtFcbToFcb 0 000074EC 93 xchg bx, ax 0 000074ED 8EC2 mov es, dx 0 000074EF 8956F8 mov word ptr [bp-8], dx 0 000074F2 268B4721 mov ax, word ptr es:[bx+33] 0 000074F6 895EFA mov word ptr [bp-6], bx 0 000074F9 8946FE mov word ptr [bp-2], ax 0 000074FC FF760E push word ptr [bp+14] 0 000074FF 8B5E0C mov bx, word ptr [bp+12] 0 00007502 FF37 push word ptr [bx] 0 00007504 57 push di 0 00007505 56 push si 0 00007506 E8[FEFF] call _FcbReadWrite 0 00007509 8846FD mov byte ptr [bp-3], al 0 0000750C 8B56F8 mov dx, word ptr [bp-8] 0 0000750F 8EC2 mov es, dx 0 00007511 8B5EFA mov bx, word ptr [bp-6] 0 00007514 268B5721 mov dx, word ptr es:[bx+33] 0 00007518 2B56FE sub dx, word ptr [bp-2] 0 0000751B 8B5E0C mov bx, word ptr [bp+12] 0 0000751E 8917 mov word ptr [bx], dx 0 00007520 57 push di 0 00007521 56 push si 0 00007522 E888F9 call _FcbCalcRec 0 00007525 8A46FD mov al, byte ptr [bp-3] 0 00007528 89EC mov sp, bp 0 0000752A 5D pop bp 0 0000752B 5F pop di 0 0000752C 5E pop si 0 0000752D C20800 ret 8 802 .size _FcbRandomBlockIO, .-_FcbRandomBlockIO 803 .global _FcbRandomIO 804 .type _FcbRandomIO, @function 805 _FcbRandomIO: 0 00007530 56 push si 0 00007531 57 push di 0 00007532 55 push bp 0 00007533 89E5 mov bp, sp 0 00007535 83EC08 sub sp, 8 0 00007538 8B7E08 mov di, word ptr [bp+8] 0 0000753B 8B760A mov si, word ptr [bp+10] 0 0000753E 56 push si 0 0000753F 57 push di 0 00007540 E86AF9 call _FcbCalcRec 0 00007543 56 push si 0 00007544 57 push di 0 00007545 E842F9 call _ExtFcbToFcb 0 00007548 93 xchg bx, ax 0 00007549 8EC2 mov es, dx 0 0000754B 268B4F0C mov cx, word ptr es:[bx+12] 0 0000754F 894EF8 mov word ptr [bp-8], cx 0 00007552 8956FA mov word ptr [bp-6], dx 0 00007555 268A4720 mov al, byte ptr es:[bx+32] 0 00007559 895EFC mov word ptr [bp-4], bx 0 0000755C 8846FF mov byte ptr [bp-1], al 0 0000755F FF760C push word ptr [bp+12] 0 00007562 B80100 mov ax, 1 0 00007565 50 push ax 0 00007566 56 push si 0 00007567 57 push di 0 00007568 E8[FEFF] call _FcbReadWrite 0 0000756B 8B56FA mov dx, word ptr [bp-6] 0 0000756E 8EC2 mov es, dx 0 00007570 8B5EFC mov bx, word ptr [bp-4] 0 00007573 8B4EF8 mov cx, word ptr [bp-8] 0 00007576 26894F0C mov word ptr es:[bx+12], cx 0 0000757A 8A66FF mov ah, byte ptr [bp-1] 0 0000757D 26886720 mov byte ptr es:[bx+32], ah 0 00007581 89EC mov sp, bp 0 00007583 5D pop bp 0 00007584 5F pop di 0 00007585 5E pop si 0 00007586 C20600 ret 6 845 .size _FcbRandomIO, .-_FcbRandomIO 846 .global _FcbOpen 847 .type _FcbOpen, @function 848 _FcbOpen: 0 00007589 56 push si 0 0000758A 57 push di 0 0000758B 55 push bp 0 0000758C 89E5 mov bp, sp 0 0000758E 83EC08 sub sp, 8 0 00007591 8B7608 mov si, word ptr [bp+8] 0 00007594 8B7E0A mov di, word ptr [bp+10] 0 00007597 8D46FE lea ax, [-2+bp] 0 0000759A 50 push ax 0 0000759B 57 push di 0 0000759C 56 push si 0 0000759D E852F9 call _CommonFcbInit.constprop.0 0 000075A0 93 xchg bx, ax 0 000075A1 8956FC mov word ptr [bp-4], dx 0 000075A4 8B460C mov ax, word ptr [bp+12] 0 000075A7 250004 and ax, 1024 0 000075AA 740E je _.L105 0 000075AC 8EC7 mov es, di 0 000075AE 26803CFF cmp byte ptr es:[si], -1 0 000075B2 752E jne _.L109 0 000075B4 268A4406 mov al, byte ptr es:[si+6] 0 000075B8 30E4 xor ah, ah 871 _.L105: 0 000075BA 895EF8 mov word ptr [bp-8], bx 0 000075BD 50 push ax 0 000075BE FF760C push word ptr [bp+12] 0 000075C1 16 push ss 0 000075C2 B8[0000] mov ax, offset __SecPathBuffer 0 000075C5 50 push ax 0 000075C6 E8[FEFF] call _DosOpenSft 0 000075C9 8946FA mov word ptr [bp-6], ax 0 000075CC 85C0 test ax, ax 0 000075CE 8B5EF8 mov bx, word ptr [bp-8] 0 000075D1 7D13 jge _.L106 0 000075D3 F7D8 neg ax 0 000075D5 A3[0000] mov word ptr [_CritErrCode], ax 0 000075D8 B0FF mov al, -1 886 _.L104: 0 000075DA 89EC mov sp, bp 0 000075DC 5D pop bp 0 000075DD 5F pop di 0 000075DE 5E pop si 0 000075DF C20600 ret 6 892 _.L109: 0 000075E2 31C0 xor ax, ax 0 000075E4 EBD4 jmp _.L105 895 _.L106: 0 000075E6 895EF8 mov word ptr [bp-8], bx 0 000075E9 FF76FA push word ptr [bp-6] 0 000075EC E8[FEFF] call _idx_to_sft 0 000075EF 8EC2 mov es, dx 0 000075F1 89C3 mov bx, ax 0 000075F3 26804F0380 or byte ptr es:[bx+3], -128 0 000075F8 8E46FC mov es, word ptr [bp-4] 0 000075FB 8A4EFA mov cl, byte ptr [bp-6] 0 000075FE 8B5EF8 mov bx, word ptr [bp-8] 0 00007601 26884F18 mov byte ptr es:[bx+24], cl 0 00007605 8E46FC mov es, word ptr [bp-4] 0 00007608 26C7470C0000 mov word ptr es:[bx+12], 0 0 0000760E 8E46FC mov es, word ptr [bp-4] 0 00007611 26C7470E0000 mov word ptr es:[bx+14], 0 0 00007617 8EC2 mov es, dx 0 00007619 89C7 mov di, ax 0 0000761B 26F6450580 test byte ptr es:[di+5], -128 0 00007620 7512 jne _.L108 0 00007622 8E46FC mov es, word ptr [bp-4] 0 00007625 8A4EFE mov cl, byte ptr [bp-2] 0 00007628 26880F mov byte ptr es:[bx], cl 0 0000762B 8E46FC mov es, word ptr [bp-4] 0 0000762E 26C7470E8000 mov word ptr es:[bx+14], 128 919 _.L108: 0 00007634 8EC2 mov es, dx 0 00007636 97 xchg di, ax 0 00007637 268B4D11 mov cx, word ptr es:[di+17] 0 0000763B 268B7513 mov si, word ptr es:[di+19] 0 0000763F 8E46FC mov es, word ptr [bp-4] 0 00007642 26894F10 mov word ptr es:[bx+16], cx 0 00007646 8E46FC mov es, word ptr [bp-4] 0 00007649 26897712 mov word ptr es:[bx+18], si 0 0000764D 8EC2 mov es, dx 0 0000764F 268B4D0F mov cx, word ptr es:[di+15] 0 00007653 8E46FC mov es, word ptr [bp-4] 0 00007656 26894F14 mov word ptr es:[bx+20], cx 0 0000765A 8EC2 mov es, dx 0 0000765C 268B450D mov ax, word ptr es:[di+13] 0 00007660 8E46FC mov es, word ptr [bp-4] 0 00007663 26894716 mov word ptr es:[bx+22], ax 0 00007667 30C0 xor al, al 0 00007669 E96EFF jmp _.L104 938 .size _FcbOpen, .-_FcbOpen 939 .global _FcbDelete 940 .type _FcbDelete, @function 941 _FcbDelete: 0 0000766C 56 push si 0 0000766D 57 push di 0 0000766E 55 push bp 0 0000766F 89E5 mov bp, sp 0 00007671 83EC36 sub sp, 54 0 00007674 8B5E08 mov bx, word ptr [bp+8] 0 00007677 8B460A mov ax, word ptr [bp+10] 0 0000767A 8946CE mov word ptr [bp-50], ax 0 0000767D C406[0000] les ax, dword ptr [_dta] 0 00007681 8946CC mov word ptr [bp-52], ax 0 00007684 8C46CA mov word ptr [bp-54], es 0 00007687 8D46D2 lea ax, [-46+bp] 0 0000768A 50 push ax 0 0000768B FF76CE push word ptr [bp-50] 0 0000768E 53 push bx 0 0000768F 895ED0 mov word ptr [bp-48], bx 0 00007692 E85DF8 call _CommonFcbInit.constprop.0 0 00007695 BE[0000] mov si, offset __SecPathBuffer 0 00007698 8CD7 mov di, ss 0 0000769A 16 push ss 0 0000769B 56 push si 0 0000769C E8[FEFF] call _IsDevice 0 0000769F B1FF mov cl, -1 0 000076A1 09D0 or ax, dx 0 000076A3 8B5ED0 mov bx, word ptr [bp-48] 0 000076A6 7536 jne _.L115 0 000076A8 C646D037 mov byte ptr [bp-48], 55 0 000076AC 8E46CE mov es, word ptr [bp-50] 0 000076AF 26380F cmp byte ptr es:[bx], cl 0 000076B2 7507 jne _.L116 0 000076B4 268A4706 mov al, byte ptr es:[bx+6] 0 000076B8 8846D0 mov byte ptr [bp-48], al 974 _.L116: 0 000076BB 8D46D5 lea ax, [-43+bp] 0 000076BE A3[0000] mov word ptr [_dta], ax 0 000076C1 8C16[0200] mov word ptr [_dta+2], ss 0 000076C5 57 push di 0 000076C6 56 push si 0 000076C7 8A46D0 mov al, byte ptr [bp-48] 0 000076CA 30E4 xor ah, ah 0 000076CC 50 push ax 0 000076CD E8[FEFF] call _DosFindFirst 0 000076D0 89C2 mov dx, ax 0 000076D2 F7DA neg dx 0 000076D4 8916[0000] mov word ptr [_CritErrCode], dx 0 000076D8 85C0 test ax, ax 0 000076DA 7418 je _.L117 989 _.L119: 0 000076DC B1FF mov cl, -1 991 _.L115: 0 000076DE 8B46CC mov ax, word ptr [bp-52] 0 000076E1 A3[0000] mov word ptr [_dta], ax 0 000076E4 8B46CA mov ax, word ptr [bp-54] 0 000076E7 A3[0200] mov word ptr [_dta+2], ax 0 000076EA 88C8 mov al, cl 0 000076EC 89EC mov sp, bp 0 000076EE 5D pop bp 0 000076EF 5F pop di 0 000076F0 5E pop si 0 000076F1 C20400 ret 4 1002 _.L117: 0 000076F4 8A46D2 mov al, byte ptr [bp-46] 0 000076F7 0440 add al, 64 0 000076F9 BB[0000] mov bx, offset __SecPathBuffer 0 000076FC 8807 mov byte ptr [bx], al 0 000076FE C606[0100]3A mov byte ptr [__SecPathBuffer+1], 58 0 00007703 8D46F3 lea ax, [-13+bp] 0 00007706 50 push ax 0 00007707 B8[0200] mov ax, offset __SecPathBuffer+2 0 0000770A 50 push ax 0 0000770B E8[FEFF] call _strcpy 0 0000770E 8A46D0 mov al, byte ptr [bp-48] 0 00007711 30E4 xor ah, ah 0 00007713 50 push ax 0 00007714 57 push di 0 00007715 56 push si 0 00007716 E8[FEFF] call _DosDelete 0 00007719 85C0 test ax, ax 0 0000771B 8946CE mov word ptr [bp-50], ax 0 0000771E 75BC jne _.L119 0 00007720 E8[FEFF] call _DosFindNext 0 00007723 89C1 mov cx, ax 0 00007725 F7D9 neg cx 0 00007727 890E[0000] mov word ptr [_CritErrCode], cx 0 0000772B 85C0 test ax, ax 0 0000772D 8B56CE mov dx, word ptr [bp-50] 0 00007730 74C2 je _.L117 0 00007732 88D1 mov cl, dl 0 00007734 EBA8 jmp _.L115 1031 .size _FcbDelete, .-_FcbDelete 1032 .global _FcbRename 1033 .type _FcbRename, @function 1034 _FcbRename: 0 00007736 56 push si 0 00007737 57 push di 0 00007738 55 push bp 0 00007739 89E5 mov bp, sp 0 0000773B 83EC7A sub sp, 122 0 0000773E 8B5E08 mov bx, word ptr [bp+8] 0 00007741 8B460A mov ax, word ptr [bp+10] 0 00007744 89468C mov word ptr [bp-116], ax 0 00007747 C406[0000] les ax, dword ptr [_dta] 0 0000774B 89468A mov word ptr [bp-118], ax 0 0000774E 8C4688 mov word ptr [bp-120], es 0 00007751 8D4694 lea ax, [-108+bp] 0 00007754 50 push ax 0 00007755 FF768C push word ptr [bp-116] 0 00007758 53 push bx 0 00007759 895E86 mov word ptr [bp-122], bx 0 0000775C E893F7 call _CommonFcbInit.constprop.0 0 0000775F 96 xchg si, ax 0 00007760 89D7 mov di, dx 0 00007762 8D4E92 lea cx, [-110+bp] 0 00007765 51 push cx 0 00007766 894E8E mov word ptr [bp-114], cx 0 00007769 B80800 mov ax, 8 0 0000776C 50 push ax 0 0000776D 8D4696 lea ax, [-106+bp] 0 00007770 16 push ss 0 00007771 50 push ax 0 00007772 8D4411 lea ax, [17+si] 0 00007775 52 push dx 0 00007776 50 push ax 0 00007777 E8[FEFF] call _GetNameField 0 0000777A 8B4E8E mov cx, word ptr [bp-114] 0 0000777D 51 push cx 0 0000777E B80300 mov ax, 3 0 00007781 50 push ax 0 00007782 8D469E lea ax, [-98+bp] 0 00007785 16 push ss 0 00007786 50 push ax 0 00007787 83C619 add si, 25 0 0000778A 57 push di 0 0000778B 56 push si 0 0000778C E8[FEFF] call _GetNameField 0 0000778F 8C568E mov word ptr [bp-114], ss 0 00007792 16 push ss 0 00007793 B8[0000] mov ax, offset __SecPathBuffer 0 00007796 50 push ax 0 00007797 E8[FEFF] call _IsDevice 0 0000779A B1FF mov cl, -1 0 0000779C 09D0 or ax, dx 0 0000779E 8B5E86 mov bx, word ptr [bp-122] 0 000077A1 7403E92401 jne _.L128 0 000077A6 B037 mov al, 55 0 000077A8 8E468C mov es, word ptr [bp-116] 0 000077AB 26380F cmp byte ptr es:[bx], cl 0 000077AE 7504 jne _.L129 0 000077B0 268A4706 mov al, byte ptr es:[bx+6] 1091 _.L129: 0 000077B4 30E4 xor ah, ah 0 000077B6 A3[0000] mov word ptr [_wAttr], ax 0 000077B9 8D56D5 lea dx, [-43+bp] 0 000077BC 8916[0000] mov word ptr [_dta], dx 0 000077C0 8C16[0200] mov word ptr [_dta+2], ss 0 000077C4 FF768E push word ptr [bp-114] 0 000077C7 BA[0000] mov dx, offset __SecPathBuffer 0 000077CA 52 push dx 0 000077CB 50 push ax 0 000077CC E8[FEFF] call _DosFindFirst 0 000077CF 89C2 mov dx, ax 0 000077D1 F7DA neg dx 0 000077D3 8916[0000] mov word ptr [_CritErrCode], dx 0 000077D7 B1FF mov cl, -1 0 000077D9 85C0 test ax, ax 0 000077DB 7403E9EA00 jne _.L128 1108 _.L135: 0 000077E0 C6469100 mov byte ptr [bp-111], 0 0 000077E4 8CD6 mov si, ss 0 000077E6 16 push ss 0 000077E7 8D46B0 lea ax, [-80+bp] 0 000077EA 50 push ax 0 000077EB 8D46F3 lea ax, [-13+bp] 0 000077EE 16 push ss 0 000077EF 50 push ax 0 000077F0 8D4691 lea ax, [-111+bp] 0 000077F3 50 push ax 0 000077F4 E8[FEFF] call _FcbParseFname 0 000077F7 31DB xor bx, bx 1121 _.L132: 0 000077F9 89EF mov di, bp 0 000077FB 8A4196 mov al, byte ptr [bx+di-106] 0 000077FE 3C3F cmp al, 63 0 00007800 7403 je _.L131 0 00007802 8841B1 mov byte ptr [bx+di-79], al 1127 _.L131: 0 00007805 43 inc bx 0 00007806 83FB0B cmp bx, 11 0 00007809 75EE jne _.L132 0 0000780B 8A4694 mov al, byte ptr [bp-108] 0 0000780E 0440 add al, 64 0 00007810 BB[0000] mov bx, offset __SecPathBuffer 0 00007813 8807 mov byte ptr [bx], al 0 00007815 C606[0100]3A mov byte ptr [__SecPathBuffer+1], 58 0 0000781A 8D46F3 lea ax, [-13+bp] 0 0000781D 50 push ax 0 0000781E B8[0200] mov ax, offset __SecPathBuffer+2 0 00007821 50 push ax 0 00007822 E8[FEFF] call _strcpy 0 00007825 31C0 xor ax, ax 0 00007827 50 push ax 0 00007828 BA[0000] mov dx, offset __PriPathBuffer 0 0000782B 52 push dx 0 0000782C 89568C mov word ptr [bp-116], dx 0 0000782F FF768E push word ptr [bp-114] 0 00007832 B8[0000] mov ax, offset __SecPathBuffer 0 00007835 50 push ax 0 00007836 E8[FEFF] call _truename 0 00007839 85C0 test ax, ax 0 0000783B 8B568C mov dx, word ptr [bp-116] 0 0000783E 89D7 mov di, dx 0 00007840 7D03E9A000 jl _.L133 0 00007845 A820 test al, 32 0 00007847 7403E99900 jne _.L133 0 0000784C 8B4694 mov ax, word ptr [bp-108] 0 0000784F 8846B0 mov byte ptr [bp-80], al 0 00007852 A0[0000] mov al, byte ptr [_default_drive] 0 00007855 98 cbw 0 00007856 40 inc ax 0 00007857 894694 mov word ptr [bp-108], ax 0 0000785A 8EC6 mov es, si 0 0000785C 8D5EB0 lea bx, [-80+bp] 0 0000785F 268A17 mov dl, byte ptr es:[bx] 0 00007862 84D2 test dl, dl 0 00007864 747A je _.L139 0 00007866 88D0 mov al, dl 0 00007868 B400 mov ah, 0 0 0000786A 894694 mov word ptr [bp-108], ax 0 0000786D 80C240 add dl, 64 0 00007870 8856A1 mov byte ptr [bp-95], dl 0 00007873 C646A23A mov byte ptr [bp-94], 58 0 00007877 8D46A3 lea ax, [-93+bp] 1174 _.L134: 0 0000787A 8D56B0 lea dx, [-80+bp] 0 0000787D 42 inc dx 0 0000787E 56 push si 0 0000787F 52 push dx 0 00007880 16 push ss 0 00007881 50 push ax 0 00007882 E8[FEFF] call _ConvertName83ToNameSZ 0 00007885 31C0 xor ax, ax 0 00007887 50 push ax 0 00007888 B8[0000] mov ax, offset __SecPathBuffer 0 0000788B 50 push ax 0 0000788C 8D46A1 lea ax, [-95+bp] 0 0000788F 16 push ss 0 00007890 50 push ax 0 00007891 E8[FEFF] call _truename 0 00007894 85C0 test ax, ax 0 00007896 7C4D jl _.L133 0 00007898 83E060 and ax, 96 0 0000789B 83F820 cmp ax, 32 0 0000789E 7445 je _.L133 0 000078A0 FF36[0000] push word ptr [_wAttr] 0 000078A4 B8[0000] mov ax, offset __SecPathBuffer 0 000078A7 50 push ax 0 000078A8 57 push di 0 000078A9 E8[FEFF] call _DosRenameTrue 0 000078AC 85C0 test ax, ax 0 000078AE 89468C mov word ptr [bp-116], ax 0 000078B1 7532 jne _.L133 0 000078B3 E8[FEFF] call _DosFindNext 0 000078B6 89C1 mov cx, ax 0 000078B8 F7D9 neg cx 0 000078BA 890E[0000] mov word ptr [_CritErrCode], cx 0 000078BE 85C0 test ax, ax 0 000078C0 8B568C mov dx, word ptr [bp-116] 0 000078C3 7503E918FF je _.L135 0 000078C8 88D1 mov cl, dl 1211 _.L128: 0 000078CA 8B468A mov ax, word ptr [bp-118] 0 000078CD A3[0000] mov word ptr [_dta], ax 0 000078D0 8B4688 mov ax, word ptr [bp-120] 0 000078D3 A3[0200] mov word ptr [_dta+2], ax 0 000078D6 88C8 mov al, cl 0 000078D8 89EC mov sp, bp 0 000078DA 5D pop bp 0 000078DB 5F pop di 0 000078DC 5E pop si 0 000078DD C20400 ret 4 1222 _.L139: 0 000078E0 8D46A1 lea ax, [-95+bp] 0 000078E3 EB95 jmp _.L134 1225 _.L133: 0 000078E5 B1FF mov cl, -1 0 000078E7 EBE1 jmp _.L128 1228 .size _FcbRename, .-_FcbRename 1229 .global _FcbClose 1230 .type _FcbClose, @function 1231 _FcbClose: 0 000078E9 56 push si 0 000078EA 57 push di 0 000078EB 55 push bp 0 000078EC 89E5 mov bp, sp 0 000078EE FF760A push word ptr [bp+10] 0 000078F1 FF7608 push word ptr [bp+8] 0 000078F4 E893F5 call _ExtFcbToFcb 0 000078F7 96 xchg si, ax 0 000078F8 8EC2 mov es, dx 0 000078FA 268A6418 mov ah, byte ptr es:[si+24] 0 000078FE 30C0 xor al, al 0 00007900 80FCFF cmp ah, -1 0 00007903 7417 je _.L150 0 00007905 89D7 mov di, dx 0 00007907 88E0 mov al, ah 0 00007909 98 cbw 0 0000790A 50 push ax 0 0000790B E8[FEFF] call _idx_to_sft 0 0000790E 89C3 mov bx, ax 0 00007910 83F8FF cmp ax, -1 0 00007913 750F jne _.L152 0 00007915 83FAFF cmp dx, -1 0 00007918 750A jne _.L152 1255 _.L154: 0 0000791A B0FF mov al, -1 1257 _.L150: 0 0000791C 89EC mov sp, bp 0 0000791E 5D pop bp 0 0000791F 5F pop di 0 00007920 5E pop si 0 00007921 C20400 ret 4 1263 _.L152: 0 00007924 8EC7 mov es, di 0 00007926 268B4410 mov ax, word ptr es:[si+16] 0 0000792A 268B4C12 mov cx, word ptr es:[si+18] 0 0000792E 8EC2 mov es, dx 0 00007930 26894711 mov word ptr es:[bx+17], ax 0 00007934 26894F13 mov word ptr es:[bx+19], cx 0 00007938 26837F0500 cmp word ptr es:[bx+5], 0 0 0000793D 7C0B jl _.L153 0 0000793F 8EC7 mov es, di 0 00007941 268A4418 mov al, byte ptr es:[si+24] 0 00007945 98 cbw 0 00007946 50 push ax 0 00007947 E8[FEFF] call _dos_merge_file_changes 1277 _.L153: 0 0000794A 8EC7 mov es, di 0 0000794C 26FF7416 push word ptr es:[si+22] 0 00007950 26FF7414 push word ptr es:[si+20] 0 00007954 268A4418 mov al, byte ptr es:[si+24] 0 00007958 98 cbw 0 00007959 50 push ax 0 0000795A E8[FEFF] call _DosSetFtimeSft 0 0000795D 31C0 xor ax, ax 0 0000795F 50 push ax 0 00007960 8EC7 mov es, di 0 00007962 268A4418 mov al, byte ptr es:[si+24] 0 00007966 98 cbw 0 00007967 50 push ax 0 00007968 E8[FEFF] call _DosCloseSft 0 0000796B 89C2 mov dx, ax 0 0000796D F7DA neg dx 0 0000796F 8916[0000] mov word ptr [_CritErrCode], dx 0 00007973 85C0 test ax, ax 0 00007975 75A3 jne _.L154 0 00007977 8EC7 mov es, di 0 00007979 26C64418FF mov byte ptr es:[si+24], -1 0 0000797E EB9C jmp _.L150 1300 .size _FcbClose, .-_FcbClose 1301 .global _FcbCloseAll 1302 .type _FcbCloseAll, @function 1303 _FcbCloseAll: 0 00007980 56 push si 0 00007981 57 push di 0 00007982 31FF xor di, di 0 00007984 89FE mov si, di 1308 _.L158: 0 00007986 57 push di 0 00007987 E8[FEFF] call _idx_to_sft 0 0000798A 89C3 mov bx, ax 0 0000798C 83F8FF cmp ax, -1 0 0000798F 7508 jne _.L160 0 00007991 83FAFF cmp dx, -1 0 00007994 7503 jne _.L160 0 00007996 5F pop di 0 00007997 5E pop si 0 00007998 C3 ret 1319 _.L160: 0 00007999 8EC2 mov es, dx 0 0000799B 26837F0200 cmp word ptr es:[bx+2], 0 0 000079A0 7D0F jge _.L159 0 000079A2 268B4731 mov ax, word ptr es:[bx+49] 0 000079A6 3B06[0000] cmp ax, word ptr [_cu_psp] 0 000079AA 7505 jne _.L159 0 000079AC 56 push si 0 000079AD 57 push di 0 000079AE E8[FEFF] call _DosCloseSft 1329 _.L159: 0 000079B1 47 inc di 0 000079B2 EBD2 jmp _.L158 1332 .size _FcbCloseAll, .-_FcbCloseAll 1333 .global _FcbFindFirstNext 1334 .type _FcbFindFirstNext, @function 1335 _FcbFindFirstNext: 0 000079B4 56 push si 0 000079B5 57 push di 0 000079B6 55 push bp 0 000079B7 89E5 mov bp, sp 0 000079B9 83EC10 sub sp, 16 0 000079BC 8B5E08 mov bx, word ptr [bp+8] 0 000079BF 8B460A mov ax, word ptr [bp+10] 0 000079C2 8946F6 mov word ptr [bp-10], ax 0 000079C5 C406[0000] les ax, dword ptr [_dta] 0 000079C9 8946FA mov word ptr [bp-6], ax 0 000079CC 8C46F8 mov word ptr [bp-8], es 0 000079CF BE[0100] mov si, offset _Dmatch 0 000079D2 8936[0000] mov word ptr [_dta], si 0 000079D6 8C16[0200] mov word ptr [_dta+2], ss 0 000079DA 8D46FE lea ax, [-2+bp] 0 000079DD 50 push ax 0 000079DE FF76F6 push word ptr [bp-10] 0 000079E1 53 push bx 0 000079E2 895EF4 mov word ptr [bp-12], bx 0 000079E5 E80AF5 call _CommonFcbInit.constprop.0 0 000079E8 8946FC mov word ptr [bp-4], ax 0 000079EB 837E0C00 cmp word ptr [bp+12], 0 0 000079EF 8B5EF4 mov bx, word ptr [bp-12] 0 000079F2 7503E92301 je _.L163 0 000079F7 895EF0 mov word ptr [bp-16], bx 0 000079FA 8EC2 mov es, dx 0 000079FC 93 xchg bx, ax 0 000079FD 268A4718 mov al, byte ptr es:[bx+24] 0 00007A01 8804 mov byte ptr [si], al 0 00007A03 8CD7 mov di, ss 0 00007A05 B80B00 mov ax, 11 0 00007A08 50 push ax 0 00007A09 8946F2 mov word ptr [bp-14], ax 0 00007A0C 89D9 mov cx, bx 0 00007A0E 41 inc cx 0 00007A0F 52 push dx 0 00007A10 8956F4 mov word ptr [bp-12], dx 0 00007A13 51 push cx 0 00007A14 16 push ss 0 00007A15 8D4401 lea ax, [1+si] 0 00007A18 50 push ax 0 00007A19 E8[FEFF] call _fmemcpy 0 00007A1C 8B46F2 mov ax, word ptr [bp-14] 0 00007A1F 50 push ax 0 00007A20 57 push di 0 00007A21 8D4401 lea ax, [1+si] 0 00007A24 50 push ax 0 00007A25 E8[FEFF] call _DosUpFMem 0 00007A28 A1[0000] mov ax, word ptr [_wAttr] 0 00007A2B 88440C mov byte ptr [si+12], al 0 00007A2E 8B56F4 mov dx, word ptr [bp-12] 0 00007A31 8EC2 mov es, dx 0 00007A33 8B5EFC mov bx, word ptr [bp-4] 0 00007A36 268B471B mov ax, word ptr es:[bx+27] 0 00007A3A 89440D mov word ptr [si+13], ax 0 00007A3D 268B471D mov ax, word ptr es:[bx+29] 0 00007A41 89440F mov word ptr [si+15], ax 0 00007A44 C744110000 mov word ptr [si+17], 0 0 00007A49 C706[0000]3700 mov word ptr [_wAttr], 55 0 00007A4F 8B5EF0 mov bx, word ptr [bp-16] 0 00007A52 3B5EFC cmp bx, word ptr [bp-4] 0 00007A55 7505 jne _.L170 0 00007A57 3956F6 cmp word ptr [bp-10], dx 0 00007A5A 7435 je _.L175 1400 _.L170: 0 00007A5C 8956F4 mov word ptr [bp-12], dx 0 00007A5F 8E46F6 mov es, word ptr [bp-10] 0 00007A62 268A4706 mov al, byte ptr es:[bx+6] 0 00007A66 B400 mov ah, 0 0 00007A68 A3[0000] mov word ptr [_wAttr], ax 0 00007A6B B80700 mov ax, 7 0 00007A6E 50 push ax 0 00007A6F 06 push es 0 00007A70 53 push bx 0 00007A71 FF76F8 push word ptr [bp-8] 0 00007A74 FF76FA push word ptr [bp-6] 0 00007A77 E8[FEFF] call _fmemcpy 0 00007A7A 8B7EFA mov di, word ptr [bp-6] 0 00007A7D 83C707 add di, 7 0 00007A80 837E0C00 cmp word ptr [bp+12], 0 0 00007A84 8B56F4 mov dx, word ptr [bp-12] 0 00007A87 750B jne _.L164 1418 _.L166: 0 00007A89 8956F6 mov word ptr [bp-10], dx 0 00007A8C E8[FEFF] call _DosFindNext 0 00007A8F EB12 jmp _.L177 1422 _.L175: 0 00007A91 8B7EFA mov di, word ptr [bp-6] 1424 _.L164: 0 00007A94 8956F6 mov word ptr [bp-10], dx 0 00007A97 16 push ss 0 00007A98 B8[0000] mov ax, offset __SecPathBuffer 0 00007A9B 50 push ax 0 00007A9C FF36[0000] push word ptr [_wAttr] 0 00007AA0 E8[FEFF] call _DosFindFirst 1431 _.L177: 0 00007AA3 F7D8 neg ax 0 00007AA5 8B56F6 mov dx, word ptr [bp-10] 0 00007AA8 A3[0000] mov word ptr [_CritErrCode], ax 0 00007AAB 85C0 test ax, ax 0 00007AAD 7416 je _.L168 0 00007AAF 8B46FA mov ax, word ptr [bp-6] 0 00007AB2 A3[0000] mov word ptr [_dta], ax 0 00007AB5 8B46F8 mov ax, word ptr [bp-8] 0 00007AB8 A3[0200] mov word ptr [_dta+2], ax 0 00007ABB B0FF mov al, -1 1442 _.L162: 0 00007ABD 89EC mov sp, bp 0 00007ABF 5D pop bp 0 00007AC0 5F pop di 0 00007AC1 5E pop si 0 00007AC2 C20600 ret 6 1448 _.L168: 0 00007AC5 8956F4 mov word ptr [bp-12], dx 0 00007AC8 8946F6 mov word ptr [bp-10], ax 0 00007ACB 8E46F8 mov es, word ptr [bp-8] 0 00007ACE 8A46FE mov al, byte ptr [bp-2] 0 00007AD1 268805 mov byte ptr es:[di], al 0 00007AD4 B92000 mov cx, 32 0 00007AD7 51 push cx 0 00007AD8 16 push ss 0 00007AD9 B9[0000] mov cx, offset _SearchDir 0 00007ADC 51 push cx 0 00007ADD 8D4D01 lea cx, [1+di] 0 00007AE0 FF76F8 push word ptr [bp-8] 0 00007AE3 51 push cx 0 00007AE4 E8[FEFF] call _fmemcpy 0 00007AE7 8B4C0F mov cx, word ptr [si+15] 0 00007AEA 8B56F4 mov dx, word ptr [bp-12] 0 00007AED 8EC2 mov es, dx 0 00007AEF 8B5EFC mov bx, word ptr [bp-4] 0 00007AF2 26894F1D mov word ptr es:[bx+29], cx 0 00007AF6 8B4C0D mov cx, word ptr [si+13] 0 00007AF9 8B5EFC mov bx, word ptr [bp-4] 0 00007AFC 26894F1B mov word ptr es:[bx+27], cx 0 00007B00 8A0C mov cl, byte ptr [si] 0 00007B02 8B5EFC mov bx, word ptr [bp-4] 0 00007B05 26884F18 mov byte ptr es:[bx+24], cl 0 00007B09 8B46FA mov ax, word ptr [bp-6] 0 00007B0C A3[0000] mov word ptr [_dta], ax 0 00007B0F 8B46F8 mov ax, word ptr [bp-8] 0 00007B12 A3[0200] mov word ptr [_dta+2], ax 0 00007B15 8B46F6 mov ax, word ptr [bp-10] 0 00007B18 EBA3 jmp _.L162 1480 _.L163: 0 00007B1A 3B5EFC cmp bx, word ptr [bp-4] 0 00007B1D 7403E93AFF jne _.L170 0 00007B22 3956F6 cmp word ptr [bp-10], dx 0 00007B25 7403E932FF jne _.L170 0 00007B2A 8B7EFA mov di, word ptr [bp-6] 0 00007B2D E959FF jmp _.L166 1487 .size _FcbFindFirstNext, .-_FcbFindFirstNext 1488 .local _mdb.2324 1489 .comm _mdb.2324,1,1 1490 .local _Dmatch 1491 .comm _Dmatch,43,1 1492 .ident "GCC: (GNU) 6.3.0" === Trace listing source: iasmsupt.lst 1 ; File: 2 ; asmsupt.asm 3 ; Description: 4 ; Assembly support routines for miscellaneous functions 5 ; 6 ; Copyright (c) 1995, 1998 7 ; Pasquale J. Villani 8 ; All Rights Reserved 9 ; 10 ; This file is part of DOS-C. 11 ; 12 ; DOS-C is free software; you can redistribute it and/or 13 ; modify it under the terms of the GNU General Public License 14 ; as published by the Free Software Foundation; either version 15 ; 2, or (at your option) any later version. 16 ; 17 ; DOS-C is distributed in the hope that it will be useful, but 18 ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 ; the GNU General Public License for more details. 21 ; 22 ; You should have received a copy of the GNU General Public 23 ; License along with DOS-C; see the file COPYING. If not, 24 ; write to the Free Software Foundation, 675 Mass Ave, 25 ; Cambridge, MA 02139, USA. 26 ; 27 ; version 1.4 by tom.ehlert@ginko.de 28 ; added some more functions 29 ; changed bcopy, scopy, sncopy,... 30 ; to memcpy, strcpy, strncpy 31 ; Bart Oldeman: optimized a bit: see /usr/include/bits/string.h from 32 ; glibc 2.2 33 ; 34 ; $Id: asmsupt.asm 1568 2011-04-09 02:42:51Z bartoldeman $ 35 ; 36 37 ; for OW on Linux: 38 %ifdef owlinux 39 %define WATCOM 40 %endif 41 42 %ifdef WATCOM 43 %ifdef _INIT 44 %define WATCOM_INIT ; no seperate init segment for watcom. 45 %endif 46 %endif 47 48 %ifndef WATCOM_INIT 49 50 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 51 %include "stacks.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; stacks.inc 4 <1> ; Description: 5 <1> ; Macro support for register stack frame 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Id: stacks.inc 1591 2011-05-06 01:46:55Z bartoldeman $ 29 <1> ; 30 <1> 31 <1> ; 32 <1> ; Standard stack frame used throughout DOS-C 33 <1> ; 34 <1> ; MS-DOS specific 35 <1> ; 36 <1> ; +---------------+ 37 <1> ; | irp hi | 26 38 <1> ; +---------------+ 39 <1> ; | irp low | 24 40 <1> ; +---------------+ 41 <1> ; | flags | 22 42 <1> ; +---------------+ 43 <1> ; | cs | 20 44 <1> ; +---------------+ 45 <1> ; | ip | 18 46 <1> ; +---------------+ 47 <1> ; | es | 16 48 <1> ; +---------------+ 49 <1> ; | ds | 14 50 <1> ; +---------------+ 51 <1> ; | bp | 12 52 <1> ; +---------------+ 53 <1> ; | di | 10 54 <1> ; +---------------+ 55 <1> ; | si | 8 56 <1> ; +---------------+ 57 <1> ; | dx | 6 58 <1> ; +---------------+ 59 <1> ; | cx | 4 60 <1> ; +---------------+ 61 <1> ; | bx | 2 62 <1> ; +---------------+ 63 <1> ; | ax | 0 64 <1> ; +---------------+ 65 <1> ; 66 <1> 67 <1> ;; Note: The order of the pushed registers _must_ match with the definition 68 <1> ;; of the "iregs" structure within PCB.H, because a pointer to the last 69 <1> ;; pushed register is used as a pointer to a "iregs" structure within the 70 <1> ;; called C sources! -- 2000/03/22 ska 71 <1> 72 <1> ; Don't use `struc RegFrame' etc. here because it interferes with segment 73 <1> ; definitions. 74 <1> reg_ax equ 0 75 <1> reg_bx equ 2 76 <1> reg_cx equ 4 77 <1> reg_dx equ 6 78 <1> reg_si equ 8 79 <1> reg_di equ 10 80 <1> reg_bp equ 12 81 <1> reg_ds equ 14 82 <1> reg_es equ 16 83 <1> reg_ip equ 18 84 <1> reg_cs equ 20 85 <1> reg_flags equ 22 86 <1> irp_low equ 24 87 <1> irp_hi equ 26 88 <1> 89 <1> %macro PUSH$ALL 0 90 <1> push es 91 <1> push ds 92 <1> push bp 93 <1> push di 94 <1> push si 95 <1> push dx 96 <1> push cx 97 <1> push bx 98 <1> push ax 99 <1> %endmacro 100 <1> 101 <1> %macro POP$ALL 0 102 <1> pop ax 103 <1> pop bx 104 <1> pop cx 105 <1> pop dx 106 <1> pop si 107 <1> pop di 108 <1> pop bp 109 <1> pop ds 110 <1> pop es 111 <1> %endmacro 112 <1> 113 <1> ; I386.inc - 10/25/01 by tom ehlert 114 <1> ; 115 <1> ; compiling the kernel for 386 will (sometimes) change the 116 <1> ; high part of (some) registers, which will be (sometimes) be used 117 <1> ; later 118 <1> ; 119 <1> ; assumption: 120 <1> ; we have never seen MSVC to use anything but eax, ecx, edx, 121 <1> ; nor have we seen Borland C to use anything but eax, ebx, edx, 122 <1> ; so we only protect eax, ebx or ecx, edx to conserve stack space 123 <1> ; 124 <1> ; to save even more stack space, we save only HIGH part of regs 125 <1> ; at some expense of slower execution. it's easier anyway :-) 126 <1> ; 127 <1> ; WATCOM only uses FS: and GS: (using -zff and -zgf) and never 128 <1> ; any high part of the 386 registers 129 <1> ; 130 <1> 131 <1> 132 <1> %IF XCPU < 386 133 <1> ; no need to save/restore anything 134 <1> 135 <1> ; error 1 2 3 136 <1> %macro Protect386Registers 0 137 <1> %endmacro 138 <1> 139 <1> %assign Size386Registers 0 140 <1> 141 <1> %macro RestoreSP 0 142 <1> mov sp, bp 143 <1> %endmacro 144 <1> 145 <1> %macro Restore386Registers 0 146 <1> %endmacro 147 <1> 148 <1> %ELSE 149 <1> %ifdef WATCOM 150 <1> 151 <1> %macro Protect386Registers 0 152 <1> push fs 153 <1> push gs 154 <1> %endmacro 155 <1> 156 <1> %assign Size386Registers 4 157 <1> 158 <1> %macro RestoreSP 0 159 <1> lea sp, [bp - Size386Registers] 160 <1> %endmacro 161 <1> 162 <1> %macro Restore386Registers 0 163 <1> pop gs 164 <1> pop fs 165 <1> %endmacro 166 <1> 167 <1> %else 168 <1> 169 <1> %macro Protect386Registers 0 170 <1> push eax 171 <1> pop ax 172 <1> %ifdef MSCL8 173 <1> push ecx 174 <1> pop cx 175 <1> %else ;BC5 176 <1> push ebx 177 <1> pop bx 178 <1> %endif 179 <1> push edx 180 <1> pop dx 181 <1> %endmacro 182 <1> 183 <1> %assign Size386Registers 6 184 <1> 185 <1> %macro RestoreSP 0 186 <1> lea sp, [bp - Size386Registers] 187 <1> %endmacro 188 <1> 189 <1> %macro Restore386Registers 0 190 <1> push dx 191 <1> pop edx 192 <1> %ifdef MSCL8 193 <1> push cx 194 <1> pop ecx 195 <1> %else ;BC5 196 <1> push bx 197 <1> pop ebx 198 <1> %endif 199 <1> push ax 200 <1> pop eax 201 <1> %endmacro 202 <1> 203 <1> %endif 204 <1> %ENDIF 205 <1> 206 <1> ; macros to define stack arguments 207 <1> ; arg a, {b,4}, c 208 <1> ; defines a and c as "word" arguments and b as a "dword" argument 209 <1> ; for STDCALL defines .a as [bp+4], .b as [bp+6] and .c as [bp+10] 210 <1> ; for PASCAL defines .a as [bp+10], .b as [bp+6] and .c as [bp+4] 211 <1> ; 212 <1> ; popargs bx, {dx,ax}, cx pops these arguments of the stack (for PASCAL 213 <1> ; in reverse order). Here dx,ax is a dword argument dx:ax where dx is 214 <1> ; the high word. The caller is responsible for dealing with instruction 215 <1> ; pointer (ip) on the stack. 216 <1> 217 <1> %ifdef gcc 218 <1> %define STDCALL 219 <1> %else 220 <1> %define PASCAL 221 <1> %endif 222 <1> 223 <1> %macro definearg 1-2 2 224 <1> %xdefine .%1 bp+.argloc 225 <1> %assign .argloc .argloc+%2 226 <1> %endmacro 227 <1> 228 <1> %macro arg 1-* 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 239 <1> %endmacro 240 <1> 241 <1> %macro multipop 1-* 242 <1> %rep %0 243 <1> %rotate -1 244 <1> pop %1 245 <1> %endrep 246 <1> %endmacro 247 <1> 248 <1> %macro popargs 1-* 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 258 <1> %endmacro 52 53 %ifdef _INIT 54 === Switch to base=00E0E0h -> "INIT_TEXT" 55 segment INIT_TEXT 56 %define FMEMCPYBACK INIT_FMEMCPYBACK 57 %define MEMCPY INIT_MEMCPY 58 %define FMEMCPY INIT_FMEMCPY 59 %define MEMSET INIT_MEMSET 60 %define FMEMSET INIT_FMEMSET 61 %define STRCPY INIT_STRCPY 62 %define FSTRCPY INIT_FSTRCPY 63 %define STRLEN INIT_STRLEN 64 %define FSTRLEN INIT_FSTRLEN 65 %define FMEMCHR INIT_FMEMCHR 66 %define FSTRCHR INIT_FSTRCHR 67 %define STRCHR INIT_STRCHR 68 %define FSTRCMP INIT_FSTRCMP 69 %define STRCMP INIT_STRCMP 70 %define FSTRNCMP INIT_FSTRNCMP 71 %define STRNCMP INIT_STRNCMP 72 %define FMEMCMP INIT_FMEMCMP 73 %define MEMCMP INIT_MEMCMP 74 75 %else 76 === Switch to base=002270h -> "HMA_TEXT" 77 segment HMA_TEXT 78 79 %endif 80 81 ;********************************************************************* 82 ; this implements some of the common string handling functions 83 ; 84 ; every function has 1 entry 85 ; 86 ; NEAR FUNC() 87 ; 88 ; currently done: 89 ; 90 ; fmemcpyBack(void FAR *dest, void FAR *src, int count) 91 ; memcpy(void *dest, void *src, int count) 92 ; fmemcpy(void FAR *dest, void FAR *src, int count) 93 ; memset(void *dest, int ch, int count); 94 ; fmemset(void FAR *dest, int ch, int count); 95 ; strcpy (void *dest, void *src); 96 ; fstrcpy (void FAR*dest, void FAR *src); 97 ; strlen (void *dest); 98 ; fstrlen (void FAR*dest); 99 ; fmemchr (BYTE FAR *src , int ch); 100 ; fstrchr (BYTE FAR *src , int ch); 101 ; strchr (BYTE *src , int ch); 102 ; fstrcmp (BYTE FAR *s1 , BYTE FAR *s2); 103 ; strcmp (BYTE *s1 , BYTE *s2); 104 ; fstrncmp(BYTE FAR *s1 , BYTE FAR *s2, int count); 105 ; strncmp(BYTE *s1 , BYTE *s2, int count); 106 ; fmemcmp(BYTE FAR *s1 , BYTE FAR *s2, int count); 107 ; memcmp(BYTE *s1 , BYTE *s2, int count); 108 109 ;*********************************************** 110 ; pascal_setup - set up the standard calling frame for C-functions 111 ; and save registers needed later 112 ; also preload the args for the near functions 113 ; di=arg1 114 ; si=arg2 115 ; cx=arg3 116 ; 117 pascal_setup: 0 000008FD 58 pop ax ; get return address 119 0 000008FE 55 push bp ; Standard C entry 0 000008FF 89E5 mov bp,sp 122 %ifdef WATCOM 123 push bx 124 push cx 125 push es 126 %endif 0 00000901 56 push si 0 00000902 57 push di 0 00000903 1E push ds 130 ; Set both ds and es to same segment (for near copy) 0 00000904 1E push ds 0 00000905 07 pop es 133 134 ; Set direction to autoincrement 0 00000906 FC cld 136 0 00000907 B306 mov bl,6 ; majority (4) wants that 138 arg arg1, arg2, arg3 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 0 00000909 8B4E08 mov cx,[.arg3] ; majority (8) wants that (near and far) 0 0000090C 8B7606 mov si,[.arg2] ; majority (3) wants that (near) 0 0000090F 8B7E04 mov di,[.arg1] ; majority (3) wants that (near) 142 0 00000912 FFE0 jmp ax 144 145 146 147 148 ;*********************************************** 149 ; 150 ; VOID memcpy(REG BYTE *s, REG BYTE *d, REG COUNT n); 151 ; 152 global MEMCPY 153 MEMCPY: 0 00000914 E8E6FF call pascal_setup 155 156 ;mov cx,[4+bp] - preset above 157 ;mov si,[6+bp] - preset above 158 ;mov di,[8+bp] - preset above 159 160 ;mov bl,6 - preset above 161 162 163 domemcpy: 164 ; And do the built-in byte copy, but do a 16-bit transfer 165 ; whenever possible. 0 00000917 D1E9 shr cx,1 0 00000919 F3A5 rep movsw 0 0000091B 7301 jnc memcpy_return 0 0000091D A4 movsb 170 memcpy_return: 171 %if 0 ; only needed for fmemcpyback 172 cld 173 %endif 174 175 ; 176 ; pascal_return - pop saved registers and do return 177 ; 178 0 0000091E EB31 jmp short pascal_return 180 181 182 183 ;************************************************************ 184 ; 185 ; VOID fmemcpy(REG BYTE FAR *d, REG BYTE FAR *s,REG COUNT n); 186 ; VOID fmemcpyBack(REG BYTE FAR *d, REG BYTE FAR *s,REG COUNT n); 187 ; 188 global FMEMCPY 189 %if 0 190 global FMEMCPYBACK 191 FMEMCPYBACK: 192 std ; force to copy the string in reverse order 193 %endif 194 FMEMCPY: 0 00000920 E8DAFF call pascal_setup 196 197 arg {d,4}, {s,4}, n 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 198 ; Get the repetition count, n preset above 199 %ifdef STDCALL 0 00000923 8B4E0C mov cx,[.n] 201 %endif 202 203 ; Get the far source pointer, s 0 00000926 C57608 lds si,[.s] 205 206 ; Get the far destination pointer d 0 00000929 C47E04 les di,[.d] 0 0000092C B30A mov bl,10 209 0 0000092E EBE7 jmp short domemcpy 211 212 ;*************************************************************** 213 ; 214 ; VOID fmemset(REG VOID FAR *d, REG BYTE ch, REG COUNT n); 215 ; 216 global FMEMSET 217 FMEMSET: 0 00000930 E8CAFF call pascal_setup 219 220 arg {d,4}, ch, n 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 221 ; Get the repetition count, n - preset above 222 %ifdef STDCALL 0 00000933 8B4E0A mov cx,[.n] 224 %endif 225 226 ; Get the fill byte ch 0 00000936 8B4608 mov ax,[.ch] 228 229 ; Get the far source pointer, s 0 00000939 C47E04 les di,[.d] 0 0000093C B308 mov bl,8 232 233 domemset: 0 0000093E 88C4 mov ah, al 235 0 00000940 D1E9 shr cx,1 0 00000942 F3AB rep stosw 0 00000944 730B jnc pascal_return 0 00000946 AA stosb 240 0 00000947 EB08 jmp short pascal_return 242 243 ;*************************************************************** 244 ; 245 ; VOID memset(REG VOID *d, REG BYTE ch, REG COUNT n); 246 ; 247 global MEMSET 248 MEMSET: 0 00000949 E8B1FF call pascal_setup 250 251 arg d, ch, n 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 252 ; Get the repitition count, n - preset above 253 ; mov cx,[bp+4] 254 255 ; Get the char ch 0 0000094C 8B4606 mov ax, [.ch] 257 258 ; Get the far source pointer, d - preset above 259 ; mov di,[bp+8] 260 261 ;mov bl, 6 ; preset above 262 0 0000094F EBED jmp short domemset 264 265 ;***** 266 pascal_return: 0 00000951 C57E00 lds di, [bp] ; return address in ds, saved bp in di 0 00000954 B700 mov bh, 0 0 00000956 01DD add bp, bx ; point bp to "as if there were 0 args" 0 00000958 8C5E02 mov [bp+2], ds ; put return address at first arg 0 0000095B 897E00 mov [bp], di ; saved bp below that one 272 0 0000095E 1F pop ds 0 0000095F 5F pop di 0 00000960 5E pop si 276 %ifdef WATCOM 277 pop es 278 pop cx 279 pop bx 280 %endif 0 00000961 89EC mov sp,bp 0 00000963 5D pop bp 0 00000964 C3 ret 284 285 ;***************************************************************** 286 287 ; fstrcpy (void FAR*dest, void FAR *src); 288 289 global FSTRCPY 290 FSTRCPY: 0 00000965 E895FF call pascal_setup 292 293 arg {dest,4}, {src,4} 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 294 ; Get the source pointer, ss 0 00000968 C57608 lds si,[.src] 296 297 ; and the destination pointer, d 0 0000096B C47E04 les di,[.dest] 299 0 0000096E B308 mov bl,8 301 0 00000970 EB05 jmp short dostrcpy 303 304 ;****** 305 global STRCPY 306 STRCPY: 0 00000972 E888FF call pascal_setup 308 309 310 %ifdef PASCAL 311 ; Get the source pointer, ss 312 mov si,[bp+4] 313 314 ; and the destination pointer, d 315 mov di,[bp+6] 316 %endif 0 00000975 B304 mov bl,4 318 319 dostrcpy: 320 321 strcpy_loop: 0 00000977 AC lodsb 0 00000978 AA stosb 0 00000979 84C0 test al,al 0 0000097B 75FA jne strcpy_loop 326 0 0000097D EBD2 jmp short pascal_return 328 329 ;****************************************************************** 330 global FSTRLEN 331 FSTRLEN: 0 0000097F E87BFF call pascal_setup 333 334 ; Get the source pointer, ss 0 00000982 C47E04 les di,[bp+4] 0 00000985 B304 mov bl,4 337 0 00000987 EB05 jmp short dostrlen 339 340 ;********************************************** 341 global STRLEN 342 STRLEN: 0 00000989 E871FF call pascal_setup 344 ; Get the source pointer, ss 345 %ifdef PASCAL 346 mov di,[bp+4] 347 %endif 0 0000098C B302 mov bl,2 349 350 dostrlen: 0 0000098E B000 mov al,0 0 00000990 B9FFFF mov cx,0xffff 0 00000993 F2AE repne scasb 354 0 00000995 89C8 mov ax,cx 0 00000997 F7D0 not ax 0 00000999 48 dec ax 358 0 0000099A EBB5 jmp short pascal_return 360 361 ;************************************************************ 362 ; strchr (BYTE *src , int ch); 363 364 global STRCHR 365 STRCHR: 0 0000099C E85EFF call pascal_setup 367 368 ; Get the source pointer, ss 369 arg src, ch 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 370 %ifdef STDCALL ; preset above for PASCAL 0 0000099F 8B4E06 mov cx,[.ch] 0 000009A2 8B7604 mov si,[.src] 373 %endif 0 000009A5 B304 mov bl,4 375 376 strchr_loop: 0 000009A7 AC lodsb 0 000009A8 38C8 cmp al,cl 0 000009AA 740A je strchr_found 0 000009AC 84C0 test al,al 0 000009AE 75F7 jne strchr_loop 382 383 strchr_retzero: 0 000009B0 31C0 xor ax, ax ; return NULL if not found 0 000009B2 89C2 mov dx, ax ; for fstrchr() 0 000009B4 EB9B jmp short pascal_return 387 388 strchr_found: 0 000009B6 89F0 mov ax, si 0 000009B8 8CDA mov dx, ds ; for fstrchr() 391 strchr_found1: 0 000009BA 48 dec ax 393 0 000009BB EB94 jmp short pascal_return 395 396 %ifndef _INIT 397 398 ;***** 399 ; fstrchr (BYTE far *src , int ch); 400 global FSTRCHR 401 FSTRCHR: 402 call pascal_setup 403 404 arg {src,4}, ch 405 ; Get ch (preset above) 406 ;mov cx, [bp+4] 407 408 ;and the source pointer, src 409 lds si, [.src] 410 411 ;mov bl, 6 - preset above 412 413 jmp short strchr_loop 414 415 ;****** 416 global FMEMCHR 417 FMEMCHR: 418 call pascal_setup 419 420 arg {src,4}, ch, n 421 ; Get the length - preset above 422 %ifdef STDCALL 423 mov cx, [.n] 424 %endif 425 426 ; and the search value 427 mov ax, [.ch] 428 429 ; and the source pointer, ss 430 les di, [.src] 431 432 mov bl, 8 433 434 jcxz strchr_retzero 435 repne scasb 436 jne strchr_retzero 437 mov dx, es 438 mov ax, di 439 jmp short strchr_found1 440 441 ;********************************************************************** 442 global FSTRCMP 443 FSTRCMP: 444 call pascal_setup 445 446 arg {dest,4}, {src,4} 447 ; Get the source pointer, ss 448 lds si,[.src] 449 450 ; and the destination pointer, d 451 les di,[.dest] 452 453 mov bl,8 454 455 %if 0 456 jmp short dostrcmp 457 458 ;****** 459 global STRCMP 460 STRCMP: 461 call pascal_setup 462 463 mov bl,4 464 465 ; Get the source pointer, ss 466 ; mov si,[bp+4] 467 468 ; and the destination pointer, d 469 ; mov di,[bp+6] 470 xchg si,di 471 472 dostrcmp: 473 %endif 474 ; replace strncmp(s1,s2)--> 475 ; strncmp(s1,s2,0xffff) 476 mov cx,0xffff 477 %if 0 478 jmp short dostrncmp 479 480 481 ;********************************************************************** 482 global FSTRNCMP 483 FSTRNCMP: 484 call pascal_setup 485 486 ; Get the source pointer, ss 487 lds si,[bp+4] 488 489 ; and the destination pointer, d 490 les di,[bp+8] 491 mov cx,[bp+12] 492 mov bl,10 493 494 jmp short dostrncmp 495 496 ;****** 497 global _strncmp 498 _strncmp: 499 call pascal_setup 500 501 ; Get the source pointer, ss 502 ;mov si,[bp+4] 503 504 ; and the destination pointer, d 505 ;mov di,[bp+6] 506 ;mov cx,[bp+8] 507 xchg si,di 508 509 dostrncmp: 510 %endif 511 jcxz strncmp_retzero 512 513 strncmp_loop: 514 lodsb 515 scasb 516 jne strncmp_done 517 test al,al 518 loopne strncmp_loop 519 jmp short strncmp_retzero 520 %endif 521 522 ;********************************************************************** 523 ; fmemcmp(BYTE FAR *s1 , BYTE FAR *s2, int count); 524 global FMEMCMP 525 FMEMCMP: 0 000009BD E83DFF call pascal_setup 527 528 arg {dest,4}, {src,4}, n 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 529 ; the length - preset above 530 %ifdef STDCALL 0 000009C0 8B4E0C mov cx, [.n] 532 %endif 533 534 ; Get the source pointer, ss 0 000009C3 C47E08 les di,[.src] 536 537 ; and the destination pointer, d 0 000009C6 C57604 lds si,[.dest] 539 0 000009C9 B30A mov bl,10 541 0 000009CB EB05 jmp short domemcmp 543 544 ;****** 545 ; memcmp(BYTE *s1 , BYTE *s2, int count); 546 global MEMCMP 547 MEMCMP: 0 000009CD E82DFF call pascal_setup 549 550 ; all preset: Get the source pointer, ss 551 ;mov si,[bp+6] 552 553 ; and the destination pointer, d 554 ;mov di,[bp+8] 555 ;mov cx,[bp+4] 556 ;mov bl,6 0 000009D0 87F7 xchg si,di 558 559 domemcmp: 0 000009D2 E304 jcxz strncmp_retzero 0 000009D4 F3A6 repe cmpsb 0 000009D6 7504 jne strncmp_done 563 strncmp_retzero: 0 000009D8 31C0 xor ax, ax 0 000009DA EB03 jmp short strncmp_done2 566 strncmp_done: 0 000009DC 9F lahf 0 000009DD D0CC ror ah,1 0 000009DF E96FFF strncmp_done2: jmp pascal_return 570 571 %endif === Trace listing source: initclk.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=initclk.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccSO9rUs.s output file : initclk.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:23.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _InitBcdToByte, @function 7 _InitBcdToByte: 0 00004984 89E3 mov bx, sp 0 00004986 8B5F02 mov bx, word ptr [bx+2] 0 00004989 89D8 mov ax, bx 0 0000498B B104 mov cl, 4 0 0000498D D3F8 sar ax, cl 0 0000498F 83E00F and ax, 15 0 00004992 BA0A00 mov dx, 10 0 00004995 F7E2 mul dx 0 00004997 89D9 mov cx, bx 0 00004999 83E10F and cx, 15 0 0000499C 01C8 add ax, cx 0 0000499E C20200 ret 2 20 .size _InitBcdToByte, .-_InitBcdToByte 21 .global _Init_clk_driver 22 .type _Init_clk_driver, @function 23 _Init_clk_driver: 0 000049A1 56 push si 0 000049A2 57 push di 0 000049A3 55 push bp 0 000049A4 89E5 mov bp, sp 0 000049A6 83EC1A sub sp, 26 0 000049A9 B9[1800] mov cx, offset _regsT.1854 0 000049AC 51 push cx 0 000049AD 894EE6 mov word ptr [bp-26], cx 0 000049B0 BE1A00 mov si, 26 0 000049B3 56 push si 0 000049B4 E8[FEFF] call _init_call_intr 0 000049B7 BF[0000] mov di, offset _regsD.1855 0 000049BA 57 push di 0 000049BB 56 push si 0 000049BC E8[FEFF] call _init_call_intr 0 000049BF C646E92B mov byte ptr [bp-23], 43 0 000049C3 8A4505 mov al, byte ptr [di+5] 0 000049C6 30E4 xor ah, ah 0 000049C8 50 push ax 0 000049C9 E8B8FF call _InitBcdToByte 0 000049CC 89C6 mov si, ax 0 000049CE 8A4504 mov al, byte ptr [di+4] 0 000049D1 30E4 xor ah, ah 0 000049D3 50 push ax 0 000049D4 E8ADFF call _InitBcdToByte 0 000049D7 91 xchg cx, ax 0 000049D8 B86400 mov ax, 100 0 000049DB F7E6 mul si 0 000049DD 96 xchg si, ax 0 000049DE 91 xchg cx, ax 0 000049DF 01F0 add ax, si 0 000049E1 89C2 mov dx, ax 0 000049E3 81C294F8 add dx, -1900 0 000049E7 83FA4F cmp dx, 79 0 000049EA 8B4EE6 mov cx, word ptr [bp-26] 0 000049ED 89CE mov si, cx 0 000049EF 7663 jbe _.L4 61 _.L7: 0 000049F1 8946EC mov word ptr [bp-20], ax 0 000049F4 8A4507 mov al, byte ptr [di+7] 0 000049F7 30E4 xor ah, ah 0 000049F9 50 push ax 0 000049FA E887FF call _InitBcdToByte 0 000049FD 8846EF mov byte ptr [bp-17], al 0 00004A00 8A4506 mov al, byte ptr [di+6] 0 00004A03 30E4 xor ah, ah 0 00004A05 50 push ax 0 00004A06 E87BFF call _InitBcdToByte 0 00004A09 8846EE mov byte ptr [bp-18], al 0 00004A0C 8D56E8 lea dx, [-24+bp] 0 00004A0F 52 push dx 0 00004A10 8956E6 mov word ptr [bp-26], dx 0 00004A13 BF2100 mov di, 33 0 00004A16 57 push di 0 00004A17 E8[FEFF] call _init_call_intr 0 00004A1A C646E92D mov byte ptr [bp-23], 45 0 00004A1E 8A4404 mov al, byte ptr [si+4] 0 00004A21 30E4 xor ah, ah 0 00004A23 50 push ax 0 00004A24 E85DFF call _InitBcdToByte 0 00004A27 8846EC mov byte ptr [bp-20], al 0 00004A2A 8A4405 mov al, byte ptr [si+5] 0 00004A2D 30E4 xor ah, ah 0 00004A2F 50 push ax 0 00004A30 E851FF call _InitBcdToByte 0 00004A33 8846ED mov byte ptr [bp-19], al 0 00004A36 8A4407 mov al, byte ptr [si+7] 0 00004A39 30E4 xor ah, ah 0 00004A3B 50 push ax 0 00004A3C E845FF call _InitBcdToByte 0 00004A3F 8846EF mov byte ptr [bp-17], al 0 00004A42 C646EE00 mov byte ptr [bp-18], 0 0 00004A46 8B56E6 mov dx, word ptr [bp-26] 0 00004A49 52 push dx 0 00004A4A 57 push di 0 00004A4B E8[FEFF] call _init_call_intr 0 00004A4E 89EC mov sp, bp 0 00004A50 5D pop bp 0 00004A51 5F pop di 0 00004A52 5E pop si 0 00004A53 C3 ret 105 _.L4: 0 00004A54 83C064 add ax, 100 0 00004A57 EB98 jmp _.L7 108 .size _Init_clk_driver, .-_Init_clk_driver === Switch to base=000790h -> ".DATA" 109 .data 110 .type _regsD.1855, @object 111 .size _regsD.1855, 24 112 _regsD.1855: 0 000005E9 0004 .hword 1024 0 000005EB 0000 .hword 0 0 000005ED 0014 .hword 5120 0 000005EF 0101 .hword 257 0 000005F1 0000000000000000 .skip 16,0 0 000005F9 0000000000000000 118 .type _regsT.1854, @object 119 .size _regsT.1854, 24 120 _regsT.1854: 0 00000601 0002 .hword 512 0 00000603 0000000000000000 .skip 22,0 0 0000060B 0000000000000000 0 00000613 000000000000 123 .ident "GCC: (GNU) 6.3.0" === Trace listing source: initdisk.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=initdisk.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccu7VPt0.s output file : initdisk.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:23.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=012B40h -> ".RODATA.STR1.1" 5 .section .rodata.str1.1,"aMS",@progbits,1 6 _.LC0: 0 00000D34 64647400 .string "ddt" === Switch to base=002270h -> ".TEXT" 8 .text 9 .type _push_ddt, @function 10 _push_ddt: 0 000037B5 56 push si 0 000037B6 57 push di 0 000037B7 55 push bp 0 000037B8 89E5 mov bp, sp 0 000037BA 1E push ds 0 000037BB 1E push ds 0 000037BC 8B7608 mov si, word ptr [bp+8] 0 000037BF BF8800 mov di, 136 0 000037C2 57 push di 0 000037C3 B80100 mov ax, 1 0 000037C6 50 push ax 0 000037C7 B80000 mov ax, offset _.LC0 0 000037CA 50 push ax 0 000037CB E8FEFF call _DynAlloc 0 000037CE 57 push di 0 000037CF 16 push ss 0 000037D0 56 push si 0 000037D1 52 push dx 0 000037D2 8956FC mov word ptr [bp-4], dx 0 000037D5 50 push ax 0 000037D6 8946FE mov word ptr [bp-2], ax 0 000037D9 E8FEFF call _init_fmemcpy 0 000037DC 807C0500 cmp byte ptr [si+5], 0 0 000037E0 7425 je _.L1 0 000037E2 8B56FC mov dx, word ptr [bp-4] 0 000037E5 8EC2 mov es, dx 0 000037E7 8B46FE mov ax, word ptr [bp-2] 0 000037EA 89C3 mov bx, ax 0 000037EC 26898778FF mov word ptr es:[bx-136], ax 0 000037F1 2689977AFF mov word ptr es:[bx-134], dx 0 000037F6 807C0400 cmp byte ptr [si+4], 0 0 000037FA 750B jne _.L1 0 000037FC 807C0501 cmp byte ptr [si+5], 1 0 00003800 7505 jne _.L1 0 00003802 26804FAB30 or byte ptr es:[bx-85], 48 46 _.L1: 0 00003807 89EC mov sp, bp 0 00003809 5D pop bp 0 0000380A 5F pop di 0 0000380B 5E pop si 0 0000380C C20200 ret 2 52 .size _push_ddt, .-_push_ddt === Switch to base=012B40h -> ".RODATA.STR1.1" 53 .section .rodata.str1.1 54 _.LC1: 0 00000D38 436865636B696E67 .string "Checking for LBA support in BIOS for drive %02x\n" 0 00000D40 20666F72204C4241 0 00000D48 20737570706F7274 0 00000D50 20696E2042494F53 0 00000D58 20666F7220647269 0 00000D60 766520253032780A 0 00000D68 00 56 _.LC2: 0 00000D69 4C42412073757070 .string "LBA support disabled.\n" 0 00000D71 6F72742064697361 0 00000D79 626C65642E0A00 58 _.LC3: 0 00000D80 537573706963696F .string "Suspicious LBA disk parameters, reverting to CHS access:\n" 0 00000D88 7573204C42412064 0 00000D90 69736B2070617261 0 00000D98 6D65746572732C20 0 00000DA0 726576657274696E 0 00000DA8 6720746F20434853 0 00000DB0 206163636573733A 0 00000DB8 0A00 60 _.LC4: 0 00000DBA 2020647269766520 .string " drive %02x, heads=%lu, sectors=%lu, total=0x%lx-%08lx\n" 0 00000DC2 253032782C206865 0 00000DCA 6164733D256C752C 0 00000DD2 20736563746F7273 0 00000DDA 3D256C752C20746F 0 00000DE2 74616C3D3078256C 0 00000DEA 782D2530386C780A 0 00000DF2 00 62 _.LC5: 0 00000DF3 4472697665202530 .string "Drive %02x is too large to handle, restricted to 2TB\n" 0 00000DFB 327820697320746F 0 00000E03 6F206C6172676520 0 00000E0B 746F2068616E646C 0 00000E13 652C207265737472 0 00000E1B 696374656420746F 0 00000E23 203254420A00 64 _.LC6: 0 00000E29 5265747269657669 .string "Retrieving CHS values for drive\n" 0 00000E31 6E67204348532076 0 00000E39 616C75657320666F 0 00000E41 722064726976650A 0 00000E49 00 66 _.LC7: 0 00000E4A 42494F5320726570 .string "BIOS reported 0 sectors/track, assuming 63!\n" 0 00000E52 6F72746564203020 0 00000E5A 736563746F72732F 0 00000E62 747261636B2C2061 0 00000E6A 7373756D696E6720 0 00000E72 3633210A00 === Switch to base=002270h -> ".TEXT" 68 .text 69 .type _LBA_Get_Drive_Parameters, @function 70 _LBA_Get_Drive_Parameters: 0 0000380F 56 push si 0 00003810 57 push di 0 00003811 55 push bp 0 00003812 89E5 mov bp, sp 0 00003814 83EC40 sub sp, 64 0 00003817 8B760A mov si, word ptr [bp+10] 0 0000381A 837E0C00 cmp word ptr [bp+12], 0 0 0000381E BF0000 mov di, offset _InitKernelConfig 0 00003821 7413 je _.L7 0 00003823 807D1500 cmp byte ptr [di+21], 0 0 00003827 7E0D jle _.L7 0 00003829 FF7608 push word ptr [bp+8] 0 0000382C B80400 mov ax, offset _.LC1 0 0000382F 50 push ax 0 00003830 E8FEFF call _init_printf 0 00003833 83C404 add sp, 4 87 _.L7: 0 00003836 B80D00 mov ax, 13 0 00003839 50 push ax 0 0000383A 31C0 xor ax, ax 0 0000383C 50 push ax 0 0000383D 8946C4 mov word ptr [bp-60], ax 0 00003840 56 push si 0 00003841 E8FEFF call _init_memset 0 00003844 8B4608 mov ax, word ptr [bp+8] 0 00003847 0C80 or al, -128 0 00003849 8946C6 mov word ptr [bp-58], ax 0 0000384C 807D0C00 cmp byte ptr [di+12], 0 0 00003850 8B46C4 mov ax, word ptr [bp-60] 0 00003853 8946C2 mov word ptr [bp-62], ax 0 00003856 7532 jne _.L8 0 00003858 837E0C00 cmp word ptr [bp+12], 0 0 0000385C 7503E94A01 je _.L10 0 00003861 807D1500 cmp byte ptr [di+21], 0 0 00003865 7F03E94101 jle _.L10 0 0000386A B83500 mov ax, offset _.LC2 0 0000386D 50 push ax 0 0000386E E8FEFF call _init_printf 0 00003871 83C402 add sp, 2 110 _.L12: 0 00003874 807D1500 cmp byte ptr [di+21], 0 0 00003878 7F03E92E01 jle _.L10 0 0000387D B8F500 mov ax, offset _.LC6 0 00003880 50 push ax 0 00003881 E8FEFF call _init_printf 0 00003884 83C402 add sp, 2 0 00003887 E92101 jmp _.L10 118 _.L8: 0 0000388A C746CCAA55 mov word ptr [bp-52], 21930 0 0000388F C646CB41 mov byte ptr [bp-53], 65 0 00003893 8A46C6 mov al, byte ptr [bp-58] 0 00003896 8846C4 mov byte ptr [bp-60], al 0 00003899 8846D0 mov byte ptr [bp-48], al 0 0000389C C746D84000 mov word ptr [bp-40], 64 0 000038A1 C746E00100 mov word ptr [bp-32], 1 0 000038A6 8D46CA lea ax, [-54+bp] 0 000038A9 50 push ax 0 000038AA B81300 mov ax, 19 0 000038AD 50 push ax 0 000038AE E8FEFF call _init_call_intr 0 000038B1 F646E001 test byte ptr [bp-32], 1 0 000038B5 7403E9E800 jne _.L14 0 000038BA 817ECC55AA cmp word ptr [bp-52], -21931 0 000038BF 7403E9DE00 jne _.L14 0 000038C4 F646CE01 test byte ptr [bp-50], 1 0 000038C8 7503E9D500 je _.L14 0 000038CD 807ECB20 cmp byte ptr [bp-53], 32 0 000038D1 770C ja _.L16 0 000038D3 B80000 mov ax, offset _LBA_WRITE_VERIFY@OZSEG16 0 000038D6 8EC0 mov es, ax 0 000038D8 26C70600000143 mov word ptr es:[_LBA_WRITE_VERIFY], 17153 142 _.L16: 0 000038DF BA1E00 mov dx, 30 0 000038E2 52 push dx 0 000038E3 8956C0 mov word ptr [bp-64], dx 0 000038E6 FF76C2 push word ptr [bp-62] 0 000038E9 8D46E2 lea ax, [-30+bp] 0 000038EC 50 push ax 0 000038ED 8946C2 mov word ptr [bp-62], ax 0 000038F0 E8FEFF call _init_memset 0 000038F3 C456C0 les dx, dword ptr [bp-64] 0 000038F6 8956E2 mov word ptr [bp-30], dx 0 000038F9 8C46D2 mov word ptr [bp-46], es 0 000038FC 8C56D8 mov word ptr [bp-40], ss 0 000038FF C646CB48 mov byte ptr [bp-53], 72 0 00003903 8A46C4 mov al, byte ptr [bp-60] 0 00003906 8846D0 mov byte ptr [bp-48], al 0 00003909 8D46CA lea ax, [-54+bp] 0 0000390C 50 push ax 0 0000390D B81300 mov ax, 19 0 00003910 50 push ax 0 00003911 E8FEFF call _init_call_intr 0 00003914 F646E001 test byte ptr [bp-32], 1 0 00003918 7403E98500 jne _.L14 0 0000391D 837EEC00 cmp word ptr [bp-20], 0 0 00003921 7521 jne _.L17 0 00003923 837EF000 cmp word ptr [bp-16], 0 0 00003927 751B jne _.L17 0 00003929 8B56F2 mov dx, word ptr [bp-14] 0 0000392C 8B46F4 mov ax, word ptr [bp-12] 0 0000392F 8946C4 mov word ptr [bp-60], ax 0 00003932 89D1 mov cx, dx 0 00003934 09C1 or cx, ax 0 00003936 8B5EF6 mov bx, word ptr [bp-10] 0 00003939 8B4EF8 mov cx, word ptr [bp-8] 0 0000393C 753B jne _.L20 0 0000393E 89D8 mov ax, bx 0 00003940 09C8 or ax, cx 0 00003942 7535 jne _.L20 180 _.L17: 0 00003944 837E0C00 cmp word ptr [bp+12], 0 0 00003948 7461 je _.L10 0 0000394A B84C00 mov ax, offset _.LC3 0 0000394D 50 push ax 0 0000394E E8FEFF call _init_printf 0 00003951 FF76F8 push word ptr [bp-8] 0 00003954 FF76F6 push word ptr [bp-10] 0 00003957 FF76F4 push word ptr [bp-12] 0 0000395A FF76F2 push word ptr [bp-14] 0 0000395D FF76F0 push word ptr [bp-16] 0 00003960 FF76EE push word ptr [bp-18] 0 00003963 FF76EC push word ptr [bp-20] 0 00003966 FF76EA push word ptr [bp-22] 0 00003969 FF76C6 push word ptr [bp-58] 0 0000396C B88600 mov ax, offset _.LC4 0 0000396F 50 push ax 0 00003970 E8FEFF call _init_printf 0 00003973 83C416 add sp, 22 0 00003976 E9FBFE jmp _.L12 200 _.L20: 0 00003979 09CB or bx, cx 0 0000397B 7403E9CE00 jne _.L21 0 00003980 895403 mov word ptr [si+3], dx 0 00003983 8B46C4 mov ax, word ptr [bp-60] 0 00003986 894405 mov word ptr [si+5], ax 206 _.L22: 0 00003989 C744010004 mov word ptr [si+1], 1024 0 0000398E 8B46E4 mov ax, word ptr [bp-28] 0 00003991 A808 test al, 8 0 00003993 7405 je _.L24 0 00003995 C74401000C mov word ptr [si+1], 3072 212 _.L24: 0 0000399A A801 test al, 1 0 0000399C 7404 je _.L14 0 0000399E 804C0210 or byte ptr [si+2], 16 216 _.L14: 0 000039A2 837E0C00 cmp word ptr [bp+12], 0 0 000039A6 7403E9C9FE jne _.L12 219 _.L10: 0 000039AB C646CB08 mov byte ptr [bp-53], 8 0 000039AF 8A46C6 mov al, byte ptr [bp-58] 0 000039B2 8846C4 mov byte ptr [bp-60], al 0 000039B5 8846D0 mov byte ptr [bp-48], al 0 000039B8 8D46CA lea ax, [-54+bp] 0 000039BB 50 push ax 0 000039BC B81300 mov ax, 19 0 000039BF 50 push ax 0 000039C0 E8FEFF call _init_call_intr 0 000039C3 F646E001 test byte ptr [bp-32], 1 0 000039C7 7403E9A200 jne _.L25 0 000039CC 8B46D0 mov ax, word ptr [bp-48] 0 000039CF B108 mov cl, 8 0 000039D1 D3E8 shr ax, cl 0 000039D3 40 inc ax 0 000039D4 894409 mov word ptr [si+9], ax 0 000039D7 8B56CE mov dx, word ptr [bp-50] 0 000039DA 89D1 mov cx, dx 0 000039DC 83E13F and cx, 63 0 000039DF 89CB mov bx, cx 0 000039E1 894C0B mov word ptr [si+11], cx 0 000039E4 89D0 mov ax, dx 0 000039E6 B102 mov cl, 2 0 000039E8 D3E0 shl ax, cl 0 000039EA 250003 and ax, 768 0 000039ED 40 inc ax 0 000039EE 08F0 or al, dh 0 000039F0 894407 mov word ptr [si+7], ax 0 000039F3 85DB test bx, bx 0 000039F5 751B jne _.L27 0 000039F7 C7440B3F00 mov word ptr [si+11], 63 0 000039FC 837E0C00 cmp word ptr [bp+12], 0 0 00003A00 7410 je _.L27 0 00003A02 807D1500 cmp byte ptr [di+21], 0 0 00003A06 7C0A jl _.L27 0 00003A08 B81601 mov ax, offset _.LC7 0 00003A0B 50 push ax 0 00003A0C E8FEFF call _init_printf 0 00003A0F 83C402 add sp, 2 259 _.L27: 0 00003A12 F6440204 test byte ptr [si+2], 4 0 00003A16 7522 jne _.L29 0 00003A18 8B4407 mov ax, word ptr [si+7] 0 00003A1B F76409 mul word ptr [si+9] 0 00003A1E 8EC0 mov es, ax 0 00003A20 8B5C0B mov bx, word ptr [si+11] 0 00003A23 89D8 mov ax, bx 0 00003A25 F7E2 mul dx 0 00003A27 97 xchg di, ax 0 00003A28 8CC0 mov ax, es 0 00003A2A F7E3 mul bx 0 00003A2C 8956C8 mov word ptr [bp-56], dx 0 00003A2F 89FA mov dx, di 0 00003A31 0356C8 add dx, word ptr [bp-56] 0 00003A34 894403 mov word ptr [si+3], ax 0 00003A37 895405 mov word ptr [si+5], dx 276 _.L29: 0 00003A3A 8A46C4 mov al, byte ptr [bp-60] 0 00003A3D 8804 mov byte ptr [si], al 0 00003A3F 8A4608 mov al, byte ptr [bp+8] 0 00003A42 30E4 xor ah, ah 0 00003A44 0C80 or al, -128 282 _.L6: 0 00003A46 89EC mov sp, bp 0 00003A48 5D pop bp 0 00003A49 5F pop di 0 00003A4A 5E pop si 0 00003A4B C20600 ret 6 288 _.L21: 0 00003A4E 837E0C00 cmp word ptr [bp+12], 0 0 00003A52 740D je _.L23 0 00003A54 FF76C6 push word ptr [bp-58] 0 00003A57 B8BF00 mov ax, offset _.LC5 0 00003A5A 50 push ax 0 00003A5B E8FEFF call _init_printf 0 00003A5E 83C404 add sp, 4 296 _.L23: 0 00003A61 C74403FFFF mov word ptr [si+3], -1 0 00003A66 C74405FFFF mov word ptr [si+5], -1 0 00003A6B E91BFF jmp _.L22 300 _.L25: 0 00003A6E C744030000 mov word ptr [si+3], 0 0 00003A73 C744050000 mov word ptr [si+5], 0 0 00003A78 C744091000 mov word ptr [si+9], 16 0 00003A7D C7440B3F00 mov word ptr [si+11], 63 0 00003A82 31C0 xor ax, ax 0 00003A84 EBC0 jmp _.L6 307 .size _LBA_Get_Drive_Parameters, .-_LBA_Get_Drive_Parameters 308 .global _init_readdasd 309 .type _init_readdasd, @function 310 _init_readdasd: 0 00003A86 56 push si 0 00003A87 55 push bp 0 00003A88 89E5 mov bp, sp 0 00003A8A BE3402 mov si, offset _regs.1887 0 00003A8D C606350215 mov byte ptr [_regs.1887+1], 21 0 00003A92 8A4606 mov al, byte ptr [bp+6] 0 00003A95 884406 mov byte ptr [si+6], al 0 00003A98 56 push si 0 00003A99 B81300 mov ax, 19 0 00003A9C 50 push ax 0 00003A9D E8FEFF call _init_call_intr 0 00003AA0 8B4416 mov ax, word ptr [si+22] 0 00003AA3 83E001 and ax, 1 0 00003AA6 7517 jne _.L60 0 00003AA8 8A5401 mov dl, byte ptr [si+1] 0 00003AAB 80FA02 cmp dl, 2 0 00003AAE 7413 je _.L61 0 00003AB0 80FA03 cmp dl, 3 0 00003AB3 7503 jne _.L56 0 00003AB5 B80100 mov ax, 1 331 _.L56: 0 00003AB8 89EC mov sp, bp 0 00003ABA 5D pop bp 0 00003ABB 5E pop si 0 00003ABC C20200 ret 2 336 _.L60: 0 00003ABF 31C0 xor ax, ax 0 00003AC1 EBF5 jmp _.L56 339 _.L61: 0 00003AC3 B80200 mov ax, 2 0 00003AC6 EBF0 jmp _.L56 342 .size _init_readdasd, .-_init_readdasd 343 .global _init_getdriveparm 344 .type _init_getdriveparm, @function 345 _init_getdriveparm: 0 00003AC8 56 push si 0 00003AC9 57 push di 0 00003ACA 55 push bp 0 00003ACB 89E5 mov bp, sp 0 00003ACD 1E push ds 0 00003ACE 8A4608 mov al, byte ptr [bp+8] 0 00003AD1 8B760A mov si, word ptr [bp+10] 0 00003AD4 84C0 test al, al 0 00003AD6 7C78 jl _.L67 0 00003AD8 BF1C02 mov di, offset _regs.1907 0 00003ADB C6061D0208 mov byte ptr [_regs.1907+1], 8 0 00003AE0 884506 mov byte ptr [di+6], al 0 00003AE3 57 push di 0 00003AE4 B81300 mov ax, 19 0 00003AE7 50 push ax 0 00003AE8 E8FEFF call _init_call_intr 0 00003AEB 8A6502 mov ah, byte ptr [di+2] 0 00003AEE 30C0 xor al, al 0 00003AF0 F6451601 test byte ptr [di+22], 1 0 00003AF4 750E jne _.L66 0 00003AF6 88E0 mov al, ah 0 00003AF8 FEC8 dec al 0 00003AFA 3C06 cmp al, 6 0 00003AFC 774E ja _.L69 0 00003AFE 3C05 cmp al, 5 0 00003B00 7502 jne _.L66 0 00003B02 B004 mov al, 4 373 _.L66: 0 00003B04 BA1100 mov dx, 17 0 00003B07 52 push dx 0 00003B08 88C4 mov ah, al 0 00003B0A 8846FF mov byte ptr [bp-1], al 0 00003B0D 80E407 and ah, 7 0 00003B10 88E2 mov dl, ah 0 00003B12 30F6 xor dh, dh 0 00003B14 B81100 mov ax, 17 0 00003B17 F7E2 mul dx 0 00003B19 92 xchg dx, ax 0 00003B1A 81C20000 add dx, offset _floppy_bpbs 0 00003B1E 52 push dx 0 00003B1F 56 push si 0 00003B20 E8FEFF call _init_memcpy 0 00003B23 C744110000 mov word ptr [si+17], 0 0 00003B28 C744130000 mov word ptr [si+19], 0 0 00003B2D C744150000 mov word ptr [si+21], 0 0 00003B32 C744170000 mov word ptr [si+23], 0 0 00003B37 8A46FF mov al, byte ptr [bp-1] 0 00003B3A 3C03 cmp al, 3 0 00003B3C 7417 je _.L70 0 00003B3E 3C04 cmp al, 4 0 00003B40 7418 je _.L71 0 00003B42 30E4 xor ah, ah 398 _.L64: 0 00003B44 89EC mov sp, bp 0 00003B46 5D pop bp 0 00003B47 5F pop di 0 00003B48 5E pop si 0 00003B49 C20400 ret 4 404 _.L69: 0 00003B4C B008 mov al, 8 0 00003B4E EBB4 jmp _.L66 407 _.L67: 0 00003B50 B80500 mov ax, 5 0 00003B53 EBEF jmp _.L64 410 _.L70: 0 00003B55 B80700 mov ax, 7 0 00003B58 EBEA jmp _.L64 413 _.L71: 0 00003B5A B80900 mov ax, 9 0 00003B5D EBE5 jmp _.L64 416 .size _init_getdriveparm, .-_init_getdriveparm 417 .type _make_ddt, @function 418 _make_ddt: 0 00003B5F 56 push si 0 00003B60 57 push di 0 00003B61 55 push bp 0 00003B62 89E5 mov bp, sp 0 00003B64 1E push ds 0 00003B65 8B7E08 mov di, word ptr [bp+8] 0 00003B68 8B560C mov dx, word ptr [bp+12] 0 00003B6B C705FFFF mov word ptr [di], -1 0 00003B6F C745020000 mov word ptr [di+2], 0 0 00003B74 8B460A mov ax, word ptr [bp+10] 0 00003B77 884505 mov byte ptr [di+5], al 0 00003B7A 8856FF mov byte ptr [bp-1], dl 0 00003B7D 885504 mov byte ptr [di+4], dl 0 00003B80 8D7537 lea si, [55+di] 0 00003B83 56 push si 0 00003B84 52 push dx 0 00003B85 E8FEFF call _init_getdriveparm 0 00003B88 884532 mov byte ptr [di+50], al 0 00003B8B A807 test al, 7 0 00003B8D 7540 jne _.L75 0 00003B8F B82800 mov ax, 40 440 _.L74: 0 00003B92 894535 mov word ptr [di+53], ax 0 00003B95 FF76FF push word ptr [bp-1] 0 00003B98 E8FEFF call _init_readdasd 0 00003B9B 0B460E or ax, word ptr [bp+14] 0 00003B9E 894533 mov word ptr [di+51], ax 0 00003BA1 C78584000000 mov word ptr [di+132], 0 0 00003BA7 C78586000000 mov word ptr [di+134], 0 0 00003BAD C745777856 mov word ptr [di+119], 22136 0 00003BB2 C745793412 mov word ptr [di+121], 4660 0 00003BB7 B82900 mov ax, 41 0 00003BBA 50 push ax 0 00003BBB 56 push si 0 00003BBC 8D4506 lea ax, [6+di] 0 00003BBF 50 push ax 0 00003BC0 E8FEFF call _init_memcpy 0 00003BC3 57 push di 0 00003BC4 E8EEFB call _push_ddt 0 00003BC7 89EC mov sp, bp 0 00003BC9 5D pop bp 0 00003BCA 5F pop di 0 00003BCB 5E pop si 0 00003BCC C20800 ret 8 463 _.L75: 0 00003BCF B85000 mov ax, 80 0 00003BD2 EBBE jmp _.L74 466 .size _make_ddt, .-_make_ddt 467 .global _init_LBA_to_CHS 468 .type _init_LBA_to_CHS, @function 469 _init_LBA_to_CHS: 0 00003BD4 56 push si 0 00003BD5 57 push di 0 00003BD6 55 push bp 0 00003BD7 89E5 mov bp, sp 0 00003BD9 83EC08 sub sp, 8 0 00003BDC 8B5E0A mov bx, word ptr [bp+10] 0 00003BDF 8B4E0C mov cx, word ptr [bp+12] 0 00003BE2 8B7E0E mov di, word ptr [bp+14] 0 00003BE5 8B450B mov ax, word ptr [di+11] 0 00003BE8 F76509 mul word ptr [di+9] 0 00003BEB 8946FC mov word ptr [bp-4], ax 0 00003BEE 31F6 xor si, si 0 00003BF0 56 push si 0 00003BF1 50 push ax 0 00003BF2 51 push cx 0 00003BF3 894EF8 mov word ptr [bp-8], cx 0 00003BF6 53 push bx 0 00003BF7 895EFA mov word ptr [bp-6], bx 0 00003BFA E8FEFF call ___umodsi3 0 00003BFD 8946FE mov word ptr [bp-2], ax 0 00003C00 56 push si 0 00003C01 FF76FC push word ptr [bp-4] 0 00003C04 8B4EF8 mov cx, word ptr [bp-8] 0 00003C07 51 push cx 0 00003C08 8B5EFA mov bx, word ptr [bp-6] 0 00003C0B 53 push bx 0 00003C0C E8FEFF call ___udivsi3 0 00003C0F 39F2 cmp dx, si 0 00003C11 7403 je _.L78 0 00003C13 B8FFFF mov ax, -1 500 _.L78: 0 00003C16 8B5E08 mov bx, word ptr [bp+8] 0 00003C19 8907 mov word ptr [bx], ax 0 00003C1B 8B46FE mov ax, word ptr [bp-2] 0 00003C1E 31D2 xor dx, dx 0 00003C20 F7750B div word ptr [di+11] 0 00003C23 894702 mov word ptr [bx+2], ax 0 00003C26 8B46FE mov ax, word ptr [bp-2] 0 00003C29 31D2 xor dx, dx 0 00003C2B F7750B div word ptr [di+11] 0 00003C2E 42 inc dx 0 00003C2F 895704 mov word ptr [bx+4], dx 0 00003C32 89EC mov sp, bp 0 00003C34 5D pop bp 0 00003C35 5F pop di 0 00003C36 5E pop si 0 00003C37 C20800 ret 8 517 .size _init_LBA_to_CHS, .-_init_LBA_to_CHS === Switch to base=012B40h -> ".RODATA.STR1.1" 518 .section .rodata.str1.1 519 _.LC8: 0 00000E77 25732534752D2575 .string "%s%4u-%u-%u" 0 00000E7F 2D257500 === Switch to base=002270h -> ".TEXT" 521 .text 522 .global _printCHS 523 .type _printCHS, @function 524 _printCHS: 0 00003C3A 55 push bp 0 00003C3B 89E5 mov bp, sp 0 00003C3D 8B5E06 mov bx, word ptr [bp+6] 0 00003C40 803E150000 cmp byte ptr [_InitKernelConfig+21], 0 0 00003C45 7815 js _.L81 0 00003C47 FF7704 push word ptr [bx+4] 0 00003C4A FF7702 push word ptr [bx+2] 0 00003C4D FF37 push word ptr [bx] 0 00003C4F FF7604 push word ptr [bp+4] 0 00003C52 B84301 mov ax, offset _.LC8 0 00003C55 50 push ax 0 00003C56 E8FEFF call _init_printf 0 00003C59 83C40A add sp, 10 538 _.L81: 0 00003C5C 89EC mov sp, bp 0 00003C5E 5D pop bp 0 00003C5F C20400 ret 4 542 .size _printCHS, .-_printCHS === Switch to base=012B40h -> ".RODATA.STR1.1" 543 .section .rodata.str1.1 544 _.LC9: 0 00000E83 4641543132202020 .string "FAT12 " 0 00000E8B 00 546 _.LC10: 0 00000E8C 4641543332202020 .string "FAT32 " 0 00000E94 00 548 _.LC11: 0 00000E95 4641543136202020 .string "FAT16 " 0 00000E9D 00 === Switch to base=002270h -> ".TEXT" 550 .text 551 .global _CalculateFATData 552 .type _CalculateFATData, @function 553 _CalculateFATData: 0 00003C62 56 push si 0 00003C63 57 push di 0 00003C64 55 push bp 0 00003C65 89E5 mov bp, sp 0 00003C67 83EC12 sub sp, 18 0 00003C6A 8B460A mov ax, word ptr [bp+10] 0 00003C6D 8B560C mov dx, word ptr [bp+12] 0 00003C70 8A4E0E mov cl, byte ptr [bp+14] 0 00003C73 8B5E08 mov bx, word ptr [bp+8] 0 00003C76 C6473C02 mov byte ptr [bx+60], 2 0 00003C7A C7473D0002 mov word ptr [bx+61], 512 0 00003C7F C7473A0100 mov word ptr [bx+58], 1 0 00003C84 89C3 mov bx, ax 0 00003C86 83C3DF add bx, -33 0 00003C89 89D6 mov si, dx 0 00003C8B 83D6FF adc si, -1 0 00003C8E 80F901 cmp cl, 1 0 00003C91 7405 je _.L110 0 00003C93 80F9FF cmp cl, -1 0 00003C96 725C jc _.L85 574 _.L110: 0 00003C98 8B7E08 mov di, word ptr [bp+8] 0 00003C9B C6453908 mov byte ptr [di+57], 8 0 00003C9F 89D8 mov ax, bx 0 00003CA1 85F6 test si, si 0 00003CA3 7506 jne _.L88 0 00003CA5 81FB807F cmp bx, 32640 0 00003CA9 7603 jbe _.L87 582 _.L88: 0 00003CAB B8807F mov ax, 32640 584 _.L87: 0 00003CAE 83C010 add ax, 16 0 00003CB1 89C3 mov bx, ax 0 00003CB3 31C9 xor cx, cx 0 00003CB5 89CA mov dx, cx 0 00003CB7 D1E0 shl ax, 1 0 00003CB9 D1D2 rcl dx, 1 0 00003CBB 01D8 add ax, bx 0 00003CBD 11CA adc dx, cx 0 00003CBF 050520 add ax, 8197 0 00003CC2 11CA adc dx, cx 0 00003CC4 51 push cx 0 00003CC5 B90620 mov cx, 8198 0 00003CC8 51 push cx 0 00003CC9 52 push dx 0 00003CCA 50 push ax 0 00003CCB E8FEFF call ___udivsi3 0 00003CCE 8B5E08 mov bx, word ptr [bp+8] 0 00003CD1 894742 mov word ptr [bx+66], ax 0 00003CD4 B80800 mov ax, 8 0 00003CD7 50 push ax 0 00003CD8 B84F01 mov ax, offset _.LC9 606 _.L117: 0 00003CDB 50 push ax 0 00003CDC 93 xchg bx, ax 0 00003CDD 83C07B add ax, 123 0 00003CE0 50 push ax 0 00003CE1 E8FEFF call _init_memcpy 0 00003CE4 8B5E08 mov bx, word ptr [bp+8] 0 00003CE7 C687830000 mov byte ptr [bx+131], 0 0 00003CEC 89EC mov sp, bp 0 00003CEE 5D pop bp 0 00003CEF 5F pop di 0 00003CF0 5E pop si 0 00003CF1 C20800 ret 8 619 _.L85: 0 00003CF4 80C1F5 add cl, -11 0 00003CF7 884EFA mov byte ptr [bp-6], cl 0 00003CFA 80F901 cmp cl, 1 0 00003CFD 7603E96C01 ja _.L90 0 00003D02 89D3 mov bx, dx 0 00003D04 B105 mov cl, 5 0 00003D06 D3EB shr bx, cl 0 00003D08 B140 mov cl, 64 0 00003D0A 83FB20 cmp bx, 32 0 00003D0D 7710 ja _.L91 0 00003D0F B120 mov cl, 32 0 00003D11 83FB10 cmp bx, 16 0 00003D14 7709 ja _.L91 0 00003D16 B110 mov cl, 16 0 00003D18 83FB08 cmp bx, 8 0 00003D1B 7702 ja _.L91 0 00003D1D B108 mov cl, 8 637 _.L91: 0 00003D1F 83FA08 cmp dx, 8 0 00003D22 7709 ja _.L92 0 00003D24 7505 jne _.L111 0 00003D26 3D0020 cmp ax, 8192 0 00003D29 7702 ja _.L92 643 _.L111: 0 00003D2B B101 mov cl, 1 645 _.L92: 0 00003D2D 8B5E08 mov bx, word ptr [bp+8] 0 00003D30 884F39 mov byte ptr [bx+57], cl 0 00003D33 C7473D0000 mov word ptr [bx+61], 0 0 00003D38 C7473A2000 mov word ptr [bx+58], 32 0 00003D3D 83C0E0 add ax, -32 0 00003D40 8946FE mov word ptr [bp-2], ax 0 00003D43 83D2FF adc dx, -1 0 00003D46 8956FC mov word ptr [bp-4], dx 0 00003D49 C746F88000 mov word ptr [bp-8], 128 0 00003D4E C746F4F9FF mov word ptr [bp-12], -7 0 00003D53 C746F2FF0F mov word ptr [bp-14], 4095 657 _.L105: 0 00003D58 8B5E08 mov bx, word ptr [bp+8] 0 00003D5B 8A4739 mov al, byte ptr [bx+57] 0 00003D5E 8846FB mov byte ptr [bp-5], al 0 00003D61 30E4 xor ah, ah 0 00003D63 F766F8 mul word ptr [bp-8] 0 00003D66 83C002 add ax, 2 0 00003D69 96 xchg si, ax 0 00003D6A 31C0 xor ax, ax 0 00003D6C 50 push ax 0 00003D6D 56 push si 0 00003D6E FF76FC push word ptr [bp-4] 0 00003D71 FF76FE push word ptr [bp-2] 0 00003D74 E8FEFF call ___udivsi3 0 00003D77 8946F6 mov word ptr [bp-10], ax 0 00003D7A 8956F0 mov word ptr [bp-16], dx 0 00003D7D 8A46FB mov al, byte ptr [bp-5] 0 00003D80 30E4 xor ah, ah 0 00003D82 D1E0 shl ax, 1 0 00003D84 01F0 add ax, si 0 00003D86 8946EE mov word ptr [bp-18], ax 0 00003D89 31FF xor di, di 0 00003D8B 57 push di 0 00003D8C 56 push si 0 00003D8D FF76FC push word ptr [bp-4] 0 00003D90 FF76FE push word ptr [bp-2] 0 00003D93 E8FEFF call ___umodsi3 0 00003D96 91 xchg cx, ax 0 00003D97 034EEE add cx, word ptr [bp-18] 0 00003D9A 89F8 mov ax, di 0 00003D9C 11D0 adc ax, dx 0 00003D9E 83C1FF add cx, -1 0 00003DA1 83D0FF adc ax, -1 0 00003DA4 93 xchg bx, ax 0 00003DA5 57 push di 0 00003DA6 56 push si 0 00003DA7 53 push bx 0 00003DA8 51 push cx 0 00003DA9 E8FEFF call ___udivsi3 0 00003DAC 93 xchg bx, ax 0 00003DAD 89D1 mov cx, dx 0 00003DAF 035EF6 add bx, word ptr [bp-10] 0 00003DB2 895EF6 mov word ptr [bp-10], bx 0 00003DB5 134EF0 adc cx, word ptr [bp-16] 0 00003DB8 89DA mov dx, bx 0 00003DBA D1E2 shl dx, 1 0 00003DBC 89C8 mov ax, cx 0 00003DBE 894EEE mov word ptr [bp-18], cx 0 00003DC1 D1D0 rcl ax, 1 0 00003DC3 8B4EFE mov cx, word ptr [bp-2] 0 00003DC6 29D1 sub cx, dx 0 00003DC8 89CA mov dx, cx 0 00003DCA 8B5EFC mov bx, word ptr [bp-4] 0 00003DCD 19C3 sbb bx, ax 0 00003DCF 8A46FB mov al, byte ptr [bp-5] 0 00003DD2 30E4 xor ah, ah 0 00003DD4 57 push di 0 00003DD5 50 push ax 0 00003DD6 53 push bx 0 00003DD7 52 push dx 0 00003DD8 E8FEFF call ___udivsi3 0 00003DDB 97 xchg di, ax 0 00003DDC 8956F0 mov word ptr [bp-16], dx 0 00003DDF 8B46F8 mov ax, word ptr [bp-8] 0 00003DE2 8B4EEE mov cx, word ptr [bp-18] 0 00003DE5 F7E1 mul cx 0 00003DE7 8946EE mov word ptr [bp-18], ax 0 00003DEA 8B46F8 mov ax, word ptr [bp-8] 0 00003DED F766F6 mul word ptr [bp-10] 0 00003DF0 93 xchg bx, ax 0 00003DF1 89D6 mov si, dx 0 00003DF3 0376EE add si, word ptr [bp-18] 0 00003DF6 8B46F4 mov ax, word ptr [bp-12] 0 00003DF9 8B56F2 mov dx, word ptr [bp-14] 0 00003DFC 39F2 cmp dx, si 0 00003DFE 7706 ja _.L99 0 00003E00 7507 jne _.L98 0 00003E02 39D8 cmp ax, bx 0 00003E04 7603 jbe _.L98 736 _.L99: 0 00003E06 93 xchg bx, ax 0 00003E07 89F2 mov dx, si 739 _.L98: 0 00003E09 83C0FE add ax, -2 0 00003E0C 83D2FF adc dx, -1 0 00003E0F 3956F0 cmp word ptr [bp-16], dx 0 00003E12 7603E99A00 ja _.L97 0 00003E17 7507 jne _.L101 0 00003E19 39C7 cmp di, ax 0 00003E1B 7603E99100 ja _.L97 747 _.L101: 0 00003E20 837EF000 cmp word ptr [bp-16], 0 0 00003E24 7509 jne _.L106 0 00003E26 81FFF50F cmp di, 4085 0 00003E2A 7703E98200 jbe _.L97 752 _.L106: 0 00003E2F 8B5E08 mov bx, word ptr [bp+8] 0 00003E32 807EFA01 cmp byte ptr [bp-6], 1 0 00003E36 B80800 mov ax, 8 0 00003E39 7769 ja _.L104 0 00003E3B C747420000 mov word ptr [bx+66], 0 0 00003E40 8B56F6 mov dx, word ptr [bp-10] 0 00003E43 895750 mov word ptr [bx+80], dx 0 00003E46 894F52 mov word ptr [bx+82], cx 0 00003E49 C747540000 mov word ptr [bx+84], 0 0 00003E4E C747560000 mov word ptr [bx+86], 0 0 00003E53 C747580200 mov word ptr [bx+88], 2 0 00003E58 C7475A0000 mov word ptr [bx+90], 0 0 00003E5D C7475C0100 mov word ptr [bx+92], 1 0 00003E62 C7475E0600 mov word ptr [bx+94], 6 0 00003E67 50 push ax 0 00003E68 B85801 mov ax, offset _.LC10 0 00003E6B E96DFE jmp _.L117 770 _.L90: 0 00003E6E 8B7E08 mov di, word ptr [bp+8] 0 00003E71 C6453904 mov byte ptr [di+57], 4 0 00003E75 895EFE mov word ptr [bp-2], bx 0 00003E78 8976FC mov word ptr [bp-4], si 0 00003E7B 83FE7F cmp si, 127 0 00003E7E 7708 ja _.L96 0 00003E80 7510 jne _.L95 0 00003E82 81FB80F8 cmp bx, -1920 0 00003E86 760A jbe _.L95 780 _.L96: 0 00003E88 C746FE80F8 mov word ptr [bp-2], -1920 0 00003E8D C746FC7F00 mov word ptr [bp-4], 127 783 _.L95: 0 00003E92 C746F80001 mov word ptr [bp-8], 256 0 00003E97 C746F4EFFF mov word ptr [bp-12], -17 0 00003E9C C746F20000 mov word ptr [bp-14], 0 0 00003EA1 E9B4FE jmp _.L105 788 _.L104: 0 00003EA4 8B56F6 mov dx, word ptr [bp-10] 0 00003EA7 895742 mov word ptr [bx+66], dx 0 00003EAA 50 push ax 0 00003EAB B86101 mov ax, offset _.LC11 0 00003EAE E92AFE jmp _.L117 794 _.L97: 0 00003EB1 8A46FB mov al, byte ptr [bp-5] 0 00003EB4 D0E0 shl al, 1 0 00003EB6 8B5E08 mov bx, word ptr [bp+8] 0 00003EB9 884739 mov byte ptr [bx+57], al 0 00003EBC FEC8 dec al 0 00003EBE 84C0 test al, al 0 00003EC0 7C03E993FE jge _.L105 0 00003EC5 E967FF jmp _.L106 803 .size _CalculateFATData, .-_CalculateFATData === Switch to base=012B40h -> ".RODATA.STR1.1" 804 .section .rodata.str1.1 805 _.LC12: 0 00000E9E 50726900 .string "Pri" 807 _.LC13: 0 00000EA2 45787400 .string "Ext" 809 _.LC14: 0 00000EA6 6D6F726520506172 .string "more Partitions detected then possible, max = %d\n" 0 00000EAE 746974696F6E7320 0 00000EB6 6465746563746564 0 00000EBE 207468656E20706F 0 00000EC6 737369626C652C20 0 00000ECE 6D6178203D202564 0 00000ED6 0A00 811 _.LC15: 0 00000ED8 25633A2048442564 .string "%c: HD%d, %s[%2d]" 0 00000EE0 2C2025735B253264 0 00000EE8 5D00 813 _.LC16: 0 00000EEA 2C204348533D2000 .string ", CHS= " 815 _.LC17: 0 00000EF2 2C2073746172743D .string ", start=%6lu MB, size=%6lu MB\n" 0 00000EFA 25366C75204D422C 0 00000F02 2073697A653D2536 0 00000F0A 6C75204D420A00 === Switch to base=002270h -> ".TEXT" 817 .text 818 .global _DosDefinePartition 819 .type _DosDefinePartition, @function 820 _DosDefinePartition: 0 00003EC8 56 push si 0 00003EC9 57 push di 0 00003ECA 55 push bp 0 00003ECB 89E5 mov bp, sp 0 00003ECD 81EC9400 sub sp, 148 0 00003ED1 8B7E08 mov di, word ptr [bp+8] 0 00003ED4 C4460A les ax, dword ptr [bp+10] 0 00003ED7 89866EFF mov word ptr [bp-146], ax 0 00003EDB 8C8670FF mov word ptr [bp-144], es 0 00003EDF 8B760E mov si, word ptr [bp+14] 0 00003EE2 A10000 mov ax, word ptr [_nUnits] 0 00003EE5 83F819 cmp ax, 25 0 00003EE8 7E16 jle _.L119 0 00003EEA B81A00 mov ax, 26 0 00003EED 50 push ax 0 00003EEE B87201 mov ax, offset _.LC14 0 00003EF1 50 push ax 0 00003EF2 E8FEFF call _init_printf 0 00003EF5 83C404 add sp, 4 840 _.L118: 0 00003EF8 89EC mov sp, bp 0 00003EFA 5D pop bp 0 00003EFB 5F pop di 0 00003EFC 5E pop si 0 00003EFD C20C00 ret 12 846 _.L119: 0 00003F00 C78678FFFFFF mov word ptr [bp-136], -1 0 00003F06 C7867AFF0000 mov word ptr [bp-134], 0 0 00003F0C 8A15 mov dl, byte ptr [di] 0 00003F0E 88967CFF mov byte ptr [bp-132], dl 0 00003F12 88867DFF mov byte ptr [bp-131], al 0 00003F16 8B4501 mov ax, word ptr [di+1] 0 00003F19 8946AB mov word ptr [bp-85], ax 0 00003F1C BB0000 mov bx, offset _InitKernelConfig 0 00003F1F 807F0B00 cmp byte ptr [bx+11], 0 0 00003F23 899E6CFF mov word ptr [bp-148], bx 0 00003F27 751F jne _.L121 0 00003F29 8A5401 mov dl, byte ptr [si+1] 0 00003F2C 88D6 mov dh, dl 0 00003F2E 80E6FD and dh, -3 0 00003F31 80FE0C cmp dh, 12 0 00003F34 7412 je _.L121 0 00003F36 80FAFF cmp dl, -1 0 00003F39 730D jnc _.L121 0 00003F3B 833E000000 cmp word ptr [_ExtLBAForce], 0 0 00003F40 7506 jne _.L121 0 00003F42 80E4FB and ah, -5 0 00003F45 8946AB mov word ptr [bp-85], ax 869 _.L121: 0 00003F48 8B4507 mov ax, word ptr [di+7] 0 00003F4B 8946AD mov word ptr [bp-83], ax 0 00003F4E C4866EFF les ax, dword ptr [bp-146] 0 00003F52 8946FC mov word ptr [bp-4], ax 0 00003F55 8C46FE mov word ptr [bp-2], es 0 00003F58 C746AF0002 mov word ptr [bp-81], 512 0 00003F5D C646B9F8 mov byte ptr [bp-71], -8 0 00003F61 C44509 les ax, dword ptr [di+9] 0 00003F64 8946BE mov word ptr [bp-66], ax 0 00003F67 8C46BC mov word ptr [bp-68], es 0 00003F6A C4440E les ax, dword ptr [si+14] 0 00003F6D 8946C0 mov word ptr [bp-64], ax 0 00003F70 8C46C2 mov word ptr [bp-62], es 0 00003F73 C746B70000 mov word ptr [bp-73], 0 0 00003F78 8B5412 mov dx, word ptr [si+18] 0 00003F7B 8B4414 mov ax, word ptr [si+20] 0 00003F7E 8956C4 mov word ptr [bp-60], dx 0 00003F81 8946C6 mov word ptr [bp-58], ax 0 00003F84 85C0 test ax, ax 0 00003F86 750B jne _.L122 0 00003F88 8956B7 mov word ptr [bp-73], dx 0 00003F8B 8946C4 mov word ptr [bp-60], ax 0 00003F8E C746C60000 mov word ptr [bp-58], 0 893 _.L122: 0 00003F93 FF7401 push word ptr [si+1] 0 00003F96 50 push ax 0 00003F97 52 push dx 0 00003F98 8D8678FF lea ax, [-136+bp] 0 00003F9C 50 push ax 0 00003F9D E8FEFF call _CalculateFATData 0 00003FA0 C746EF7856 mov word ptr [bp-17], 22136 0 00003FA5 C746F13412 mov word ptr [bp-15], 4660 0 00003FAA FFB67CFF push word ptr [bp-132] 0 00003FAE E8FEFF call _init_readdasd 0 00003FB1 80CC02 or ah, 2 0 00003FB4 0946AB or word ptr [bp-85], ax 0 00003FB7 C646AA05 mov byte ptr [bp-86], 5 0 00003FBB B82900 mov ax, 41 0 00003FBE 50 push ax 0 00003FBF 8D46AF lea ax, [-81+bp] 0 00003FC2 50 push ax 0 00003FC3 8D8678FF lea ax, [-136+bp] 0 00003FC7 83C006 add ax, 6 0 00003FCA 50 push ax 0 00003FCB E8FEFF call _init_memcpy 0 00003FCE 8D8678FF lea ax, [-136+bp] 0 00003FD2 50 push ax 0 00003FD3 E8DFF7 call _push_ddt 0 00003FD6 8B9E6CFF mov bx, word ptr [bp-148] 0 00003FDA 807F0900 cmp byte ptr [bx+9], 0 0 00003FDE 7503E98500 je _.L124 0 00003FE3 57 push di 0 00003FE4 FFB670FF push word ptr [bp-144] 0 00003FE8 FFB66EFF push word ptr [bp-146] 0 00003FEC 8D8672FF lea ax, [-142+bp] 0 00003FF0 50 push ax 0 00003FF1 E8FEFF call _init_LBA_to_CHS 0 00003FF4 837E1000 cmp word ptr [bp+16], 0 0 00003FF8 7575 jne _.L126 0 00003FFA 8B4612 mov ax, word ptr [bp+18] 0 00003FFD 40 inc ax 0 00003FFE 894610 mov word ptr [bp+16], ax 0 00004001 B86A01 mov ax, offset _.LC12 933 _.L125: 0 00004004 FF7610 push word ptr [bp+16] 0 00004007 50 push ax 0 00004008 8A05 mov al, byte ptr [di] 0 0000400A 247F and al, 127 0 0000400C 30E4 xor ah, ah 0 0000400E 40 inc ax 0 0000400F 50 push ax 0 00004010 A10000 mov ax, word ptr [_nUnits] 0 00004013 83C041 add ax, 65 0 00004016 50 push ax 0 00004017 B8A401 mov ax, offset _.LC15 0 0000401A 50 push ax 0 0000401B E8FEFF call _init_printf 0 0000401E 8D8672FF lea ax, [-142+bp] 0 00004022 50 push ax 0 00004023 B8B601 mov ax, offset _.LC16 0 00004026 50 push ax 0 00004027 E8FEFF call _printCHS 0 0000402A 8B5414 mov dx, word ptr [si+20] 0 0000402D B405 mov ah, 5 0 0000402F 89D3 mov bx, dx 0 00004031 88E1 mov cl, ah 0 00004033 D3E3 shl bx, cl 0 00004035 8B7412 mov si, word ptr [si+18] 0 00004038 B00B mov al, 11 0 0000403A 88C1 mov cl, al 0 0000403C D3EE shr si, cl 0 0000403E 09DE or si, bx 0 00004040 D3EA shr dx, cl 0 00004042 52 push dx 0 00004043 56 push si 0 00004044 8B9E70FF mov bx, word ptr [bp-144] 0 00004048 88E1 mov cl, ah 0 0000404A D3E3 shl bx, cl 0 0000404C 8B966EFF mov dx, word ptr [bp-146] 0 00004050 88C1 mov cl, al 0 00004052 D3EA shr dx, cl 0 00004054 09DA or dx, bx 0 00004056 8B9E70FF mov bx, word ptr [bp-144] 0 0000405A D3EB shr bx, cl 0 0000405C 53 push bx 0 0000405D 52 push dx 0 0000405E B8BE01 mov ax, offset _.LC17 0 00004061 50 push ax 0 00004062 E8FEFF call _init_printf 0 00004065 83C414 add sp, 20 980 _.L124: 0 00004068 FF060000 inc word ptr [_nUnits] 0 0000406C E989FE jmp _.L118 983 _.L126: 0 0000406F B86E01 mov ax, offset _.LC13 0 00004072 EB90 jmp _.L125 986 .size _DosDefinePartition, .-_DosDefinePartition 987 .global _ConvPartTableEntryToIntern 988 .type _ConvPartTableEntryToIntern, @function 989 _ConvPartTableEntryToIntern: 0 00004074 56 push si 0 00004075 57 push di 0 00004076 55 push bp 0 00004077 89E5 mov bp, sp 0 00004079 1E push ds 0 0000407A 8B7608 mov si, word ptr [bp+8] 0 0000407D 8B7E0A mov di, word ptr [bp+10] 0 00004080 80BDFE0155 cmp byte ptr [di+510], 85 0 00004085 7507 jne _.L135 0 00004087 80BDFF01AA cmp byte ptr [di+511], -86 0 0000408C 7419 je _.L136 1001 _.L135: 0 0000408E B85800 mov ax, 88 0 00004091 50 push ax 0 00004092 31C0 xor ax, ax 0 00004094 50 push ax 0 00004095 8946FE mov word ptr [bp-2], ax 0 00004098 56 push si 0 00004099 E8FEFF call _init_memset 0 0000409C 8B46FE mov ax, word ptr [bp-2] 1010 _.L134: 0 0000409F 89EC mov sp, bp 0 000040A1 5D pop bp 0 000040A2 5F pop di 0 000040A3 5E pop si 0 000040A4 C20400 ret 4 1016 _.L136: 0 000040A7 8D9DBE01 lea bx, [446+di] 0 000040AB 81C7FE01 add di, 510 0 000040AF B102 mov cl, 2 1020 _.L138: 0 000040B1 8A07 mov al, byte ptr [bx] 0 000040B3 8804 mov byte ptr [si], al 0 000040B5 8A4704 mov al, byte ptr [bx+4] 0 000040B8 884401 mov byte ptr [si+1], al 0 000040BB 8A4701 mov al, byte ptr [bx+1] 0 000040BE B400 mov ah, 0 0 000040C0 894404 mov word ptr [si+4], ax 0 000040C3 8A4702 mov al, byte ptr [bx+2] 0 000040C6 243F and al, 63 0 000040C8 B400 mov ah, 0 0 000040CA 894406 mov word ptr [si+6], ax 0 000040CD 8A4702 mov al, byte ptr [bx+2] 0 000040D0 30E4 xor ah, ah 0 000040D2 D3E0 shl ax, cl 0 000040D4 250003 and ax, 768 0 000040D7 8A5703 mov dl, byte ptr [bx+3] 0 000040DA 30F6 xor dh, dh 0 000040DC 01D0 add ax, dx 0 000040DE 894402 mov word ptr [si+2], ax 0 000040E1 8A4705 mov al, byte ptr [bx+5] 0 000040E4 B400 mov ah, 0 0 000040E6 89440A mov word ptr [si+10], ax 0 000040E9 8A4706 mov al, byte ptr [bx+6] 0 000040EC 243F and al, 63 0 000040EE B400 mov ah, 0 0 000040F0 89440C mov word ptr [si+12], ax 0 000040F3 8A4706 mov al, byte ptr [bx+6] 0 000040F6 30E4 xor ah, ah 0 000040F8 D3E0 shl ax, cl 0 000040FA 250003 and ax, 768 0 000040FD 8A5707 mov dl, byte ptr [bx+7] 0 00004100 30F6 xor dh, dh 0 00004102 01D0 add ax, dx 0 00004104 894408 mov word ptr [si+8], ax 0 00004107 8B4708 mov ax, word ptr [bx+8] 0 0000410A 8B570A mov dx, word ptr [bx+10] 0 0000410D 89440E mov word ptr [si+14], ax 0 00004110 895410 mov word ptr [si+16], dx 0 00004113 8B470C mov ax, word ptr [bx+12] 0 00004116 8B570E mov dx, word ptr [bx+14] 0 00004119 894412 mov word ptr [si+18], ax 0 0000411C 895414 mov word ptr [si+20], dx 0 0000411F 83C310 add bx, 16 0 00004122 83C616 add si, 22 0 00004125 39DF cmp di, bx 0 00004127 7588 jne _.L138 0 00004129 B80100 mov ax, 1 0 0000412C E970FF jmp _.L134 1069 .size _ConvPartTableEntryToIntern, .-_ConvPartTableEntryToIntern 1070 .global _is_suspect 1071 .type _is_suspect, @function 1072 _is_suspect: 0 0000412F 56 push si 0 00004130 55 push bp 0 00004131 89E5 mov bp, sp 0 00004133 8B5E06 mov bx, word ptr [bp+6] 0 00004136 8B7608 mov si, word ptr [bp+8] 0 00004139 8B0C mov cx, word ptr [si] 0 0000413B 8B17 mov dx, word ptr [bx] 0 0000413D 39D1 cmp cx, dx 0 0000413F 7510 jne _.L142 0 00004141 8B4402 mov ax, word ptr [si+2] 0 00004144 3B4702 cmp ax, word ptr [bx+2] 0 00004147 7508 jne _.L142 0 00004149 8B4404 mov ax, word ptr [si+4] 0 0000414C 3B4704 cmp ax, word ptr [bx+4] 0 0000414F 7421 je _.L146 1088 _.L142: 0 00004151 81FAFF03 cmp dx, 1023 0 00004155 7616 jbe _.L145 0 00004157 81F9FF03 cmp cx, 1023 0 0000415B 7415 je _.L146 0 0000415D 80E603 and dh, 3 0 00004160 31CA xor dx, cx 0 00004162 83FA01 cmp dx, 1 0 00004165 19C0 sbb ax, ax 0 00004167 40 inc ax 1098 _.L141: 0 00004168 5D pop bp 0 00004169 5E pop si 0 0000416A C20400 ret 4 1102 _.L145: 0 0000416D B80100 mov ax, 1 0 00004170 EBF6 jmp _.L141 1105 _.L146: 0 00004172 31C0 xor ax, ax 0 00004174 EBF2 jmp _.L141 1108 .size _is_suspect, .-_is_suspect === Switch to base=012B40h -> ".RODATA.STR1.1" 1109 .section .rodata.str1.1 1110 _.LC18: 0 00000F11 5741524E494E473A .string "WARNING: using suspect partition %s FS %02x:" 0 00000F19 207573696E672073 0 00000F21 7573706563742070 0 00000F29 6172746974696F6E 0 00000F31 2025732046532025 0 00000F39 3032783A00 1112 _.LC19: 0 00000F3E 2077697468206361 .string " with calculated values " 0 00000F46 6C63756C61746564 0 00000F4E 2076616C75657320 0 00000F56 00 1114 _.LC20: 0 00000F57 20696E7374656164 .string " instead of " 0 00000F5F 206F662000 1116 _.LC21: 0 00000F64 0A00 .string "\n" === Switch to base=002270h -> ".TEXT" 1118 .text 1119 .global _print_warning_suspect 1120 .type _print_warning_suspect, @function 1121 _print_warning_suspect: 0 00004176 56 push si 0 00004177 57 push di 0 00004178 55 push bp 0 00004179 89E5 mov bp, sp 0 0000417B 8B760C mov si, word ptr [bp+12] 0 0000417E 8B7E0E mov di, word ptr [bp+14] 0 00004181 BB0000 mov bx, offset _InitKernelConfig 0 00004184 807F0B00 cmp byte ptr [bx+11], 0 0 00004188 7530 jne _.L149 0 0000418A 807F1500 cmp byte ptr [bx+21], 0 0 0000418E 7C2A jl _.L149 0 00004190 8A460A mov al, byte ptr [bp+10] 0 00004193 30E4 xor ah, ah 0 00004195 50 push ax 0 00004196 FF7608 push word ptr [bp+8] 0 00004199 B8DD01 mov ax, offset _.LC18 0 0000419C 50 push ax 0 0000419D E8FEFF call _init_printf 0 000041A0 56 push si 0 000041A1 B80A02 mov ax, offset _.LC19 0 000041A4 50 push ax 0 000041A5 E8FEFF call _printCHS 0 000041A8 57 push di 0 000041A9 B82302 mov ax, offset _.LC20 0 000041AC 50 push ax 0 000041AD E8FEFF call _printCHS 0 000041B0 B83002 mov ax, offset _.LC21 0 000041B3 50 push ax 0 000041B4 E8FEFF call _init_printf 0 000041B7 83C408 add sp, 8 1152 _.L149: 0 000041BA B80600 mov ax, 6 0 000041BD 50 push ax 0 000041BE 56 push si 0 000041BF 57 push di 0 000041C0 E8FEFF call _init_memcpy 0 000041C3 89EC mov sp, bp 0 000041C5 5D pop bp 0 000041C6 5F pop di 0 000041C7 5E pop si 0 000041C8 C20800 ret 8 1163 .size _print_warning_suspect, .-_print_warning_suspect === Switch to base=012B40h -> ".RODATA.STR1.1" 1164 .section .rodata.str1.1 1165 _.LC22: 0 00000F66 4578743A256400 .string "Ext:%d" 1167 _.LC23: 0 00000F6D 5072693A256400 .string "Pri:%d" 1169 _.LC24: 0 00000F74 4E6F74207573696E .string "Not using partition %s with 0 sectors\n" 0 00000F7C 6720706172746974 0 00000F84 696F6E2025732077 0 00000F8C 6974682030207365 0 00000F94 63746F72730A00 1171 _.LC25: 0 00000F9B 63616E2774207573 .string "can't use LBA partition without LBA support - part %s FS %02x" 0 00000FA3 65204C4241207061 0 00000FAB 72746974696F6E20 0 00000FB3 776974686F757420 0 00000FBB 4C42412073757070 0 00000FC3 6F7274202D207061 0 00000FCB 7274202573204653 0 00000FD3 202530327800 1173 _.LC26: 0 00000FD9 2073746172742000 .string " start " 1175 _.LC27: 0 00000FE1 2C20656E642000 .string ", end " 1177 _.LC28: 0 00000FE8 5741524E494E473A .string "WARNING: Partition ID does not suggest LBA - part %s FS %02x.\nPlease run FDISK to correct this - using LBA to access partition.\n" 0 00000FF0 2050617274697469 0 00000FF8 6F6E20494420646F 0 00001000 6573206E6F742073 0 00001008 756767657374204C 0 00001010 4241202D20706172 0 00001018 7420257320465320 0 00001020 253032782E0A506C 0 00001028 656173652072756E 0 00001030 20464449534B2074 0 00001038 6F20636F72726563 0 00001040 742074686973202D 0 00001048 207573696E67204C 0 00001050 424120746F206163 0 00001058 6365737320706172 0 00001060 746974696F6E2E0A 0 00001068 00 === Switch to base=002270h -> ".TEXT" 1179 .text 1180 .global _ScanForPrimaryPartitions 1181 .type _ScanForPrimaryPartitions, @function 1182 _ScanForPrimaryPartitions: 0 000041CB 56 push si 0 000041CC 57 push di 0 000041CD 55 push bp 0 000041CE 89E5 mov bp, sp 0 000041D0 83EC26 sub sp, 38 0 000041D3 8B760C mov si, word ptr [bp+12] 0 000041D6 C4460E les ax, dword ptr [bp+14] 0 000041D9 8946DE mov word ptr [bp-34], ax 0 000041DC 8C46DC mov word ptr [bp-36], es 0 000041DF 8B4612 mov ax, word ptr [bp+18] 0 000041E2 8946E4 mov word ptr [bp-28], ax 0 000041E5 C746E60000 mov word ptr [bp-26], 0 1195 _.L165: 0 000041EA 8A4401 mov al, byte ptr [si+1] 0 000041ED 3C0F cmp al, 15 0 000041EF 770F ja _.L152 0 000041F1 88C1 mov cl, al 0 000041F3 BA2180 mov dx, -32735 0 000041F6 D3EA shr dx, cl 0 000041F8 F6C201 test dl, 1 0 000041FB 7403E9D700 jne _.L153 1204 _.L152: 0 00004200 8A4EE6 mov cl, byte ptr [bp-26] 0 00004203 8B56E4 mov dx, word ptr [bp-28] 0 00004206 D3FA sar dx, cl 0 00004208 F6C201 test dl, 1 0 0000420B 7403E9C700 jne _.L153 0 00004210 837E0A00 cmp word ptr [bp+10], 0 0 00004214 7508 jne _.L154 0 00004216 803C00 cmp byte ptr [si], 0 0 00004219 7503E9B900 je _.L153 1214 _.L154: 0 0000421E 8B540E mov dx, word ptr [si+14] 0 00004221 8B4C10 mov cx, word ptr [si+16] 0 00004224 0356DE add dx, word ptr [bp-34] 0 00004227 8956E2 mov word ptr [bp-30], dx 0 0000422A 134EDC adc cx, word ptr [bp-36] 0 0000422D 894EE0 mov word ptr [bp-32], cx 0 00004230 3C0E cmp al, 14 0 00004232 7603E9A000 ja _.L153 0 00004237 BA5258 mov dx, 22610 0 0000423A 88C1 mov cl, al 0 0000423C D3EA shr dx, cl 0 0000423E F6C201 test dl, 1 0 00004241 7503E99100 je _.L153 0 00004246 837E1400 cmp word ptr [bp+20], 0 0 0000424A 7503E99A00 je _.L155 0 0000424F FF7614 push word ptr [bp+20] 0 00004252 B83202 mov ax, offset _.LC22 1232 _.L185: 0 00004255 50 push ax 0 00004256 8D46F4 lea ax, [-12+bp] 0 00004259 50 push ax 0 0000425A E8FEFF call _init_sprintf 0 0000425D 83C406 add sp, 6 0 00004260 FF7608 push word ptr [bp+8] 0 00004263 FF76E0 push word ptr [bp-32] 0 00004266 FF76E2 push word ptr [bp-30] 0 00004269 8D7EE8 lea di, [-24+bp] 0 0000426C 57 push di 0 0000426D E8FEFF call _init_LBA_to_CHS 0 00004270 FF7608 push word ptr [bp+8] 0 00004273 8B4412 mov ax, word ptr [si+18] 0 00004276 8B5414 mov dx, word ptr [si+20] 0 00004279 83C0FF add ax, -1 0 0000427C 83D2FF adc dx, -1 0 0000427F 0346E2 add ax, word ptr [bp-30] 0 00004282 1356E0 adc dx, word ptr [bp-32] 0 00004285 52 push dx 0 00004286 50 push ax 0 00004287 8D46EE lea ax, [-18+bp] 0 0000428A 50 push ax 0 0000428B E8FEFF call _init_LBA_to_CHS 0 0000428E 8D5402 lea dx, [2+si] 0 00004291 52 push dx 0 00004292 8956DA mov word ptr [bp-38], dx 0 00004295 57 push di 0 00004296 E8FEFF call _is_suspect 0 00004299 85C0 test ax, ax 0 0000429B 8B56DA mov dx, word ptr [bp-38] 0 0000429E 740C je _.L157 0 000042A0 52 push dx 0 000042A1 57 push di 0 000042A2 FF7401 push word ptr [si+1] 0 000042A5 8D46F4 lea ax, [-12+bp] 0 000042A8 50 push ax 0 000042A9 E8FEFF call _print_warning_suspect 1270 _.L157: 0 000042AC 8D5408 lea dx, [8+si] 0 000042AF 52 push dx 0 000042B0 8956DA mov word ptr [bp-38], dx 0 000042B3 8D7EEE lea di, [-18+bp] 0 000042B6 57 push di 0 000042B7 E8FEFF call _is_suspect 0 000042BA 85C0 test ax, ax 0 000042BC 7442 je _.L158 0 000042BE 8B4414 mov ax, word ptr [si+20] 0 000042C1 0B4412 or ax, word ptr [si+18] 0 000042C4 8B56DA mov dx, word ptr [bp-38] 0 000042C7 752B jne _.L159 0 000042C9 8D46F4 lea ax, [-12+bp] 0 000042CC 50 push ax 0 000042CD B84002 mov ax, offset _.LC24 0 000042D0 50 push ax 0 000042D1 E8FEFF call _init_printf 0 000042D4 83C404 add sp, 4 1289 _.L153: 0 000042D7 FF46E6 inc word ptr [bp-26] 0 000042DA 83C616 add si, 22 0 000042DD 837EE604 cmp word ptr [bp-26], 4 0 000042E1 7403E904FF jne _.L165 0 000042E6 E9EE00 jmp _.L151 1295 _.L155: 0 000042E9 8B46E6 mov ax, word ptr [bp-26] 0 000042EC 40 inc ax 0 000042ED 50 push ax 0 000042EE B83902 mov ax, offset _.LC23 0 000042F1 E961FF jmp _.L185 1301 _.L159: 0 000042F4 52 push dx 0 000042F5 57 push di 0 000042F6 FF7401 push word ptr [si+1] 0 000042F9 8D46F4 lea ax, [-12+bp] 0 000042FC 50 push ax 0 000042FD E8FEFF call _print_warning_suspect 1308 _.L158: 0 00004300 817EE8FF03 cmp word ptr [bp-24], 1023 0 00004305 770A ja _.L160 0 00004307 817EEEFF03 cmp word ptr [bp-18], 1023 0 0000430C 7703E99F00 jbe _.L161 1313 _.L160: 0 00004311 8B5E08 mov bx, word ptr [bp+8] 0 00004314 F6470204 test byte ptr [bx+2], 4 0 00004318 7533 jne _.L162 0 0000431A 8A4401 mov al, byte ptr [si+1] 0 0000431D 30E4 xor ah, ah 0 0000431F 50 push ax 0 00004320 8D46F4 lea ax, [-12+bp] 0 00004323 50 push ax 0 00004324 B86702 mov ax, offset _.LC25 0 00004327 50 push ax 0 00004328 E8FEFF call _init_printf 0 0000432B 8D46E8 lea ax, [-24+bp] 0 0000432E 50 push ax 0 0000432F B8A502 mov ax, offset _.LC26 0 00004332 50 push ax 0 00004333 E8FEFF call _printCHS 0 00004336 8D46EE lea ax, [-18+bp] 0 00004339 50 push ax 0 0000433A B8AD02 mov ax, offset _.LC27 0 0000433D 50 push ax 0 0000433E E8FEFF call _printCHS 0 00004341 B83002 mov ax, offset _.LC21 0 00004344 50 push ax 0 00004345 E8FEFF call _init_printf 0 00004348 83C408 add sp, 8 0 0000434B EB8A jmp _.L153 1340 _.L162: 0 0000434D 803E0B0001 cmp byte ptr [_InitKernelConfig+11], 1 0 00004352 735C jnc _.L161 0 00004354 8A4401 mov al, byte ptr [si+1] 0 00004357 88C4 mov ah, al 0 00004359 80E4FD and ah, -3 0 0000435C 80FC0C cmp ah, 12 0 0000435F 744F je _.L161 0 00004361 3CFF cmp al, -1 0 00004363 734B jnc _.L161 0 00004365 833E000000 cmp word ptr [_ExtLBAForce], 0 0 0000436A 7544 jne _.L161 0 0000436C 30E4 xor ah, ah 0 0000436E 50 push ax 0 0000436F 8D46F4 lea ax, [-12+bp] 0 00004372 50 push ax 0 00004373 B8B402 mov ax, offset _.LC28 0 00004376 50 push ax 0 00004377 E8FEFF call _init_printf 0 0000437A 8D46E8 lea ax, [-24+bp] 0 0000437D 50 push ax 0 0000437E B8A502 mov ax, offset _.LC26 0 00004381 50 push ax 0 00004382 E8FEFF call _printCHS 0 00004385 8D46EE lea ax, [-18+bp] 0 00004388 50 push ax 0 00004389 B8AD02 mov ax, offset _.LC27 0 0000438C 50 push ax 0 0000438D E8FEFF call _printCHS 0 00004390 B83002 mov ax, offset _.LC21 0 00004393 50 push ax 0 00004394 E8FEFF call _init_printf 0 00004397 8A6401 mov ah, byte ptr [si+1] 0 0000439A 83C408 add sp, 8 0 0000439D B0FF mov al, -1 0 0000439F 80FC01 cmp ah, 1 0 000043A2 7409 je _.L163 0 000043A4 B00C mov al, 12 0 000043A6 80FC0B cmp ah, 11 0 000043A9 7402 je _.L163 0 000043AB B00E mov al, 14 1381 _.L163: 0 000043AD 884401 mov byte ptr [si+1], al 1383 _.L161: 0 000043B0 8A4EE6 mov cl, byte ptr [bp-26] 0 000043B3 B80100 mov ax, 1 0 000043B6 D3E0 shl ax, cl 0 000043B8 0946E4 or word ptr [bp-28], ax 0 000043BB FF76E6 push word ptr [bp-26] 0 000043BE FF7614 push word ptr [bp+20] 0 000043C1 56 push si 0 000043C2 FF76E0 push word ptr [bp-32] 0 000043C5 FF76E2 push word ptr [bp-30] 0 000043C8 FF7608 push word ptr [bp+8] 0 000043CB E8FEFF call _DosDefinePartition 0 000043CE 837E0A01 cmp word ptr [bp+10], 1 0 000043D2 7603E900FF ja _.L153 1397 _.L151: 0 000043D7 8B46E4 mov ax, word ptr [bp-28] 0 000043DA 89EC mov sp, bp 0 000043DC 5D pop bp 0 000043DD 5F pop di 0 000043DE 5E pop si 0 000043DF C20E00 ret 14 1404 .size _ScanForPrimaryPartitions, .-_ScanForPrimaryPartitions === Switch to base=012B40h -> ".RODATA.STR1.1" 1405 .section .rodata.str1.1 1406 _.LC29: 0 00001069 6E6F206861726420 .string "no hard disks detected\n" 0 00001071 6469736B73206465 0 00001079 7465637465640A00 === Switch to base=002270h -> ".TEXT" 1408 .text 1409 .global _BIOS_nrdrives 1410 .type _BIOS_nrdrives, @function 1411 _BIOS_nrdrives: 0 000043E2 55 push bp 0 000043E3 89E5 mov bp, sp 0 000043E5 83EC18 sub sp, 24 0 000043E8 C646E908 mov byte ptr [bp-23], 8 0 000043EC C646EE80 mov byte ptr [bp-18], -128 0 000043F0 8D46E8 lea ax, [-24+bp] 0 000043F3 50 push ax 0 000043F4 B81300 mov ax, 19 0 000043F7 50 push ax 0 000043F8 E8FEFF call _init_call_intr 0 000043FB F646FE01 test byte ptr [bp-2], 1 0 000043FF 7410 je _.L187 0 00004401 B83503 mov ax, offset _.LC29 0 00004404 50 push ax 0 00004405 E8FEFF call _init_printf 0 00004408 83C402 add sp, 2 0 0000440B 31C0 xor ax, ax 1429 _.L186: 0 0000440D 89EC mov sp, bp 0 0000440F 5D pop bp 0 00004410 C3 ret 1433 _.L187: 0 00004411 8A46EE mov al, byte ptr [bp-18] 0 00004414 30E4 xor ah, ah 0 00004416 EBF5 jmp _.L186 1437 .size _BIOS_nrdrives, .-_BIOS_nrdrives 1438 .global _BIOS_drive_reset 1439 .type _BIOS_drive_reset, @function 1440 _BIOS_drive_reset: 0 00004418 55 push bp 0 00004419 89E5 mov bp, sp 0 0000441B 83EC18 sub sp, 24 0 0000441E 8A4604 mov al, byte ptr [bp+4] 0 00004421 0C80 or al, -128 0 00004423 8846EE mov byte ptr [bp-18], al 0 00004426 C646E900 mov byte ptr [bp-23], 0 0 0000442A 8D46E8 lea ax, [-24+bp] 0 0000442D 50 push ax 0 0000442E B81300 mov ax, 19 0 00004431 50 push ax 0 00004432 E8FEFF call _init_call_intr 0 00004435 89EC mov sp, bp 0 00004437 5D pop bp 0 00004438 C20200 ret 2 1456 .size _BIOS_drive_reset, .-_BIOS_drive_reset === Switch to base=012B40h -> ".RODATA.STR1.1" 1457 .section .rodata.str1.1 1458 _.LC30: 0 00001081 7265747279232025 .string "retry# %i sector %lu\n" 0 00001089 6920736563746F72 0 00001091 20256C750A00 1460 _.LC31: 0 00001097 4C4241206D6F6465 .string "LBA mode\n" 0 0000109F 0A00 1462 _.LC32: 0 000010A1 434853206D6F6465 .string "CHS mode\n" 0 000010A9 0A00 1464 _.LC33: 0 000010AB 4C42412D5472616E .string "LBA-Transfer error : address = %lu, cylinder %u > 1023\n" 0 000010B3 7366657220657272 0 000010BB 6F72203A20616464 0 000010C3 72657373203D2025 0 000010CB 6C752C2063796C69 0 000010D3 6E64657220257520 0 000010DB 3E20313032330A00 === Switch to base=002270h -> ".TEXT" 1466 .text 1467 .global _Read1LBASector 1468 .type _Read1LBASector, @function 1469 _Read1LBASector: 0 0000443B 56 push si 0 0000443C 57 push di 0 0000443D 55 push bp 0 0000443E 89E5 mov bp, sp 0 00004440 83EC28 sub sp, 40 0 00004443 8B760C mov si, word ptr [bp+12] 0 00004446 8B460E mov ax, word ptr [bp+14] 0 00004449 8946E0 mov word ptr [bp-32], ax 0 0000444C 8C56DC mov word ptr [bp-36], ss 0 0000444F C746DE0000 mov word ptr [bp-34], 0 0 00004454 BF0000 mov di, offset _dap.2011 0 00004457 8A460A mov al, byte ptr [bp+10] 0 0000445A 0C80 or al, -128 0 0000445C 8846DB mov byte ptr [bp-37], al 1484 _.L202: 0 0000445F BB0000 mov bx, offset _InitKernelConfig 0 00004462 807F1500 cmp byte ptr [bx+21], 0 0 00004466 7E17 jle _.L193 0 00004468 895ED8 mov word ptr [bp-40], bx 0 0000446B FF76E0 push word ptr [bp-32] 0 0000446E 56 push si 0 0000446F FF76DE push word ptr [bp-34] 0 00004472 B84D03 mov ax, offset _.LC30 0 00004475 50 push ax 0 00004476 E8FEFF call _init_printf 0 00004479 83C408 add sp, 8 0 0000447C 8B5ED8 mov bx, word ptr [bp-40] 1497 _.L193: 0 0000447F 895ED8 mov word ptr [bp-40], bx 0 00004482 8A46DB mov al, byte ptr [bp-37] 0 00004485 8846EE mov byte ptr [bp-18], al 0 00004488 FF7608 push word ptr [bp+8] 0 0000448B FF76E0 push word ptr [bp-32] 0 0000448E 56 push si 0 0000448F 8D46E2 lea ax, [-30+bp] 0 00004492 50 push ax 0 00004493 E8FEFF call _init_LBA_to_CHS 0 00004496 8B5E08 mov bx, word ptr [bp+8] 0 00004499 F6470204 test byte ptr [bx+2], 4 0 0000449D 8B5ED8 mov bx, word ptr [bp-40] 0 000044A0 7473 je _.L194 0 000044A2 807F0B00 cmp byte ptr [bx+11], 0 0 000044A6 750E jne _.L195 0 000044A8 833E000000 cmp word ptr [_ExtLBAForce], 0 0 000044AD 7507 jne _.L195 0 000044AF 817EE2FF03 cmp word ptr [bp-30], 1023 0 000044B4 765F jbe _.L194 1517 _.L195: 0 000044B6 807F1500 cmp byte ptr [bx+21], 0 0 000044BA 7E0A jle _.L196 0 000044BC B86303 mov ax, offset _.LC31 0 000044BF 50 push ax 0 000044C0 E8FEFF call _init_printf 0 000044C3 83C402 add sp, 2 1524 _.L196: 0 000044C6 C606020001 mov byte ptr [_dap.2011+2], 1 0 000044CB 8B4610 mov ax, word ptr [bp+16] 0 000044CE 894504 mov word ptr [di+4], ax 0 000044D1 8B46DC mov ax, word ptr [bp-36] 0 000044D4 894506 mov word ptr [di+6], ax 0 000044D7 C7060C000000 mov word ptr [_dap.2011+12], 0 0 000044DD C7060E000000 mov word ptr [_dap.2011+14], 0 0 000044E3 897508 mov word ptr [di+8], si 0 000044E6 8B46E0 mov ax, word ptr [bp-32] 0 000044E9 89450A mov word ptr [di+10], ax 0 000044EC C746E80042 mov word ptr [bp-24], 16896 0 000044F1 C746F00000 mov word ptr [bp-16], offset _dap.2011 0 000044F6 8B46DC mov ax, word ptr [bp-36] 0 000044F9 8946F6 mov word ptr [bp-10], ax 1539 _.L197: 0 000044FC 8D46E8 lea ax, [-24+bp] 0 000044FF 50 push ax 0 00004500 B81300 mov ax, 19 0 00004503 50 push ax 0 00004504 E8FEFF call _init_call_intr 0 00004507 F646FE01 test byte ptr [bp-2], 1 0 0000450B 7568 jne _.L201 1547 _.L203: 0 0000450D 8A46FE mov al, byte ptr [bp-2] 0 00004510 83E001 and ax, 1 0 00004513 EB2A jmp _.L192 1551 _.L194: 0 00004515 807F1500 cmp byte ptr [bx+21], 0 0 00004519 7E0A jle _.L198 0 0000451B B86D03 mov ax, offset _.LC32 0 0000451E 50 push ax 0 0000451F E8FEFF call _init_printf 0 00004522 83C402 add sp, 2 1558 _.L198: 0 00004525 8B46E2 mov ax, word ptr [bp-30] 0 00004528 3DFF03 cmp ax, 1023 0 0000452B 761A jbe _.L199 0 0000452D 50 push ax 0 0000452E FF76E0 push word ptr [bp-32] 0 00004531 56 push si 0 00004532 B87703 mov ax, offset _.LC33 0 00004535 50 push ax 0 00004536 E8FEFF call _init_printf 0 00004539 83C408 add sp, 8 0 0000453C B80100 mov ax, 1 1570 _.L192: 0 0000453F 89EC mov sp, bp 0 00004541 5D pop bp 0 00004542 5F pop di 0 00004543 5E pop si 0 00004544 C20A00 ret 10 1576 _.L199: 0 00004547 C746E80102 mov word ptr [bp-24], 513 0 0000454C 8B5610 mov dx, word ptr [bp+16] 0 0000454F 8956EA mov word ptr [bp-22], dx 0 00004552 89C2 mov dx, ax 0 00004554 B108 mov cl, 8 0 00004556 D3E2 shl dx, cl 0 00004558 0356E6 add dx, word ptr [bp-26] 0 0000455B B102 mov cl, 2 0 0000455D D3E8 shr ax, cl 0 0000455F 25C000 and ax, 192 0 00004562 01D0 add ax, dx 0 00004564 8946EC mov word ptr [bp-20], ax 0 00004567 8B46E4 mov ax, word ptr [bp-28] 0 0000456A 8846EF mov byte ptr [bp-17], al 0 0000456D 8B46DC mov ax, word ptr [bp-36] 0 00004570 8946F8 mov word ptr [bp-8], ax 0 00004573 EB87 jmp _.L197 1594 _.L201: 0 00004575 8B5E08 mov bx, word ptr [bp+8] 0 00004578 8A07 mov al, byte ptr [bx] 0 0000457A 30E4 xor ah, ah 0 0000457C 50 push ax 0 0000457D E8FEFF call _BIOS_drive_reset 0 00004580 FF46DE inc word ptr [bp-34] 0 00004583 837EDE05 cmp word ptr [bp-34], 5 0 00004587 7403E9D3FE jne _.L202 0 0000458C E97EFF jmp _.L203 1604 .size _Read1LBASector, .-_Read1LBASector === Switch to base=012B40h -> ".RODATA.STR1.1" 1605 .section .rodata.str1.1 1606 _.LC34: 0 000010E3 63616E2774206765 .string "can't get drive parameters for drive %02x\n" 0 000010EB 7420647269766520 0 000010F3 706172616D657465 0 000010FB 727320666F722064 0 00001103 7269766520253032 0 0000110B 780A00 1608 _.LC35: 0 0000110E 4572726F72207265 .string "Error reading partition table drive %02Xh sector %lu" 0 00001116 6164696E67207061 0 0000111E 72746974696F6E20 0 00001126 7461626C65206472 0 0000112E 6976652025303258 0 00001136 6820736563746F72 0 0000113E 20256C7500 1610 _.LC36: 0 00001143 696C6C6567616C20 .string "illegal partition table - drive %02x sector %lu\n" 0 0000114B 706172746974696F 0 00001153 6E207461626C6520 0 0000115B 2D20647269766520 0 00001163 2530327820736563 0 0000116B 746F7220256C750A 0 00001173 00 1612 _.LC37: 0 00001174 666F756E64206D6F .string "found more then 30 extended partitions, terminated\n" 0 0000117C 7265207468656E20 0 00001184 333020657874656E 0 0000118C 6465642070617274 0 00001194 6974696F6E732C20 0 0000119C 7465726D696E6174 0 000011A4 65640A00 === Switch to base=002270h -> ".TEXT" 1614 .text 1615 .global _ProcessDisk 1616 .type _ProcessDisk, @function 1617 _ProcessDisk: 0 0000458F 56 push si 0 00004590 57 push di 0 00004591 55 push bp 0 00004592 89E5 mov bp, sp 0 00004594 83EC74 sub sp, 116 0 00004597 8B760C mov si, word ptr [bp+12] 0 0000459A 837E0801 cmp word ptr [bp+8], 1 0 0000459E BF0000 mov di, 0 0 000045A1 19C0 sbb ax, ax 0 000045A3 F7D8 neg ax 0 000045A5 50 push ax 0 000045A6 8D469B lea ax, [-101+bp] 0 000045A9 50 push ax 0 000045AA FF760A push word ptr [bp+10] 0 000045AD E85FF2 call _LBA_Get_Drive_Parameters 0 000045B0 39F8 cmp ax, di 0 000045B2 7516 jne _.L210 0 000045B4 FF760A push word ptr [bp+10] 0 000045B7 B8AF03 mov ax, offset _.LC34 0 000045BA 50 push ax 0 000045BB E8FEFF call _init_printf 0 000045BE 83C404 add sp, 4 1640 _.L211: 0 000045C1 96 xchg si, ax 0 000045C2 89EC mov sp, bp 0 000045C4 5D pop bp 0 000045C5 5F pop di 0 000045C6 5E pop si 0 000045C7 C20600 ret 6 1647 _.L210: 0 000045CA 893E0000 mov word ptr [_ExtLBAForce], di 0 000045CE 897E96 mov word ptr [bp-106], di 0 000045D1 897E94 mov word ptr [bp-108], di 0 000045D4 897E98 mov word ptr [bp-104], di 0 000045D7 89FB mov bx, di 1653 _.L212: 0 000045D9 C746900300 mov word ptr [bp-112], 3 1655 _.L213: 0 000045DE BA0000 mov dx, offset _InitDiskTransferBuffer 0 000045E1 52 push dx 0 000045E2 89568C mov word ptr [bp-116], dx 0 000045E5 53 push bx 0 000045E6 895E8E mov word ptr [bp-114], bx 0 000045E9 FF7698 push word ptr [bp-104] 0 000045EC FF760A push word ptr [bp+10] 0 000045EF 8D469B lea ax, [-101+bp] 0 000045F2 50 push ax 0 000045F3 E8FEFF call _Read1LBASector 0 000045F6 894692 mov word ptr [bp-110], ax 0 000045F9 85C0 test ax, ax 0 000045FB 8B5E8E mov bx, word ptr [bp-114] 0 000045FE 8B568C mov dx, word ptr [bp-116] 0 00004601 7413 je _.L214 0 00004603 53 push bx 0 00004604 FF7698 push word ptr [bp-104] 0 00004607 FF760A push word ptr [bp+10] 0 0000460A B8DA03 mov ax, offset _.LC35 1675 _.L231: 0 0000460D 50 push ax 0 0000460E E8FEFF call _init_printf 0 00004611 83C408 add sp, 8 0 00004614 EBAB jmp _.L211 1680 _.L214: 0 00004616 895E8E mov word ptr [bp-114], bx 0 00004619 52 push dx 0 0000461A 8D46A8 lea ax, [-88+bp] 0 0000461D 50 push ax 0 0000461E E8FEFF call _ConvPartTableEntryToIntern 0 00004621 85C0 test ax, ax 0 00004623 8B5E8E mov bx, word ptr [bp-114] 0 00004626 7517 jne _.L215 0 00004628 FF4E90 dec word ptr [bp-112] 0 0000462B 75B1 jne _.L213 0 0000462D 837E0800 cmp word ptr [bp+8], 0 0 00004631 758E jne _.L211 0 00004633 53 push bx 0 00004634 FF7698 push word ptr [bp-104] 0 00004637 FF760A push word ptr [bp+10] 0 0000463A B80F04 mov ax, offset _.LC36 0 0000463D EBCE jmp _.L231 1698 _.L215: 0 0000463F 837E0802 cmp word ptr [bp+8], 1+1 0 00004643 18C0 sbb al, al 0 00004645 F6D8 neg al 0 00004647 837E0803 cmp word ptr [bp+8], 3 0 0000464B 9F lahf 0 0000464C D0E4 shl ah, 1 0 0000464E 99 cwd 0 0000464F F6DA neg dl 0 00004651 08D0 or al, dl 0 00004653 7504 jne _.L222 0 00004655 85FF test di, di 0 00004657 7415 je _.L216 1711 _.L222: 0 00004659 57 push di 0 0000465A 56 push si 0 0000465B 53 push bx 0 0000465C FF7698 push word ptr [bp-104] 0 0000465F 8D46A8 lea ax, [-88+bp] 0 00004662 50 push ax 0 00004663 FF7608 push word ptr [bp+8] 0 00004666 8D469B lea ax, [-101+bp] 0 00004669 50 push ax 0 0000466A E8FEFF call _ScanForPrimaryPartitions 0 0000466D 96 xchg si, ax 1723 _.L216: 0 0000466E 837E0802 cmp word ptr [bp+8], 2 0 00004672 7403E94AFF jne _.L211 0 00004677 8B4692 mov ax, word ptr [bp-110] 0 0000467A 894698 mov word ptr [bp-104], ax 1728 _.L221: 0 0000467D B81600 mov ax, 22 0 00004680 F76698 mul word ptr [bp-104] 0 00004683 93 xchg bx, ax 0 00004684 89EE mov si, bp 0 00004686 8A40A9 mov al, byte ptr [bx+si-87] 0 00004689 3C0F cmp al, 15 0 0000468B 9F lahf 0 0000468C D0E4 shl ah, 1 0 0000468E 99 cwd 0 0000468F F6DA neg dl 0 00004691 88D1 mov cl, dl 0 00004693 3C05 cmp al, 5 0 00004695 7404 je _.L223 0 00004697 84D2 test dl, dl 0 00004699 744B je _.L218 1744 _.L223: 0 0000469B B81600 mov ax, 22 0 0000469E F76698 mul word ptr [bp-104] 0 000046A1 96 xchg si, ax 0 000046A2 8D5AB6 lea bx, [-74+bp+si] 0 000046A5 8B07 mov ax, word ptr [bx] 0 000046A7 8B7702 mov si, word ptr [bx+2] 0 000046AA 8B5696 mov dx, word ptr [bp-106] 0 000046AD 01C2 add dx, ax 0 000046AF 895698 mov word ptr [bp-104], dx 0 000046B2 8B5E94 mov bx, word ptr [bp-108] 0 000046B5 11F3 adc bx, si 0 000046B7 8B5696 mov dx, word ptr [bp-106] 0 000046BA 0B5694 or dx, word ptr [bp-108] 0 000046BD 750E jne _.L220 0 000046BF 88CA mov dl, cl 0 000046C1 B600 mov dh, 0 0 000046C3 89160000 mov word ptr [_ExtLBAForce], dx 0 000046C7 894696 mov word ptr [bp-106], ax 0 000046CA 897694 mov word ptr [bp-108], si 1764 _.L220: 0 000046CD 47 inc di 0 000046CE 8B7692 mov si, word ptr [bp-110] 0 000046D1 83FF1F cmp di, 31 0 000046D4 7403E900FF jne _.L212 0 000046D9 B84004 mov ax, offset _.LC37 0 000046DC 50 push ax 0 000046DD E8FEFF call _init_printf 0 000046E0 83C402 add sp, 2 0 000046E3 E9DBFE jmp _.L211 1774 _.L218: 0 000046E6 FF4698 inc word ptr [bp-104] 0 000046E9 837E9804 cmp word ptr [bp-104], 4 0 000046ED 758E jne _.L221 0 000046EF 8B7692 mov si, word ptr [bp-110] 0 000046F2 E9CCFE jmp _.L211 1780 .size _ProcessDisk, .-_ProcessDisk === Switch to base=012B40h -> ".RODATA.STR1.1" 1781 .section .rodata.str1.1 1782 _.LC38: 0 000011A8 4472697665204C65 .string "Drive Letter Assignment - DOS order\n" 0 000011B0 7474657220417373 0 000011B8 69676E6D656E7420 0 000011C0 2D20444F53206F72 0 000011C8 6465720A00 1784 _.LC39: 0 000011CD 4472697665204C65 .string "Drive Letter Assignment - sorted by drive\n" 0 000011D5 7474657220417373 0 000011DD 69676E6D656E7420 0 000011E5 2D20736F72746564 0 000011ED 2062792064726976 0 000011F5 650A00 1786 _.LC40: 0 000011F8 4E6F20737570706F .string "No supported partitions found.\n" 0 00001200 7274656420706172 0 00001208 746974696F6E7320 0 00001210 666F756E642E0A00 === Switch to base=002270h -> ".TEXT" 1788 .text 1789 .global _ReadAllPartitionTables 1790 .type _ReadAllPartitionTables, @function 1791 _ReadAllPartitionTables: 0 000046F5 56 push si 0 000046F6 57 push di 0 000046F7 55 push bp 0 000046F8 89E5 mov bp, sp 0 000046FA 81ECA600 sub sp, 166 0 000046FE B80E00 mov ax, 14 0 00004701 50 push ax 0 00004702 31F6 xor si, si 0 00004704 8EC6 mov es, si 0 00004706 26FF367A00 push word ptr es:[122] 0 0000470B 26FF367800 push word ptr es:[120] 0 00004710 B80000 mov ax, offset _int1e_table 0 00004713 BF0000 mov di, offset _int1e_table@OZSEG16 0 00004716 57 push di 0 00004717 50 push ax 0 00004718 898660FF mov word ptr [bp-160], ax 0 0000471C E8FEFF call _init_fmemcpy 0 0000471F 8EC7 mov es, di 0 00004721 26C606030002 mov byte ptr es:[_int1e_table+3], 2 0 00004727 26803E040008 cmp byte ptr es:[_int1e_table+4], 8 0 0000472D 8B8660FF mov ax, word ptr [bp-160] 0 00004731 7706 ja _.L233 0 00004733 26C606040009 mov byte ptr es:[_int1e_table+4], 9 1815 _.L233: 0 00004739 57 push di 0 0000473A 50 push ax 0 0000473B B01E mov al, 30 0 0000473D 50 push ax 0 0000473E E8FEFF call _setvec 0 00004741 56 push si 0 00004742 56 push si 0 00004743 56 push si 0 00004744 8D9678FF lea dx, [-136+bp] 0 00004748 52 push dx 0 00004749 89965EFF mov word ptr [bp-162], dx 0 0000474D E80FF4 call _make_ddt 0 00004750 BF0402 mov di, offset _regs.2056 0 00004753 57 push di 0 00004754 B81100 mov ax, 17 0 00004757 50 push ax 0 00004758 E8FEFF call _init_call_intr 0 0000475B 8A05 mov al, byte ptr [di] 0 0000475D 888660FF mov byte ptr [bp-160], al 0 00004761 F68660FF01 test byte ptr [bp-160], 1 0 00004766 7503E99B00 je _.L234 0 0000476B A8C0 test al, -64 0 0000476D 8B965EFF mov dx, word ptr [bp-162] 0 00004771 7503E99000 je _.L234 0 00004776 56 push si 0 00004777 B80100 mov ax, 1 0 0000477A 50 push ax 0 0000477B 50 push ax 0 0000477C 52 push dx 1845 _.L272: 0 0000477D E8DFF3 call _make_ddt 0 00004780 C70600000200 mov word ptr [_nUnits], 2 0 00004786 E8FEFF call _BIOS_nrdrives 0 00004789 83F808 cmp ax, 8 0 0000478C 7603 jbe _.L236 0 0000478E B80800 mov ax, 8 1852 _.L236: 0 00004791 C78660FF0000 mov word ptr [bp-160], 0 1854 _.L237: 0 00004797 398660FF cmp word ptr [bp-160], ax 0 0000479B 757A jne _.L238 0 0000479D BB0000 mov bx, offset _InitKernelConfig 0 000047A0 807F0800 cmp byte ptr [bx+8], 0 0 000047A4 899E5EFF mov word ptr [bp-162], bx 0 000047A8 7403E9E400 jne _.L239 0 000047AD 807F1500 cmp byte ptr [bx+21], 0 0 000047B1 7E0A jle _.L240 0 000047B3 B87404 mov ax, offset _.LC38 0 000047B6 50 push ax 0 000047B7 E8FEFF call _init_printf 0 000047BA 83C402 add sp, 2 1867 _.L240: 0 000047BD 31DB xor bx, bx 1869 _.L241: 0 000047BF 399E60FF cmp word ptr [bp-160], bx 0 000047C3 7573 jne _.L243 0 000047C5 31D2 xor dx, dx 1873 _.L244: 0 000047C7 399660FF cmp word ptr [bp-160], dx 0 000047CB 7403E99500 jne _.L245 0 000047D0 31F6 xor si, si 1877 _.L246: 0 000047D2 39B660FF cmp word ptr [bp-160], si 0 000047D6 7403E99F00 jne _.L247 1880 _.L260: 0 000047DB 8B9E5EFF mov bx, word ptr [bp-162] 0 000047DF 807F1500 cmp byte ptr [bx+21], 0 0 000047E3 7C1B jl _.L232 0 000047E5 31C0 xor ax, ax 0 000047E7 89C3 mov bx, ax 1886 _.L249: 0 000047E9 399E60FF cmp word ptr [bp-160], bx 0 000047ED 7403E96601 jne _.L261 0 000047F2 85C0 test ax, ax 0 000047F4 750A jne _.L232 0 000047F6 B8C404 mov ax, offset _.LC40 0 000047F9 50 push ax 0 000047FA E8FEFF call _init_printf 0 000047FD 83C402 add sp, 2 1895 _.L232: 0 00004800 89EC mov sp, bp 0 00004802 5D pop bp 0 00004803 5F pop di 0 00004804 5E pop si 0 00004805 C3 ret 1901 _.L234: 0 00004806 B81000 mov ax, 16 0 00004809 50 push ax 0 0000480A 56 push si 0 0000480B B80100 mov ax, 1 0 0000480E 50 push ax 0 0000480F 8D8678FF lea ax, [-136+bp] 0 00004813 50 push ax 0 00004814 E966FF jmp _.L272 1910 _.L238: 0 00004817 89865EFF mov word ptr [bp-162], ax 0 0000481B FFB660FF push word ptr [bp-160] 0 0000481F E8FEFF call _BIOS_drive_reset 0 00004822 89EF mov di, bp 0 00004824 8B9E60FF mov bx, word ptr [bp-160] 0 00004828 C68163FF00 mov byte ptr [bx+di-157], 0 0 0000482D FF8660FF inc word ptr [bp-160] 0 00004831 8B865EFF mov ax, word ptr [bp-162] 0 00004835 E95FFF jmp _.L237 1920 _.L243: 0 00004838 56 push si 0 00004839 53 push bx 0 0000483A 899E5CFF mov word ptr [bp-164], bx 0 0000483E 56 push si 0 0000483F E8FEFF call _ProcessDisk 0 00004842 89EF mov di, bp 0 00004844 8B9E5CFF mov bx, word ptr [bp-164] 0 00004848 888163FF mov byte ptr [bx+di-157], al 0 0000484C 84C0 test al, al 0 0000484E 7511 jne _.L242 0 00004850 56 push si 0 00004851 53 push bx 0 00004852 B80100 mov ax, 1 0 00004855 50 push ax 0 00004856 E8FEFF call _ProcessDisk 0 00004859 8B9E5CFF mov bx, word ptr [bp-164] 0 0000485D 888163FF mov byte ptr [bx+di-157], al 1938 _.L242: 0 00004861 43 inc bx 0 00004862 E95AFF jmp _.L241 1941 _.L245: 0 00004865 56 push si 0 00004866 52 push dx 0 00004867 89965CFF mov word ptr [bp-164], dx 0 0000486B B80200 mov ax, 2 0 0000486E 50 push ax 0 0000486F E8FEFF call _ProcessDisk 0 00004872 8B965CFF mov dx, word ptr [bp-164] 0 00004876 42 inc dx 0 00004877 E94DFF jmp _.L244 1951 _.L247: 0 0000487A 89EF mov di, bp 0 0000487C 89F3 mov bx, si 0 0000487E 8A8163FF mov al, byte ptr [bx+di-157] 0 00004882 30E4 xor ah, ah 0 00004884 50 push ax 0 00004885 56 push si 0 00004886 B80300 mov ax, 3 0 00004889 50 push ax 0 0000488A E8FEFF call _ProcessDisk 0 0000488D 46 inc si 0 0000488E E941FF jmp _.L246 1963 _.L239: 0 00004891 8EC6 mov es, si 0 00004893 26A0E005 mov al, byte ptr es:[1504] 0 00004897 88865CFF mov byte ptr [bp-164], al 0 0000489B 8B9E5EFF mov bx, word ptr [bp-162] 0 0000489F 807F1500 cmp byte ptr [bx+21], 0 0 000048A3 7E0A jle _.L250 0 000048A5 B89904 mov ax, offset _.LC39 0 000048A8 50 push ax 0 000048A9 E8FEFF call _init_printf 0 000048AC 83C402 add sp, 2 1974 _.L250: 0 000048AF 31D2 xor dx, dx 1976 _.L251: 0 000048B1 399660FF cmp word ptr [bp-160], dx 0 000048B5 7439 je _.L255 0 000048B7 56 push si 0 000048B8 8D866BFF lea ax, [-149+bp] 0 000048BC 50 push ax 0 000048BD 52 push dx 0 000048BE 89965AFF mov word ptr [bp-166], dx 0 000048C2 E84AEF call _LBA_Get_Drive_Parameters 0 000048C5 85C0 test ax, ax 0 000048C7 8B965AFF mov dx, word ptr [bp-166] 0 000048CB 7503E98400 je _.L252 0 000048D0 8A865CFF mov al, byte ptr [bp-164] 0 000048D4 3A866BFF cmp al, byte ptr [bp-149] 0 000048D8 757A jne _.L252 0 000048DA 56 push si 0 000048DB 52 push dx 0 000048DC 89965CFF mov word ptr [bp-164], dx 0 000048E0 56 push si 0 000048E1 E8FEFF call _ProcessDisk 0 000048E4 89EF mov di, bp 0 000048E6 8B965CFF mov dx, word ptr [bp-164] 0 000048EA 89D3 mov bx, dx 0 000048EC 888163FF mov byte ptr [bx+di-157], al 2000 _.L255: 0 000048F0 31DB xor bx, bx 2002 _.L253: 0 000048F2 399E60FF cmp word ptr [bp-160], bx 0 000048F6 7503E9E0FE je _.L260 0 000048FB 89EF mov di, bp 0 000048FD 80B963FF00 cmp byte ptr [bx+di-157], 0 0 00004902 7527 jne _.L257 0 00004904 56 push si 0 00004905 53 push bx 0 00004906 899E5CFF mov word ptr [bp-164], bx 0 0000490A 56 push si 0 0000490B E8FEFF call _ProcessDisk 0 0000490E 8B9E5CFF mov bx, word ptr [bp-164] 0 00004912 888163FF mov byte ptr [bx+di-157], al 0 00004916 84C0 test al, al 0 00004918 7511 jne _.L257 0 0000491A 56 push si 0 0000491B 53 push bx 0 0000491C B80100 mov ax, 1 0 0000491F 50 push ax 0 00004920 E8FEFF call _ProcessDisk 0 00004923 8B9E5CFF mov bx, word ptr [bp-164] 0 00004927 888163FF mov byte ptr [bx+di-157], al 2024 _.L257: 0 0000492B 56 push si 0 0000492C 53 push bx 0 0000492D 899E5CFF mov word ptr [bp-164], bx 0 00004931 B80200 mov ax, 2 0 00004934 50 push ax 0 00004935 E8FEFF call _ProcessDisk 0 00004938 89EF mov di, bp 0 0000493A 8B9E5CFF mov bx, word ptr [bp-164] 0 0000493E 8A8163FF mov al, byte ptr [bx+di-157] 0 00004942 30E4 xor ah, ah 0 00004944 50 push ax 0 00004945 53 push bx 0 00004946 B80300 mov ax, 3 0 00004949 50 push ax 0 0000494A E8FEFF call _ProcessDisk 0 0000494D 8B9E5CFF mov bx, word ptr [bp-164] 0 00004951 43 inc bx 0 00004952 EB9E jmp _.L253 2043 _.L252: 0 00004954 42 inc dx 0 00004955 E959FF jmp _.L251 2046 _.L261: 0 00004958 89EF mov di, bp 0 0000495A 8A9163FF mov dl, byte ptr [bx+di-157] 0 0000495E 30F6 xor dh, dh 0 00004960 01D0 add ax, dx 0 00004962 43 inc bx 0 00004963 E983FE jmp _.L249 2053 .size _ReadAllPartitionTables, .-_ReadAllPartitionTables === Switch to base=012B40h -> ".RODATA.STR1.1" 2054 .section .rodata.str1.1 2055 _.LC41: 0 00001218 0A496E6974446973 .string "\nInitDisk\n" 0 00001220 6B0A00 === Switch to base=002270h -> ".TEXT" 2057 .text 2058 .global _dsk_init 2059 .type _dsk_init, @function 2060 _dsk_init: 0 00004966 803E150000 cmp byte ptr [_InitKernelConfig+21], 0 0 0000496B 7E0A jle _.L274 0 0000496D B8E404 mov ax, offset _.LC41 0 00004970 50 push ax 0 00004971 E8FEFF call _init_printf 0 00004974 83C402 add sp, 2 2067 _.L274: 0 00004977 31C0 xor ax, ax 0 00004979 50 push ax 0 0000497A E8FEFF call _BIOS_drive_reset 0 0000497D E8FEFF call _ReadAllPartitionTables 0 00004980 A10000 mov ax, word ptr [_nUnits] 0 00004983 C3 ret 2074 .size _dsk_init, .-_dsk_init 2075 .local _regs.2056 2076 .comm _regs.2056,24,1 === Switch to base=000790h -> ".DATA" 2077 .data 2078 .type _dap.2011, @object 2079 .size _dap.2011, 16 2080 _dap.2011: 0 00000584 10 .byte 16 0 00000585 00 .byte 0 0 00000586 00 .byte 0 0 00000587 00 .byte 0 0 00000588 0000 .hword 0 0 0000058A 0000 .hword 0 0 0000058C 0000 .hword 0 0 0000058E 0000 .hword 0 0 00000590 0000 .hword 0 0 00000592 0000 .hword 0 2091 .local _regs.1907 2092 .comm _regs.1907,24,1 2093 .local _regs.1887 2094 .comm _regs.1887,24,1 2095 .global _floppy_bpbs 2096 .type _floppy_bpbs, @object 2097 .size _floppy_bpbs, 85 2098 _floppy_bpbs: 0 00000594 0002 .hword 512 0 00000596 02 .byte 2 0 00000597 0100 .hword 1 0 00000599 02 .byte 2 0 0000059A 7000 .hword 112 0 0000059C D002 .hword 720 0 0000059E FD .byte -3 0 0000059F 0200 .hword 2 0 000005A1 0900 .hword 9 0 000005A3 0200 .hword 2 0 000005A5 0002 .hword 512 0 000005A7 01 .byte 1 0 000005A8 0100 .hword 1 0 000005AA 02 .byte 2 0 000005AB E000 .hword 224 0 000005AD 6009 .hword 2400 0 000005AF F9 .byte -7 0 000005B0 0700 .hword 7 0 000005B2 0F00 .hword 15 0 000005B4 0200 .hword 2 0 000005B6 0002 .hword 512 0 000005B8 02 .byte 2 0 000005B9 0100 .hword 1 0 000005BB 02 .byte 2 0 000005BC 7000 .hword 112 0 000005BE A005 .hword 1440 0 000005C0 F9 .byte -7 0 000005C1 0300 .hword 3 0 000005C3 0900 .hword 9 0 000005C5 0200 .hword 2 0 000005C7 0002 .hword 512 0 000005C9 01 .byte 1 0 000005CA 0100 .hword 1 0 000005CC 02 .byte 2 0 000005CD E000 .hword 224 0 000005CF 400B .hword 2880 0 000005D1 F0 .byte -16 0 000005D2 0900 .hword 9 0 000005D4 1200 .hword 18 0 000005D6 0200 .hword 2 0 000005D8 0002 .hword 512 0 000005DA 02 .byte 2 0 000005DB 0100 .hword 1 0 000005DD 02 .byte 2 0 000005DE F000 .hword 240 0 000005E0 8016 .hword 5760 0 000005E2 F0 .byte -16 0 000005E3 0900 .hword 9 0 000005E5 2400 .hword 36 0 000005E7 0200 .hword 2 2149 .global _ExtLBAForce === Switch to base=012B40h -> ".BSS" 2150 .bss 2151 .p2align 1 2152 .type _ExtLBAForce, @object 2153 .size _ExtLBAForce, 2 2154 _ExtLBAForce: 0 0000203E 0000 .skip 2,0 2156 .global _nUnits 2157 .p2align 1 2158 .type _nUnits, @object 2159 .size _nUnits, 2 2160 _nUnits: 0 00002040 0000 .skip 2,0 2162 .global _InitDiskTransferBuffer 2163 .p2align 0 2164 .type _InitDiskTransferBuffer, @object 2165 .size _InitDiskTransferBuffer, 512 2166 _InitDiskTransferBuffer: 0 00002042 0000000000000000 .skip 512,0 0 0000204A 0000000000000000 0 00002052 0000000000000000 0 0000205A 0000000000000000 0 00002062 0000000000000000 0 0000206A 0000000000000000 0 00002072 0000000000000000 0 0000207A 0000000000000000 0 00002082 0000000000000000 0 0000208A 0000000000000000 0 00002092 0000000000000000 0 0000209A 0000000000000000 0 000020A2 0000000000000000 0 000020AA 0000000000000000 0 000020B2 0000000000000000 0 000020BA 0000000000000000 0 000020C2 0000000000000000 0 000020CA 0000000000000000 0 000020D2 0000000000000000 0 000020DA 0000000000000000 0 000020E2 0000000000000000 0 000020EA 0000000000000000 0 000020F2 0000000000000000 0 000020FA 0000000000000000 0 00002102 0000000000000000 0 0000210A 0000000000000000 0 00002112 0000000000000000 0 0000211A 0000000000000000 0 00002122 0000000000000000 0 0000212A 0000000000000000 0 00002132 0000000000000000 0 0000213A 0000000000000000 0 00002142 0000000000000000 0 0000214A 0000000000000000 0 00002152 0000000000000000 0 0000215A 0000000000000000 0 00002162 0000000000000000 0 0000216A 0000000000000000 0 00002172 0000000000000000 0 0000217A 0000000000000000 0 00002182 0000000000000000 0 0000218A 0000000000000000 0 00002192 0000000000000000 0 0000219A 0000000000000000 0 000021A2 0000000000000000 0 000021AA 0000000000000000 0 000021B2 0000000000000000 0 000021BA 0000000000000000 0 000021C2 0000000000000000 0 000021CA 0000000000000000 0 000021D2 0000000000000000 0 000021DA 0000000000000000 0 000021E2 0000000000000000 0 000021EA 0000000000000000 0 000021F2 0000000000000000 0 000021FA 0000000000000000 0 00002202 0000000000000000 0 0000220A 0000000000000000 0 00002212 0000000000000000 0 0000221A 0000000000000000 0 00002222 0000000000000000 0 0000222A 0000000000000000 0 00002232 0000000000000000 0 0000223A 0000000000000000 2168 .ident "GCC: (GNU) 6.3.0" === Trace listing source: inithma.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=inithma.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccZ67EDD.s output file : inithma.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:23.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=012B40h -> ".RODATA.STR1.1" 5 .section .rodata.str1.1,"aMS",@progbits,1 6 _.LC0: 0 00000C5B 484D412063616E27 .string "HMA can't be enabled\n" 0 00000C63 7420626520656E61 0 00000C6B 626C65640A00 8 _.LC1: 0 00000C71 484D412063616E27 .string "HMA can't be enabled second time\n" 0 00000C79 7420626520656E61 0 00000C81 626C656420736563 0 00000C89 6F6E642074696D65 0 00000C91 0A00 === Switch to base=002270h -> ".TEXT" 10 .text 11 .global _EnableHMA 12 .type _EnableHMA, @function 13 _EnableHMA: 0 0000313F 56 push si 0 00003140 57 push di 0 00003141 9A00000000 call (__EnableA20@OZSEG16):__EnableA20 0 00003146 B88000 mov ax, 128 0 00003149 50 push ax 0 0000314A B8FFFF mov ax, -1 0 0000314D 50 push ax 0 0000314E B81000 mov ax, 16 0 00003151 50 push ax 0 00003152 31FF xor di, di 0 00003154 57 push di 0 00003155 57 push di 0 00003156 E8FEFF call _init_fmemcmp 0 00003159 39F8 cmp ax, di 0 0000315B 750F jne _.L2 0 0000315D 96 xchg si, ax 0 0000315E B80000 mov ax, offset _.LC0 31 _.L6: 0 00003161 50 push ax 0 00003162 E8FEFF call _init_printf 0 00003165 83C402 add sp, 2 35 _.L1: 0 00003168 96 xchg si, ax 0 00003169 5F pop di 0 0000316A 5E pop si 0 0000316B C3 ret 40 _.L2: 0 0000316C 9A00000000 call (__DisableA20@OZSEG16):__DisableA20 0 00003171 9A00000000 call (__EnableA20@OZSEG16):__EnableA20 0 00003176 B88000 mov ax, 128 0 00003179 50 push ax 0 0000317A B8FFFF mov ax, -1 0 0000317D 50 push ax 0 0000317E B81000 mov ax, 16 0 00003181 50 push ax 0 00003182 57 push di 0 00003183 57 push di 0 00003184 E8FEFF call _init_fmemcmp 0 00003187 89C6 mov si, ax 0 00003189 85C0 test ax, ax 0 0000318B 7505 jne _.L4 0 0000318D B81600 mov ax, offset _.LC1 0 00003190 EBCF jmp _.L6 57 _.L4: 0 00003192 BE0100 mov si, 1 0 00003195 EBD1 jmp _.L1 60 .size _EnableHMA, .-_EnableHMA 61 .global _HMAalloc 62 .type _HMAalloc, @function 63 _HMAalloc: 0 00003197 56 push si 0 00003198 55 push bp 0 00003199 89E5 mov bp, sp 0 0000319B 1E push ds 0 0000319C 1E push ds 0 0000319D 8B5E06 mov bx, word ptr [bp+6] 0 000031A0 36803E000000 cmp byte ptr ss:[_DosLoadedInHMA], 0 0 000031A6 B80000 mov ax, 0 0 000031A9 8ED8 mov ds, ax 0 000031AB 743C je _.L9 0 000031AD 368B360000 mov si, word ptr ss:[_HMAFree] 0 000031B2 B9F0FF mov cx, -16 0 000031B5 29D9 sub cx, bx 0 000031B7 89C2 mov dx, ax 0 000031B9 39F1 cmp cx, si 0 000031BB 7223 jc _.L7 0 000031BD BAFFFF mov dx, -1 0 000031C0 8D480F lea cx, [15+bx+si] 0 000031C3 83E1F0 and cx, -16 0 000031C6 36890E0000 mov word ptr ss:[_HMAFree], cx 0 000031CB 53 push bx 0 000031CC 1E push ds 0 000031CD 52 push dx 0 000031CE 8956FC mov word ptr [bp-4], dx 0 000031D1 56 push si 0 000031D2 8976FE mov word ptr [bp-2], si 0 000031D5 16 push ss 0 000031D6 1F pop ds 0 000031D7 E8FEFF call _init_fmemset 0 000031DA 8B46FE mov ax, word ptr [bp-2] 0 000031DD 8B56FC mov dx, word ptr [bp-4] 95 _.L7: 0 000031E0 89EC mov sp, bp 0 000031E2 5D pop bp 0 000031E3 5E pop si 0 000031E4 16 push ss 0 000031E5 1F pop ds 0 000031E6 C20200 ret 2 102 _.L9: 0 000031E9 89C0 mov ax, ax 0 000031EB 89C2 mov dx, ax 0 000031ED EBF1 jmp _.L7 106 .size _HMAalloc, .-_HMAalloc === Switch to base=012B40h -> ".RODATA.STR1.1" 107 .section .rodata.str1.1 108 _.LC2: 0 00000C93 696C6C6567616C20 .string "illegal relocation entry # %d\n" 0 00000C9B 72656C6F63617469 0 00000CA3 6F6E20656E747279 0 00000CAB 20232025640A00 === Switch to base=012B40h -> ".RODATA.CST2" 110 .section .rodata.cst2,"aM",@progbits,2 111 .p2align 1 112 _.LC3: 0 00000D08 0000 .hword __HMARelocationTableEnd === Switch to base=002270h -> ".TEXT" 114 .text 115 .global _MoveKernel 116 .type _MoveKernel, @function 117 _MoveKernel: 0 000031EF 56 push si 0 000031F0 57 push di 0 000031F1 55 push bp 0 000031F2 89E5 mov bp, sp 0 000031F4 83EC0C sub sp, 12 0 000031F7 8B7E08 mov di, word ptr [bp+8] 0 000031FA A10000 mov ax, word ptr [_CurrentKernelSegment] 0 000031FD 8946F6 mov word ptr [bp-10], ax 0 00003200 85C0 test ax, ax 0 00003202 7506 jne _.L13 0 00003204 B80000 mov ax, offset __HMATextEnd@OZSEG16 0 00003207 A30000 mov word ptr [_CurrentKernelSegment], ax 130 _.L13: 0 0000320A 8B0E0000 mov cx, word ptr [_CurrentKernelSegment] 0 0000320E 83F9FF cmp cx, -1 0 00003211 7503E98600 je _.L12 0 00003216 BA0000 mov dx, offset ___ia16_near_alias.0 0 00003219 83E2F0 and dx, -16 0 0000321C 31F6 xor si, si 0 0000321E B80000 mov ax, offset ___ia16_near_alias.1 0 00003221 83C80F or ax, 15 0 00003224 BB0000 mov bx, offset ___ia16_near_alias.2 0 00003227 83E3F0 and bx, -16 0 0000322A 29D8 sub ax, bx 0 0000322C 83FFFF cmp di, -1 0 0000322F 7519 jne _.L15 0 00003231 83C220 add dx, 32 0 00003234 BE2000 mov si, 32 0 00003237 83C0E0 add ax, -32 147 _.L16: 0 0000323A 50 push ax 0 0000323B 8946F4 mov word ptr [bp-12], ax 0 0000323E 51 push cx 0 0000323F 52 push dx 0 00003240 57 push di 0 00003241 56 push si 0 00003242 E8FEFF call _init_fmemcpy 0 00003245 8B46F4 mov ax, word ptr [bp-12] 0 00003248 EB04 jmp _.L17 157 _.L15: 0 0000324A 39F9 cmp cx, di 0 0000324C 77EC ja _.L16 160 _.L17: 0 0000324E 93 xchg bx, ax 0 0000324F 8D400F lea ax, [15+bx+si] 0 00003252 83E0F0 and ax, -16 0 00003255 A30000 mov word ptr [_HMAFree], ax 0 00003258 BE0000 mov si, offset __HMARelocationTableStart@OZSEG16 0 0000325B BB0000 mov bx, offset __HMARelocationTableStart 0 0000325E BA0000 mov dx, offset __HMARelocationTableEnd 0 00003261 B80000 mov ax, offset __HMARelocationTableEnd@OZSEG16 169 _.L18: 0 00003264 39F0 cmp ax, si 0 00003266 773C ja _.L22 0 00003268 7504 jne _.L30 0 0000326A 39DA cmp dx, bx 0 0000326C 7736 ja _.L22 175 _.L30: 0 0000326E BB0000 mov bx, offset __HMARelocationTableStart 177 _.L24: 0 00003271 39F0 cmp ax, si 0 00003273 7763 ja _.L27 0 00003275 7506 jne _.L31 0 00003277 391E0000 cmp word ptr [_.LC3], bx 0 0000327B 775B ja _.L27 183 _.L31: 0 0000327D 83FFFF cmp di, -1 0 00003280 7516 jne _.L29 0 00003282 8EC7 mov es, di 0 00003284 26C606D000EA mov byte ptr es:[208], -22 0 0000328A 26C706D1000000 mov word ptr es:[209], offset _cpm_entry 0 00003291 B80000 mov ax, offset _cpm_entry@OZSEG16 0 00003294 26A3D300 mov word ptr es:[211], ax 191 _.L29: 0 00003298 893E0000 mov word ptr [_CurrentKernelSegment], di 193 _.L12: 0 0000329C 89EC mov sp, bp 0 0000329E 5D pop bp 0 0000329F 5F pop di 0 000032A0 5E pop si 0 000032A1 C20200 ret 2 199 _.L22: 0 000032A4 8EC6 mov es, si 0 000032A6 26803FEA cmp byte ptr es:[bx], -22 0 000032AA 7415 je _.L19 203 _.L21: 0 000032AC 81EB0000 sub bx, offset ___ia16_near_alias.3 0 000032B0 B103 mov cl, 3 0 000032B2 D3EB shr bx, cl 0 000032B4 53 push bx 0 000032B5 B83800 mov ax, offset _.LC2 0 000032B8 50 push ax 0 000032B9 E8FEFF call _init_printf 0 000032BC 83C404 add sp, 4 212 _.L20: 0 000032BF EBFE jmp _.L20 214 _.L19: 0 000032C1 8EC6 mov es, si 0 000032C3 8B4EF6 mov cx, word ptr [bp-10] 0 000032C6 263B4F03 cmp cx, word ptr es:[bx+3] 0 000032CA 75E0 jne _.L21 0 000032CC 26807F05E8 cmp byte ptr es:[bx+5], -24 0 000032D1 75D9 jne _.L21 0 000032D3 83C308 add bx, 8 0 000032D6 EB8C jmp _.L18 223 _.L27: 0 000032D8 83FFFF cmp di, -1 0 000032DB 7544 jne _.L25 0 000032DD 8946F4 mov word ptr [bp-12], ax 0 000032E0 BA0800 mov dx, 8 0 000032E3 52 push dx 0 000032E4 56 push si 0 000032E5 53 push bx 0 000032E6 895EF6 mov word ptr [bp-10], bx 0 000032E9 8D56F8 lea dx, [-8+bp] 0 000032EC 16 push ss 0 000032ED 52 push dx 0 000032EE E8FEFF call _init_fmemcpy 0 000032F1 8A56F8 mov dl, byte ptr [bp-8] 0 000032F4 8EC6 mov es, si 0 000032F6 8B5EF6 mov bx, word ptr [bp-10] 0 000032F9 26885703 mov byte ptr es:[bx+3], dl 0 000032FD 26897F06 mov word ptr es:[bx+6], di 0 00003301 8B56F9 mov dx, word ptr [bp-7] 0 00003304 26895704 mov word ptr es:[bx+4], dx 0 00003308 8A56FD mov dl, byte ptr [bp-3] 0 0000330B 268817 mov byte ptr es:[bx], dl 0 0000330E 8B56FE mov dx, word ptr [bp-2] 0 00003311 83C205 add dx, 5 0 00003314 26895701 mov word ptr es:[bx+1], dx 0 00003318 8B46F4 mov ax, word ptr [bp-12] 249 _.L26: 0 0000331B 83C308 add bx, 8 0 0000331E E950FF jmp _.L24 252 _.L25: 0 00003321 8EC6 mov es, si 0 00003323 26897F03 mov word ptr es:[bx+3], di 0 00003327 EBF2 jmp _.L26 256 .size _MoveKernel, .-_MoveKernel === Switch to base=012B40h -> ".RODATA.STR1.1" 257 .section .rodata.str1.1 258 _.LC4: 0 00000CB2 43616E277420656E .string "Can't enable HMA area (the famous A20), NOT moving to HMA\n" 0 00000CBA 61626C6520484D41 0 00000CC2 2061726561202874 0 00000CCA 68652066616D6F75 0 00000CD2 7320413230292C20 0 00000CDA 4E4F54206D6F7669 0 00000CE2 6E6720746F20484D 0 00000CEA 410A00 260 _.LC5: 0 00000CED 43616E2774207265 .string "Can't reserve HMA area ??\n" 0 00000CF5 736572766520484D 0 00000CFD 412061726561203F 0 00000D05 3F0A00 === Switch to base=002270h -> ".TEXT" 262 .text 263 .global _MoveKernelToHMA 264 .type _MoveKernelToHMA, @function 265 _MoveKernelToHMA: 0 00003329 56 push si 0 0000332A 57 push di 0 0000332B 55 push bp 0 0000332C 89E5 mov bp, sp 0 0000332E 1E push ds 0 0000332F 803E000000 cmp byte ptr [_DosLoadedInHMA], 0 0 00003334 7403E99B00 jne _.L41 0 00003339 E8FEFF call _DetectXMSDriver 0 0000333C 89C7 mov di, ax 0 0000333E 96 xchg si, ax 0 0000333F 09D6 or si, dx 0 00003341 7433 je _.L36 0 00003343 B80000 mov ax, offset _XMSDriverAddress@OZSEG16 0 00003346 8EC0 mov es, ax 0 00003348 26893E0000 mov word ptr es:[_XMSDriverAddress], di 0 0000334D 2689160200 mov word ptr es:[_XMSDriverAddress+2], dx 0 00003352 8956FE mov word ptr [bp-2], dx 0 00003355 B80000 mov ax, offset _XMS_Enable_Patch@OZSEG16 0 00003358 8EC0 mov es, ax 0 0000335A 26C606000090 mov byte ptr es:[_XMS_Enable_Patch], -112 0 00003360 E8FEFF call _EnableHMA 0 00003363 89C6 mov si, ax 0 00003365 85C0 test ax, ax 0 00003367 8B56FE mov dx, word ptr [bp-2] 0 0000336A 7511 jne _.L39 0 0000336C B85700 mov ax, offset _.LC4 0 0000336F 50 push ax 0 00003370 E8FEFF call _init_printf 0 00003373 83C402 add sp, 2 295 _.L36: 0 00003376 96 xchg si, ax 0 00003377 89EC mov sp, bp 0 00003379 5D pop bp 0 0000337A 5F pop di 0 0000337B 5E pop si 0 0000337C C3 ret 302 _.L39: 0 0000337D 803E000000 cmp byte ptr [_HMAclaimed], 0 0 00003382 BEFFFF mov si, -1 0 00003385 7520 jne _.L40 0 00003387 56 push si 0 00003388 B80001 mov ax, 256 0 0000338B 50 push ax 0 0000338C 52 push dx 0 0000338D 57 push di 0 0000338E E8FEFF call _init_call_XMScall 0 00003391 A20000 mov byte ptr [_HMAclaimed], al 0 00003394 84C0 test al, al 0 00003396 750F jne _.L40 0 00003398 B89200 mov ax, offset _.LC5 0 0000339B 50 push ax 0 0000339C E8FEFF call _init_printf 0 0000339F 83C402 add sp, 2 0 000033A2 8D7401 lea si, [1+si] 0 000033A5 EBCF jmp _.L36 321 _.L40: 0 000033A7 56 push si 0 000033A8 E8FEFF call _MoveKernel 0 000033AB C606000001 mov byte ptr [_DosLoadedInHMA], 1 0 000033B0 B81600 mov ax, 22 0 000033B3 50 push ax 0 000033B4 16 push ss 0 000033B5 B80000 mov ax, offset _VDISK_BOOT_SEKTOR.1873 0 000033B8 50 push ax 0 000033B9 56 push si 0 000033BA B81000 mov ax, 16 0 000033BD 50 push ax 0 000033BE E8FEFF call _init_fmemcpy 0 000033C1 8EC6 mov es, si 0 000033C3 26C7062E004004 mov word ptr es:[46], 1088 0 000033CA C41E0000 les bx, dword ptr [_LoL] 0 000033CE 26808F950010 or byte ptr es:[bx+149], 16 338 _.L41: 0 000033D4 BE0100 mov si, 1 0 000033D7 EB9D jmp _.L36 341 .size _MoveKernelToHMA, .-_MoveKernelToHMA === Switch to base=000790h -> ".DATA" 342 .data 343 .type _VDISK_BOOT_SEKTOR.1873, @object 344 .size _VDISK_BOOT_SEKTOR.1873, 22 345 _VDISK_BOOT_SEKTOR.1873: 0 0000056E CF .byte -49 0 0000056F 20 .byte 32 0 00000570 20 .byte 32 0 00000571 56 .byte 86 0 00000572 44 .byte 68 0 00000573 49 .byte 73 0 00000574 53 .byte 83 0 00000575 4B .byte 75 0 00000576 20 .byte 32 0 00000577 20 .byte 32 0 00000578 20 .byte 32 0 00000579 0002 .hword 512 0 0000057B 46 .byte 70 0 0000057C 44 .byte 68 0 0000057D 4F .byte 79 0 0000057E 53 .byte 83 0 0000057F 20 .byte 32 0 00000580 20 .byte 32 0 00000581 8000 .hword 128 0 00000583 20 .byte 32 366 .global _CurrentKernelSegment === Switch to base=012B40h -> ".BSS" 367 .bss 368 .p2align 1 369 .type _CurrentKernelSegment, @object 370 .size _CurrentKernelSegment, 2 371 _CurrentKernelSegment: 0 00002036 0000 .skip 2,0 373 .global _HMAFree 374 .p2align 1 375 .type _HMAFree, @object 376 .size _HMAFree, 2 377 _HMAFree: 0 00002038 0000 .skip 2,0 379 .global _HMAclaimed 380 .p2align 0 381 .type _HMAclaimed, @object 382 .size _HMAclaimed, 1 383 _HMAclaimed: 0 0000203A 00 .skip 1,0 385 .global _DosLoadedInHMA 386 .p2align 0 387 .type _DosLoadedInHMA, @object 388 .size _DosLoadedInHMA, 1 389 _DosLoadedInHMA: 0 0000203B 00 .skip 1,0 391 .weakref ___ia16_near_alias.3,__HMARelocationTableStart 392 .weakref ___ia16_near_alias.2,__HMATextStart 393 .weakref ___ia16_near_alias.1,__HMATextEnd 394 .weakref ___ia16_near_alias.0,__HMATextStart 395 .ident "GCC: (GNU) 6.3.0" === Trace listing source: initoem.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=initoem.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccmutD28.s output file : initoem.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:23.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .global _init_oem 7 .type _init_oem, @function 8 _init_oem: 0 0000309E 55 push bp 0 0000309F 89E5 mov bp, sp 0 000030A1 83EC18 sub sp, 24 0 000030A4 8D46E8 lea ax, [-24+bp] 0 000030A7 50 push ax 0 000030A8 B81200 mov ax, 18 0 000030AB 50 push ax 0 000030AC E8[FEFF] call _init_call_intr 0 000030AF 8B46E8 mov ax, word ptr [bp-24] 0 000030B2 89EC mov sp, bp 0 000030B4 5D pop bp 0 000030B5 C3 ret 21 .size _init_oem, .-_init_oem 22 .global _movebda 23 .type _movebda, @function 24 _movebda: 0 000030B6 56 push si 0 000030B7 57 push di 0 000030B8 55 push bp 0 000030B9 89E5 mov bp, sp 0 000030BB FF7608 push word ptr [bp+8] 0 000030BE BF0E04 mov di, 1038 0 000030C1 31F6 xor si, si 0 000030C3 8EC6 mov es, si 0 000030C5 26FF35 push word ptr es:[di] 0 000030C8 56 push si 0 000030C9 FF760A push word ptr [bp+10] 0 000030CC 56 push si 0 000030CD E8[FEFF] call _init_fmemcpy 0 000030D0 8EC6 mov es, si 0 000030D2 8B460A mov ax, word ptr [bp+10] 0 000030D5 268905 mov word ptr es:[di], ax 0 000030D8 8B16[0000] mov dx, word ptr [_ram_top] 0 000030DC 2689161304 mov word ptr es:[1043], dx 0 000030E1 89EC mov sp, bp 0 000030E3 5D pop bp 0 000030E4 5F pop di 0 000030E5 5E pop si 0 000030E6 C20400 ret 4 48 .size _movebda, .-_movebda 49 .global _ebdasize 50 .type _ebdasize, @function 51 _ebdasize: 0 000030E9 8B16[0000] mov dx, word ptr [_ram_top] 0 000030ED 31DB xor bx, bx 0 000030EF 89D8 mov ax, bx 0 000030F1 8EC3 mov es, bx 0 000030F3 263B161304 cmp dx, word ptr es:[1043] 0 000030F8 7540 jne _.L21 0 000030FA 57 push di 0 000030FB 55 push bp 0 000030FC 89E5 mov bp, sp 0 000030FE 1E push ds 0 000030FF 26A10E04 mov ax, word ptr es:[1038] 0 00003103 89D7 mov di, dx 0 00003105 B106 mov cl, 6 0 00003107 D3E7 shl di, cl 0 00003109 39C7 cmp di, ax 0 0000310B 752E jne _.L8 0 0000310D 81FA8002 cmp dx, 639+1 0 00003111 7328 jnc _.L8 0 00003113 8EC0 mov es, ax 0 00003115 268A07 mov al, byte ptr es:[bx] 0 00003118 8846FE mov byte ptr [bp-2], al 0 0000311B C646FF00 mov byte ptr [bp-1], 0 0 0000311F 93 xchg bx, ax 0 00003120 837EFE3F cmp word ptr [bp-2], 63 0 00003124 7710 ja _.L5 0 00003126 0356FE add dx, word ptr [bp-2] 0 00003129 81FA8002 cmp dx, 640 0 0000312D 7507 jne _.L5 0 0000312F 8B46FE mov ax, word ptr [bp-2] 0 00003132 B10A mov cl, 10 0 00003134 D3E0 shl ax, cl 83 _.L5: 0 00003136 89EC mov sp, bp 0 00003138 5D pop bp 0 00003139 5F pop di 87 _.L21: 0 0000313A C3 ret 89 _.L8: 0 0000313B 31C0 xor ax, ax 0 0000313D EBF7 jmp _.L5 92 .size _ebdasize, .-_ebdasize 93 .ident "GCC: (GNU) 6.3.0" === Trace listing source: int2f.lst 1 ; 2 ; File: 3 ; int2f.asm 4 ; Description: 5 ; multiplex interrupt support code 6 ; 7 ; Copyright (c) 1996, 1998 8 ; Pasquale J. Villani 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; You should have received a copy of the GNU General Public 24 ; License along with DOS-C; see the file COPYING. If not, 25 ; write to the Free Software Foundation, 675 Mass Ave, 26 ; Cambridge, MA 02139, USA. 27 ; 28 ; $Id: int2f.asm 1591 2011-05-06 01:46:55Z bartoldeman $ 29 ; 30 31 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 32 %include "stacks.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; stacks.inc 4 <1> ; Description: 5 <1> ; Macro support for register stack frame 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Id: stacks.inc 1591 2011-05-06 01:46:55Z bartoldeman $ 29 <1> ; 30 <1> 31 <1> ; 32 <1> ; Standard stack frame used throughout DOS-C 33 <1> ; 34 <1> ; MS-DOS specific 35 <1> ; 36 <1> ; +---------------+ 37 <1> ; | irp hi | 26 38 <1> ; +---------------+ 39 <1> ; | irp low | 24 40 <1> ; +---------------+ 41 <1> ; | flags | 22 42 <1> ; +---------------+ 43 <1> ; | cs | 20 44 <1> ; +---------------+ 45 <1> ; | ip | 18 46 <1> ; +---------------+ 47 <1> ; | es | 16 48 <1> ; +---------------+ 49 <1> ; | ds | 14 50 <1> ; +---------------+ 51 <1> ; | bp | 12 52 <1> ; +---------------+ 53 <1> ; | di | 10 54 <1> ; +---------------+ 55 <1> ; | si | 8 56 <1> ; +---------------+ 57 <1> ; | dx | 6 58 <1> ; +---------------+ 59 <1> ; | cx | 4 60 <1> ; +---------------+ 61 <1> ; | bx | 2 62 <1> ; +---------------+ 63 <1> ; | ax | 0 64 <1> ; +---------------+ 65 <1> ; 66 <1> 67 <1> ;; Note: The order of the pushed registers _must_ match with the definition 68 <1> ;; of the "iregs" structure within PCB.H, because a pointer to the last 69 <1> ;; pushed register is used as a pointer to a "iregs" structure within the 70 <1> ;; called C sources! -- 2000/03/22 ska 71 <1> 72 <1> ; Don't use `struc RegFrame' etc. here because it interferes with segment 73 <1> ; definitions. 74 <1> reg_ax equ 0 75 <1> reg_bx equ 2 76 <1> reg_cx equ 4 77 <1> reg_dx equ 6 78 <1> reg_si equ 8 79 <1> reg_di equ 10 80 <1> reg_bp equ 12 81 <1> reg_ds equ 14 82 <1> reg_es equ 16 83 <1> reg_ip equ 18 84 <1> reg_cs equ 20 85 <1> reg_flags equ 22 86 <1> irp_low equ 24 87 <1> irp_hi equ 26 88 <1> 89 <1> %macro PUSH$ALL 0 90 <1> push es 91 <1> push ds 92 <1> push bp 93 <1> push di 94 <1> push si 95 <1> push dx 96 <1> push cx 97 <1> push bx 98 <1> push ax 99 <1> %endmacro 100 <1> 101 <1> %macro POP$ALL 0 102 <1> pop ax 103 <1> pop bx 104 <1> pop cx 105 <1> pop dx 106 <1> pop si 107 <1> pop di 108 <1> pop bp 109 <1> pop ds 110 <1> pop es 111 <1> %endmacro 112 <1> 113 <1> ; I386.inc - 10/25/01 by tom ehlert 114 <1> ; 115 <1> ; compiling the kernel for 386 will (sometimes) change the 116 <1> ; high part of (some) registers, which will be (sometimes) be used 117 <1> ; later 118 <1> ; 119 <1> ; assumption: 120 <1> ; we have never seen MSVC to use anything but eax, ecx, edx, 121 <1> ; nor have we seen Borland C to use anything but eax, ebx, edx, 122 <1> ; so we only protect eax, ebx or ecx, edx to conserve stack space 123 <1> ; 124 <1> ; to save even more stack space, we save only HIGH part of regs 125 <1> ; at some expense of slower execution. it's easier anyway :-) 126 <1> ; 127 <1> ; WATCOM only uses FS: and GS: (using -zff and -zgf) and never 128 <1> ; any high part of the 386 registers 129 <1> ; 130 <1> 131 <1> 132 <1> %IF XCPU < 386 133 <1> ; no need to save/restore anything 134 <1> 135 <1> ; error 1 2 3 136 <1> %macro Protect386Registers 0 137 <1> %endmacro 138 <1> 139 <1> %assign Size386Registers 0 140 <1> 141 <1> %macro RestoreSP 0 142 <1> mov sp, bp 143 <1> %endmacro 144 <1> 145 <1> %macro Restore386Registers 0 146 <1> %endmacro 147 <1> 148 <1> %ELSE 149 <1> %ifdef WATCOM 150 <1> 151 <1> %macro Protect386Registers 0 152 <1> push fs 153 <1> push gs 154 <1> %endmacro 155 <1> 156 <1> %assign Size386Registers 4 157 <1> 158 <1> %macro RestoreSP 0 159 <1> lea sp, [bp - Size386Registers] 160 <1> %endmacro 161 <1> 162 <1> %macro Restore386Registers 0 163 <1> pop gs 164 <1> pop fs 165 <1> %endmacro 166 <1> 167 <1> %else 168 <1> 169 <1> %macro Protect386Registers 0 170 <1> push eax 171 <1> pop ax 172 <1> %ifdef MSCL8 173 <1> push ecx 174 <1> pop cx 175 <1> %else ;BC5 176 <1> push ebx 177 <1> pop bx 178 <1> %endif 179 <1> push edx 180 <1> pop dx 181 <1> %endmacro 182 <1> 183 <1> %assign Size386Registers 6 184 <1> 185 <1> %macro RestoreSP 0 186 <1> lea sp, [bp - Size386Registers] 187 <1> %endmacro 188 <1> 189 <1> %macro Restore386Registers 0 190 <1> push dx 191 <1> pop edx 192 <1> %ifdef MSCL8 193 <1> push cx 194 <1> pop ecx 195 <1> %else ;BC5 196 <1> push bx 197 <1> pop ebx 198 <1> %endif 199 <1> push ax 200 <1> pop eax 201 <1> %endmacro 202 <1> 203 <1> %endif 204 <1> %ENDIF 205 <1> 206 <1> ; macros to define stack arguments 207 <1> ; arg a, {b,4}, c 208 <1> ; defines a and c as "word" arguments and b as a "dword" argument 209 <1> ; for STDCALL defines .a as [bp+4], .b as [bp+6] and .c as [bp+10] 210 <1> ; for PASCAL defines .a as [bp+10], .b as [bp+6] and .c as [bp+4] 211 <1> ; 212 <1> ; popargs bx, {dx,ax}, cx pops these arguments of the stack (for PASCAL 213 <1> ; in reverse order). Here dx,ax is a dword argument dx:ax where dx is 214 <1> ; the high word. The caller is responsible for dealing with instruction 215 <1> ; pointer (ip) on the stack. 216 <1> 217 <1> %ifdef gcc 218 <1> %define STDCALL 219 <1> %else 220 <1> %define PASCAL 221 <1> %endif 222 <1> 223 <1> %macro definearg 1-2 2 224 <1> %xdefine .%1 bp+.argloc 225 <1> %assign .argloc .argloc+%2 226 <1> %endmacro 227 <1> 228 <1> %macro arg 1-* 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 239 <1> %endmacro 240 <1> 241 <1> %macro multipop 1-* 242 <1> %rep %0 243 <1> %rotate -1 244 <1> pop %1 245 <1> %endrep 246 <1> %endmacro 247 <1> 248 <1> %macro popargs 1-* 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 258 <1> %endmacro 33 34 ; macro to switch to an internal stack (if necessary), set DS == SS == DGROUP, 35 ; and push the old SS:SP onto the internal stack 36 ; 37 ; destroys AX, SI, BP; turns on IRQs 38 ; 39 ; int2f does not really need to switch to a separate stack for MS-DOS 40 ; compatibility; this is mainly to work around the C code's assumption 41 ; that SS == DGROUP 42 ; 43 ; TODO: remove the need for this hackery -- tkchia 44 %macro SwitchToInt2fStack 0 45 mov ax,[cs:_DGROUP_] 46 mov ds,ax 47 mov si,ss 48 mov bp,sp 49 cmp ax,si 50 jz %%already 51 cli 52 mov ss,ax 53 extern int2f_stk_top 54 mov sp,int2f_stk_top 55 sti 56 %%already: 57 ; well, GCC does not currently clobber function parameters passed on the 58 ; stack; but just in case it decides to do that in the future, we push _two_ 59 ; copies of the old SS:SP: 60 ; - the second copy can be passed as a pointer parameter to a C function 61 ; - the first copy is used to actually restore the user stack later 62 push si 63 push bp 64 push si 65 push bp 66 %endmacro 67 68 ; macro to switch back from an internal stack, i.e. undo SwitchToInt2fStack 69 ; 70 ; destroys BP; turns on IRQs -- tkchia 71 %macro DoneInt2fStack 0 72 pop bp 73 pop bp 74 pop bp 75 cli 76 pop ss 77 mov sp,bp 78 sti 79 %endmacro 80 === Switch to base=002270h -> "HMA_TEXT" 81 segment HMA_TEXT 82 extern _cu_psp 83 extern _HaltCpuWhileIdle 84 extern _syscall_MUX14 85 86 extern _DGROUP_ 87 88 global reloc_call_int2f_handler 89 reloc_call_int2f_handler: 0 00000629 FB sti ; Enable interrupts 0 0000062A 80FC11 cmp ah,11h ; Network interrupt? 0 0000062D 752F jne Int2f3 ; No, continue 93 Int2f1: 0 0000062F 08C0 or al,al ; Installation check? 0 00000631 7404 jz FarTabRetn ; yes, just return 96 Int2f2: 0 00000633 B80100 mov ax,1 ; TE 07/13/01 98 ; at least for redirected INT21/5F44 99 ; --> 2f/111e 100 ; the error code is AX=0001 = unknown function 0 00000636 F9 stc 102 FarTabRetn: 0 00000637 CA0200 retf 2 ; Return far 104 105 WinIdle: ; only HLT if at haltlevel 2+ 0 0000063A 1E push ds 0 0000063B 2E8E1E[0000] mov ds, [cs:_DGROUP_] 0 00000640 803E[0000]02 cmp byte [_HaltCpuWhileIdle],2 0 00000645 1F pop ds 0 00000646 72EF jb FarTabRetn 0 00000648 9C pushf 0 00000649 FB sti 0 0000064A F4 hlt ; save some energy :-) 0 0000064B 9D popf 0 0000064C 1E push ds 0 0000064D 2E8E1E[0000] mov ds, [cs:_DGROUP_] 0 00000652 803E[0000]03 cmp byte [_HaltCpuWhileIdle],3 0 00000657 1F pop ds 0 00000658 72DD jb FarTabRetn 0 0000065A B000 mov al,0 ; even admit we HLTed ;-) 0 0000065C EBD9 jmp short FarTabRetn 122 0 0000065E 3D8016 Int2f3: cmp ax,1680h ; Win "release time slice" 0 00000661 74D7 je WinIdle 0 00000663 80FC12 cmp ah,12h 0 00000666 7503E99100 je IntDosCal ; Dos Internal calls 0 0000066B 80FC13 cmp ah,13h 0 0000066E 7503E98900 je IntDosCal ; Install Int13h Hook 0 00000673 80FC16 cmp ah,16h 0 00000676 7503E98100 je IntDosCal ; Win (Multitasking) Hook 0 0000067B 80FC46 cmp ah,46h 0 0000067E 747C je IntDosCal ; Win Hook to avoid MCB corruption 133 0 00000680 3D014A cmp ax,4a01h 0 00000683 7477 je IntDosCal ; Dos Internal calls 0 00000685 3D024A cmp ax,4a02h 0 00000688 7472 je IntDosCal ; Dos Internal calls 138 %ifdef WITHFAT32 0 0000068A 3D334A cmp ax,4a33h ; Check DOS version 7 0 0000068D 7505 jne Check4Share 0 0000068F 31C0 xor ax,ax ; no undocumented shell strings 0 00000691 31DB xor bx,bx ; RBIL undoc BX = ?? (0h) 143 ; " DS:DX ASCIIZ shell exe name 144 ; " DS:SI SHELL= line 0 00000693 CF iret 146 Check4Share: 147 %endif 0 00000694 80FC10 cmp ah,10h ; SHARE.EXE interrupt? 0 00000697 7496 je Int2f1 ; yes, do installation check 0 00000699 80FC08 cmp ah,08h 0 0000069C 7450 je DriverSysCal ; DRIVER.SYS calls 0 0000069E 80FC14 cmp ah,14h ; NLSFUNC.EXE interrupt? 0 000006A1 754A jne Int2f?iret ; yes, do installation check 154 Int2f?14: ;; MUX-14 -- NLSFUNC API 155 ;; all functions are passed to syscall_MUX14 156 ;; Note: this is the kernel's default NLS handlers, if made it 157 ;; here then no other program (e.g. NLSFUNC) hooked int 2F/14 158 ;; and handled request (either none loaded or choose not to) 0 000006A3 55 push bp ; Preserve BP later on 160 Protect386Registers 161 PUSH$ALL 0 000006A4 06 push es 0 000006A5 1E push ds 0 000006A6 55 push bp 0 000006A7 57 push di 0 000006A8 56 push si 0 000006A9 52 push dx 0 000006AA 51 push cx 0 000006AB 53 push bx 0 000006AC 50 push ax 162 SwitchToInt2fStack 0 000006AD 2EA1[0000] mov ax,[cs:_DGROUP_] 0 000006B1 8ED8 mov ds,ax 0 000006B3 8CD6 mov si,ss 0 000006B5 89E5 mov bp,sp 0 000006B7 39F0 cmp ax,si 0 000006B9 7407 jz %%already 0 000006BB FA cli 0 000006BC 8ED0 mov ss,ax 53 <1> extern int2f_stk_top 0 000006BE BC[0000] mov sp,int2f_stk_top 0 000006C1 FB sti 56 <1> %%already: 57 <1> 58 <1> 59 <1> 60 <1> 61 <1> 0 000006C2 56 push si 0 000006C3 55 push bp 0 000006C4 56 push si 0 000006C5 55 push bp 0 000006C6 E8[0000] call _syscall_MUX14 164 DoneInt2fStack 0 000006C9 5D pop bp 0 000006CA 5D pop bp 0 000006CB 5D pop bp 0 000006CC FA cli 0 000006CD 17 pop ss 0 000006CE 89EC mov sp,bp 0 000006D0 FB sti 0 000006D1 5D pop bp ; Discard incoming AX 0 000006D2 50 push ax ; Correct stack for POP$ALL 167 POP$ALL 0 000006D3 58 pop ax 0 000006D4 5B pop bx 0 000006D5 59 pop cx 0 000006D6 5A pop dx 0 000006D7 5E pop si 0 000006D8 5F pop di 0 000006D9 5D pop bp 0 000006DA 1F pop ds 0 000006DB 07 pop es 168 Restore386Registers 0 000006DC 89E5 mov bp, sp 0 000006DE 09C0 or ax, ax 0 000006E0 7506 jnz Int2f?14?1 ; must return set carry 172 ;; -6 == -2 (CS), -2 (IP), -2 (flags) 173 ;; current SP = on old_BP 0 000006E2 8066FAFE and BYTE [bp-6], 0feh ; clear carry as no error condition 0 000006E6 5D pop bp 0 000006E7 CF iret 0 000006E8 804EFA01 Int2f?14?1: or BYTE [bp-6], 1 0 000006EC 5D pop bp 179 Int2f?iret: 0 000006ED CF iret 181 182 ; DRIVER.SYS calls - now only 0803. 183 DriverSysCal: 184 extern _Dyn 0 000006EE 3C03 cmp al, 3 0 000006F0 750A jne IntDosCal ; pass other calls through 0 000006F2 2E8E1E[0000] mov ds, [cs:_DGROUP_] 0 000006F7 BF[0200] mov di, _Dyn+2 0 000006FA EBF1 jmp short Int2f?iret 190 191 192 ;********************************************************************** 193 ; internal dos calls INT2F/12xx and INT2F/4A01,4A02 - handled through C 194 ;********************************************************************** 195 IntDosCal: 196 ; set up register structure 197 ;struct int2f12regs 198 ;{ 199 ; [space for 386 regs] 200 ; UWORD es,ds; 201 ; UWORD di,si,bp,bx,dx,cx,ax; 202 ; UWORD ip,cs,flags; 203 ; UWORD callerARG1; 204 ;} 0 000006FC 50 push ax 0 000006FD 51 push cx 0 000006FE 52 push dx 0 000006FF 53 push bx 0 00000700 55 push bp 0 00000701 56 push si 0 00000702 57 push di 0 00000703 1E push ds 0 00000704 06 push es 214 0 00000705 FC cld 216 217 %if XCPU >= 386 218 %ifdef WATCOM 219 mov si,fs 220 mov di,gs 221 %else 222 Protect386Registers 223 %endif 224 %endif 225 226 SwitchToInt2fStack 0 00000706 2EA1[0000] mov ax,[cs:_DGROUP_] 0 0000070A 8ED8 mov ds,ax 0 0000070C 8CD6 mov si,ss 0 0000070E 89E5 mov bp,sp 0 00000710 39F0 cmp ax,si 0 00000712 7407 jz %%already 0 00000714 FA cli 0 00000715 8ED0 mov ss,ax 53 <1> extern int2f_stk_top 0 00000717 BC[0000] mov sp,int2f_stk_top 0 0000071A FB sti 56 <1> %%already: 57 <1> 58 <1> 59 <1> 60 <1> 61 <1> 0 0000071B 56 push si 0 0000071C 55 push bp 0 0000071D 56 push si 0 0000071E 55 push bp 227 extern _int2F_12_handler 0 0000071F E8[0000] call _int2F_12_handler 229 DoneInt2fStack 0 00000722 5D pop bp 0 00000723 5D pop bp 0 00000724 5D pop bp 0 00000725 FA cli 0 00000726 17 pop ss 0 00000727 89EC mov sp,bp 0 00000729 FB sti 230 231 %if XCPU >= 386 232 %ifdef WATCOM 233 mov fs,si 234 mov gs,di 235 %else 236 Restore386Registers 237 %endif 238 %endif 239 0 0000072A 07 pop es 0 0000072B 1F pop ds 0 0000072C 5F pop di 0 0000072D 5E pop si 0 0000072E 5D pop bp 0 0000072F 5B pop bx 0 00000730 5A pop dx 0 00000731 59 pop cx 0 00000732 58 pop ax 249 0 00000733 CF iret 251 252 global SHARE_CHECK 253 SHARE_CHECK: 0 00000734 B80010 mov ax, 0x1000 0 00000737 CD2F int 0x2f 0 00000739 A95553 test ax, "US" ; Uninstallable SHARE signature 0 0000073C C3 ret 258 259 ; DOS calls this to see if it's okay to open the file. 260 ; Returns a file_table entry number to use (>= 0) if okay 261 ; to open. Otherwise returns < 0 and may generate a critical 262 ; error. If < 0 is returned, it is the negated error return 263 ; code, so DOS simply negates this value and returns it in 264 ; AX. 265 ; STATIC int share_open_check(const char FAR * filename, 266 ; /* pointer to fully qualified filename */ 267 ; unsigned short pspseg, 268 ; /* psp segment address of owner process */ 269 ; int openmode, 270 ; /* 0=read-only, 1=write-only, 2=read-write */ 271 ; int sharemode) /* SHARE_COMPAT, etc... */ 272 global SHARE_OPEN_CHECK 273 SHARE_OPEN_CHECK: 0 0000073D 1E push ds 0 0000073E 07 pop es ; save ds 0 0000073F 89F7 mov di, si ; save si 0 00000741 58 pop ax ; return address 278 popargs {ds,si},bx,cx,dx; filename,pspseg,openmode,sharemode; 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 00000742 5E pop %1 243 <4> %rotate -1 0 00000743 1F pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 00000744 5B pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 00000745 59 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 00000746 5A pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 0 00000747 50 push ax ; return address 0 00000748 B8A010 mov ax, 0x10a0 0 0000074B CD2F int 0x2f ; returns ax 0 0000074D 89FE mov si, di ; restore si 0 0000074F 06 push es 0 00000750 1F pop ds ; restore ds 0 00000751 C3 ret 286 287 ; DOS calls this to record the fact that it has successfully 288 ; closed a file, or the fact that the open for this file failed. 289 ; STATIC void share_close_file(int fileno) /* file_table entry number */ 290 291 global SHARE_CLOSE_FILE 292 SHARE_CLOSE_FILE: 0 00000752 58 pop ax 0 00000753 5B pop bx 0 00000754 50 push ax 0 00000755 B8A110 mov ax, 0x10a1 0 00000758 CD2F int 0x2f 0 0000075A C3 ret 299 300 ; DOS calls this to determine whether it can access (read or 301 ; write) a specific section of a file. We call it internally 302 ; from lock_unlock (only when locking) to see if any portion 303 ; of the requested region is already locked. If pspseg is zero, 304 ; then it matches any pspseg in the lock table. Otherwise, only 305 ; locks which DO NOT belong to pspseg will be considered. 306 ; Returns zero if okay to access or lock (no portion of the 307 ; region is already locked). Otherwise returns non-zero and 308 ; generates a critical error (if allowcriter is non-zero). 309 ; If non-zero is returned, it is the negated return value for 310 ; the DOS call. 311 ;STATIC int share_access_check(unsigned short pspseg, 312 ; /* psp segment address of owner process */ 313 ; int fileno, /* file_table entry number */ 314 ; unsigned long ofs, /* offset into file */ 315 ; unsigned long len, /* length (in bytes) of region to access */ 316 ; int allowcriter) /* allow a critical error to be generated */ 317 global SHARE_ACCESS_CHECK 318 SHARE_ACCESS_CHECK: 0 0000075B B8A210 mov ax, 0x10a2 320 share_common: 0 0000075E 55 push bp 0 0000075F 89E5 mov bp, sp 0 00000761 56 push si 0 00000762 57 push di 325 arg pspseg, fileno, {ofs,4}, {len,4}, allowcriter 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 0 00000763 8B5E04 mov bx, [.pspseg] ; pspseg 0 00000766 8B4E06 mov cx, [.fileno] ; fileno 0 00000769 8B760A mov si, [.ofs+2] ; high word of ofs 0 0000076C 8B7E08 mov di, [.ofs] ; low word of ofs 0 0000076F C4560C les dx, [.len] ; len 0 00000772 0B4610 or ax, [.allowcriter] ; allowcriter/unlock 0 00000775 CD2F int 0x2f 0 00000777 5F pop di 0 00000778 5E pop si 0 00000779 5D pop bp 0 0000077A C20E00 ret 14 ; returns ax 337 338 ; DOS calls this to lock or unlock a specific section of a file. 339 ; Returns zero if successfully locked or unlocked. Otherwise 340 ; returns non-zero. 341 ; If the return value is non-zero, it is the negated error 342 ; return code for the DOS 0x5c call. */ 343 ;STATIC int share_lock_unlock(unsigned short pspseg, /* psp segment address of owner process */ 344 ; int fileno, /* file_table entry number */ 345 ; unsigned long ofs, /* offset into file */ 346 ; unsigned long len, /* length (in bytes) of region to lock or unlock */ 347 ; int unlock) /* one to unlock; zero to lock */ 348 global SHARE_LOCK_UNLOCK 349 SHARE_LOCK_UNLOCK: 0 0000077D B8A410 mov ax,0x10a4 0 00000780 EBDC jmp short share_common 352 353 ; DOS calls this to see if share already has the file marked as open. 354 ; Returns: 355 ; 1 if open 356 ; 0 if not 357 ; STATIC WORD share_is_file_open(const char far *filename) /* pointer to fully qualified filename */ 358 global SHARE_IS_FILE_OPEN 359 SHARE_IS_FILE_OPEN: 0 00000782 8CDE mov si, ds 0 00000784 8EC6 mov es, si ; save ds 0 00000786 58 pop ax ; save return address 0 00000787 5E pop si ; filename 0 00000788 1F pop ds ; SEG filename 0 00000789 50 push ax ; restore return address 0 0000078A B8A610 mov ax, 0x10a6 0 0000078D CD2F int 0x2f ; returns ax 0 0000078F 8CC6 mov si, es ; restore ds 0 00000791 8EDE mov ds, si 0 00000793 C3 ret 371 372 ; Int 2F Multipurpose Remote System Calls 373 ; 374 ; added by James Tabor jimtabor@infohwy.com 375 ; changed by Bart Oldeman 376 ; 377 ; assume ss == ds after setup of stack in entry 378 ; sumtimes return data *ptr is the push stack word 379 ; 380 381 remote_lseek: ; arg is a pointer to the long seek value 0 00000794 89CB mov bx, cx 0 00000796 8B17 mov dx, [bx] 0 00000798 8B4F02 mov cx, [bx+2] 385 ; "fall through" 386 387 remote_getfattr: 0 0000079B F8 clc ; set to succeed 0 0000079C CD2F int 2fh 0 0000079E 7253 jc ret_neg_ax 0 000007A0 EB53 jmp short ret_int2f 392 393 remote_lock_unlock: 0 000007A2 89CA mov dx, cx ; parameter block (dx) in arg 0 000007A4 89CB mov bx, cx 0 000007A6 8A5F08 mov bl, [bx + 8] ; unlock or not 0 000007A9 B90100 mov cx, 1 0 000007AC CD2F int 0x2f 0 000007AE 7366 jnc ret_set_ax_to_carry 0 000007B0 B400 mov ah, 0 0 000007B2 EB3F jmp short ret_neg_ax 402 403 ;long ASMPASCAL network_redirector_mx(unsigned cmd, void far *s, void *arg) 404 global NETWORK_REDIRECTOR_MX 405 NETWORK_REDIRECTOR_MX: 0 000007B4 5B pop bx ; ret address 407 popargs ax,{es,dx},cx ; cmd (ax), seg:off s 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000007B5 58 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000007B6 5A pop %1 243 <4> %rotate -1 0 000007B7 07 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000007B8 59 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 408 ; stack value (arg); cx in remote_rw 0 000007B9 53 push bx ; ret address 410 call_int2f: 0 000007BA 55 push bp 0 000007BB 56 push si 0 000007BC 57 push di 0 000007BD 3C0F cmp al, 0fh 0 000007BF 74DA je remote_getfattr 416 0 000007C1 89D7 mov di, dx ; es:di -> s and dx is used for 1125! 0 000007C3 3C08 cmp al, 08h 0 000007C5 7469 je remote_rw 0 000007C7 3C09 cmp al, 09h 0 000007C9 7465 je remote_rw 0 000007CB 3C0A cmp al, 0ah 0 000007CD 74D3 je remote_lock_unlock 0 000007CF 3C21 cmp al, 21h 0 000007D1 74C1 je remote_lseek 0 000007D3 3C22 cmp al, 22h 0 000007D5 746D je remote_process_end 0 000007D7 3C23 cmp al, 23h 0 000007D9 7463 je qremote_fn 430 0 000007DB 51 push cx ; arg 0 000007DC 3C0C cmp al, 0ch 0 000007DE 743A je remote_getfree 0 000007E0 3CA3 cmp al, 0xa3 0 000007E2 7436 je remote_getfree 0 000007E4 3C1E cmp al, 1eh 0 000007E6 7414 je remote_print_doredir 0 000007E8 3C1F cmp al, 1fh 0 000007EA 7410 je remote_print_doredir 440 441 int2f_call: 0 000007EC 31C9 xor cx, cx ; set to succeed; clear carry and CX 0 000007EE CD2F int 2fh 0 000007F0 5B pop bx 0 000007F1 7306 jnc ret_set_ax_to_cx 446 ret_neg_ax: 0 000007F3 F7D8 neg ax 448 ret_int2f: 0 000007F5 5F pop di 0 000007F6 5E pop si 0 000007F7 5D pop bp 0 000007F8 C3 ret 453 454 ret_set_ax_to_cx: ; ext_open or rw -> status from CX in AX 455 ; otherwise CX was set to zero above 0 000007F9 91 xchg ax, cx ; set ax:=cx (one byte shorter than mov) 0 000007FA EBF9 jmp short ret_int2f 458 459 remote_print_doredir: ; di points to an lregs structure 0 000007FC 8E450E mov es,[di+0xe] 0 000007FF 8B5D02 mov bx,[di+2] 0 00000802 8B4D04 mov cx,[di+4] 0 00000805 8B5506 mov dx,[di+6] 0 00000808 8B7508 mov si,[di+8] 0 0000080B C57D0A lds di,[di+0xa] 466 0 0000080E F8 clc ; set to succeed 0 0000080F CD2F int 2fh 0 00000811 5B pop bx ; restore stack and ds=ss 0 00000812 16 push ss 0 00000813 1F pop ds 0 00000814 72DD jc ret_neg_ax 473 ret_set_ax_to_carry: ; carry => -1 else 0 (SUCCESS) 0 00000816 19C0 sbb ax, ax 0 00000818 EBDB jmp short ret_int2f 476 477 remote_getfree: 0 0000081A F8 clc ; set to succeed 0 0000081B CD2F int 2fh 0 0000081D 5F pop di ; retrieve pushed pointer arg 0 0000081E 72F6 jc ret_set_ax_to_carry 0 00000820 8905 mov [di],ax 0 00000822 895D02 mov [di+2],bx 0 00000825 894D04 mov [di+4],cx 0 00000828 895506 mov [di+6],dx 0 0000082B 897508 mov [di+8],si ; for REM_GETLARGEFREE, unused on REM_GETFREE 0 0000082E EBE6 jmp short ret_set_ax_to_carry 488 489 remote_rw: 0 00000830 F8 clc ; set to succeed 0 00000831 CD2F int 2fh 0 00000833 7204 jc ret_min_dx_ax 0 00000835 31D2 xor dx, dx ; dx:ax := dx:cx = bytes read 0 00000837 EBC0 jmp short ret_set_ax_to_cx 0 00000839 F7D8 ret_min_dx_ax: neg ax 0 0000083B 99 cwd 0 0000083C EBB7 jmp short ret_int2f 498 499 qremote_fn: 0 0000083E 89CB mov bx, cx 0 00000840 C537 lds si, [bx] 0 00000842 EB04 jmp short int2f_restore_ds 503 504 remote_process_end: ; Terminate process 0 00000844 8E1E[0000] mov ds, [_cu_psp] 506 int2f_restore_ds: 0 00000848 F8 clc 0 00000849 CD2F int 2fh 0 0000084B 16 push ss 0 0000084C 1F pop ds 0 0000084D EBC7 jmp short ret_set_ax_to_carry 512 513 ; extern UWORD ASMPASCAL call_nls(UWORD bp, UWORD FAR *buf, 514 ; UWORD subfct, UWORD cp, UWORD cntry, UWORD bufsize); 515 516 extern _nlsInfo 517 global CALL_NLS 518 CALL_NLS: 0 0000084F 07 pop es ; ret addr 0 00000850 59 pop cx ; bufsize 0 00000851 5A pop dx ; cntry 0 00000852 5B pop bx ; cp 0 00000853 58 pop ax ; sub fct 0 00000854 B414 mov ah, 0x14 0 00000856 06 push es ; ret addr 0 00000857 55 push bp 0 00000858 89E5 mov bp, sp 0 0000085A 56 push si 0 0000085B 57 push di 0 0000085C BE[0000] mov si, _nlsInfo ; nlsinfo 0 0000085F C47E04 les di, [bp + 4] ; buf 0 00000862 8B6E08 mov bp, [bp + 8] ; bp 0 00000865 CD2F int 0x2f 0 00000867 89DA mov dx, bx ; return id in high word 0 00000869 5F pop di 0 0000086A 5E pop si 0 0000086B 5D pop bp 0 0000086C C20600 ret 6 539 540 ; extern UWORD ASMPASCAL floppy_change(UWORD drives) 541 542 global FLOPPY_CHANGE 543 FLOPPY_CHANGE: 0 0000086F 59 pop cx ; ret addr 0 00000870 5A pop dx ; drives 0 00000871 51 push cx ; ret addr 0 00000872 B8004A mov ax, 0x4a00 0 00000875 31C9 xor cx, cx 0 00000877 CD2F int 0x2f 0 00000879 89C8 mov ax, cx ; return 0 0000087B C3 ret 552 553 ; 554 ; Test to see if a umb driver has been loaded. 555 ; if so, retrieve largest available block+size 556 ; 557 ; From RB list and Dosemu xms.c. 558 ; 559 ; Call the XMS driver "Request upper memory block" function with: 560 ; AH = 10h 561 ; DX = size of block in paragraphs 562 ; Return: AX = status 563 ; 0001h success 564 ; BX = segment address of UMB 565 ; DX = actual size of block 566 ; 0000h failure 567 ; BL = error code (80h,B0h,B1h) (see #02775) 568 ; DX = largest available block 569 ; 570 ; (Table 02775) 571 ; Values for XMS error code returned in BL: 572 ; 00h successful 573 ; 80h function not implemented 574 ; B0h only a smaller UMB is available 575 ; B1h no UMBs are available 576 ; B2h UMB segment number is invalid 577 ; 578 === Switch to base=00E0E0h -> "INIT_TEXT" 579 segment INIT_TEXT 580 ; int ASMPASCAL UMB_get_largest(void FAR * driverAddress, 581 ; UCOUNT * seg, UCOUNT * size); 582 arg {driverAddress,4}, argseg, size 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 224 <3> %xdefine .%1 bp+.argloc 225 <3> %assign .argloc .argloc+%2 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 583 global UMB_GET_LARGEST 584 585 UMB_GET_LARGEST: 0 0000019F 55 push bp 0 000001A0 89E5 mov bp,sp 588 0 000001A2 BAFFFF mov dx,0xffff ; go for broke! 0 000001A5 B80010 mov ax,1000h ; get the UMBs 0 000001A8 FF5E04 call far [.driverAddress] ; Call the driver 592 593 ; 594 ; bl = 0xB0 and ax = 0 so do it again. 595 ; 0 000001AB 80FBB0 cmp bl,0xb0 ; fail safe 0 000001AE 751F jne umbt_error 598 0 000001B0 21D2 and dx,dx ; if it returns a size of zero. 0 000001B2 741B je umbt_error 601 0 000001B4 B80010 mov ax,1000h ; dx set with largest size 0 000001B7 FF5E04 call far [.driverAddress] ; Call the driver 604 0 000001BA 83F801 cmp ax,1 0 000001BD 7510 jne umbt_error 607 ; now return the segment 608 ; and the size 609 0 000001BF 89D9 mov cx,bx ; *seg = segment 0 000001C1 8B5E08 mov bx, [.argseg] 0 000001C4 890F mov [bx],cx 613 0 000001C6 8B5E0A mov bx, [.size] ; *size = size 0 000001C9 8917 mov [bx],dx 616 617 umbt_ret: 0 000001CB 5D pop bp 0 000001CC C20800 ret 8 ; this was called NEAR!! 620 0 000001CF 31C0 umbt_error: xor ax,ax 0 000001D1 EBF8 jmp short umbt_ret === Trace listing source: inthndlr.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=inthndlr.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccx2qiBA.s output file : inthndlr.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .global _int21_syscall 7 .type _int21_syscall, @function 8 _int21_syscall: 0 00007B30 89E3 mov bx, sp 0 00007B32 1E push ds 0 00007B33 07 pop es 0 00007B34 368B5F02 mov bx, word ptr ss:[bx+2] 0 00007B38 368B07 mov ax, word ptr ss:[bx] 0 00007B3B 26A30000 mov word ptr es:[_Int21AX], ax 0 00007B3F 368A4701 mov al, byte ptr ss:[bx+1] 0 00007B43 3C50 cmp al, 80 0 00007B45 7503E9BD00 je _.L3 0 00007B4A 7707 ja _.L4 0 00007B4C 3C33 cmp al, 51 0 00007B4E 7415 je _.L5 21 _.L1: 0 00007B50 06 push es 0 00007B51 1F pop ds 0 00007B52 C3 ret 25 _.L4: 0 00007B53 3C51 cmp al, 81 0 00007B55 7404 je _.L6 0 00007B57 3C62 cmp al, 98 0 00007B59 75F5 jne _.L1 30 _.L6: 0 00007B5B 26A10000 mov ax, word ptr es:[_cu_psp] 0 00007B5F 36894702 mov word ptr ss:[bx+2], ax 0 00007B63 EBEB jmp _.L1 34 _.L5: 0 00007B65 368A07 mov al, byte ptr ss:[bx] 0 00007B68 3C05 cmp al, 5 0 00007B6A 7478 je _.L8 0 00007B6C 7710 ja _.L9 0 00007B6E 3C01 cmp al, 1 0 00007B70 7448 je _.L10 0 00007B72 7250 jc _.L11 0 00007B74 3C02 cmp al, 2 0 00007B76 7456 je _.L12 44 _.L7: 0 00007B78 36C607FF mov byte ptr ss:[bx], -1 0 00007B7C EBD2 jmp _.L1 47 _.L9: 0 00007B7E 3CFA cmp al, -6 0 00007B80 7468 je _.L13 0 00007B82 7723 ja _.L14 0 00007B84 3C06 cmp al, 6 0 00007B86 75F0 jne _.L7 0 00007B88 26A00000 mov al, byte ptr es:[_os_major] 0 00007B8C 36884702 mov byte ptr ss:[bx+2], al 0 00007B90 26A00000 mov al, byte ptr es:[_os_minor] 0 00007B94 36884703 mov byte ptr ss:[bx+3], al 0 00007B98 36C6470600 mov byte ptr ss:[bx+6], 0 0 00007B9D 26A00000 mov al, byte ptr es:[_version_flags] 0 00007BA1 36884707 mov byte ptr ss:[bx+7], al 0 00007BA5 EBA9 jmp _.L1 61 _.L14: 0 00007BA7 3CFC cmp al, -4 0 00007BA9 7449 je _.L16 0 00007BAB 3CFF cmp al, -1 0 00007BAD 75C9 jne _.L7 0 00007BAF 368C5F06 mov word ptr ss:[bx+6], ds 0 00007BB3 36C7070000 mov word ptr ss:[bx], offset _os_release 0 00007BB8 EB96 jmp _.L1 69 _.L10: 0 00007BBA 368A4706 mov al, byte ptr ss:[bx+6] 0 00007BBE 2401 and al, 1 0 00007BC0 26A20000 mov byte ptr es:[_break_ena], al 73 _.L11: 0 00007BC4 26A00000 mov al, byte ptr es:[_break_ena] 75 _.L25: 0 00007BC8 36884706 mov byte ptr ss:[bx+6], al 0 00007BCC EB82 jmp _.L1 78 _.L12: 0 00007BCE 268A260000 mov ah, byte ptr es:[_break_ena] 0 00007BD3 368A4706 mov al, byte ptr ss:[bx+6] 0 00007BD7 2401 and al, 1 0 00007BD9 26A20000 mov byte ptr es:[_break_ena], al 0 00007BDD 36886706 mov byte ptr ss:[bx+6], ah 0 00007BE1 E96CFF jmp _.L1 85 _.L8: 0 00007BE4 26A00000 mov al, byte ptr es:[_BootDrive] 0 00007BE8 EBDE jmp _.L25 88 _.L13: 0 00007BEA 26A00000 mov al, byte ptr es:[_CPULevel] 0 00007BEE 368807 mov byte ptr ss:[bx], al 0 00007BF1 E95CFF jmp _.L1 92 _.L16: 0 00007BF4 368A4702 mov al, byte ptr ss:[bx+2] 0 00007BF8 26A20000 mov byte ptr es:[_os_setver_major], al 0 00007BFC 368A4703 mov al, byte ptr ss:[bx+3] 0 00007C00 26A20000 mov byte ptr es:[_os_setver_minor], al 0 00007C04 E949FF jmp _.L1 98 _.L3: 0 00007C07 368B4702 mov ax, word ptr ss:[bx+2] 0 00007C0B 26A30000 mov word ptr es:[_cu_psp], ax 0 00007C0F E93EFF jmp _.L1 102 .size _int21_syscall, .-_int21_syscall 103 .global _int21_fat32 104 .type _int21_fat32, @function 105 _int21_fat32: 0 00007C12 56 push si 0 00007C13 57 push di 0 00007C14 55 push bp 0 00007C15 89E5 mov bp, sp 0 00007C17 83EC0E sub sp, 14 0 00007C1A 8B7608 mov si, word ptr [bp+8] 0 00007C1D 8A04 mov al, byte ptr [si] 0 00007C1F 3C03 cmp al, 3 0 00007C21 7503E9A201 je _.L28 0 00007C26 770D ja _.L29 0 00007C28 3C02 cmp al, 2 0 00007C2A 7503E99100 je _.L30 118 _.L70: 0 00007C2F B9FFFF mov cx, -1 0 00007C32 E98A01 jmp _.L26 121 _.L29: 0 00007C35 3C04 cmp al, 4 0 00007C37 7503E9AA01 je _.L31 0 00007C3C 3C05 cmp al, 5 0 00007C3E 75EF jne _.L70 0 00007C40 8B4C0C mov cx, word ptr [si+12] 0 00007C43 8B5C02 mov bx, word ptr [si+2] 0 00007C46 837C04FF cmp word ptr [si+4], -1 0 00007C4A 7403E91D02 jne _.L45 0 00007C4F 8B5408 mov dx, word ptr [si+8] 0 00007C52 F7C2FE9F test dx, -24578 0 00007C56 7403E91102 jne _.L45 0 00007C5B 8A4406 mov al, byte ptr [si+6] 0 00007C5E 3A060000 cmp al, byte ptr [_lastdrive] 0 00007C62 7603E9F503 ja _.L72 0 00007C67 84C0 test al, al 0 00007C69 7503E9EE03 je _.L72 0 00007C6E 83E201 and dx, 1 0 00007C71 83FA01 cmp dx, 1 0 00007C74 F5 cmc 0 00007C75 18D2 sbb dl, dl 0 00007C77 80C204 add dl, 4 0 00007C7A 8856FC mov byte ptr [bp-4], dl 0 00007C7D 30F6 xor dh, dh 0 00007C7F 52 push dx 0 00007C80 8EC1 mov es, cx 0 00007C82 26FF7704 push word ptr es:[bx+4] 0 00007C86 26FF7708 push word ptr es:[bx+8] 0 00007C8A 26FF7706 push word ptr es:[bx+6] 0 00007C8E 26FF7702 push word ptr es:[bx+2] 0 00007C92 26FF37 push word ptr es:[bx] 0 00007C95 30E4 xor ah, ah 0 00007C97 48 dec ax 0 00007C98 50 push ax 0 00007C99 E8FEFF call _dskxfer 0 00007C9C 8904 mov word ptr [si], ax 0 00007C9E 85C0 test ax, ax 0 00007CA0 7510 jne _.L63 0 00007CA2 807EFC03 cmp byte ptr [bp-4], 3 0 00007CA6 750A jne _.L63 0 00007CA8 8A4406 mov al, byte ptr [si+6] 0 00007CAB 30E4 xor ah, ah 0 00007CAD 48 dec ax 0 00007CAE 50 push ax 0 00007CAF E8FEFF call _setinvld 166 _.L63: 0 00007CB2 833C00 cmp word ptr [si], 0 0 00007CB5 7503E92102 je _.L96 0 00007CBA B9F4FD mov cx, -524 0 00007CBD E9FF00 jmp _.L26 171 _.L30: 0 00007CC0 837C043E cmp word ptr [si+4], 62 0 00007CC4 7703E98D03 jbe _.L69 0 00007CC9 8D46FE lea ax, [-2+bp] 0 00007CCC 50 push ax 0 00007CCD FF7406 push word ptr [si+6] 0 00007CD0 E8FEFF call _GetDriveDPB 0 00007CD3 93 xchg bx, ax 0 00007CD4 8B4EFE mov cx, word ptr [bp-2] 0 00007CD7 85C9 test cx, cx 0 00007CD9 7403E9E100 jne _.L26 0 00007CDE 894EF4 mov word ptr [bp-12], cx 0 00007CE1 8EC2 mov es, dx 0 00007CE3 8956FA mov word ptr [bp-6], dx 0 00007CE6 268A07 mov al, byte ptr es:[bx] 0 00007CE9 895EFC mov word ptr [bp-4], bx 0 00007CEC 98 cbw 0 00007CED 50 push ax 0 00007CEE E8FEFF call _flush_buffers 0 00007CF1 8B56FA mov dx, word ptr [bp-6] 0 00007CF4 8EC2 mov es, dx 0 00007CF6 8B5EFC mov bx, word ptr [bp-4] 0 00007CF9 26C64718FF mov byte ptr es:[bx+24], -1 0 00007CFE 52 push dx 0 00007CFF 8956F6 mov word ptr [bp-10], dx 0 00007D02 53 push bx 0 00007D03 895EF8 mov word ptr [bp-8], bx 0 00007D06 E8FEFF call _media_check 0 00007D09 85C0 test ax, ax 0 00007D0B 7D03E94602 jl _.L71 0 00007D10 8B440E mov ax, word ptr [si+14] 0 00007D13 8946FC mov word ptr [bp-4], ax 0 00007D16 8B740A mov si, word ptr [si+10] 0 00007D19 89F0 mov ax, si 0 00007D1B 83C002 add ax, 2 0 00007D1E 8946FA mov word ptr [bp-6], ax 0 00007D21 BF3D00 mov di, 61 0 00007D24 57 push di 0 00007D25 8B56F6 mov dx, word ptr [bp-10] 0 00007D28 52 push dx 0 00007D29 8B5EF8 mov bx, word ptr [bp-8] 0 00007D2C 53 push bx 0 00007D2D FF76FC push word ptr [bp-4] 0 00007D30 50 push ax 0 00007D31 E8FEFF call _fmemcpy 0 00007D34 8E46FC mov es, word ptr [bp-4] 0 00007D37 26893C mov word ptr es:[si], di 0 00007D3A 8B56F6 mov dx, word ptr [bp-10] 0 00007D3D 8EC2 mov es, dx 0 00007D3F 8B5EF8 mov bx, word ptr [bp-8] 0 00007D42 26837F0F00 cmp word ptr es:[bx+15], 0 0 00007D47 7503E98F01 je _.L96 0 00007D4C 268B470D mov ax, word ptr es:[bx+13] 0 00007D50 2639472D cmp word ptr es:[bx+45], ax 0 00007D54 8B4EF4 mov cx, word ptr [bp-12] 0 00007D57 7509 jne _.L75 0 00007D59 26394F2F cmp word ptr es:[bx+47], cx 0 00007D5D 7503E97901 je _.L96 229 _.L75: 0 00007D62 8EC2 mov es, dx 0 00007D64 8956F4 mov word ptr [bp-12], dx 0 00007D67 26837F1FFF cmp word ptr es:[bx+31], -1 0 00007D6C 895EF6 mov word ptr [bp-10], bx 0 00007D6F B90000 mov cx, 0 0 00007D72 894EF8 mov word ptr [bp-8], cx 0 00007D75 F5 cmc 0 00007D76 19C0 sbb ax, ax 0 00007D78 8E46FC mov es, word ptr [bp-4] 0 00007D7B 26894423 mov word ptr es:[si+35], ax 0 00007D7F FF76FC push word ptr [bp-4] 0 00007D82 FF76FA push word ptr [bp-6] 0 00007D85 E8FEFF call _dpb16to32 0 00007D88 8B56F4 mov dx, word ptr [bp-12] 0 00007D8B 8EC2 mov es, dx 0 00007D8D 8B5EF6 mov bx, word ptr [bp-10] 0 00007D90 268B470F mov ax, word ptr es:[bx+15] 0 00007D94 8E46FC mov es, word ptr [bp-4] 0 00007D97 26894433 mov word ptr es:[si+51], ax 0 00007D9B 8E46FC mov es, word ptr [bp-4] 0 00007D9E 8B4EF8 mov cx, word ptr [bp-8] 0 00007DA1 26894C35 mov word ptr es:[si+53], cx 0 00007DA5 8EC2 mov es, dx 0 00007DA7 268B471D mov ax, word ptr es:[bx+29] 0 00007DAB 83F8FF cmp ax, -1 0 00007DAE F5 cmc 0 00007DAF 19D2 sbb dx, dx 0 00007DB1 8E46FC mov es, word ptr [bp-4] 0 00007DB4 2689443B mov word ptr es:[si+59], ax 0 00007DB8 8E46FC mov es, word ptr [bp-4] 0 00007DBB 2689543D mov word ptr es:[si+61], dx 261 _.L26: 0 00007DBF 91 xchg cx, ax 0 00007DC0 89EC mov sp, bp 0 00007DC2 5D pop bp 0 00007DC3 5F pop di 0 00007DC4 5E pop si 0 00007DC5 C20200 ret 2 268 _.L28: 0 00007DC8 8B540E mov dx, word ptr [si+14] 0 00007DCB 8B440A mov ax, word ptr [si+10] 0 00007DCE 837C042B cmp word ptr [si+4], 43 0 00007DD2 7703E97F02 jbe _.L69 0 00007DD7 52 push dx 0 00007DD8 50 push ax 0 00007DD9 8B4406 mov ax, word ptr [si+6] 0 00007DDC FF740C push word ptr [si+12] 0 00007DDF 50 push ax 0 00007DE0 E8FEFF call _DosGetExtFree 0 00007DE3 91 xchg cx, ax 0 00007DE4 EBD9 jmp _.L26 281 _.L31: 0 00007DE6 8B440E mov ax, word ptr [si+14] 0 00007DE9 8946FA mov word ptr [bp-6], ax 0 00007DEC 8B440A mov ax, word ptr [si+10] 0 00007DEF 8946F8 mov word ptr [bp-8], ax 0 00007DF2 837C0417 cmp word ptr [si+4], 23 0 00007DF6 7703E95B02 jbe _.L69 0 00007DFB 8D46FE lea ax, [-2+bp] 0 00007DFE 50 push ax 0 00007DFF FF7406 push word ptr [si+6] 0 00007E02 E8FEFF call _GetDriveDPB 0 00007E05 93 xchg bx, ax 0 00007E06 8956FC mov word ptr [bp-4], dx 0 00007E09 8B4EFE mov cx, word ptr [bp-2] 0 00007E0C 85C9 test cx, cx 0 00007E0E 75AF jne _.L26 0 00007E10 C47EF8 les di, dword ptr [bp-8] 0 00007E13 26C7051800 mov word ptr es:[di], 24 0 00007E18 C47EF8 les di, dword ptr [bp-8] 0 00007E1B 26894D02 mov word ptr es:[di+2], cx 0 00007E1F C47EF8 les di, dword ptr [bp-8] 0 00007E22 268B4504 mov ax, word ptr es:[di+4] 0 00007E26 83F804 cmp ax, 4 0 00007E29 7603E901FE ja _.L70 0 00007E2E 89C2 mov dx, ax 0 00007E30 D1E2 shl dx, 1 0 00007E32 89D7 mov di, dx 0 00007E34 FFA50000 jmp word ptr [di+_.L37] === Switch to base=012B40h -> ".RODATA" 309 .section .rodata 310 .p2align 1 311 .p2align 2 312 _.L37: 0 00001680 0803 .hword _.L36 0 00001682 DF03 .hword _.L38 0 00001684 0504 .hword _.L39 0 00001686 2C04 .hword _.L40 0 00001688 2C04 .hword _.L40 === Switch to base=002270h -> ".TEXT" 318 .text 319 _.L36: 0 00007E38 C47EF8 les di, dword ptr [bp-8] 0 00007E3B 268B5508 mov dx, word ptr es:[di+8] 0 00007E3F 268B750A mov si, word ptr es:[di+10] 0 00007E43 268B450C mov ax, word ptr es:[di+12] 0 00007E47 268B4D0E mov cx, word ptr es:[di+14] 0 00007E4B 894EFA mov word ptr [bp-6], cx 0 00007E4E 8E46FC mov es, word ptr [bp-4] 0 00007E51 26837F0F00 cmp word ptr es:[bx+15], 0 0 00007E56 7403E98500 jne _.L41 0 00007E5B 26837F25FF cmp word ptr es:[bx+37], -1 0 00007E60 7510 jne _.L42 0 00007E62 89D7 mov di, dx 0 00007E64 09C7 or di, ax 0 00007E66 09F1 or cx, si 0 00007E68 09CF or di, cx 0 00007E6A 740F je _.L43 336 _.L45: 0 00007E6C B9A9FF mov cx, -87 0 00007E6F E94DFF jmp _.L26 339 _.L42: 0 00007E72 83FA01 cmp dx, 1 0 00007E75 7504 jne _.L43 0 00007E77 85F6 test si, si 0 00007E79 74F1 je _.L45 344 _.L43: 0 00007E7B 8E46FC mov es, word ptr [bp-4] 0 00007E7E 268B4F2D mov cx, word ptr es:[bx+45] 0 00007E82 894EF8 mov word ptr [bp-8], cx 0 00007E85 268B4F2F mov cx, word ptr es:[bx+47] 0 00007E89 89CF mov di, cx 0 00007E8B B501 mov ch, 1 0 00007E8D 397EFA cmp word ptr [bp-6], di 0 00007E90 7709 ja _.L47 0 00007E92 7505 jne _.L48 0 00007E94 3B46F8 cmp ax, word ptr [bp-8] 0 00007E97 7702 ja _.L47 356 _.L48: 0 00007E99 30ED xor ch, ch 358 _.L47: 0 00007E9B B101 mov cl, 1 0 00007E9D 39FE cmp si, di 0 00007E9F 7709 ja _.L49 0 00007EA1 7505 jne _.L50 0 00007EA3 3B56F8 cmp dx, word ptr [bp-8] 0 00007EA6 7702 ja _.L49 365 _.L50: 0 00007EA8 30C9 xor cl, cl 367 _.L49: 0 00007EAA 08CD or ch, cl 0 00007EAC 75BE jne _.L45 0 00007EAE 89C1 mov cx, ax 0 00007EB0 83F101 xor cx, 1 0 00007EB3 0B4EFA or cx, word ptr [bp-6] 0 00007EB6 74B4 je _.L45 0 00007EB8 8E46FC mov es, word ptr [bp-4] 0 00007EBB 2689571F mov word ptr es:[bx+31], dx 0 00007EBF 8E46FC mov es, word ptr [bp-4] 0 00007EC2 26897721 mov word ptr es:[bx+33], si 0 00007EC6 8E46FC mov es, word ptr [bp-4] 0 00007EC9 26894739 mov word ptr es:[bx+57], ax 0 00007ECD C446FA les ax, dword ptr [bp-6] 0 00007ED0 2689473B mov word ptr es:[bx+59], ax 0 00007ED4 FF76FC push word ptr [bp-4] 0 00007ED7 53 push bx 0 00007ED8 E8FEFF call _write_fsinfo 385 _.L96: 0 00007EDB 31C9 xor cx, cx 0 00007EDD E9DFFE jmp _.L26 388 _.L41: 0 00007EE0 83FA01 cmp dx, 1 0 00007EE3 7487 je _.L45 0 00007EE5 8E46FC mov es, word ptr [bp-4] 0 00007EE8 268B4F0D mov cx, word ptr es:[bx+13] 0 00007EEC 39CA cmp dx, cx 0 00007EEE 7603E979FF ja _.L45 0 00007EF3 39C1 cmp cx, ax 0 00007EF5 7303E972FF jc _.L45 0 00007EFA 83F801 cmp ax, 1 0 00007EFD 7503E96AFF je _.L45 0 00007F02 2689571F mov word ptr es:[bx+31], dx 0 00007F06 8E46FC mov es, word ptr [bp-4] 0 00007F09 2689471D mov word ptr es:[bx+29], ax 0 00007F0D EBCC jmp _.L96 403 _.L38: 0 00007F0F 895EF6 mov word ptr [bp-10], bx 0 00007F12 8A4406 mov al, byte ptr [si+6] 0 00007F15 30E4 xor ah, ah 0 00007F17 50 push ax 0 00007F18 E8FEFF call _getddt 0 00007F1B BA2900 mov dx, 41 0 00007F1E 52 push dx 0 00007F1F C45EF8 les bx, dword ptr [bp-8] 0 00007F22 26FF770E push word ptr es:[bx+14] 0 00007F26 26FF770C push word ptr es:[bx+12] 0 00007F2A 83C006 add ax, 6 0 00007F2D 16 push ss 0 00007F2E 50 push ax 0 00007F2F E8FEFF call _fmemcpy 0 00007F32 8B5EF6 mov bx, word ptr [bp-10] 419 _.L39: 0 00007F35 8E46FC mov es, word ptr [bp-4] 0 00007F38 268A07 mov al, byte ptr es:[bx] 0 00007F3B 895EFA mov word ptr [bp-6], bx 0 00007F3E 98 cbw 0 00007F3F 50 push ax 0 00007F40 E8FEFF call _flush_buffers 0 00007F43 C45EFA les bx, dword ptr [bp-6] 0 00007F46 26C64718FF mov byte ptr es:[bx+24], -1 0 00007F4B FF76FC push word ptr [bp-4] 0 00007F4E 53 push bx 0 00007F4F E8FEFF call _media_check 0 00007F52 85C0 test ax, ax 0 00007F54 7D85 jge _.L96 433 _.L71: 0 00007F56 B9F1FF mov cx, -15 0 00007F59 E963FE jmp _.L26 436 _.L40: 0 00007F5C 8E46FC mov es, word ptr [bp-4] 0 00007F5F 26837F0F00 cmp word ptr es:[bx+15], 0 0 00007F64 7403E903FF jne _.L45 0 00007F69 C47EF8 les di, dword ptr [bp-8] 0 00007F6C 268B4D08 mov cx, word ptr es:[di+8] 0 00007F70 268B750A mov si, word ptr es:[di+10] 0 00007F74 83F803 cmp ax, 3 0 00007F77 757F jne _.L51 0 00007F79 83F9FF cmp cx, -1 0 00007F7C 7505 jne _.L76 0 00007F7E 83FEFF cmp si, -1 0 00007F81 740C je _.L52 449 _.L76: 0 00007F83 89C8 mov ax, cx 0 00007F85 2570FF and ax, -144 0 00007F88 09F0 or ax, si 0 00007F8A 7403E9DDFE jne _.L45 454 _.L52: 0 00007F8F 8E46FC mov es, word ptr [bp-4] 0 00007F92 268B4723 mov ax, word ptr es:[bx+35] 0 00007F96 C47EF8 les di, dword ptr [bp-8] 0 00007F99 2689450C mov word ptr es:[di+12], ax 0 00007F9D C47EF8 les di, dword ptr [bp-8] 0 00007FA0 26C7450E0000 mov word ptr es:[di+14], 0 461 _.L54: 0 00007FA6 83F9FF cmp cx, -1 0 00007FA9 7505 jne _.L79 0 00007FAB 83FEFF cmp si, -1 0 00007FAE 7485 je _.L39 466 _.L79: 0 00007FB0 894EF2 mov word ptr [bp-14], cx 0 00007FB3 31D2 xor dx, dx 0 00007FB5 52 push dx 0 00007FB6 8E46FC mov es, word ptr [bp-4] 0 00007FB9 268A07 mov al, byte ptr es:[bx] 0 00007FBC 895EF4 mov word ptr [bp-12], bx 0 00007FBF 98 cbw 0 00007FC0 50 push ax 0 00007FC1 52 push dx 0 00007FC2 B80100 mov ax, 1 0 00007FC5 50 push ax 0 00007FC6 E8FEFF call _getblk 0 00007FC9 8EC2 mov es, dx 0 00007FCB 89C3 mov bx, ax 0 00007FCD 268A4F05 mov cl, byte ptr es:[bx+5] 0 00007FD1 884EF6 mov byte ptr [bp-10], cl 0 00007FD4 80E1F1 and cl, -15 0 00007FD7 80C960 or cl, 96 0 00007FDA 26884F05 mov byte ptr es:[bx+5], cl 0 00007FDE C45EF8 les bx, dword ptr [bp-8] 0 00007FE1 26837F0403 cmp word ptr es:[bx+4], 3 0 00007FE6 8B5EF4 mov bx, word ptr [bp-12] 0 00007FE9 8B4EF2 mov cx, word ptr [bp-14] 0 00007FEC 8EC2 mov es, dx 0 00007FEE 97 xchg di, ax 0 00007FEF 755A jne _.L60 0 00007FF1 26894D3C mov word ptr es:[di+60], cx 0 00007FF5 E93DFF jmp _.L39 495 _.L51: 0 00007FF8 83F9FF cmp cx, -1 0 00007FFB 7505 jne _.L77 0 00007FFD 83FEFF cmp si, -1 0 00008000 741E je _.L55 500 _.L77: 0 00008002 85F6 test si, si 0 00008004 7539 jne _.L78 0 00008006 83F901 cmp cx, 1 0 00008009 7703E95EFE jbe _.L45 505 _.L84: 0 0000800E 8E46FC mov es, word ptr [bp-4] 0 00008011 2639772F cmp word ptr es:[bx+47], si 0 00008015 7509 jne _.L55 0 00008017 26394F2D cmp word ptr es:[bx+45], cx 0 0000801B 7303E94CFE jc _.L45 511 _.L55: 0 00008020 8E46FC mov es, word ptr [bp-4] 0 00008023 268B4735 mov ax, word ptr es:[bx+53] 0 00008027 C47EF8 les di, dword ptr [bp-8] 0 0000802A 2689450C mov word ptr es:[di+12], ax 0 0000802E 8E46FC mov es, word ptr [bp-4] 0 00008031 268B4737 mov ax, word ptr es:[bx+55] 0 00008035 C47EF8 les di, dword ptr [bp-8] 0 00008038 2689450E mov word ptr es:[di+14], ax 0 0000803C E967FF jmp _.L54 521 _.L78: 0 0000803F 8E46FC mov es, word ptr [bp-4] 0 00008042 2639772F cmp word ptr es:[bx+47], si 0 00008046 73C6 jnc _.L84 0 00008048 E921FE jmp _.L45 526 _.L60: 0 0000804B 26894D40 mov word ptr es:[di+64], cx 0 0000804F 26897542 mov word ptr es:[di+66], si 0 00008053 E9DFFE jmp _.L39 530 _.L69: 0 00008056 B9E8FF mov cx, -24 0 00008059 E963FD jmp _.L26 533 _.L72: 0 0000805C B9F9FD mov cx, -519 0 0000805F E95DFD jmp _.L26 536 .size _int21_fat32, .-_int21_fat32 === Switch to base=012B40h -> ".RODATA.STR1.1" 537 .section .rodata.str1.1,"aMS",@progbits,1 538 _.LC0: 0 0000199D 4D43422063686169 .string "MCB chain corrupted" 0 000019A5 6E20636F72727570 0 000019AD 74656400 540 _.LC1: 0 000019B1 6265666F72652034 .string "before 4a: MCB chain corrupted" 0 000019B9 613A204D43422063 0 000019C1 6861696E20636F72 0 000019C9 72757074656400 542 _.LC2: 0 000019D0 6166746572203461 .string "after 4a: MCB chain corrupted" 0 000019D8 3A204D4342206368 0 000019E0 61696E20636F7272 0 000019E8 757074656400 === Switch to base=002270h -> ".TEXT" 544 .text 545 .global _int21_service 546 .type _int21_service, @function 547 _int21_service: 0 00008062 56 push si 0 00008063 57 push di 0 00008064 55 push bp 0 00008065 89E5 mov bp, sp 0 00008067 83EC36 sub sp, 54 0 0000806A 8B7E08 mov di, word ptr [bp+8] 0 0000806D 8B460A mov ax, word ptr [bp+10] 0 00008070 8946D6 mov word ptr [bp-42], ax 0 00008073 A10000 mov ax, word ptr [_cu_psp] 0 00008076 8946D4 mov word ptr [bp-44], ax 0 00008079 8EC0 mov es, ax 0 0000807B 26893E2E00 mov word ptr es:[46], di 0 00008080 8E46D4 mov es, word ptr [bp-44] 0 00008083 8B46D6 mov ax, word ptr [bp-42] 0 00008086 26A33000 mov word ptr es:[48], ax 0 0000808A 8C56D2 mov word ptr [bp-46], ss 0 0000808D B80C00 mov ax, 12 0 00008090 50 push ax 0 00008091 8946D0 mov word ptr [bp-48], ax 0 00008094 FF76D6 push word ptr [bp-42] 0 00008097 57 push di 0 00008098 16 push ss 0 00008099 8D46D8 lea ax, [-40+bp] 0 0000809C 50 push ax 0 0000809D E8FEFF call _fmemcpy 0 000080A0 8E46D6 mov es, word ptr [bp-42] 0 000080A3 268B550E mov dx, word ptr es:[di+14] 0 000080A7 8956E4 mov word ptr [bp-28], dx 0 000080AA 268B5510 mov dx, word ptr es:[di+16] 0 000080AE 8956E6 mov word ptr [bp-26], dx 0 000080B1 31F6 xor si, si 0 000080B3 8B46D0 mov ax, word ptr [bp-48] 0 000080B6 8946CC mov word ptr [bp-52], ax 581 _.L98: 0 000080B9 8A46D9 mov al, byte ptr [bp-39] 0 000080BC 88C4 mov ah, al 0 000080BE 80C4C8 add ah, -56 0 000080C1 80FC18 cmp ah, 23+1 0 000080C4 7220 jc _.L99 0 000080C6 88C4 mov ah, al 0 000080C8 80C4AA add ah, -86 0 000080CB 80FC07 cmp ah, 6+1 0 000080CE 7216 jc _.L99 0 000080D0 88C2 mov dl, al 0 000080D2 80C2A2 add dl, -94 0 000080D5 80FA0E cmp dl, 14 0 000080D8 771E ja _.L100 0 000080DA BB875F mov bx, 24455 0 000080DD 88D1 mov cl, dl 0 000080DF D3EB shr bx, cl 0 000080E1 F6C301 test bl, 1 0 000080E4 7412 je _.L100 600 _.L99: 0 000080E6 8E46D6 mov es, word ptr [bp-42] 0 000080E9 26806516FE and byte ptr es:[di+22], -2 0 000080EE 3C59 cmp al, 89 0 000080F0 7425 je _.L101 0 000080F2 C70600000000 mov word ptr [_CritErrCode], 0 606 _.L100: 0 000080F8 3C0D cmp al, 12+1 0 000080FA 18D2 sbb dl, dl 0 000080FC FEC2 inc dl 0 000080FE 88C4 mov ah, al 0 00008100 80F430 xor ah, 48 0 00008103 80FC01 cmp ah, 1 0 00008106 18E4 sbb ah, ah 0 00008108 FEC4 inc ah 0 0000810A 84E2 test dl, ah 0 0000810C 7409 je _.L101 0 0000810E 3C59 cmp al, 89 0 00008110 7405 je _.L101 0 00008112 C606000000 mov byte ptr [_ErrorMode], 0 620 _.L101: 0 00008117 803E000000 cmp byte ptr [_break_ena], 0 0 0000811C 750F jne _.L102 0 0000811E 88C4 mov ah, al 0 00008120 FECC dec ah 0 00008122 80FC04 cmp ah, 4 0 00008125 7606 jbe _.L102 0 00008127 04F8 add al, -8 0 00008129 3C03 cmp al, 3 0 0000812B 7707 ja _.L103 630 _.L102: 0 0000812D B80000 mov ax, offset _syscon 0 00008130 50 push ax 0 00008131 E8FEFF call _check_handle_break 634 _.L103: 0 00008134 8A66D9 mov ah, byte ptr [bp-39] 0 00008137 80FC73 cmp ah, 115 0 0000813A 7603E90001 ja _.L374 0 0000813F 88E2 mov dl, ah 0 00008141 30F6 xor dh, dh 0 00008143 D1E2 shl dx, 1 0 00008145 89D3 mov bx, dx 0 00008147 FFA70C00 jmp word ptr [bx+_.L106] === Switch to base=012B40h -> ".RODATA" 643 .section .rodata 644 .p2align 1 0 0000168A 0000 .p2align 2 646 _.L106: 0 0000168C BC0C .hword _.L105 0 0000168E 1B06 .hword _.L107 0 00001690 5306 .hword _.L108 0 00001692 5806 .hword _.L109 0 00001694 6D06 .hword _.L110 0 00001696 8006 .hword _.L111 0 00001698 8506 .hword _.L112 0 0000169A AB06 .hword _.L113 0 0000169C B106 .hword _.L114 0 0000169E B706 .hword _.L115 0 000016A0 D706 .hword _.L116 0 000016A2 0107 .hword _.L117 0 000016A4 1607 .hword _.L118 0 000016A6 4307 .hword _.L119 0 000016A8 4907 .hword _.L120 0 000016AA 5207 .hword _.L121 0 000016AC 6207 .hword _.L122 0 000016AE 6E07 .hword _.L123 0 000016B0 7E07 .hword _.L124 0 000016B2 8107 .hword _.L125 0 000016B4 8D07 .hword _.L126 0 000016B6 9E07 .hword _.L127 0 000016B8 A707 .hword _.L128 0 000016BA AC07 .hword _.L129 0 000016BC 0F07 .hword _.L374 0 000016BE B807 .hword _.L130 0 000016C0 BE07 .hword _.L131 0 000016C2 CD07 .hword _.L132 0 000016C4 D107 .hword _.L133 0 000016C6 0F07 .hword _.L374 0 000016C8 0F07 .hword _.L374 0 000016CA 7309 .hword _.L134 0 000016CC 0F07 .hword _.L374 0 000016CE F707 .hword _.L135 0 000016D0 0708 .hword _.L136 0 000016D2 0C08 .hword _.L137 0 000016D4 1808 .hword _.L138 0 000016D6 0F07 .hword _.L374 0 000016D8 2408 .hword _.L139 0 000016DA 3408 .hword _.L140 0 000016DC 4808 .hword _.L141 0 000016DE 4D08 .hword _.L142 0 000016E0 6608 .hword _.L143 0 000016E2 7008 .hword _.L144 0 000016E4 8008 .hword _.L145 0 000016E6 8A08 .hword _.L146 0 000016E8 9308 .hword _.L147 0 000016EA 9E08 .hword _.L148 0 000016EC AD08 .hword _.L149 0 000016EE 4909 .hword _.L150 0 000016F0 7309 .hword _.L134 0 000016F2 0F07 .hword _.L374 0 000016F4 E409 .hword _.L151 0 000016F6 0F07 .hword _.L374 0 000016F8 EF09 .hword _.L152 0 000016FA 070A .hword _.L153 0 000016FC 2C0A .hword _.L154 0 000016FE 7E0A .hword _.L155 0 00001700 7E0A .hword _.L155 0 00001702 8E0A .hword _.L156 0 00001704 990A .hword _.L157 0 00001706 B50A .hword _.L158 0 00001708 C00A .hword _.L159 0 0000170A C90A .hword _.L160 0 0000170C EF0A .hword _.L161 0 0000170E 090B .hword _.L162 0 00001710 190B .hword _.L163 0 00001712 440B .hword _.L164 0 00001714 B40B .hword _.L165 0 00001716 E50B .hword _.L166 0 00001718 EE0B .hword _.L167 0 0000171A FA0B .hword _.L168 0 0000171C 100C .hword _.L169 0 0000171E 570C .hword _.L170 0 00001720 6B0C .hword _.L171 0 00001722 9F0C .hword _.L172 0 00001724 C10C .hword _.L173 0 00001726 F80C .hword _.L174 0 00001728 070D .hword _.L175 0 0000172A 190D .hword _.L176 0 0000172C 0F07 .hword _.L374 0 0000172E 0F07 .hword _.L374 0 00001730 270D .hword _.L177 0 00001732 2F0D .hword _.L178 0 00001734 5D0D .hword _.L179 0 00001736 630D .hword _.L180 0 00001738 6C0B .hword _.L181 0 0000173A 890D .hword _.L182 0 0000173C C20D .hword _.L183 0 0000173E 190E .hword _.L184 0 00001740 3D0E .hword _.L185 0 00001742 4C0E .hword _.L186 0 00001744 550E .hword _.L187 0 00001746 7C0E .hword _.L188 0 00001748 230F .hword _.L189 0 0000174A 610F .hword _.L190 0 0000174C E40F .hword _.L191 0 0000174E 0F07 .hword _.L374 0 00001750 0F07 .hword _.L374 0 00001752 FE0F .hword _.L192 0 00001754 120A .hword _.L193 0 00001756 2010 .hword _.L194 0 00001758 B810 .hword _.L195 0 0000175A E610 .hword _.L196 0 0000175C EF10 .hword _.L197 0 0000175E 0011 .hword _.L198 0 00001760 EF10 .hword _.L197 0 00001762 0F07 .hword _.L374 0 00001764 5C11 .hword _.L199 0 00001766 0F07 .hword _.L374 0 00001768 0F07 .hword _.L374 0 0000176A 0F07 .hword _.L374 0 0000176C 0F07 .hword _.L374 0 0000176E A611 .hword _.L200 0 00001770 0F07 .hword _.L374 0 00001772 7E12 .hword _.L201 === Switch to base=002270h -> ".TEXT" 763 .text 764 _.L107: 0 0000814B B80100 mov ax, 1 0 0000814E 50 push ax 0 0000814F E8FEFF call _read_char_stdin 768 _.L369: 0 00008152 8846D8 mov byte ptr [bp-40], al 0 00008155 30E4 xor ah, ah 0 00008157 50 push ax 0 00008158 E8FEFF call _write_char_stdout 773 _.L202: 0 0000815B FF76CC push word ptr [bp-52] 0 0000815E FF76D2 push word ptr [bp-46] 0 00008161 8D46D8 lea ax, [-40+bp] 0 00008164 50 push ax 0 00008165 FF76D6 push word ptr [bp-42] 0 00008168 57 push di 0 00008169 E8FEFF call _fmemcpy 0 0000816C 8B46E4 mov ax, word ptr [bp-28] 0 0000816F 8E46D6 mov es, word ptr [bp-42] 0 00008172 2689450E mov word ptr es:[di+14], ax 0 00008176 8B46E6 mov ax, word ptr [bp-26] 0 00008179 8E46D6 mov es, word ptr [bp-42] 0 0000817C 26894510 mov word ptr es:[di+16], ax 787 _.L276: 0 00008180 E98B09 jmp _.L97 789 _.L108: 0 00008183 8A46DE mov al, byte ptr [bp-34] 0 00008186 EBCA jmp _.L369 792 _.L109: 0 00008188 B80300 mov ax, 3 0 0000818B 50 push ax 0 0000818C E8FEFF call _get_sft_idx 0 0000818F BA0100 mov dx, 1 0 00008192 52 push dx 0 00008193 50 push ax 0 00008194 50 push ax 0 00008195 E8FEFF call _read_char 801 _.L371: 0 00008198 8846D8 mov byte ptr [bp-40], al 0 0000819B EBBE jmp _.L202 804 _.L110: 0 0000819D B80300 mov ax, 3 806 _.L372: 0 000081A0 50 push ax 0 000081A1 E8FEFF call _get_sft_idx 0 000081A4 50 push ax 0 000081A5 8A46DE mov al, byte ptr [bp-34] 0 000081A8 30E4 xor ah, ah 0 000081AA 50 push ax 0 000081AB E8FEFF call _write_char 0 000081AE EBAB jmp _.L202 815 _.L111: 0 000081B0 B80400 mov ax, 4 0 000081B3 EBEB jmp _.L372 818 _.L112: 0 000081B5 807EDEFF cmp byte ptr [bp-34], -1 0 000081B9 75C8 jne _.L108 0 000081BB C646D800 mov byte ptr [bp-40], 0 0 000081BF 8E46D6 mov es, word ptr [bp-42] 0 000081C2 26804D1640 or byte ptr es:[di+22], 64 0 000081C7 E8FEFF call _StdinBusy 0 000081CA 85C0 test ax, ax 0 000081CC 7405 je _.L203 0 000081CE E8FEFF call _DosIdle_int 0 000081D1 EB88 jmp _.L202 829 _.L203: 0 000081D3 8E46D6 mov es, word ptr [bp-42] 0 000081D6 26806516BF and byte ptr es:[di+22], -65 832 _.L113: 0 000081DB 56 push si 834 _.L385: 0 000081DC E8FEFF call _read_char_stdin 0 000081DF EBB7 jmp _.L371 837 _.L114: 0 000081E1 B80100 mov ax, 1 0 000081E4 50 push ax 0 000081E5 EBF5 jmp _.L385 841 _.L115: 0 000081E7 8B46E4 mov ax, word ptr [bp-28] 0 000081EA 8946D4 mov word ptr [bp-44], ax 0 000081ED 8B5EDE mov bx, word ptr [bp-34] 845 _.L204: 0 000081F0 8D7701 lea si, [1+bx] 0 000081F3 8E46D4 mov es, word ptr [bp-44] 0 000081F6 268A07 mov al, byte ptr es:[bx] 0 000081F9 3C24 cmp al, 36 0 000081FB 749B je _.L371 0 000081FD 30E4 xor ah, ah 0 000081FF 50 push ax 0 00008200 E8FEFF call _write_char_stdout 0 00008203 89F3 mov bx, si 0 00008205 EBE9 jmp _.L204 856 _.L116: 0 00008207 8B46E4 mov ax, word ptr [bp-28] 0 0000820A 8946D0 mov word ptr [bp-48], ax 0 0000820D 8B46DE mov ax, word ptr [bp-34] 0 00008210 8946CE mov word ptr [bp-50], ax 0 00008213 B80100 mov ax, 1 0 00008216 50 push ax 0 00008217 E8FEFF call _get_sft_idx 0 0000821A 8946D4 mov word ptr [bp-44], ax 0 0000821D 56 push si 0 0000821E E8FEFF call _get_sft_idx 0 00008221 FF76D0 push word ptr [bp-48] 0 00008224 FF76CE push word ptr [bp-50] 0 00008227 FF76D4 push word ptr [bp-44] 0 0000822A 50 push ax 0 0000822B E8FEFF call _read_line 0 0000822E E92AFF jmp _.L202 873 _.L117: 0 00008231 C646D8FF mov byte ptr [bp-40], -1 0 00008235 E8FEFF call _StdinBusy 0 00008238 85C0 test ax, ax 0 0000823A 7503E91CFF je _.L202 878 _.L374: 0 0000823F C646D800 mov byte ptr [bp-40], 0 0 00008243 E915FF jmp _.L202 881 _.L118: 0 00008246 56 push si 0 00008247 E8FEFF call _get_sft 0 0000824A 52 push dx 0 0000824B 50 push ax 0 0000824C E8FEFF call _sft_to_dev 0 0000824F 8946E8 mov word ptr [bp-24], ax 0 00008252 8956EA mov word ptr [bp-22], dx 0 00008255 09D0 or ax, dx 0 00008257 7407 je _.L207 0 00008259 8D46E8 lea ax, [-24+bp] 0 0000825C 50 push ax 0 0000825D E8FEFF call _con_flush 894 _.L207: 0 00008260 8A46D8 mov al, byte ptr [bp-40] 0 00008263 FEC8 dec al 0 00008265 3C09 cmp al, 9 0 00008267 77D6 ja _.L374 0 00008269 30E4 xor ah, ah 0 0000826B D1E0 shl ax, 1 0 0000826D 89C3 mov bx, ax 0 0000826F FFA7F400 jmp word ptr [bx+_.L211] === Switch to base=012B40h -> ".RODATA" 903 .section .rodata 904 .p2align 1 905 .p2align 2 906 _.L211: 0 00001774 1B06 .hword _.L107 0 00001776 0F07 .hword _.L374 0 00001778 0F07 .hword _.L374 0 0000177A 0F07 .hword _.L374 0 0000177C 0F07 .hword _.L374 0 0000177E 8506 .hword _.L112 0 00001780 AB06 .hword _.L113 0 00001782 B106 .hword _.L114 0 00001784 0F07 .hword _.L374 0 00001786 D706 .hword _.L116 === Switch to base=002270h -> ".TEXT" 917 .text 918 _.L119: 0 00008273 E8FEFF call _flush 0 00008276 E9E2FE jmp _.L202 921 _.L120: 0 00008279 FF76DE push word ptr [bp-34] 0 0000827C E8FEFF call _DosSelectDrv 0 0000827F E916FF jmp _.L371 925 _.L121: 0 00008282 B80289 mov ax, -30462 927 _.L379: 0 00008285 50 push ax 0 00008286 FF76E4 push word ptr [bp-28] 0 00008289 FF76DE push word ptr [bp-34] 0 0000828C E8FEFF call _FcbOpen 0 0000828F E906FF jmp _.L371 933 _.L122: 0 00008292 FF76E4 push word ptr [bp-28] 0 00008295 FF76DE push word ptr [bp-34] 0 00008298 E8FEFF call _FcbClose 0 0000829B E9FAFE jmp _.L371 938 _.L123: 0 0000829E B80100 mov ax, 1 0 000082A1 50 push ax 941 _.L380: 0 000082A2 FF76E4 push word ptr [bp-28] 0 000082A5 FF76DE push word ptr [bp-34] 0 000082A8 E8FEFF call _FcbFindFirstNext 0 000082AB E9EAFE jmp _.L371 946 _.L124: 0 000082AE 56 push si 0 000082AF EBF1 jmp _.L380 949 _.L125: 0 000082B1 FF76E4 push word ptr [bp-28] 0 000082B4 FF76DE push word ptr [bp-34] 0 000082B7 E8FEFF call _FcbDelete 0 000082BA E9DBFE jmp _.L371 954 _.L126: 0 000082BD B80100 mov ax, 1 0 000082C0 50 push ax 957 _.L382: 0 000082C1 50 push ax 0 000082C2 FF76E4 push word ptr [bp-28] 0 000082C5 FF76DE push word ptr [bp-34] 0 000082C8 E8FEFF call _FcbReadWrite 0 000082CB E9CAFE jmp _.L371 963 _.L127: 0 000082CE B80200 mov ax, 2 0 000082D1 50 push ax 0 000082D2 B80100 mov ax, 1 0 000082D5 EBEA jmp _.L382 968 _.L128: 0 000082D7 B8028E mov ax, -29182 0 000082DA EBA9 jmp _.L379 971 _.L129: 0 000082DC FF76E4 push word ptr [bp-28] 0 000082DF FF76DE push word ptr [bp-34] 0 000082E2 E8FEFF call _FcbRename 0 000082E5 E9B0FE jmp _.L371 976 _.L130: 0 000082E8 A00000 mov al, byte ptr [_default_drive] 0 000082EB E9AAFE jmp _.L371 979 _.L131: 0 000082EE 8B46DE mov ax, word ptr [bp-34] 0 000082F1 A30000 mov word ptr [_dta], ax 0 000082F4 8B46E4 mov ax, word ptr [bp-28] 0 000082F7 A30200 mov word ptr [_dta+2], ax 0 000082FA E95EFE jmp _.L202 985 _.L132: 0 000082FD C646DE00 mov byte ptr [bp-34], 0 987 _.L133: 0 00008301 8D46D8 lea ax, [-40+bp] 0 00008304 8D56DE lea dx, [-34+bp] 0 00008307 52 push dx 0 00008308 8D56DC lea dx, [-36+bp] 0 0000830B 52 push dx 0 0000830C 50 push ax 0 0000830D FF76DE push word ptr [bp-34] 0 00008310 E8FEFF call _FatGetDrvData 0 00008313 89C1 mov cx, ax 0 00008315 09D1 or cx, dx 0 00008317 85C9 test cx, cx 0 00008319 7503E9A501 je _.L280 0 0000831E 8956E4 mov word ptr [bp-28], dx 0 00008321 8946DA mov word ptr [bp-38], ax 0 00008324 E934FE jmp _.L202 1003 _.L135: 0 00008327 B80100 mov ax, 1 1005 _.L383: 0 0000832A 50 push ax 0 0000832B FF76E4 push word ptr [bp-28] 0 0000832E FF76DE push word ptr [bp-34] 0 00008331 E8FEFF call _FcbRandomIO 0 00008334 E961FE jmp _.L371 1011 _.L136: 0 00008337 B80200 mov ax, 2 0 0000833A EBEE jmp _.L383 1014 _.L137: 0 0000833C FF76E4 push word ptr [bp-28] 0 0000833F FF76DE push word ptr [bp-34] 0 00008342 E8FEFF call _FcbGetFileSize 0 00008345 E950FE jmp _.L371 1019 _.L138: 0 00008348 FF76E4 push word ptr [bp-28] 0 0000834B FF76DE push word ptr [bp-34] 0 0000834E E8FEFF call _FcbSetRandom 0 00008351 E907FE jmp _.L202 1024 _.L139: 0 00008354 8E46D6 mov es, word ptr [bp-42] 0 00008357 26FF7514 push word ptr es:[di+20] 0 0000835B FF76DE push word ptr [bp-34] 0 0000835E E8FEFF call _new_psp 0 00008361 E9F7FD jmp _.L202 1030 _.L140: 0 00008364 B80500 mov ax, 5 1032 _.L384: 0 00008367 50 push ax 0 00008368 8D46DC lea ax, [-36+bp] 0 0000836B 50 push ax 0 0000836C FF76E4 push word ptr [bp-28] 0 0000836F FF76DE push word ptr [bp-34] 0 00008372 E8FEFF call _FcbRandomBlockIO 0 00008375 E920FE jmp _.L371 1040 _.L141: 0 00008378 B80600 mov ax, 6 0 0000837B EBEA jmp _.L384 1043 _.L142: 0 0000837D FF76E6 push word ptr [bp-26] 0 00008380 FF76E2 push word ptr [bp-30] 0 00008383 FF76E4 push word ptr [bp-28] 0 00008386 FF76E0 push word ptr [bp-32] 0 00008389 8D46D8 lea ax, [-40+bp] 0 0000838C 50 push ax 0 0000838D E8FEFF call _FcbParseFname 1051 _.L376: 0 00008390 8946E0 mov word ptr [bp-32], ax 0 00008393 E9C5FD jmp _.L202 1054 _.L143: 0 00008396 8D46DC lea ax, [-36+bp] 0 00008399 50 push ax 0 0000839A E8FEFF call _DosGetDate 0 0000839D E9F8FD jmp _.L371 1059 _.L144: 0 000083A0 8D46DC lea ax, [-36+bp] 0 000083A3 50 push ax 0 000083A4 E8FEFF call _DosSetDate 1063 _.L381: 0 000083A7 83F801 cmp ax, 1 0 000083AA F5 cmc 0 000083AB 18C0 sbb al, al 0 000083AD E9E8FD jmp _.L371 1068 _.L145: 0 000083B0 8D46DC lea ax, [-36+bp] 0 000083B3 50 push ax 0 000083B4 E8FEFF call _DosGetTime 0 000083B7 E9A1FD jmp _.L202 1073 _.L146: 0 000083BA 8D46DC lea ax, [-36+bp] 0 000083BD 50 push ax 0 000083BE E8FEFF call _DosSetTime 0 000083C1 EBE4 jmp _.L381 1078 _.L147: 0 000083C3 8A46D8 mov al, byte ptr [bp-40] 0 000083C6 2401 and al, 1 0 000083C8 A20000 mov byte ptr [_verify_ena], al 0 000083CB E98DFD jmp _.L202 1083 _.L148: 0 000083CE A10000 mov ax, word ptr [_dta] 0 000083D1 8946DA mov word ptr [bp-38], ax 0 000083D4 A10200 mov ax, word ptr [_dta+2] 1087 _.L378: 0 000083D7 8946E6 mov word ptr [bp-26], ax 0 000083DA E97EFD jmp _.L202 1090 _.L149: 0 000083DD 807ED801 cmp byte ptr [bp-40], 1 0 000083E1 7555 jne _.L218 0 000083E3 A00000 mov al, byte ptr [_version_flags] 0 000083E6 8846DB mov byte ptr [bp-37], al 1095 _.L219: 0 000083E9 8E46D4 mov es, word ptr [bp-44] 0 000083EC 26A14000 mov ax, word ptr es:[64] 0 000083F0 8946D8 mov word ptr [bp-40], ax 0 000083F3 C646DA2C mov byte ptr [bp-38], 44 0 000083F7 C746DC0000 mov word ptr [bp-36], 0 0 000083FC 803E000000 cmp byte ptr [_ReturnAnyDosVersionExpected], 0 0 00008401 7503E955FD je _.L202 0 00008406 8E46D6 mov es, word ptr [bp-42] 0 00008409 26C45D12 les bx, dword ptr es:[di+18] 0 0000840D 268A17 mov dl, byte ptr es:[bx] 0 00008410 80FA3D cmp dl, 61 0 00008413 7529 jne _.L221 0 00008415 268A5703 mov dl, byte ptr es:[bx+3] 0 00008419 8856D4 mov byte ptr [bp-44], dl 0 0000841C 80C28C add dl, -116 0 0000841F 80FA01 cmp dl, 1 0 00008422 7603E934FD ja _.L202 0 00008427 268A5701 mov dl, byte ptr es:[bx+1] 0 0000842B 8856D8 mov byte ptr [bp-40], dl 0 0000842E 268A4702 mov al, byte ptr es:[bx+2] 1116 _.L373: 0 00008432 8846D9 mov byte ptr [bp-39], al 0 00008435 E923FD jmp _.L202 1119 _.L218: 0 00008438 C646DBFD mov byte ptr [bp-37], -3 0 0000843C EBAB jmp _.L219 1122 _.L221: 0 0000843E 80FA86 cmp dl, -122 0 00008441 7403E915FD jne _.L202 0 00008446 26807F01C4 cmp byte ptr es:[bx+1], -60 0 0000844B 7403E90BFD jne _.L202 0 00008450 26807F023D cmp byte ptr es:[bx+2], 61 0 00008455 7403E901FD jne _.L202 0 0000845A 268A5705 mov dl, byte ptr es:[bx+5] 0 0000845E 8856D4 mov byte ptr [bp-44], dl 0 00008461 80C28C add dl, -116 0 00008464 80FA01 cmp dl, 1 0 00008467 7603E9EFFC ja _.L202 0 0000846C 268A5704 mov dl, byte ptr es:[bx+4] 0 00008470 8856D8 mov byte ptr [bp-40], dl 0 00008473 268A4703 mov al, byte ptr es:[bx+3] 0 00008477 EBB9 jmp _.L373 1138 _.L150: 0 00008479 56 push si 0 0000847A 8B46DE mov ax, word ptr [bp-34] 0 0000847D 83F806 cmp ax, 6 0 00008480 7303 jnc _.L222 0 00008482 B80600 mov ax, 6 1144 _.L222: 0 00008485 50 push ax 0 00008486 FF360000 push word ptr [_cu_psp] 0 0000848A E8FEFF call _DosMemChange 0 0000848D 8A46D8 mov al, byte ptr [bp-40] 0 00008490 30E4 xor ah, ah 0 00008492 80CC03 or ah, 3 0 00008495 A30000 mov word ptr [_return_code], ax 0 00008498 C606000003 mov byte ptr [_term_type], 3 1153 _.L254: 0 0000849D E8FEFF call _return_user 0 000084A0 E9B8FC jmp _.L202 1156 _.L134: 0 000084A3 8A46DE mov al, byte ptr [bp-34] 0 000084A6 84C0 test al, al 0 000084A8 7405 je _.L313 0 000084AA 80FC1F cmp ah, 31 0 000084AD 751B jne _.L223 1162 _.L313: 0 000084AF A00000 mov al, byte ptr [_default_drive] 0 000084B2 98 cbw 1165 _.L225: 0 000084B3 50 push ax 0 000084B4 E8FEFF call _get_dpb 0 000084B7 89C6 mov si, ax 0 000084B9 09D0 or ax, dx 0 000084BB 7512 jne _.L226 0 000084BD C70600000F00 mov word ptr [_CritErrCode], 15 1172 _.L280: 0 000084C3 C646D8FF mov byte ptr [bp-40], -1 0 000084C7 E991FC jmp _.L202 1175 _.L223: 0 000084CA 30E4 xor ah, ah 0 000084CC 48 dec ax 0 000084CD EBE4 jmp _.L225 1179 _.L226: 0 000084CF 8EC2 mov es, dx 0 000084D1 8956D4 mov word ptr [bp-44], dx 0 000084D4 268A04 mov al, byte ptr es:[si] 0 000084D7 98 cbw 0 000084D8 50 push ax 0 000084D9 E8FEFF call _flush_buffers 0 000084DC 8B56D4 mov dx, word ptr [bp-44] 0 000084DF 8EC2 mov es, dx 0 000084E1 26C64418FF mov byte ptr es:[si+24], -1 0 000084E6 52 push dx 0 000084E7 8956D4 mov word ptr [bp-44], dx 0 000084EA 56 push si 0 000084EB E8FEFF call _media_check 0 000084EE 85C0 test ax, ax 0 000084F0 7C0C jl _.L227 0 000084F2 8B56D4 mov dx, word ptr [bp-44] 0 000084F5 8EC2 mov es, dx 0 000084F7 26837C0F00 cmp word ptr es:[si+15], 0 0 000084FC 750D jne _.L228 1199 _.L227: 0 000084FE C646D8FF mov byte ptr [bp-40], -1 0 00008502 C70600000F00 mov word ptr [_CritErrCode], 15 0 00008508 E950FC jmp _.L202 1203 _.L228: 0 0000850B 8956E4 mov word ptr [bp-28], dx 0 0000850E 8976DA mov word ptr [bp-38], si 0 00008511 E92BFD jmp _.L374 1207 _.L151: 0 00008514 C746DA0000 mov word ptr [bp-38], offset _InDOS 1209 _.L377: 0 00008519 8C56E6 mov word ptr [bp-26], ss 0 0000851C E93CFC jmp _.L202 1212 _.L152: 0 0000851F 8D46DE lea ax, [-34+bp] 0 00008522 50 push ax 0 00008523 8D46DC lea ax, [-36+bp] 0 00008526 50 push ax 0 00008527 8D46DA lea ax, [-38+bp] 0 0000852A 50 push ax 0 0000852B FF76DE push word ptr [bp-34] 0 0000852E E8FEFF call _DosGetFree 1221 _.L300: 0 00008531 8946D8 mov word ptr [bp-40], ax 0 00008534 E924FC jmp _.L202 1224 _.L153: 0 00008537 8A46D8 mov al, byte ptr [bp-40] 0 0000853A 84C0 test al, al 0 0000853C 740C je _.L229 0 0000853E 3C01 cmp al, 1 0 00008540 7411 je _.L230 1230 _.L193: 0 00008542 C746E8FFFF mov word ptr [bp-24], -1 0 00008547 E92302 jmp _.L249 1233 _.L229: 0 0000854A A00000 mov al, byte ptr [_switchar] 0 0000854D 8846DE mov byte ptr [bp-34], al 0 00008550 E9ECFC jmp _.L374 1237 _.L230: 0 00008553 8A46DE mov al, byte ptr [bp-34] 0 00008556 A20000 mov byte ptr [_switchar], al 0 00008559 E9E3FC jmp _.L374 1241 _.L154: 0 0000855C 8A46D8 mov al, byte ptr [bp-40] 0 0000855F 30E4 xor ah, ah 0 00008561 89C6 mov si, ax 0 00008563 3DFF00 cmp ax, 255 0 00008566 7503 jne _.L231 0 00008568 8B76DA mov si, word ptr [bp-38] 1248 _.L231: 0 0000856B 8B46DE mov ax, word ptr [bp-34] 0 0000856E 83F8FF cmp ax, -1 0 00008571 750A jne _.L232 0 00008573 56 push si 0 00008574 E8FEFF call _DosSetCountry 1254 _.L298: 0 00008577 8946E8 mov word ptr [bp-24], ax 0 0000857A E94701 jmp _.L233 1257 _.L232: 0 0000857D 85F6 test si, si 0 0000857F 7503 jne _.L234 0 00008581 8D74FF lea si, [-1+si] 1261 _.L234: 0 00008584 FF76E4 push word ptr [bp-28] 0 00008587 50 push ax 0 00008588 56 push si 0 00008589 E8FEFF call _DosGetCountryInformation 0 0000858C 8946E8 mov word ptr [bp-24], ax 0 0000858F 85C0 test ax, ax 0 00008591 7D03E9D701 jl _.L249 0 00008596 83FEFF cmp si, -1 0 00008599 750A jne _.L236 0 0000859B BB0000 mov bx, offset _nlsInfo 0 0000859E C47708 les si, dword ptr [bx+8] 0 000085A1 268B7404 mov si, word ptr es:[si+4] 1274 _.L236: 0 000085A5 8976DA mov word ptr [bp-38], si 1276 _.L365: 0 000085A8 8976D8 mov word ptr [bp-40], si 0 000085AB E91601 jmp _.L233 1279 _.L155: 0 000085AE 88E0 mov al, ah 1281 _.L242: 0 000085B0 30E4 xor ah, ah 0 000085B2 50 push ax 0 000085B3 FF76E4 push word ptr [bp-28] 0 000085B6 FF76DE push word ptr [bp-34] 0 000085B9 E8FEFF call _DosMkRmdir 0 000085BC EBB9 jmp _.L298 1288 _.L156: 0 000085BE FF76E4 push word ptr [bp-28] 0 000085C1 FF76DE push word ptr [bp-34] 0 000085C4 E8FEFF call _DosChangeDir 0 000085C7 EBAE jmp _.L298 1293 _.L157: 0 000085C9 8A46DC mov al, byte ptr [bp-36] 0 000085CC 30E4 xor ah, ah 0 000085CE 50 push ax 0 000085CF B8020E mov ax, 3586 1298 _.L363: 0 000085D2 50 push ax 0 000085D3 FF76E4 push word ptr [bp-28] 0 000085D6 FF76DE push word ptr [bp-34] 0 000085D9 E8FEFF call _DosOpen 1303 _.L237: 0 000085DC 85D2 test dx, dx 0 000085DE 7C03E94EFF jge _.L300 0 000085E3 EB92 jmp _.L298 1307 _.L158: 0 000085E5 56 push si 0 000085E6 8A46D8 mov al, byte ptr [bp-40] 0 000085E9 30E4 xor ah, ah 0 000085EB 80CC09 or ah, 9 0 000085EE EBE2 jmp _.L363 1313 _.L159: 0 000085F0 FF76DA push word ptr [bp-38] 0 000085F3 E8FEFF call _DosClose 0 000085F6 E97EFF jmp _.L298 1317 _.L160: 0 000085F9 8B76E4 mov si, word ptr [bp-28] 0 000085FC 8B46DE mov ax, word ptr [bp-34] 0 000085FF 8946D0 mov word ptr [bp-48], ax 0 00008602 8B46DC mov ax, word ptr [bp-36] 0 00008605 8946D4 mov word ptr [bp-44], ax 0 00008608 FF76DA push word ptr [bp-38] 0 0000860B E8FEFF call _get_sft_idx 0 0000860E BA0100 mov dx, 1 1326 _.L364: 0 00008611 52 push dx 0 00008612 56 push si 0 00008613 FF76D0 push word ptr [bp-48] 0 00008616 FF76D4 push word ptr [bp-44] 0 00008619 50 push ax 0 0000861A E8FEFF call _DosRWSft 0 0000861D EBBD jmp _.L237 1334 _.L161: 0 0000861F 8B76E4 mov si, word ptr [bp-28] 0 00008622 8B46DE mov ax, word ptr [bp-34] 0 00008625 8946D0 mov word ptr [bp-48], ax 0 00008628 8B46DC mov ax, word ptr [bp-36] 0 0000862B 8946D4 mov word ptr [bp-44], ax 0 0000862E FF76DA push word ptr [bp-38] 0 00008631 E8FEFF call _get_sft_idx 0 00008634 BA0200 mov dx, 2 0 00008637 EBD8 jmp _.L364 1344 _.L162: 0 00008639 B83700 mov ax, 55 0 0000863C 50 push ax 0 0000863D FF76E4 push word ptr [bp-28] 0 00008640 FF76DE push word ptr [bp-34] 0 00008643 E8FEFF call _DosDelete 0 00008646 E92EFF jmp _.L298 1351 _.L163: 0 00008649 8A46D8 mov al, byte ptr [bp-40] 0 0000864C 3C02 cmp al, 2 0 0000864E 7603E9EFFE ja _.L193 0 00008653 8D56E8 lea dx, [-24+bp] 0 00008656 52 push dx 0 00008657 30E4 xor ah, ah 0 00008659 50 push ax 0 0000865A FF76DC push word ptr [bp-36] 0 0000865D FF76DE push word ptr [bp-34] 0 00008660 FF76DA push word ptr [bp-38] 0 00008663 E8FEFF call _DosSeek 0 00008666 837EE800 cmp word ptr [bp-24], 0 0 0000866A 7558 jne _.L233 0 0000866C 8956DE mov word ptr [bp-34], dx 1366 _.L366: 0 0000866F 8946D8 mov word ptr [bp-40], ax 0 00008672 EB50 jmp _.L233 1369 _.L164: 0 00008674 8A46D8 mov al, byte ptr [bp-40] 0 00008677 3C01 cmp al, 1 0 00008679 7455 je _.L239 0 0000867B 7231 jc _.L240 0 0000867D 3CFF cmp al, -1 0 0000867F 7403E9BEFE jne _.L193 0 00008684 8A46DC mov al, byte ptr [bp-36] 0 00008687 3C39 cmp al, 57 0 00008689 7303E9B4FE jc _.L193 0 0000868E 3C3A cmp al, 58 0 00008690 7703E91BFF jbe _.L242 0 00008695 3C56 cmp al, 86 0 00008697 7403E9A6FE jne _.L193 1383 _.L181: 0 0000869C FF76E6 push word ptr [bp-26] 0 0000869F FF76E2 push word ptr [bp-30] 0 000086A2 FF76E4 push word ptr [bp-28] 0 000086A5 FF76DE push word ptr [bp-34] 0 000086A8 E8FEFF call _DosRename 0 000086AB E9C9FE jmp _.L298 1390 _.L240: 0 000086AE FF76E4 push word ptr [bp-28] 0 000086B1 FF76DE push word ptr [bp-34] 0 000086B4 E8FEFF call _DosGetFattr 0 000086B7 8946E8 mov word ptr [bp-24], ax 0 000086BA 85C0 test ax, ax 0 000086BC 7D03E9AC00 jl _.L249 0 000086C1 8946DC mov word ptr [bp-36], ax 1398 _.L233: 0 000086C4 837EE800 cmp word ptr [bp-24], 0 0 000086C8 7C03E98EFA jge _.L202 0 000086CD E99D00 jmp _.L249 1402 _.L239: 0 000086D0 FF76DC push word ptr [bp-36] 0 000086D3 FF76E4 push word ptr [bp-28] 0 000086D6 FF76DE push word ptr [bp-34] 0 000086D9 E8FEFF call _DosSetFattr 0 000086DC 8946E8 mov word ptr [bp-24], ax 0 000086DF 8B46DC mov ax, word ptr [bp-36] 0 000086E2 EB8B jmp _.L366 1410 _.L165: 0 000086E4 8D46D8 lea ax, [-40+bp] 0 000086E7 50 push ax 0 000086E8 E8FEFF call _DosDevIOctl 0 000086EB 8946E8 mov word ptr [bp-24], ax 0 000086EE 85C0 test ax, ax 0 000086F0 7C03E966FA jge _.L202 0 000086F5 89C2 mov dx, ax 0 000086F7 F7DA neg dx 0 000086F9 8956D8 mov word ptr [bp-40], dx 0 000086FC 83F8EF cmp ax, -17 0 000086FF 7409 je _.L246 0 00008701 83F8FB cmp ax, -5 0 00008704 7404 je _.L246 0 00008706 89160000 mov word ptr [_CritErrCode], dx 1425 _.L246: 0 0000870A 8E46D6 mov es, word ptr [bp-42] 0 0000870D 26804D1601 or byte ptr es:[di+22], 1 0 00008712 E946FA jmp _.L202 1429 _.L166: 0 00008715 FF76DA push word ptr [bp-38] 0 00008718 E8FEFF call _DosDup 0 0000871B E9BEFE jmp _.L237 1433 _.L167: 0 0000871E FF76DC push word ptr [bp-36] 0 00008721 FF76DA push word ptr [bp-38] 0 00008724 E8FEFF call _DosForceDup 0 00008727 E94DFE jmp _.L298 1438 _.L168: 0 0000872A FF76E4 push word ptr [bp-28] 0 0000872D FF76E0 push word ptr [bp-32] 0 00008730 FF76DE push word ptr [bp-34] 0 00008733 E8FEFF call _DosGetCuDir 0 00008736 8946E8 mov word ptr [bp-24], ax 0 00008739 C746D80001 mov word ptr [bp-40], 256 0 0000873E EB84 jmp _.L233 1446 _.L169: 0 00008740 8D46D8 lea ax, [-40+bp] 0 00008743 8D76DA lea si, [-38+bp] 0 00008746 56 push si 0 00008747 50 push ax 0 00008748 A00000 mov al, byte ptr [_mem_access_mode] 0 0000874B 30E4 xor ah, ah 0 0000874D 50 push ax 0 0000874E FF76DA push word ptr [bp-38] 0 00008751 E8FEFF call _DosMemAlloc 0 00008754 8946E8 mov word ptr [bp-24], ax 0 00008757 85C0 test ax, ax 0 00008759 7D26 jge _.L247 0 0000875B 56 push si 0 0000875C E8FEFF call _DosMemLargest 1461 _.L361: 0 0000875F E8FEFF call _DosMemCheck 0 00008762 85C0 test ax, ax 0 00008764 7407 je _.L249 0 00008766 B80000 mov ax, offset _.LC0 1466 _.L367: 0 00008769 50 push ax 0 0000876A E8FEFF call _panic 1469 _.L249: 0 0000876D 8B46E8 mov ax, word ptr [bp-24] 0 00008770 F7D8 neg ax 0 00008772 8946D8 mov word ptr [bp-40], ax 0 00008775 833E000000 cmp word ptr [_CritErrCode], 0 0 0000877A 758E jne _.L246 0 0000877C A30000 mov word ptr [_CritErrCode], ax 0 0000877F EB89 jmp _.L246 1477 _.L247: 0 00008781 FF46D8 inc word ptr [bp-40] 0 00008784 E9D4F9 jmp _.L202 1480 _.L170: 0 00008787 8B46E6 mov ax, word ptr [bp-26] 0 0000878A 48 dec ax 0 0000878B 50 push ax 0 0000878C E8FEFF call _DosMemFree 0 0000878F 8946E8 mov word ptr [bp-24], ax 0 00008792 85C0 test ax, ax 0 00008794 7C03E9C2F9 jge _.L202 0 00008799 EBC4 jmp _.L361 1489 _.L171: 0 0000879B E8FEFF call _DosMemCheck 0 0000879E 85C0 test ax, ax 0 000087A0 7407 je _.L251 0 000087A2 B81400 mov ax, offset _.LC1 0 000087A5 50 push ax 0 000087A6 E8FEFF call _panic 1496 _.L251: 0 000087A9 8D46DA lea ax, [-38+bp] 0 000087AC 50 push ax 0 000087AD FF76DA push word ptr [bp-38] 0 000087B0 FF76E6 push word ptr [bp-26] 0 000087B3 E8FEFF call _DosMemChange 0 000087B6 8946E8 mov word ptr [bp-24], ax 0 000087B9 85C0 test ax, ax 0 000087BB 7D0C jge _.L252 0 000087BD E8FEFF call _DosMemCheck 0 000087C0 85C0 test ax, ax 0 000087C2 74A9 je _.L249 0 000087C4 B83300 mov ax, offset _.LC2 0 000087C7 EBA0 jmp _.L367 1510 _.L252: 0 000087C9 8B46E6 mov ax, word ptr [bp-26] 0 000087CC E962FD jmp _.L300 1513 _.L172: 0 000087CF C606000000 mov byte ptr [_break_flg], 0 0 000087D4 FF76E4 push word ptr [bp-28] 0 000087D7 FF76DE push word ptr [bp-34] 0 000087DA FF76E6 push word ptr [bp-26] 0 000087DD FF76DA push word ptr [bp-38] 0 000087E0 8A46D8 mov al, byte ptr [bp-40] 0 000087E3 30E4 xor ah, ah 0 000087E5 50 push ax 0 000087E6 E8FEFF call _DosExec 0 000087E9 E98BFD jmp _.L298 1524 _.L105: 0 000087EC C746D8004C mov word ptr [bp-40], 19456 1526 _.L173: 0 000087F1 803E000000 cmp byte ptr [_break_flg], 0 0 000087F6 740A je _.L253 0 000087F8 C606000000 mov byte ptr [_break_flg], 0 0 000087FD C606000001 mov byte ptr [_term_type], 1 1531 _.L253: 0 00008802 A10000 mov ax, word ptr [_term_type] 0 00008805 B108 mov cl, 8 0 00008807 D3E0 shl ax, cl 0 00008809 8946E8 mov word ptr [bp-24], ax 0 0000880C 8A56D8 mov dl, byte ptr [bp-40] 0 0000880F 08D0 or al, dl 0 00008811 A30000 mov word ptr [_return_code], ax 0 00008814 E8FEFF call _DosMemCheck 0 00008817 85C0 test ax, ax 0 00008819 7503E97FFC je _.L254 0 0000881E B80000 mov ax, offset _.LC0 0 00008821 50 push ax 0 00008822 E8FEFF call _panic 0 00008825 E975FC jmp _.L254 1546 _.L174: 0 00008828 A10000 mov ax, word ptr [_return_code] 0 0000882B 8946D8 mov word ptr [bp-40], ax 0 0000882E C70600000000 mov word ptr [_return_code], 0 0 00008834 E924F9 jmp _.L202 1551 _.L175: 0 00008837 FF76E4 push word ptr [bp-28] 0 0000883A FF76DE push word ptr [bp-34] 0 0000883D FF76DC push word ptr [bp-36] 0 00008840 E8FEFF call _DosFindFirst 0 00008843 8946E8 mov word ptr [bp-24], ax 0 00008846 E95FFD jmp _.L365 1558 _.L176: 0 00008849 E8FEFF call _DosFindNext 0 0000884C 8946E8 mov word ptr [bp-24], ax 0 0000884F C746D80000 mov word ptr [bp-40], 0 0 00008854 E96DFE jmp _.L233 1563 _.L177: 0 00008857 C746DA0000 mov word ptr [bp-38], offset _DPBp 0 0000885C E9BAFC jmp _.L377 1566 _.L178: 0 0000885F 30D2 xor dl, dl 0 00008861 817EDC5845 cmp word ptr [bp-36], 17752 0 00008866 750B jne _.L255 0 00008868 817EDE5241 cmp word ptr [bp-34], 16722 0 0000886D 9F lahf 0 0000886E D0E4 shl ah, 1 0 00008870 99 cwd 0 00008871 F6DA neg dl 1575 _.L255: 0 00008873 30F6 xor dh, dh 0 00008875 52 push dx 0 00008876 8E46D6 mov es, word ptr [bp-42] 0 00008879 268B450C mov ax, word ptr es:[di+12] 0 0000887D FF76E6 push word ptr [bp-26] 0 00008880 50 push ax 0 00008881 FF76E4 push word ptr [bp-28] 0 00008884 FF76E0 push word ptr [bp-32] 0 00008887 E8FEFF call _bpb_to_dpb 0 0000888A E9CEF8 jmp _.L202 1586 _.L179: 0 0000888D A00000 mov al, byte ptr [_verify_ena] 0 00008890 E905F9 jmp _.L371 1589 _.L180: 0 00008893 FF76E0 push word ptr [bp-32] 0 00008896 FF360000 push word ptr [_cu_psp] 0 0000889A FF76DE push word ptr [bp-34] 0 0000889D E8FEFF call _child_psp 0 000088A0 B88000 mov ax, 128 0 000088A3 50 push ax 0 000088A4 FF360000 push word ptr [_cu_psp] 0 000088A8 50 push ax 0 000088A9 FF76DE push word ptr [bp-34] 0 000088AC 50 push ax 0 000088AD E8FEFF call _fmemcpy 0 000088B0 8B46DE mov ax, word ptr [bp-34] 0 000088B3 A30000 mov word ptr [_cu_psp], ax 0 000088B6 E9A2F8 jmp _.L202 1604 _.L182: 0 000088B9 8A46D8 mov al, byte ptr [bp-40] 0 000088BC 84C0 test al, al 0 000088BE 7421 je _.L256 0 000088C0 3C01 cmp al, 1 0 000088C2 7403E97BFC jne _.L193 0 000088C7 8B76DC mov si, word ptr [bp-36] 0 000088CA 8B46DE mov ax, word ptr [bp-34] 0 000088CD 8946D4 mov word ptr [bp-44], ax 0 000088D0 FF76DA push word ptr [bp-38] 0 000088D3 E8FEFF call _get_sft_idx 0 000088D6 56 push si 0 000088D7 FF76D4 push word ptr [bp-44] 0 000088DA 50 push ax 0 000088DB E8FEFF call _DosSetFtimeSft 0 000088DE E996FC jmp _.L298 1620 _.L256: 0 000088E1 8D46DC lea ax, [-36+bp] 0 000088E4 50 push ax 0 000088E5 8D46DE lea ax, [-34+bp] 0 000088E8 50 push ax 0 000088E9 FF76DA push word ptr [bp-38] 0 000088EC E8FEFF call _DosGetFtime 0 000088EF E985FC jmp _.L298 1628 _.L183: 0 000088F2 8A46D8 mov al, byte ptr [bp-40] 0 000088F5 3C01 cmp al, 1 0 000088F7 742D je _.L258 0 000088F9 721E jc _.L259 0 000088FB 3C02 cmp al, 2 0 000088FD 7444 je _.L260 0 000088FF 3C03 cmp al, 3 0 00008901 7403E93CFC jne _.L193 0 00008906 833E0000FF cmp word ptr [_uppermem_root], -1 0 0000890B 7503E932FC je _.L193 0 00008910 FF76DA push word ptr [bp-38] 0 00008913 E8FEFF call _DosUmbLink 0 00008916 E942F8 jmp _.L202 1642 _.L259: 0 00008919 A00000 mov al, byte ptr [_mem_access_mode] 0 0000891C 8846D8 mov byte ptr [bp-40], al 0 0000891F C646D900 mov byte ptr [bp-39], 0 0 00008923 E935F8 jmp _.L202 1647 _.L258: 0 00008926 8A46DA mov al, byte ptr [bp-38] 0 00008929 3C82 cmp al, -126 0 0000892B 7603E912FC ja _.L193 0 00008930 88C4 mov ah, al 0 00008932 80E43F and ah, 63 0 00008935 80FC02 cmp ah, 2 0 00008938 7603E905FC ja _.L193 0 0000893D A20000 mov byte ptr [_mem_access_mode], al 0 00008940 E918F8 jmp _.L202 1657 _.L260: 0 00008943 A00000 mov al, byte ptr [_uppermem_link] 0 00008946 E94FF8 jmp _.L371 1660 _.L184: 0 00008949 A10000 mov ax, word ptr [_CritErrCode] 0 0000894C 8946D8 mov word ptr [bp-40], ax 0 0000894F A00000 mov al, byte ptr [_CritErrLocus] 0 00008952 8846DD mov byte ptr [bp-35], al 0 00008955 A00000 mov al, byte ptr [_CritErrClass] 0 00008958 8846DB mov byte ptr [bp-37], al 0 0000895B A00000 mov al, byte ptr [_CritErrAction] 0 0000895E 8846DA mov byte ptr [bp-38], al 0 00008961 A10000 mov ax, word ptr [_CritErrDev] 0 00008964 8946E2 mov word ptr [bp-30], ax 0 00008967 A10200 mov ax, word ptr [_CritErrDev+2] 0 0000896A E96AFA jmp _.L378 1673 _.L185: 0 0000896D FF76DC push word ptr [bp-36] 0 00008970 FF76E4 push word ptr [bp-28] 0 00008973 FF76DE push word ptr [bp-34] 0 00008976 E8FEFF call _DosMkTmp 0 00008979 E960FC jmp _.L237 1679 _.L186: 0 0000897C FF76DC push word ptr [bp-36] 0 0000897F B8020C mov ax, 3074 0 00008982 E94DFC jmp _.L363 1683 _.L187: 0 00008985 807ED801 cmp byte ptr [bp-40], 1 0 00008989 19C0 sbb ax, ax 0 0000898B 40 inc ax 0 0000898C 50 push ax 0 0000898D FF76E0 push word ptr [bp-32] 0 00008990 FF76E2 push word ptr [bp-30] 0 00008993 FF76DC push word ptr [bp-36] 0 00008996 FF76DE push word ptr [bp-34] 0 00008999 FF76DA push word ptr [bp-38] 0 0000899C E8FEFF call _DosLockUnlock 0 0000899F 8946E8 mov word ptr [bp-24], ax 1695 _.L386: 0 000089A2 85C0 test ax, ax 1697 _.L368: 0 000089A4 7403E9C4FD jne _.L249 0 000089A9 E9AFF7 jmp _.L202 1700 _.L188: 0 000089AC 807ED80A cmp byte ptr [bp-40], 10 0 000089B0 7603E99500 ja _.L263 0 000089B5 8A46D8 mov al, byte ptr [bp-40] 0 000089B8 30E4 xor ah, ah 0 000089BA D1E0 shl ax, 1 0 000089BC 93 xchg bx, ax 0 000089BD FFA70801 jmp word ptr [bx+_.L265] === Switch to base=012B40h -> ".RODATA" 1708 .section .rodata 1709 .p2align 1 1710 .p2align 2 1711 _.L265: 0 00001788 910E .hword _.L264 0 0000178A 1A0F .hword _.L263 0 0000178C 1A0F .hword _.L263 0 0000178E 1A0F .hword _.L263 0 00001790 1A0F .hword _.L263 0 00001792 1A0F .hword _.L263 0 00001794 A80E .hword _.L266 0 00001796 CC0E .hword _.L267 0 00001798 CC0E .hword _.L267 0 0000179A CC0E .hword _.L267 0 0000179C E80E .hword _.L268 === Switch to base=002270h -> ".TEXT" 1723 .text 1724 _.L264: 0 000089C1 B81000 mov ax, 16 0 000089C4 50 push ax 0 000089C5 FF76E4 push word ptr [bp-28] 0 000089C8 FF76DE push word ptr [bp-34] 0 000089CB FF76D2 push word ptr [bp-46] 0 000089CE 8D46D8 lea ax, [-40+bp] 0 000089D1 50 push ax 0 000089D2 E8FEFF call _fmemcpy 0 000089D5 E9E1F6 jmp _.L98 1734 _.L266: 0 000089D8 BA0000 mov dx, offset _internal_data 0 000089DB 8C56E4 mov word ptr [bp-28], ss 0 000089DE 8956E0 mov word ptr [bp-32], dx 0 000089E1 B80000 mov ax, offset _swap_indos 0 000089E4 29D0 sub ax, dx 0 000089E6 8946DC mov word ptr [bp-36], ax 0 000089E9 B80000 mov ax, offset _swap_always 0 000089EC 29D0 sub ax, dx 0 000089EE 8946DE mov word ptr [bp-34], ax 1744 _.L370: 0 000089F1 8E46D6 mov es, word ptr [bp-42] 0 000089F4 26806516FE and byte ptr es:[di+22], -2 0 000089F9 E95FF7 jmp _.L202 1748 _.L267: 0 000089FC FF360000 push word ptr [_Int21AX] 0 00008A00 56 push si 0 00008A01 FF76DE push word ptr [bp-34] 0 00008A04 B82511 mov ax, 4389 0 00008A07 50 push ax 0 00008A08 E8FEFF call _network_redirector_mx 0 00008A0B 8946E8 mov word ptr [bp-24], ax 0 00008A0E 8E46D6 mov es, word ptr [bp-42] 0 00008A11 26806516FE and byte ptr es:[di+22], -2 0 00008A16 EB8A jmp _.L386 1759 _.L268: 0 00008A18 8B5EDE mov bx, word ptr [bp-34] 0 00008A1B 8E46E4 mov es, word ptr [bp-28] 0 00008A1E 268B07 mov ax, word ptr es:[bx] 0 00008A21 A30000 mov word ptr [_CritErrCode], ax 0 00008A24 268B570E mov dx, word ptr es:[bx+14] 0 00008A28 268B470A mov ax, word ptr es:[bx+10] 0 00008A2C A30000 mov word ptr [_CritErrDev], ax 0 00008A2F 89160200 mov word ptr [_CritErrDev+2], dx 0 00008A33 268A4705 mov al, byte ptr es:[bx+5] 0 00008A37 A20000 mov byte ptr [_CritErrLocus], al 0 00008A3A 268A4703 mov al, byte ptr es:[bx+3] 0 00008A3E A20000 mov byte ptr [_CritErrClass], al 0 00008A41 268A4702 mov al, byte ptr es:[bx+2] 0 00008A45 A20000 mov byte ptr [_CritErrAction], al 0 00008A48 EBA7 jmp _.L370 1775 _.L263: 0 00008A4A C70600000000 mov word ptr [_CritErrCode], 0 0 00008A50 E9EFFA jmp _.L193 1778 _.L189: 0 00008A53 8A46D8 mov al, byte ptr [bp-40] 0 00008A56 84C0 test al, al 0 00008A58 7419 je _.L270 0 00008A5A 3C01 cmp al, 1 0 00008A5C 7424 je _.L271 0 00008A5E FF360000 push word ptr [_Int21AX] 0 00008A62 FF76D2 push word ptr [bp-46] 0 00008A65 8D46D8 lea ax, [-40+bp] 0 00008A68 50 push ax 0 00008A69 B81F11 mov ax, 4383 0 00008A6C 50 push ax 0 00008A6D E8FEFF call _network_redirector_mx 0 00008A70 E904FB jmp _.L298 1792 _.L270: 0 00008A73 FF76E4 push word ptr [bp-28] 0 00008A76 FF76DE push word ptr [bp-34] 0 00008A79 E8FEFF call _get_machine_name 0 00008A7C 8946DC mov word ptr [bp-36], ax 0 00008A7F E9D9F6 jmp _.L202 1798 _.L271: 0 00008A82 FF76DC push word ptr [bp-36] 0 00008A85 FF76E4 push word ptr [bp-28] 0 00008A88 FF76DE push word ptr [bp-34] 0 00008A8B E8FEFF call _set_machine_name 0 00008A8E E9CAF6 jmp _.L202 1804 _.L190: 0 00008A91 8A56D8 mov dl, byte ptr [bp-40] 0 00008A94 88D0 mov al, dl 0 00008A96 04F9 add al, -7 0 00008A98 3C01 cmp al, 1 0 00008A9A 7741 ja _.L272 0 00008A9C 8A46DE mov al, byte ptr [bp-34] 0 00008A9F 3A060000 cmp al, byte ptr [_lastdrive] 0 00008AA3 7330 jnc _.L273 0 00008AA5 B358 mov bl, 88 0 00008AA7 F6E3 mul bl 0 00008AA9 8B0E0200 mov cx, word ptr [_CDSp+2] 0 00008AAD 03060000 add ax, word ptr [_CDSp] 0 00008AB1 93 xchg bx, ax 0 00008AB2 8EC1 mov es, cx 0 00008AB4 26837F4501 cmp word ptr es:[bx+69], 1 0 00008AB9 721A jc _.L273 0 00008ABB 268B4743 mov ax, word ptr es:[bx+67] 0 00008ABF 80E4BF and ah, -65 0 00008AC2 80FA07 cmp dl, 7 0 00008AC5 7407 je _.L274 1825 _.L375: 0 00008AC7 26894743 mov word ptr es:[bx+67], ax 0 00008ACB E98DF6 jmp _.L202 1828 _.L274: 0 00008ACE 80CC40 or ah, 64 0 00008AD1 8EC1 mov es, cx 0 00008AD3 EBF2 jmp _.L375 1832 _.L273: 0 00008AD5 C746E8F1FF mov word ptr [bp-24], -15 0 00008ADA E990FC jmp _.L249 1835 _.L272: 0 00008ADD FF360000 push word ptr [_Int21AX] 0 00008AE1 FF76D2 push word ptr [bp-46] 0 00008AE4 8D46D8 lea ax, [-40+bp] 0 00008AE7 50 push ax 0 00008AE8 B81E11 mov ax, 4382 0 00008AEB 50 push ax 0 00008AEC E8FEFF call _network_redirector_mx 0 00008AEF 8946E8 mov word ptr [bp-24], ax 0 00008AF2 85C0 test ax, ax 0 00008AF4 7410 je _.L275 0 00008AF6 89C2 mov dx, ax 0 00008AF8 F7DA neg dx 0 00008AFA 89160000 mov word ptr [_CritErrCode], dx 0 00008AFE 8E46D6 mov es, word ptr [bp-42] 0 00008B01 26804D1601 or byte ptr es:[di+22], 1 1851 _.L275: 0 00008B06 F7D8 neg ax 0 00008B08 8E46D6 mov es, word ptr [bp-42] 0 00008B0B 268905 mov word ptr es:[di], ax 1855 _.L97: 0 00008B0E 89EC mov sp, bp 0 00008B10 5D pop bp 0 00008B11 5F pop di 0 00008B12 5E pop si 0 00008B13 C3 ret 1861 _.L191: 0 00008B14 FF76E6 push word ptr [bp-26] 0 00008B17 FF76E2 push word ptr [bp-30] 0 00008B1A E8FEFF call _adjust_far 0 00008B1D 52 push dx 0 00008B1E 50 push ax 0 00008B1F FF76E4 push word ptr [bp-28] 0 00008B22 FF76E0 push word ptr [bp-32] 0 00008B25 E8FEFF call _DosTruename 0 00008B28 8946E8 mov word ptr [bp-24], ax 0 00008B2B E941FB jmp _.L366 1872 _.L192: 0 00008B2E 8A46D8 mov al, byte ptr [bp-40] 0 00008B31 3C01 cmp al, 1 0 00008B33 7503E98BF9 je _.L280 0 00008B38 720A jc _.L279 0 00008B3A 3C02 cmp al, 2 0 00008B3C 7503E982F9 je _.L280 0 00008B41 E9FEF9 jmp _.L193 1880 _.L279: 0 00008B44 E8FEFF call _DosGetDBCS 0 00008B47 8956E4 mov word ptr [bp-28], dx 0 00008B4A 83C002 add ax, 2 0 00008B4D E940F8 jmp _.L376 1885 _.L194: 0 00008B50 8A46D8 mov al, byte ptr [bp-40] 0 00008B53 3C23 cmp al, 35 0 00008B55 7503E98100 je _.L282 0 00008B5A 7722 ja _.L283 0 00008B5C 3C21 cmp al, 33 0 00008B5E 7445 je _.L284 0 00008B60 7752 ja _.L285 0 00008B62 3C20 cmp al, 32 0 00008B64 7430 je _.L286 1895 _.L281: 0 00008B66 FF76E6 push word ptr [bp-26] 0 00008B69 FF76E2 push word ptr [bp-30] 0 00008B6C FF76DC push word ptr [bp-36] 0 00008B6F FF76DE push word ptr [bp-34] 0 00008B72 FF76DA push word ptr [bp-38] 0 00008B75 30E4 xor ah, ah 0 00008B77 50 push ax 0 00008B78 E8FEFF call _DosGetData 0 00008B7B E9F9F9 jmp _.L298 1905 _.L283: 0 00008B7E 3CA1 cmp al, -95 0 00008B80 743E je _.L287 0 00008B82 3CA2 cmp al, -94 0 00008B84 7449 je _.L288 0 00008B86 3CA0 cmp al, -96 0 00008B88 75DC jne _.L281 0 00008B8A FF76DE push word ptr [bp-34] 0 00008B8D E8FEFF call _DosUpFChar 0 00008B90 8846DE mov byte ptr [bp-34], al 0 00008B93 E9C5F5 jmp _.L202 1916 _.L286: 0 00008B96 FF76DE push word ptr [bp-34] 0 00008B99 E8FEFF call _DosUpChar 0 00008B9C 8846DE mov byte ptr [bp-34], al 0 00008B9F 83C402 add sp, 2 0 00008BA2 E9B6F5 jmp _.L202 1922 _.L284: 0 00008BA5 FF76DC push word ptr [bp-36] 0 00008BA8 FF76E4 push word ptr [bp-28] 0 00008BAB FF76DE push word ptr [bp-34] 0 00008BAE E8FEFF call _DosUpMem 0 00008BB1 E9A7F5 jmp _.L202 1928 _.L285: 0 00008BB4 FF76E4 push word ptr [bp-28] 0 00008BB7 FF76DE push word ptr [bp-34] 0 00008BBA E8FEFF call _DosUpString 0 00008BBD E99BF5 jmp _.L202 1933 _.L287: 0 00008BC0 FF76DC push word ptr [bp-36] 0 00008BC3 FF76E4 push word ptr [bp-28] 0 00008BC6 FF76DE push word ptr [bp-34] 0 00008BC9 E8FEFF call _DosUpFMem 0 00008BCC E98CF5 jmp _.L202 1939 _.L288: 0 00008BCF FF76E4 push word ptr [bp-28] 0 00008BD2 FF76DE push word ptr [bp-34] 0 00008BD5 E8FEFF call _DosUpFString 0 00008BD8 E980F5 jmp _.L202 1944 _.L282: 0 00008BDB 8A46DE mov al, byte ptr [bp-34] 0 00008BDE 30E4 xor ah, ah 0 00008BE0 50 push ax 0 00008BE1 E8FEFF call _DosYesNo 0 00008BE4 98 cbw 0 00008BE5 E949F9 jmp _.L300 1951 _.L195: 0 00008BE8 8A46D8 mov al, byte ptr [bp-40] 0 00008BEB 3C01 cmp al, 1 0 00008BED 7412 je _.L290 0 00008BEF 3C02 cmp al, 2 0 00008BF1 7403E94CF9 jne _.L193 0 00008BF6 FF76DE push word ptr [bp-34] 0 00008BF9 FF76DA push word ptr [bp-38] 0 00008BFC E8FEFF call _DosSetCodepage 0 00008BFF EB0B jmp _.L362 1961 _.L290: 0 00008C01 8D46DE lea ax, [-34+bp] 0 00008C04 50 push ax 0 00008C05 8D46DA lea ax, [-38+bp] 0 00008C08 50 push ax 0 00008C09 E8FEFF call _DosGetCodepage 1967 _.L362: 0 00008C0C 8946E8 mov word ptr [bp-24], ax 0 00008C0F 837EE800 cmp word ptr [bp-24], 0 0 00008C13 E98EFD jmp _.L368 1971 _.L196: 0 00008C16 FF76DA push word ptr [bp-38] 0 00008C19 E8FEFF call _SetJFTSize 0 00008C1C E958F9 jmp _.L298 1975 _.L197: 0 00008C1F FF76DA push word ptr [bp-38] 0 00008C22 E8FEFF call _get_sft_idx 0 00008C25 BA0100 mov dx, 1 0 00008C28 52 push dx 0 00008C29 50 push ax 0 00008C2A E8FEFF call _DosCloseSft 0 00008C2D E947F9 jmp _.L298 1983 _.L198: 0 00008C30 8A46DA mov al, byte ptr [bp-38] 0 00008C33 84C0 test al, al 0 00008C35 754B jne _.L293 0 00008C37 A00000 mov al, byte ptr [_default_drive] 0 00008C3A 98 cbw 1989 _.L294: 0 00008C3B 8946E8 mov word ptr [bp-24], ax 0 00008C3E 807ED801 cmp byte ptr [bp-40], 1 0 00008C42 7603E9FBF8 ja _.L193 0 00008C47 50 push ax 0 00008C48 E8FEFF call _get_cds 0 00008C4B 09D0 or ax, dx 0 00008C4D 7503E983FE je _.L273 0 00008C52 FF76E8 push word ptr [bp-24] 0 00008C55 E8FEFF call _get_dpb 0 00008C58 09D0 or ax, dx 0 00008C5A 7503E9E3F8 je _.L193 0 00008C5F 8B76DC mov si, word ptr [bp-36] 0 00008C62 807ED800 cmp byte ptr [bp-40], 0 0 00008C66 751F jne _.L312 0 00008C68 B86608 mov ax, 2150 2005 _.L297: 0 00008C6B 8946DC mov word ptr [bp-36], ax 0 00008C6E C646D80D mov byte ptr [bp-40], 13 0 00008C72 8D46D8 lea ax, [-40+bp] 0 00008C75 50 push ax 0 00008C76 E8FEFF call _DosDevIOctl 0 00008C79 8946E8 mov word ptr [bp-24], ax 0 00008C7C 8976DC mov word ptr [bp-36], si 0 00008C7F E942FA jmp _.L233 2014 _.L293: 0 00008C82 30E4 xor ah, ah 0 00008C84 48 dec ax 0 00008C85 EBB4 jmp _.L294 2018 _.L312: 0 00008C87 B84608 mov ax, 2118 0 00008C8A EBDF jmp _.L297 2021 _.L199: 0 00008C8C 8A46DE mov al, byte ptr [bp-34] 0 00008C8F 88C4 mov ah, al 0 00008C91 80E4EF and ah, -17 0 00008C94 80FC02 cmp ah, 2 0 00008C97 7603E9A6F8 ja _.L193 0 00008C9C 30E4 xor ah, ah 0 00008C9E 8A56DC mov dl, byte ptr [bp-36] 0 00008CA1 30F6 xor dh, dh 0 00008CA3 52 push dx 0 00008CA4 89C2 mov dx, ax 0 00008CA6 B108 mov cl, 8 0 00008CA8 D3E2 shl dx, cl 0 00008CAA 81E20003 and dx, 768 0 00008CAE B106 mov cl, 6 0 00008CB0 D3E0 shl ax, cl 0 00008CB2 250004 and ax, 1024 0 00008CB5 09D0 or ax, dx 0 00008CB7 8B56DA mov dx, word ptr [bp-38] 0 00008CBA 80E670 and dh, 112 0 00008CBD 09D0 or ax, dx 0 00008CBF 50 push ax 0 00008CC0 FF76E4 push word ptr [bp-28] 0 00008CC3 FF76E0 push word ptr [bp-32] 0 00008CC6 E8FEFF call _DosOpen 0 00008CC9 85D2 test dx, dx 0 00008CCB 7D03E9A7F8 jl _.L298 0 00008CD0 8956DC mov word ptr [bp-36], dx 0 00008CD3 E95BF8 jmp _.L300 2050 _.L200: 0 00008CD6 8A46D8 mov al, byte ptr [bp-40] 0 00008CD9 3C42 cmp al, 66 0 00008CDB 7407 je _.L302 0 00008CDD 3CA6 cmp al, -90 0 00008CDF 7403E9C300 jne _.L301 2056 _.L302: 0 00008CE4 8B5EDA mov bx, word ptr [bp-38] 0 00008CE7 8E46D4 mov es, word ptr [bp-44] 0 00008CEA 263B1E3200 cmp bx, word ptr es:[50] 0 00008CEF 7208 jc _.L303 2061 _.L304: 0 00008CF1 C746E8FAFF mov word ptr [bp-24], -6 0 00008CF6 E974FA jmp _.L249 2064 _.L303: 0 00008CF9 8E46D4 mov es, word ptr [bp-44] 0 00008CFC 268B163600 mov dx, word ptr es:[54] 0 00008D01 26031E3400 add bx, word ptr es:[52] 0 00008D06 8EC2 mov es, dx 0 00008D08 268A07 mov al, byte ptr es:[bx] 0 00008D0B 30E4 xor ah, ah 0 00008D0D 50 push ax 0 00008D0E E8FEFF call _idx_to_sft 0 00008D11 83F8FF cmp ax, -1 0 00008D14 7505 jne _.L314 0 00008D16 83FAFF cmp dx, -1 0 00008D19 74D6 je _.L304 2077 _.L314: 0 00008D1B 8EC2 mov es, dx 0 00008D1D 89C3 mov bx, ax 0 00008D1F 26837F0500 cmp word ptr es:[bx+5], 0 0 00008D24 7C06 jl _.L306 0 00008D26 807ED842 cmp byte ptr [bp-40], 66 0 00008D2A 757B jne _.L301 2084 _.L306: 0 00008D2C 8956CA mov word ptr [bp-54], dx 0 00008D2F 8946CE mov word ptr [bp-50], ax 0 00008D32 8D5EE8 lea bx, [-24+bp] 0 00008D35 8CD6 mov si, ss 0 00008D37 B91800 mov cx, 24 0 00008D3A 51 push cx 0 00008D3B 894ED0 mov word ptr [bp-48], cx 0 00008D3E FF76D6 push word ptr [bp-42] 0 00008D41 57 push di 0 00008D42 16 push ss 0 00008D43 53 push bx 0 00008D44 895ED4 mov word ptr [bp-44], bx 0 00008D47 E8FEFF call _fmemcpy 0 00008D4A 8E46D6 mov es, word ptr [bp-42] 0 00008D4D 8B56CA mov dx, word ptr [bp-54] 0 00008D50 26895510 mov word ptr es:[di+16], dx 0 00008D54 8E46D6 mov es, word ptr [bp-42] 0 00008D57 8B46CE mov ax, word ptr [bp-50] 0 00008D5A 2689450A mov word ptr es:[di+10], ax 0 00008D5E 8E46D6 mov es, word ptr [bp-42] 0 00008D61 26804D1601 or byte ptr es:[di+22], 1 0 00008D66 8E46D6 mov es, word ptr [bp-42] 0 00008D69 26C6450111 mov byte ptr es:[di+1], 17 0 00008D6E FF76D6 push word ptr [bp-42] 0 00008D71 57 push di 0 00008D72 B82F00 mov ax, 47 0 00008D75 50 push ax 0 00008D76 E8FEFF call _call_intr 0 00008D79 8E46D6 mov es, word ptr [bp-42] 0 00008D7C 26F6451601 test byte ptr es:[di+22], 1 0 00008D81 8B5ED4 mov bx, word ptr [bp-44] 0 00008D84 8B4ED0 mov cx, word ptr [bp-48] 0 00008D87 7514 jne _.L308 0 00008D89 8B46F8 mov ax, word ptr [bp-8] 0 00008D8C 26894510 mov word ptr es:[di+16], ax 0 00008D90 8B46F2 mov ax, word ptr [bp-14] 0 00008D93 8E46D6 mov es, word ptr [bp-42] 0 00008D96 2689450A mov word ptr es:[di+10], ax 0 00008D9A E971FD jmp _.L97 2124 _.L308: 0 00008D9D 51 push cx 0 00008D9E 56 push si 0 00008D9F 53 push bx 0 00008DA0 FF76D6 push word ptr [bp-42] 0 00008DA3 57 push di 0 00008DA4 E8FEFF call _fmemcpy 2131 _.L301: 0 00008DA7 C646D800 mov byte ptr [bp-40], 0 0 00008DAB E95CF9 jmp _.L246 2134 _.L201: 0 00008DAE 8E46D6 mov es, word ptr [bp-42] 0 00008DB1 26806516FE and byte ptr es:[di+22], -2 0 00008DB6 C70600000000 mov word ptr [_CritErrCode], 0 0 00008DBC 8D46D8 lea ax, [-40+bp] 0 00008DBF 50 push ax 0 00008DC0 E8FEFF call _int21_fat32 0 00008DC3 E9B1F7 jmp _.L298 2142 .size _int21_service, .-_int21_service 2143 .global _int2526_handler 2144 .type _int2526_handler, @function 2145 _int2526_handler: 0 00008DC6 56 push si 0 00008DC7 57 push di 0 00008DC8 55 push bp 0 00008DC9 89E5 mov bp, sp 0 00008DCB 83EC0E sub sp, 14 0 00008DCE 8B5E0A mov bx, word ptr [bp+10] 0 00008DD1 8B460C mov ax, word ptr [bp+12] 0 00008DD4 8946FE mov word ptr [bp-2], ax 0 00008DD7 837E0826 cmp word ptr [bp+8], 38 0 00008DDB 9F lahf 0 00008DDC D0E4 shl ah, 1 0 00008DDE 99 cwd 0 00008DDF 8956FA mov word ptr [bp-6], dx 0 00008DE2 8346FA04 add word ptr [bp-6], 4 0 00008DE6 8E46FE mov es, word ptr [bp-2] 0 00008DE9 268B4712 mov ax, word ptr es:[bx+18] 0 00008DED 895EF6 mov word ptr [bp-10], bx 0 00008DF0 8946FC mov word ptr [bp-4], ax 0 00008DF3 8A4EFC mov cl, byte ptr [bp-4] 0 00008DF6 80E17F and cl, 127 0 00008DF9 884EFC mov byte ptr [bp-4], cl 0 00008DFC 884EF8 mov byte ptr [bp-8], cl 0 00008DFF C646FD00 mov byte ptr [bp-3], 0 0 00008E03 FF76FC push word ptr [bp-4] 0 00008E06 E8FEFF call _get_dpb 0 00008E09 8A4EF8 mov cl, byte ptr [bp-8] 0 00008E0C 8E46FE mov es, word ptr [bp-2] 0 00008E0F 363A0E0000 cmp cl, byte ptr ss:[_lastdrive] 0 00008E14 8B5EF6 mov bx, word ptr [bp-10] 0 00008E17 7306 jnc _.L401 0 00008E19 89C6 mov si, ax 0 00008E1B 09D0 or ax, dx 0 00008E1D 7514 jne _.L389 2179 _.L401: 0 00008E1F 26C747120102 mov word ptr es:[bx+18], 513 2181 _.L409: 0 00008E25 8E46FE mov es, word ptr [bp-2] 0 00008E28 26804F1401 or byte ptr es:[bx+20], 1 2184 _.L387: 0 00008E2D 89EC mov sp, bp 0 00008E2F 5D pop bp 0 00008E30 5F pop di 0 00008E31 5E pop si 0 00008E32 C3 ret 2190 _.L389: 0 00008E33 268B4710 mov ax, word ptr es:[bx+16] 0 00008E37 8946F8 mov word ptr [bp-8], ax 0 00008E3A 268B7F0E mov di, word ptr es:[bx+14] 0 00008E3E 31C9 xor cx, cx 0 00008E40 39CF cmp di, cx 0 00008E42 741D je _.L392 0 00008E44 8EC2 mov es, dx 0 00008E46 26394C0F cmp word ptr es:[si+15], cx 0 00008E4A 7515 jne _.L392 0 00008E4C 268B4433 mov ax, word ptr es:[si+51] 0 00008E50 260B4431 or ax, word ptr es:[si+49] 0 00008E54 740B je _.L392 0 00008E56 8E46FE mov es, word ptr [bp-2] 0 00008E59 26C747120702 mov word ptr es:[bx+18], 519 0 00008E5F EBC4 jmp _.L409 2206 _.L392: 0 00008E61 8E46FE mov es, word ptr [bp-2] 0 00008E64 268B770C mov si, word ptr es:[bx+12] 0 00008E68 89F0 mov ax, si 0 00008E6A 268B5702 mov dx, word ptr es:[bx+2] 0 00008E6E 837EF8FF cmp word ptr [bp-8], -1 0 00008E72 751B jne _.L395 0 00008E74 8EDB mov ds, bx 0 00008E76 8EC2 mov es, dx 0 00008E78 268B3C mov di, word ptr es:[si] 0 00008E7B 26C44C02 les cx, dword ptr es:[si+2] 0 00008E7F 8C46F8 mov word ptr [bp-8], es 0 00008E82 8EC2 mov es, dx 0 00008E84 268B7406 mov si, word ptr es:[si+6] 0 00008E88 93 xchg bx, ax 0 00008E89 268B5708 mov dx, word ptr es:[bx+8] 0 00008E8D 8CDB mov bx, ds 2223 _.L395: 0 00008E8F 36FE060000 inc byte ptr ss:[_InDOS] 0 00008E94 837EFA03 cmp word ptr [bp-6], 3 0 00008E98 7522 jne _.L396 0 00008E9A 895EF2 mov word ptr [bp-14], bx 0 00008E9D 8956F4 mov word ptr [bp-12], dx 0 00008EA0 B80200 mov ax, 2 0 00008EA3 50 push ax 0 00008EA4 FF76FC push word ptr [bp-4] 0 00008EA7 51 push cx 0 00008EA8 57 push di 0 00008EA9 51 push cx 0 00008EAA 894EF6 mov word ptr [bp-10], cx 0 00008EAD 57 push di 0 00008EAE 16 push ss 0 00008EAF 1F pop ds 0 00008EB0 E8FEFF call _DeleteBlockInBufferCache 0 00008EB3 8B5EF2 mov bx, word ptr [bp-14] 0 00008EB6 8B56F4 mov dx, word ptr [bp-12] 0 00008EB9 8B4EF6 mov cx, word ptr [bp-10] 2243 _.L396: 0 00008EBC 895EF6 mov word ptr [bp-10], bx 0 00008EBF FF76FA push word ptr [bp-6] 0 00008EC2 FF76F8 push word ptr [bp-8] 0 00008EC5 52 push dx 0 00008EC6 56 push si 0 00008EC7 51 push cx 0 00008EC8 57 push di 0 00008EC9 FF76FC push word ptr [bp-4] 0 00008ECC 16 push ss 0 00008ECD 1F pop ds 0 00008ECE E8FEFF call _dskxfer 0 00008ED1 8E46FE mov es, word ptr [bp-2] 0 00008ED4 8B5EF6 mov bx, word ptr [bp-10] 0 00008ED7 26894712 mov word ptr es:[bx+18], ax 0 00008EDB 8E46FE mov es, word ptr [bp-2] 0 00008EDE 268B5714 mov dx, word ptr es:[bx+20] 0 00008EE2 83E2FE and dx, -2 0 00008EE5 85C0 test ax, ax 0 00008EE7 750C jne _.L397 0 00008EE9 26895714 mov word ptr es:[bx+20], dx 2264 _.L398: 0 00008EED 36FE0E0000 dec byte ptr ss:[_InDOS] 0 00008EF2 E938FF jmp _.L387 2267 _.L397: 0 00008EF5 83CA01 or dx, 1 0 00008EF8 8E46FE mov es, word ptr [bp-2] 0 00008EFB 26895714 mov word ptr es:[bx+20], dx 0 00008EFF 837EFA03 cmp word ptr [bp-6], 3 0 00008F03 75E8 jne _.L398 0 00008F05 FF76FC push word ptr [bp-4] 0 00008F08 E8FEFF call _setinvld 0 00008F0B EBE0 jmp _.L398 2276 .size _int2526_handler, .-_int2526_handler === Switch to base=012B40h -> ".RODATA.STR1.1" 2277 .section .rodata.str1.1 2278 _.LC3: 0 000019EE 3F3A5C00 .string "?:\\" 2280 _.LC4: 0 000019F2 756E696D706C656D .string "unimplemented internal dos function INT2F/12" 0 000019FA 656E74656420696E 0 00001A02 7465726E616C2064 0 00001A0A 6F732066756E6374 0 00001A12 696F6E20494E5432 0 00001A1A 462F313200 2282 _.LC5: 0 00001A1F 0A00 .string "\n" === Switch to base=002270h -> ".TEXT" 2284 .text 2285 .global _int2F_12_handler 2286 .type _int2F_12_handler, @function 2287 _int2F_12_handler: 0 00008F0D 56 push si 0 00008F0E 57 push di 0 00008F0F 55 push bp 0 00008F10 89E5 mov bp, sp 0 00008F12 83EC2A sub sp, 42 0 00008F15 8B7608 mov si, word ptr [bp+8] 0 00008F18 8B460A mov ax, word ptr [bp+10] 0 00008F1B 8946DE mov word ptr [bp-34], ax 0 00008F1E 8EC0 mov es, ax 0 00008F20 268A4411 mov al, byte ptr es:[si+17] 0 00008F24 3C4A cmp al, 74 0 00008F26 7403E9B500 jne _.L411 0 00008F2B 26C704FFFF mov word ptr es:[si], -1 0 00008F30 A10000 mov ax, word ptr [_firstAvailableBuf] 0 00008F33 8946DA mov word ptr [bp-38], ax 0 00008F36 A10200 mov ax, word ptr [_firstAvailableBuf+2] 0 00008F39 8946DC mov word ptr [bp-36], ax 0 00008F3C 83F8FF cmp ax, -1 0 00008F3F 7403E98E00 jne _.L485 0 00008F44 837EDAF0 cmp word ptr [bp-38], -16 0 00008F48 7603E98A00 ja _.L488 0 00008F4D 8B4EDA mov cx, word ptr [bp-38] 0 00008F50 83C10F add cx, 15 0 00008F53 83E1F0 and cx, -16 0 00008F56 89C8 mov ax, cx 0 00008F58 F7D8 neg ax 0 00008F5A 8E46DE mov es, word ptr [bp-34] 0 00008F5D 26807C1002 cmp byte ptr es:[si+16], 2 0 00008F62 7577 jne _.L487 0 00008F64 268B540A mov dx, word ptr es:[si+10] 0 00008F68 89D3 mov bx, dx 0 00008F6A 83C30F add bx, 15 0 00008F6D 83E3F0 and bx, -16 0 00008F70 39DA cmp dx, bx 0 00008F72 7763 ja _.L488 0 00008F74 39D8 cmp ax, bx 0 00008F76 725F jc _.L488 0 00008F78 89CF mov di, cx 0 00008F7A 894ED8 mov word ptr [bp-40], cx 0 00008F7D 8D41FF lea ax, [-1+bx+di] 0 00008F80 895ED6 mov word ptr [bp-42], bx 0 00008F83 50 push ax 0 00008F84 FF76DA push word ptr [bp-38] 0 00008F87 E8FEFF call _AllocateHMASpace 0 00008F8A 8B4ED8 mov cx, word ptr [bp-40] 0 00008F8D 31C0 xor ax, ax 0 00008F8F 8B5ED6 mov bx, word ptr [bp-42] 0 00008F92 89DA mov dx, bx 0 00008F94 01CA add dx, cx 0 00008F96 11C0 adc ax, ax 0 00008F98 85D2 test dx, dx 0 00008F9A 7528 jne _.L414 0 00008F9C 83F801 cmp ax, 1 0 00008F9F 7523 jne _.L414 0 00008FA1 8B46DC mov ax, word ptr [bp-36] 0 00008FA4 A30000 mov word ptr [_firstAvailableBuf], ax 0 00008FA7 A30200 mov word ptr [_firstAvailableBuf+2], ax 2345 _.L504: 0 00008FAA 894EDC mov word ptr [bp-36], cx 0 00008FAD 93 xchg bx, ax 2348 _.L412: 0 00008FAE C456DC les dx, dword ptr [bp-36] 0 00008FB1 26895404 mov word ptr es:[si+4], dx 0 00008FB5 8E46DE mov es, word ptr [bp-34] 0 00008FB8 2689440A mov word ptr es:[si+10], ax 2353 _.L410: 0 00008FBC 89EC mov sp, bp 0 00008FBE 5D pop bp 0 00008FBF 5F pop di 0 00008FC0 5E pop si 0 00008FC1 16 push ss 0 00008FC2 1F pop ds 0 00008FC3 C3 ret 2361 _.L414: 0 00008FC4 89D8 mov ax, bx 0 00008FC6 2B46DA sub ax, word ptr [bp-38] 0 00008FC9 01C8 add ax, cx 0 00008FCB 3601060000 add word ptr ss:[_firstAvailableBuf], ax 0 00008FD0 EBD8 jmp _.L504 2367 _.L485: 0 00008FD2 C746DCFFFF mov word ptr [bp-36], -1 2369 _.L488: 0 00008FD7 31C0 xor ax, ax 0 00008FD9 EBD3 jmp _.L412 2372 _.L487: 0 00008FDB 894EDC mov word ptr [bp-36], cx 0 00008FDE EBCE jmp _.L412 2375 _.L411: 0 00008FE0 3C13 cmp al, 19 0 00008FE2 756B jne _.L416 0 00008FE4 BB0000 mov bx, offset _UserInt13 0 00008FE7 B80000 mov ax, offset _UserInt13@OZSEG16 0 00008FEA 8EC0 mov es, ax 0 00008FEC 268B17 mov dx, word ptr es:[bx] 0 00008FEF 268B0E0200 mov cx, word ptr es:[_UserInt13+2] 0 00008FF4 8E5EDE mov ds, word ptr [bp-34] 0 00008FF7 8B7C02 mov di, word ptr [si+2] 0 00008FFA 26893E0200 mov word ptr es:[_UserInt13+2], di 0 00008FFF 8E46DE mov es, word ptr [bp-34] 0 00009002 268E5C0C mov ds, word ptr es:[si+12] 0 00009006 8EC0 mov es, ax 0 00009008 268C1F mov word ptr es:[bx], ds 0 0000900B 8E46DE mov es, word ptr [bp-34] 0 0000900E 26894C02 mov word ptr es:[si+2], cx 0 00009012 8E46DE mov es, word ptr [bp-34] 0 00009015 2689540C mov word ptr es:[si+12], dx 0 00009019 BB0000 mov bx, offset _BIOSInt13 0 0000901C B80000 mov ax, offset _BIOSInt13@OZSEG16 0 0000901F 8EC0 mov es, ax 0 00009021 268B17 mov dx, word ptr es:[bx] 0 00009024 268B0E0200 mov cx, word ptr es:[_BIOSInt13+2] 0 00009029 8E5EDE mov ds, word ptr [bp-34] 0 0000902C 8B3C mov di, word ptr [si] 0 0000902E 26893E0200 mov word ptr es:[_BIOSInt13+2], di 0 00009033 8E46DE mov es, word ptr [bp-34] 0 00009036 268E5C0A mov ds, word ptr es:[si+10] 0 0000903A 8EC0 mov es, ax 0 0000903C 268C1F mov word ptr es:[bx], ds 0 0000903F 8E46DE mov es, word ptr [bp-34] 0 00009042 26890C mov word ptr es:[si], cx 0 00009045 8E46DE mov es, word ptr [bp-34] 0 00009048 2689540A mov word ptr es:[si+10], dx 0 0000904C E96DFF jmp _.L410 2411 _.L416: 0 0000904F 3C46 cmp al, 70 0 00009051 7503E966FF je _.L410 0 00009056 3C16 cmp al, 22 0 00009058 7503E95FFF je _.L410 0 0000905D 3C08 cmp al, 8 0 0000905F 8E46DE mov es, word ptr [bp-34] 0 00009062 268A4410 mov al, byte ptr es:[si+16] 0 00009066 7522 jne _.L418 0 00009068 84C0 test al, al 0 0000906A 7432 je _.L422 0 0000906C 3C03 cmp al, 3 0 0000906E 7403E949FF jne _.L410 0 00009073 8E46DE mov es, word ptr [bp-34] 0 00009076 268C5402 mov word ptr es:[si+2], ss 0 0000907A 31C0 xor ax, ax 0 0000907C 50 push ax 0 0000907D E8FEFF call _getddt 2429 _.L505: 0 00009080 8E46DE mov es, word ptr [bp-34] 0 00009083 26894404 mov word ptr es:[si+4], ax 0 00009087 E932FF jmp _.L410 2433 _.L418: 0 0000908A 3C2F cmp al, 47 0 0000908C 7603E9E405 ja _.L421 0 00009091 88C2 mov dl, al 0 00009093 30F6 xor dh, dh 0 00009095 D1E2 shl dx, 1 0 00009097 89D3 mov bx, dx 0 00009099 36FFA72001 jmp word ptr ss:[bx+_.L423] === Switch to base=012B40h -> ".RODATA" 2441 .section .rodata 2442 .p2align 1 0 0000179E 0000 .p2align 2 2444 _.L423: 0 000017A0 6E15 .hword _.L422 0 000017A2 451B .hword _.L421 0 000017A4 451B .hword _.L421 0 000017A6 7915 .hword _.L424 0 000017A8 451B .hword _.L421 0 000017AA 451B .hword _.L421 0 000017AC 8315 .hword _.L425 0 000017AE 451B .hword _.L421 0 000017B0 B915 .hword _.L426 0 000017B2 451B .hword _.L421 0 000017B4 EA15 .hword _.L427 0 000017B6 3B16 .hword _.L428 0 000017B8 AE16 .hword _.L429 0 000017BA ED16 .hword _.L430 0 000017BC 451B .hword _.L421 0 000017BE 451B .hword _.L421 0 000017C0 451B .hword _.L421 0 000017C2 0417 .hword _.L431 0 000017C4 4417 .hword _.L432 0 000017C6 5D17 .hword _.L433 0 000017C8 451B .hword _.L421 0 000017CA 451B .hword _.L421 0 000017CC 8317 .hword _.L434 0 000017CE C317 .hword _.L435 0 000017D0 0018 .hword _.L436 0 000017D2 451B .hword _.L421 0 000017D4 451B .hword _.L421 0 000017D6 1718 .hword _.L437 0 000017D8 451B .hword _.L421 0 000017DA 451B .hword _.L421 0 000017DC 451B .hword _.L421 0 000017DE 2A18 .hword _.L438 0 000017E0 E918 .hword _.L439 0 000017E2 3419 .hword _.L440 0 000017E4 451B .hword _.L421 0 000017E6 4E19 .hword _.L441 0 000017E8 451B .hword _.L421 0 000017EA 8019 .hword _.L442 0 000017EC 8E19 .hword _.L443 0 000017EE C119 .hword _.L444 0 000017F0 DE19 .hword _.L445 0 000017F2 501A .hword _.L446 0 000017F4 CA18 .hword _.L447 0 000017F6 8C1A .hword _.L448 0 000017F8 011B .hword _.L449 0 000017FA 1A1B .hword _.L450 0 000017FC 8C14 .hword _.L410 0 000017FE 1F1B .hword _.L451 === Switch to base=002270h -> ".TEXT" 2493 .text 2494 _.L422: 0 0000909E 8E46DE mov es, word ptr [bp-34] 0 000090A1 26C64410FF mov byte ptr es:[si+16], -1 0 000090A6 E913FF jmp _.L410 2498 _.L424: 0 000090A9 8E46DE mov es, word ptr [bp-34] 0 000090AC 268C5402 mov word ptr es:[si+2], ss 0 000090B0 E909FF jmp _.L410 2502 _.L425: 0 000090B3 8E46DE mov es, word ptr [bp-34] 0 000090B6 26C55C06 lds bx, dword ptr es:[si+6] 0 000090BA 268B4C04 mov cx, word ptr es:[si+4] 0 000090BE 268B4418 mov ax, word ptr es:[si+24] 0 000090C2 85C0 test ax, ax 0 000090C4 7C1F jl _.L489 0 000090C6 89C2 mov dx, ax 0 000090C8 30F6 xor dh, dh 2511 _.L452: 0 000090CA 1E push ds 0 000090CB 53 push bx 0 000090CC 51 push cx 0 000090CD 52 push dx 0 000090CE B108 mov cl, 8 0 000090D0 D3E8 shr ax, cl 0 000090D2 50 push ax 0 000090D3 16 push ss 0 000090D4 1F pop ds 0 000090D5 E8FEFF call _CriticalError 0 000090D8 8E46DE mov es, word ptr [bp-34] 0 000090DB 26884410 mov byte ptr es:[si+16], al 0 000090DF 83C40A add sp, 10 0 000090E2 E9D7FE jmp _.L410 2526 _.L489: 0 000090E5 31D2 xor dx, dx 0 000090E7 EBE1 jmp _.L452 2529 _.L426: 0 000090E9 8E46DE mov es, word ptr [bp-34] 0 000090EC 268B14 mov dx, word ptr es:[si] 0 000090EF 268B5C04 mov bx, word ptr es:[si+4] 0 000090F3 8EC2 mov es, dx 0 000090F5 268B07 mov ax, word ptr es:[bx] 0 000090F8 8E46DE mov es, word ptr [bp-34] 0 000090FB 26894410 mov word ptr es:[si+16], ax 0 000090FF 8EC2 mov es, dx 0 00009101 268B07 mov ax, word ptr es:[bx] 0 00009104 89C1 mov cx, ax 0 00009106 49 dec cx 0 00009107 7406 je _.L453 0 00009109 26890F mov word ptr es:[bx], cx 0 0000910C E9ADFE jmp _.L410 2544 _.L453: 0 0000910F 83C0FE add ax, -2 0 00009112 8EC2 mov es, dx 0 00009114 268907 mov word ptr es:[bx], ax 0 00009117 E9A2FE jmp _.L410 2549 _.L427: 0 0000911A B058 mov al, 88 0 0000911C 36F62E0000 imul byte ptr ss:[_default_drive] 0 00009121 3603060000 add ax, word ptr ss:[_CDSp] 0 00009126 93 xchg bx, ax 0 00009127 8E060200 mov es, word ptr [_CDSp+2] 0 0000912B 26C47F45 les di, dword ptr es:[bx+69] 0 0000912F 26FF7515 push word ptr es:[di+21] 0 00009133 26FF7513 push word ptr es:[di+19] 0 00009137 8E46DE mov es, word ptr [bp-34] 0 0000913A 26FF7418 push word ptr es:[si+24] 0 0000913E A00000 mov al, byte ptr [_default_drive] 0 00009141 98 cbw 0 00009142 50 push ax 0 00009143 B83800 mov ax, 56 0 00009146 50 push ax 0 00009147 E8FEFF call _CriticalError 0 0000914A 88C2 mov dl, al 0 0000914C 8E46DE mov es, word ptr [bp-34] 0 0000914F 26884410 mov byte ptr es:[si+16], al 0 00009153 8E46DE mov es, word ptr [bp-34] 0 00009156 268B4416 mov ax, word ptr es:[si+22] 0 0000915A 83C40A add sp, 10 0 0000915D 80FA01 cmp dl, 1 0 00009160 7503E93E03 je _.L454 2574 _.L513: 0 00009165 83C801 or ax, 1 0 00009168 E93E03 jmp _.L506 2577 _.L428: 0 0000916B 8E46DE mov es, word ptr [bp-34] 0 0000916E 268B04 mov ax, word ptr es:[si] 0 00009171 8946DC mov word ptr [bp-36], ax 0 00009174 268B5C04 mov bx, word ptr es:[si+4] 0 00009178 26804C1601 or byte ptr es:[si+22], 1 0 0000917D 8E46DC mov es, word ptr [bp-36] 0 00009180 268B4702 mov ax, word ptr es:[bx+2] 0 00009184 85C0 test ax, ax 0 00009186 7C04 jl _.L455 0 00009188 A8F0 test al, -16 0 0000918A 7546 jne _.L456 2589 _.L455: 0 0000918C B058 mov al, 88 0 0000918E 36F62E0000 imul byte ptr ss:[_default_drive] 0 00009193 3603060000 add ax, word ptr ss:[_CDSp] 0 00009198 93 xchg bx, ax 0 00009199 8E060200 mov es, word ptr [_CDSp+2] 0 0000919D 26C47F45 les di, dword ptr es:[bx+69] 0 000091A1 26FF7515 push word ptr es:[di+21] 0 000091A5 26FF7513 push word ptr es:[di+19] 0 000091A9 8E46DE mov es, word ptr [bp-34] 0 000091AC 26FF7418 push word ptr es:[si+24] 0 000091B0 A00000 mov al, byte ptr [_default_drive] 0 000091B3 98 cbw 0 000091B4 50 push ax 0 000091B5 B83800 mov ax, 56 0 000091B8 50 push ax 0 000091B9 E8FEFF call _CriticalError 0 000091BC 8E46DE mov es, word ptr [bp-34] 0 000091BF 26884410 mov byte ptr es:[si+16], al 0 000091C3 83C40A add sp, 10 0 000091C6 3C01 cmp al, 1 0 000091C8 7508 jne _.L456 0 000091CA 8E46DE mov es, word ptr [bp-34] 0 000091CD 26806416FE and byte ptr es:[si+22], -2 2613 _.L456: 0 000091D2 8E46DE mov es, word ptr [bp-34] 0 000091D5 26C744102000 mov word ptr es:[si+16], 32 0 000091DB E9DEFD jmp _.L410 2617 _.L429: 0 000091DE 36C41E0000 les bx, dword ptr ss:[_lpCurSft] 0 000091E3 26F6470580 test byte ptr es:[bx+5], -128 0 000091E8 7421 je _.L458 0 000091EA C646E300 mov byte ptr [bp-29], 0 0 000091EE C746E50000 mov word ptr [bp-27], 0 0 000091F3 C646E40D mov byte ptr [bp-28], 13 0 000091F7 C646E21E mov byte ptr [bp-30], 30 0 000091FB 26FF7709 push word ptr es:[bx+9] 0 000091FF 26FF7707 push word ptr es:[bx+7] 0 00009203 8D46E2 lea ax, [-30+bp] 0 00009206 16 push ss 0 00009207 50 push ax 0 00009208 E8FEFF call _execrh 2631 _.L458: 0 0000920B 8B1E0000 mov bx, word ptr [_lpCurSft] 0 0000920F A10000 mov ax, word ptr [_cu_psp] 0 00009212 8E060200 mov es, word ptr [_lpCurSft+2] 0 00009216 26894731 mov word ptr es:[bx+49], ax 0 0000921A E99FFD jmp _.L410 2637 _.L430: 0 0000921D E8FEFF call _dos_getdate 0 00009220 8E46DE mov es, word ptr [bp-34] 0 00009223 26894410 mov word ptr es:[si+16], ax 0 00009227 E8FEFF call _dos_gettime 0 0000922A 8E46DE mov es, word ptr [bp-34] 0 0000922D 2689440C mov word ptr es:[si+12], ax 0 00009231 E988FD jmp _.L410 2645 _.L431: 0 00009234 8E46DE mov es, word ptr [bp-34] 0 00009237 268E5C02 mov ds, word ptr es:[si+2] 0 0000923B 268B5C06 mov bx, word ptr es:[si+6] 0 0000923F 268B3C mov di, word ptr es:[si] 0 00009242 268B7404 mov si, word ptr es:[si+4] 2651 _.L461: 0 00009246 8D5701 lea dx, [1+bx] 0 00009249 8A07 mov al, byte ptr [bx] 0 0000924B 88C4 mov ah, al 0 0000924D 80C49F add ah, -97 0 00009250 80FC19 cmp ah, 25 0 00009253 7717 ja _.L459 0 00009255 04E0 add al, -32 2659 _.L460: 0 00009257 8D4C01 lea cx, [1+si] 0 0000925A 8EC7 mov es, di 0 0000925C 268804 mov byte ptr es:[si], al 0 0000925F 89D3 mov bx, dx 0 00009261 84C0 test al, al 0 00009263 7503E954FD je _.L410 0 00009268 89CE mov si, cx 0 0000926A EBDA jmp _.L461 2668 _.L459: 0 0000926C 3C2F cmp al, 47 0 0000926E 75E7 jne _.L460 0 00009270 B05C mov al, 92 0 00009272 EBE3 jmp _.L460 2673 _.L432: 0 00009274 8E46DE mov es, word ptr [bp-34] 0 00009277 268B4404 mov ax, word ptr es:[si+4] 0 0000927B 26FF34 push word ptr es:[si] 2677 _.L507: 0 0000927E 50 push ax 0 0000927F E8FEFF call _fstrlen 0 00009282 40 inc ax 0 00009283 8E46DE mov es, word ptr [bp-34] 0 00009286 2689440E mov word ptr es:[si+14], ax 0 0000928A E92FFD jmp _.L410 2684 _.L433: 0 0000928D 8E46DE mov es, word ptr [bp-34] 0 00009290 268B5418 mov dx, word ptr es:[si+24] 0 00009294 88D0 mov al, dl 0 00009296 88D4 mov ah, dl 0 00009298 80C49F add ah, -97 0 0000929B 80FC19 cmp ah, 25 0 0000929E 7607 jbe _.L462 0 000092A0 26885410 mov byte ptr es:[si+16], dl 0 000092A4 E915FD jmp _.L410 2694 _.L462: 0 000092A7 04E0 add al, -32 0 000092A9 8E46DE mov es, word ptr [bp-34] 2697 _.L510: 0 000092AC 26884410 mov byte ptr es:[si+16], al 0 000092B0 E909FD jmp _.L410 2700 _.L434: 0 000092B3 8E46DE mov es, word ptr [bp-34] 0 000092B6 26FF740A push word ptr es:[si+10] 0 000092BA E8FEFF call _idx_to_sft_ 0 000092BD 83F8FF cmp ax, -1 0 000092C0 8E46DE mov es, word ptr [bp-34] 0 000092C3 268B5416 mov dx, word ptr es:[si+22] 0 000092C7 750A jne _.L463 0 000092C9 83CA01 or dx, 1 0 000092CC 26895416 mov word ptr es:[si+22], dx 0 000092D0 E9E9FC jmp _.L410 2711 _.L463: 0 000092D3 83E2FE and dx, -2 0 000092D6 8E46DE mov es, word ptr [bp-34] 0 000092D9 26895416 mov word ptr es:[si+22], dx 0 000092DD 8E46DE mov es, word ptr [bp-34] 0 000092E0 2689440A mov word ptr es:[si+10], ax 0 000092E4 A10200 mov ax, word ptr [_lpCurSft+2] 0 000092E7 8E46DE mov es, word ptr [bp-34] 0 000092EA 268904 mov word ptr es:[si], ax 0 000092ED A10000 mov ax, word ptr [_lpCurSft] 0 000092F0 E98DFD jmp _.L505 2722 _.L435: 0 000092F3 8E46DE mov es, word ptr [bp-34] 0 000092F6 268B4418 mov ax, word ptr es:[si+24] 0 000092FA 8946DC mov word ptr [bp-36], ax 0 000092FD 30E4 xor ah, ah 0 000092FF 50 push ax 0 00009300 E8FEFF call _get_cds_unvalidated 0 00009303 89C1 mov cx, ax 0 00009305 09D1 or cx, dx 0 00009307 8E46DE mov es, word ptr [bp-34] 0 0000930A 268B4C16 mov cx, word ptr es:[si+22] 0 0000930E 750A jne _.L464 0 00009310 83C901 or cx, 1 2735 _.L511: 0 00009313 26894C16 mov word ptr es:[si+22], cx 0 00009317 E9A2FC jmp _.L410 2738 _.L464: 0 0000931A 8E46DE mov es, word ptr [bp-34] 0 0000931D 26895402 mov word ptr es:[si+2], dx 0 00009321 8E46DE mov es, word ptr [bp-34] 0 00009324 26894406 mov word ptr es:[si+6], ax 0 00009328 83E1FE and cx, -2 0 0000932B 8E46DE mov es, word ptr [bp-34] 0 0000932E EBE3 jmp _.L511 2746 _.L436: 0 00009330 A10200 mov ax, word ptr [_user_r+2] 0 00009333 8E46DE mov es, word ptr [bp-34] 0 00009336 26894402 mov word ptr es:[si+2], ax 0 0000933A A10000 mov ax, word ptr [_user_r] 0 0000933D 8E46DE mov es, word ptr [bp-34] 0 00009340 26894406 mov word ptr es:[si+6], ax 0 00009344 E975FC jmp _.L410 2754 _.L437: 0 00009347 8E46DE mov es, word ptr [bp-34] 0 0000934A 268A440E mov al, byte ptr es:[si+14] 0 0000934E 2403 and al, 3 0 00009350 3C01 cmp al, 1 0 00009352 F5 cmc 0 00009353 18C0 sbb al, al 0 00009355 041D add al, 29 0 00009357 E952FF jmp _.L510 2763 _.L438: 0 0000935A 8E46DE mov es, word ptr [bp-34] 0 0000935D 268B4418 mov ax, word ptr es:[si+24] 0 00009361 8946DC mov word ptr [bp-36], ax 0 00009364 83E01F and ax, 31 0 00009367 48 dec ax 0 00009368 8B56DC mov dx, word ptr [bp-36] 0 0000936B 83C2BF add dx, -65 0 0000936E 83FA3A cmp dx, 57+1 0 00009371 7305 jnc _.L478 0 00009373 83F8FF cmp ax, -1 0 00009376 720B jc _.L466 2775 _.L478: 0 00009378 8E46DE mov es, word ptr [bp-34] 0 0000937B 26804C1601 or byte ptr es:[si+22], 1 0 00009380 E939FC jmp _.L410 2779 _.L466: 0 00009383 50 push ax 0 00009384 E8FEFF call _get_cds_unvalidated 0 00009387 89C3 mov bx, ax 0 00009389 09D0 or ax, dx 0 0000938B 85C0 test ax, ax 0 0000938D 74E9 je _.L478 0 0000938F 8956DA mov word ptr [bp-38], dx 0 00009392 895EDC mov word ptr [bp-36], bx 0 00009395 B85100 mov ax, offset _.LC3 0 00009398 50 push ax 0 00009399 BF0000 mov di, offset _TempCDS 0 0000939C 57 push di 0 0000939D E8FEFF call _strcpy 0 000093A0 8E46DE mov es, word ptr [bp-34] 0 000093A3 268B4418 mov ax, word ptr es:[si+24] 0 000093A7 8805 mov byte ptr [di], al 0 000093A9 C7064F000200 mov word ptr [_TempCDS+79], 2 0 000093AF 8B56DA mov dx, word ptr [bp-38] 0 000093B2 8EC2 mov es, dx 0 000093B4 8B5EDC mov bx, word ptr [bp-36] 0 000093B7 26837F4300 cmp word ptr es:[bx+67], 0 0 000093BC 7447 je _.L469 0 000093BE 268B4F45 mov cx, word ptr es:[bx+69] 0 000093C2 268B4747 mov ax, word ptr es:[bx+71] 0 000093C6 894D45 mov word ptr [di+69], cx 0 000093C9 894547 mov word ptr [di+71], ax 0 000093CC C70643000040 mov word ptr [_TempCDS+67], 16384 2807 _.L470: 0 000093D2 C7064900FFFF mov word ptr [_TempCDS+73], -1 0 000093D8 C7064B00FFFF mov word ptr [_TempCDS+75], -1 0 000093DE C7064D00FFFF mov word ptr [_TempCDS+77], -1 0 000093E4 8E46DE mov es, word ptr [bp-34] 0 000093E7 26C7440E5800 mov word ptr es:[si+14], 88 0 000093ED 8E46DE mov es, word ptr [bp-34] 0 000093F0 268C14 mov word ptr es:[si], ss 0 000093F3 8E46DE mov es, word ptr [bp-34] 0 000093F6 26897C04 mov word ptr es:[si+4], di 2817 _.L447: 0 000093FA 8E46DE mov es, word ptr [bp-34] 0 000093FD 26806416FE and byte ptr es:[si+22], -2 0 00009402 E9B7FB jmp _.L410 2821 _.L469: 0 00009405 C70645000000 mov word ptr [_TempCDS+69], 0 0 0000940B C70647000000 mov word ptr [_TempCDS+71], 0 0 00009411 C70643000000 mov word ptr [_TempCDS+67], 0 0 00009417 EBB9 jmp _.L470 2826 _.L439: 0 00009419 8B1E0000 mov bx, word ptr [_cu_psp] 0 0000941D 8E46DE mov es, word ptr [bp-34] 0 00009420 268B540A mov dx, word ptr es:[si+10] 0 00009424 8EC3 mov es, bx 0 00009426 263B163200 cmp dx, word ptr es:[50] 0 0000942B 8E46DE mov es, word ptr [bp-34] 0 0000942E 268B4416 mov ax, word ptr es:[si+22] 0 00009432 720A jc _.L471 0 00009434 26C6441006 mov byte ptr es:[si+16], 6 0 00009439 83C801 or ax, 1 0 0000943C EB68 jmp _.L512 2838 _.L471: 0 0000943E 8EC3 mov es, bx 0 00009440 268B0E3600 mov cx, word ptr es:[54] 0 00009445 2603163400 add dx, word ptr es:[52] 0 0000944A 83E0FE and ax, -2 0 0000944D 8E46DE mov es, word ptr [bp-34] 0 00009450 26894416 mov word ptr es:[si+22], ax 0 00009454 8E46DE mov es, word ptr [bp-34] 0 00009457 26890C mov word ptr es:[si], cx 0 0000945A 8E46DE mov es, word ptr [bp-34] 0 0000945D 26895404 mov word ptr es:[si+4], dx 0 00009461 E958FB jmp _.L410 2850 _.L440: 0 00009464 8E46DE mov es, word ptr [bp-34] 0 00009467 268B4404 mov ax, word ptr es:[si+4] 0 0000946B 26FF34 push word ptr es:[si] 0 0000946E 50 push ax 0 0000946F 268B4406 mov ax, word ptr es:[si+6] 0 00009473 26FF7402 push word ptr es:[si+2] 0 00009477 50 push ax 0 00009478 E8FEFF call _DosTruename 0 0000947B E93EFB jmp _.L410 2860 _.L441: 0 0000947E 16 push ss 0 0000947F B80000 mov ax, offset _DirEntBuffer 0 00009482 50 push ax 0 00009483 E8FEFF call _IsDevice 0 00009486 89C3 mov bx, ax 0 00009488 09D0 or ax, dx 0 0000948A 8E46DE mov es, word ptr [bp-34] 0 0000948D 268B4416 mov ax, word ptr es:[si+22] 0 00009491 7503E9CFFC je _.L513 0 00009496 8EC2 mov es, dx 0 00009498 268B5704 mov dx, word ptr es:[bx+4] 0 0000949C 8E46DE mov es, word ptr [bp-34] 0 0000949F 2688540B mov byte ptr es:[si+11], dl 2874 _.L454: 0 000094A3 83E0FE and ax, -2 2876 _.L512: 0 000094A6 8E46DE mov es, word ptr [bp-34] 2878 _.L506: 0 000094A9 26894416 mov word ptr es:[si+22], ax 0 000094AD E90CFB jmp _.L410 2881 _.L442: 0 000094B0 8E46DE mov es, word ptr [bp-34] 0 000094B3 268B4406 mov ax, word ptr es:[si+6] 0 000094B7 26FF7402 push word ptr es:[si+2] 0 000094BB E9C0FD jmp _.L507 2886 _.L443: 0 000094BE 8E46DE mov es, word ptr [bp-34] 0 000094C1 26806416FE and byte ptr es:[si+22], -2 0 000094C6 C70600000000 mov word ptr [_CritErrCode], 0 0 000094CC 31C0 xor ax, ax 0 000094CE 50 push ax 0 000094CF 8E46DE mov es, word ptr [bp-34] 0 000094D2 268A440E mov al, byte ptr es:[si+14] 0 000094D6 30E4 xor ah, ah 0 000094D8 80CC09 or ah, 9 0 000094DB 50 push ax 0 000094DC 268B440C mov ax, word ptr es:[si+12] 0 000094E0 26FF7402 push word ptr es:[si+2] 0 000094E4 50 push ax 0 000094E5 E8FEFF call _DosOpen 2901 _.L473: 0 000094E8 85D2 test dx, dx 0 000094EA 7C03E95101 jge _.L509 0 000094EF EB18 jmp _.L480 2905 _.L444: 0 000094F1 8E46DE mov es, word ptr [bp-34] 0 000094F4 26806416FE and byte ptr es:[si+22], -2 0 000094F9 C70600000000 mov word ptr [_CritErrCode], 0 0 000094FF 8E46DE mov es, word ptr [bp-34] 0 00009502 26FF740A push word ptr es:[si+10] 0 00009506 E8FEFF call _DosClose 2912 _.L480: 0 00009509 8946E0 mov word ptr [bp-32], ax 0 0000950C EB4C jmp _.L474 2915 _.L445: 0 0000950E 8E46DE mov es, word ptr [bp-34] 0 00009511 26806416FE and byte ptr es:[si+22], -2 0 00009516 C70600000000 mov word ptr [_CritErrCode], 0 0 0000951C 8E46DE mov es, word ptr [bp-34] 0 0000951F 268B4408 mov ax, word ptr es:[si+8] 0 00009523 89C2 mov dx, ax 0 00009525 80C6BE add dh, -66 0 00009528 83FA02 cmp dx, 2 0 0000952B 7603E97201 ja _.L475 0 00009530 8D56E0 lea dx, [-32+bp] 0 00009533 52 push dx 0 00009534 30E4 xor ah, ah 0 00009536 50 push ax 0 00009537 26FF740E push word ptr es:[si+14] 0 0000953B 26FF740C push word ptr es:[si+12] 0 0000953F 26FF740A push word ptr es:[si+10] 0 00009543 E8FEFF call _DosSeek 0 00009546 837EE000 cmp word ptr [bp-32], 0 0 0000954A 750E jne _.L474 0 0000954C 8E46DE mov es, word ptr [bp-34] 0 0000954F 2689540C mov word ptr es:[si+12], dx 0 00009553 8E46DE mov es, word ptr [bp-34] 0 00009556 26894410 mov word ptr es:[si+16], ax 2939 _.L474: 0 0000955A 837EE000 cmp word ptr [bp-32], 0 0 0000955E 7C03E959FA jge _.L410 2942 _.L482: 0 00009563 8B46E0 mov ax, word ptr [bp-32] 0 00009566 F7D8 neg ax 0 00009568 8E46DE mov es, word ptr [bp-34] 0 0000956B 26894410 mov word ptr es:[si+16], ax 0 0000956F 36833E000000 cmp word ptr ss:[_CritErrCode], 0 0 00009575 7403E9FEFD jne _.L478 0 0000957A A30000 mov word ptr [_CritErrCode], ax 0 0000957D E9F8FD jmp _.L478 2951 _.L446: 0 00009580 8E46DE mov es, word ptr [bp-34] 0 00009583 26806416FE and byte ptr es:[si+22], -2 0 00009588 C70600000000 mov word ptr [_CritErrCode], 0 0 0000958E 8E46DE mov es, word ptr [bp-34] 0 00009591 268B7C02 mov di, word ptr es:[si+2] 0 00009595 268B440C mov ax, word ptr es:[si+12] 0 00009599 8946DA mov word ptr [bp-38], ax 0 0000959C 268B440E mov ax, word ptr es:[si+14] 0 000095A0 8946DC mov word ptr [bp-36], ax 0 000095A3 26FF740A push word ptr es:[si+10] 0 000095A7 E8FEFF call _get_sft_idx 0 000095AA BA0100 mov dx, 1 0 000095AD 52 push dx 0 000095AE 57 push di 0 000095AF FF76DA push word ptr [bp-38] 0 000095B2 FF76DC push word ptr [bp-36] 0 000095B5 50 push ax 0 000095B6 E8FEFF call _DosRWSft 0 000095B9 E92CFF jmp _.L473 2971 _.L448: 0 000095BC 8E46DE mov es, word ptr [bp-34] 0 000095BF 268B4408 mov ax, word ptr es:[si+8] 0 000095C3 89C2 mov dx, ax 0 000095C5 80C6BC add dh, -68 0 000095C8 81FAFF00 cmp dx, 255 0 000095CC 7603E9D100 ja _.L475 0 000095D1 8946E2 mov word ptr [bp-30], ax 0 000095D4 268B440A mov ax, word ptr es:[si+10] 0 000095D8 8946E4 mov word ptr [bp-28], ax 0 000095DB 268B440E mov ax, word ptr es:[si+14] 0 000095DF 8946E6 mov word ptr [bp-26], ax 0 000095E2 268B440C mov ax, word ptr es:[si+12] 0 000095E6 8946E8 mov word ptr [bp-24], ax 0 000095E9 268B4404 mov ax, word ptr es:[si+4] 0 000095ED 8946EC mov word ptr [bp-20], ax 0 000095F0 268B4406 mov ax, word ptr es:[si+6] 0 000095F4 8946EA mov word ptr [bp-22], ax 0 000095F7 268B4402 mov ax, word ptr es:[si+2] 0 000095FB 8946EE mov word ptr [bp-18], ax 0 000095FE 8D46E2 lea ax, [-30+bp] 0 00009601 50 push ax 0 00009602 E8FEFF call _DosDevIOctl 0 00009605 8946E0 mov word ptr [bp-32], ax 0 00009608 85C0 test ax, ax 0 0000960A 7C03E9ADF9 jge _.L410 0 0000960F 89C2 mov dx, ax 0 00009611 F7DA neg dx 0 00009613 8E46DE mov es, word ptr [bp-34] 0 00009616 26895410 mov word ptr es:[si+16], dx 0 0000961A 83F8EF cmp ax, -17 0 0000961D 7503E956FD je _.L478 0 00009622 83F8FB cmp ax, -5 0 00009625 7503E94EFD je _.L478 0 0000962A 89160000 mov word ptr [_CritErrCode], dx 0 0000962E E947FD jmp _.L478 3007 _.L449: 0 00009631 BB0000 mov bx, offset _nul_dev 0 00009634 8B07 mov ax, word ptr [bx] 0 00009636 8B5702 mov dx, word ptr [bx+2] 0 00009639 8E46DE mov es, word ptr [bp-34] 0 0000963C 2689540A mov word ptr es:[si+10], dx 3013 _.L509: 0 00009640 8E46DE mov es, word ptr [bp-34] 0 00009643 26894410 mov word ptr es:[si+16], ax 0 00009647 E972F9 jmp _.L410 3017 _.L450: 0 0000964A A10000 mov ax, word ptr [_CritErrCode] 0 0000964D EBF1 jmp _.L509 3020 _.L451: 0 0000964F 8E46DE mov es, word ptr [bp-34] 0 00009652 26837C0C00 cmp word ptr es:[si+12], 0 0 00009657 7411 je _.L479 0 00009659 268A440C mov al, byte ptr es:[si+12] 0 0000965D A20000 mov byte ptr [_os_setver_major], al 0 00009660 268A440D mov al, byte ptr es:[si+13] 3027 _.L508: 0 00009664 A20000 mov byte ptr [_os_setver_minor], al 0 00009667 E952F9 jmp _.L410 3030 _.L479: 0 0000966A A00000 mov al, byte ptr [_os_major] 0 0000966D A20000 mov byte ptr [_os_setver_major], al 0 00009670 A00000 mov al, byte ptr [_os_minor] 0 00009673 EBEF jmp _.L508 3035 _.L421: 0 00009675 3C31 cmp al, 49 0 00009677 7603E940F9 ja _.L410 0 0000967C B85500 mov ax, offset _.LC4 0 0000967F 50 push ax 0 00009680 E8FEFF call _put_string 0 00009683 B80200 mov ax, 2 0 00009686 50 push ax 0 00009687 B81000 mov ax, 16 0 0000968A 50 push ax 0 0000968B 8E46DE mov es, word ptr [bp-34] 0 0000968E 268A4410 mov al, byte ptr es:[si+16] 0 00009692 30E4 xor ah, ah 0 00009694 50 push ax 0 00009695 E8FEFF call _put_unsigned 0 00009698 B88200 mov ax, offset _.LC5 0 0000969B 50 push ax 0 0000969C E8FEFF call _put_string 0 0000969F E9D6FC jmp _.L478 3054 _.L475: 0 000096A2 C746E0FFFF mov word ptr [bp-32], -1 0 000096A7 E9B9FE jmp _.L482 3057 .size _int2F_12_handler, .-_int2F_12_handler 3058 .global _fnode === Switch to base=012B40h -> ".BSS" 3059 .bss 3060 .p2align 0 3061 .type _fnode, @object 3062 .size _fnode, 116 3063 _fnode: 0 00000D34 0000000000000000 .skip 116,0 0 00000D3C 0000000000000000 0 00000D44 0000000000000000 0 00000D4C 0000000000000000 0 00000D54 0000000000000000 0 00000D5C 0000000000000000 0 00000D64 0000000000000000 0 00000D6C 0000000000000000 0 00000D74 0000000000000000 0 00000D7C 0000000000000000 0 00000D84 0000000000000000 0 00000D8C 0000000000000000 0 00000D94 0000000000000000 0 00000D9C 0000000000000000 0 00000DA4 00000000 3065 .global _HaltCpuWhileIdle 3066 .p2align 0 3067 .type _HaltCpuWhileIdle, @object 3068 .size _HaltCpuWhileIdle, 1 3069 _HaltCpuWhileIdle: 0 00000DA8 00 .skip 1,0 3071 .global _ReturnAnyDosVersionExpected 3072 .p2align 0 3073 .type _ReturnAnyDosVersionExpected, @object 3074 .size _ReturnAnyDosVersionExpected, 1 3075 _ReturnAnyDosVersionExpected: 0 00000DA9 00 .skip 1,0 3077 .global _firstAvailableBuf 3078 .p2align 1 3079 .type _firstAvailableBuf, @object 3080 .size _firstAvailableBuf, 4 3081 _firstAvailableBuf: 0 00000DAA 00000000 .skip 4,0 3083 .global _os_release === Switch to base=012B40h -> ".RODATA" 3084 .section .rodata 3085 .type _os_release, @object 3086 .size _os_release, 67 3087 _os_release: 0 00001800 46726565444F5320 .string "FreeDOS kernel - GIT (build 2044 OEM:0xfd) [compiled Apr 23 2026]\n" 0 00001808 6B65726E656C202D 0 00001810 2047495420286275 0 00001818 696C642032303434 0 00001820 204F454D3A307866 0 00001828 6429205B636F6D70 0 00001830 696C656420417072 0 00001838 2032332032303236 0 00001840 5D0A00 3089 .ident "GCC: (GNU) 6.3.0" === Trace listing source: intr.lst 1 ; File: 2 ; intr.asm 3 ; Description: 4 ; Assembly implementation of calling an interrupt 5 ; 6 ; Copyright (c) 2000 7 ; Steffen Kaiser 8 ; All Rights Reserved 9 ; 10 ; This file is part of FreeDOS. 11 ; 12 ; FreeDOS is free software; you can redistribute it and/or 13 ; modify it under the terms of the GNU General Public License 14 ; as published by the Free Software Foundation; either version 15 ; 2, or (at your option) any later version. 16 ; 17 ; DOS-C is distributed in the hope that it will be useful, but 18 ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 ; the GNU General Public License for more details. 21 ; 22 ; You should have received a copy of the GNU General Public 23 ; License along with DOS-C; see the file COPYING. If not, 24 ; write to the Free Software Foundation, Inc., 25 ; 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 26 ; 27 28 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 29 %include "stacks.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; stacks.inc 4 <1> ; Description: 5 <1> ; Macro support for register stack frame 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Id: stacks.inc 1591 2011-05-06 01:46:55Z bartoldeman $ 29 <1> ; 30 <1> 31 <1> ; 32 <1> ; Standard stack frame used throughout DOS-C 33 <1> ; 34 <1> ; MS-DOS specific 35 <1> ; 36 <1> ; +---------------+ 37 <1> ; | irp hi | 26 38 <1> ; +---------------+ 39 <1> ; | irp low | 24 40 <1> ; +---------------+ 41 <1> ; | flags | 22 42 <1> ; +---------------+ 43 <1> ; | cs | 20 44 <1> ; +---------------+ 45 <1> ; | ip | 18 46 <1> ; +---------------+ 47 <1> ; | es | 16 48 <1> ; +---------------+ 49 <1> ; | ds | 14 50 <1> ; +---------------+ 51 <1> ; | bp | 12 52 <1> ; +---------------+ 53 <1> ; | di | 10 54 <1> ; +---------------+ 55 <1> ; | si | 8 56 <1> ; +---------------+ 57 <1> ; | dx | 6 58 <1> ; +---------------+ 59 <1> ; | cx | 4 60 <1> ; +---------------+ 61 <1> ; | bx | 2 62 <1> ; +---------------+ 63 <1> ; | ax | 0 64 <1> ; +---------------+ 65 <1> ; 66 <1> 67 <1> ;; Note: The order of the pushed registers _must_ match with the definition 68 <1> ;; of the "iregs" structure within PCB.H, because a pointer to the last 69 <1> ;; pushed register is used as a pointer to a "iregs" structure within the 70 <1> ;; called C sources! -- 2000/03/22 ska 71 <1> 72 <1> ; Don't use `struc RegFrame' etc. here because it interferes with segment 73 <1> ; definitions. 74 <1> reg_ax equ 0 75 <1> reg_bx equ 2 76 <1> reg_cx equ 4 77 <1> reg_dx equ 6 78 <1> reg_si equ 8 79 <1> reg_di equ 10 80 <1> reg_bp equ 12 81 <1> reg_ds equ 14 82 <1> reg_es equ 16 83 <1> reg_ip equ 18 84 <1> reg_cs equ 20 85 <1> reg_flags equ 22 86 <1> irp_low equ 24 87 <1> irp_hi equ 26 88 <1> 89 <1> %macro PUSH$ALL 0 90 <1> push es 91 <1> push ds 92 <1> push bp 93 <1> push di 94 <1> push si 95 <1> push dx 96 <1> push cx 97 <1> push bx 98 <1> push ax 99 <1> %endmacro 100 <1> 101 <1> %macro POP$ALL 0 102 <1> pop ax 103 <1> pop bx 104 <1> pop cx 105 <1> pop dx 106 <1> pop si 107 <1> pop di 108 <1> pop bp 109 <1> pop ds 110 <1> pop es 111 <1> %endmacro 112 <1> 113 <1> ; I386.inc - 10/25/01 by tom ehlert 114 <1> ; 115 <1> ; compiling the kernel for 386 will (sometimes) change the 116 <1> ; high part of (some) registers, which will be (sometimes) be used 117 <1> ; later 118 <1> ; 119 <1> ; assumption: 120 <1> ; we have never seen MSVC to use anything but eax, ecx, edx, 121 <1> ; nor have we seen Borland C to use anything but eax, ebx, edx, 122 <1> ; so we only protect eax, ebx or ecx, edx to conserve stack space 123 <1> ; 124 <1> ; to save even more stack space, we save only HIGH part of regs 125 <1> ; at some expense of slower execution. it's easier anyway :-) 126 <1> ; 127 <1> ; WATCOM only uses FS: and GS: (using -zff and -zgf) and never 128 <1> ; any high part of the 386 registers 129 <1> ; 130 <1> 131 <1> 132 <1> %IF XCPU < 386 133 <1> ; no need to save/restore anything 134 <1> 135 <1> ; error 1 2 3 136 <1> %macro Protect386Registers 0 137 <1> %endmacro 138 <1> 139 <1> %assign Size386Registers 0 140 <1> 141 <1> %macro RestoreSP 0 142 <1> mov sp, bp 143 <1> %endmacro 144 <1> 145 <1> %macro Restore386Registers 0 146 <1> %endmacro 147 <1> 148 <1> %ELSE 149 <1> %ifdef WATCOM 150 <1> 151 <1> %macro Protect386Registers 0 152 <1> push fs 153 <1> push gs 154 <1> %endmacro 155 <1> 156 <1> %assign Size386Registers 4 157 <1> 158 <1> %macro RestoreSP 0 159 <1> lea sp, [bp - Size386Registers] 160 <1> %endmacro 161 <1> 162 <1> %macro Restore386Registers 0 163 <1> pop gs 164 <1> pop fs 165 <1> %endmacro 166 <1> 167 <1> %else 168 <1> 169 <1> %macro Protect386Registers 0 170 <1> push eax 171 <1> pop ax 172 <1> %ifdef MSCL8 173 <1> push ecx 174 <1> pop cx 175 <1> %else ;BC5 176 <1> push ebx 177 <1> pop bx 178 <1> %endif 179 <1> push edx 180 <1> pop dx 181 <1> %endmacro 182 <1> 183 <1> %assign Size386Registers 6 184 <1> 185 <1> %macro RestoreSP 0 186 <1> lea sp, [bp - Size386Registers] 187 <1> %endmacro 188 <1> 189 <1> %macro Restore386Registers 0 190 <1> push dx 191 <1> pop edx 192 <1> %ifdef MSCL8 193 <1> push cx 194 <1> pop ecx 195 <1> %else ;BC5 196 <1> push bx 197 <1> pop ebx 198 <1> %endif 199 <1> push ax 200 <1> pop eax 201 <1> %endmacro 202 <1> 203 <1> %endif 204 <1> %ENDIF 205 <1> 206 <1> ; macros to define stack arguments 207 <1> ; arg a, {b,4}, c 208 <1> ; defines a and c as "word" arguments and b as a "dword" argument 209 <1> ; for STDCALL defines .a as [bp+4], .b as [bp+6] and .c as [bp+10] 210 <1> ; for PASCAL defines .a as [bp+10], .b as [bp+6] and .c as [bp+4] 211 <1> ; 212 <1> ; popargs bx, {dx,ax}, cx pops these arguments of the stack (for PASCAL 213 <1> ; in reverse order). Here dx,ax is a dword argument dx:ax where dx is 214 <1> ; the high word. The caller is responsible for dealing with instruction 215 <1> ; pointer (ip) on the stack. 216 <1> 217 <1> %ifdef gcc 218 <1> %define STDCALL 219 <1> %else 220 <1> %define PASCAL 221 <1> %endif 222 <1> 223 <1> %macro definearg 1-2 2 224 <1> %xdefine .%1 bp+.argloc 225 <1> %assign .argloc .argloc+%2 226 <1> %endmacro 227 <1> 228 <1> %macro arg 1-* 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 239 <1> %endmacro 240 <1> 241 <1> %macro multipop 1-* 242 <1> %rep %0 243 <1> %rotate -1 244 <1> pop %1 245 <1> %endrep 246 <1> %endmacro 247 <1> 248 <1> %macro popargs 1-* 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 258 <1> %endmacro 30 31 %macro INTR 1 32 33 push bp ; Standard C entry 34 mov bp,sp 35 push si 36 push di 37 %ifdef WATCOM 38 push bx 39 push cx 40 push dx 41 push es 42 %endif 43 push ds 44 pushf 45 46 arg nr, {rp,%1} 47 mov ax, [.nr] ; interrupt number 48 mov [cs:%%intr_1-1], al 49 jmp short %%intr_2 ; flush the instruction cache 50 %%intr_2: 51 %if %1 == 4 52 lds bx, [.rp] ; regpack structure FAR 53 %else 54 mov bx, [.rp] ; regpack structure 55 %endif 56 mov cx, [bx+4] 57 mov dx, [bx+6] 58 mov si, [bx+8] 59 mov di, [bx+10] 60 mov bp, [bx+12] 61 push word [bx+14] ; ds 62 mov es, [bx+16] 63 mov ah, byte [bx+22] ; flags 64 sahf 65 mov ax, [bx] 66 mov bx, [bx+2] 67 pop ds 68 int 0 69 %%intr_1: 70 71 pushf 72 push ds 73 push bx 74 mov bx, sp 75 %if %1 == 4 76 %ifdef WATCOM 77 lds bx, [ss:bx+(14+8)+4] ; FAR address of REGPACK, pascal convention 78 %else 79 lds bx, [ss:bx+14+.rp-bp] ; FAR address of REGPACK, SP=BX + skip saved registers (14) + 80 %endif 81 %else 82 mov ds, [ss:bx+8] 83 %ifdef WATCOM 84 mov bx, [ss:bx+26] ; NEAR address of REGPACK, pascal convention 85 %else 86 mov bx, [ss:bx+14+.rp-bp] ; NEAR address of REGPACK 87 %endif 88 %endif 89 mov [bx], ax 90 pop word [bx+2] ; bx 91 mov [bx+4], cx 92 mov [bx+6], dx 93 mov [bx+8], si 94 mov [bx+10], di 95 mov [bx+12], bp 96 pop word [bx+14] ; ds 97 mov [bx+16], es 98 pop word [bx+22] ; flags 99 100 ; restore all registers to values from INTR entry 101 popf 102 pop ds 103 %ifdef WATCOM 104 pop es 105 pop dx 106 pop cx 107 pop bx 108 %endif 109 pop di 110 pop si 111 pop bp 112 %endmacro 113 === Switch to base=002270h -> "HMA_TEXT" 114 segment HMA_TEXT 115 116 ; 117 ; void ASMPASCAL call_intr(WORD nr, struct REGPACK FAR *rp) 118 ; 119 global CALL_INTR 120 CALL_INTR: 121 INTR 4 ; rp is far, DWORD argument 32 <1> 0 0000087C 55 push bp 0 0000087D 89E5 mov bp,sp 0 0000087F 56 push si 0 00000880 57 push di 37 <1> %ifdef WATCOM 38 <1> push bx 39 <1> push cx 40 <1> push dx 41 <1> push es 42 <1> %endif 0 00000881 1E push ds 0 00000882 9C pushf 45 <1> 46 <1> arg nr, {rp,%1} 229 <2> %assign .argloc 4 230 <2> %rep %0 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 238 <2> %endrep 231 <3> %ifdef PASCAL 232 <3> %rotate -1 233 <3> %endif 234 <3> definearg %1 224 <4> %xdefine .%1 bp+.argloc 225 <4> %assign .argloc .argloc+%2 235 <3> %ifdef STDCALL 236 <3> %rotate 1 237 <3> %endif 231 <3> %ifdef PASCAL 232 <3> %rotate -1 233 <3> %endif 234 <3> definearg %1 224 <4> %xdefine .%1 bp+.argloc 225 <4> %assign .argloc .argloc+%2 235 <3> %ifdef STDCALL 236 <3> %rotate 1 237 <3> %endif 0 00000883 8B4604 mov ax, [.nr] 0 00000886 2EA2[3300] mov [cs:%%intr_1-1], al 0 0000088A EB00 jmp short %%intr_2 50 <1> %%intr_2: 51 <1> %if %1 == 4 0 0000088C C55E06 lds bx, [.rp] 53 <1> %else 54 <1> mov bx, [.rp] 55 <1> %endif 0 0000088F 8B4F04 mov cx, [bx+4] 0 00000892 8B5706 mov dx, [bx+6] 0 00000895 8B7708 mov si, [bx+8] 0 00000898 8B7F0A mov di, [bx+10] 0 0000089B 8B6F0C mov bp, [bx+12] 0 0000089E FF770E push word [bx+14] 0 000008A1 8E4710 mov es, [bx+16] 0 000008A4 8A6716 mov ah, byte [bx+22] 0 000008A7 9E sahf 0 000008A8 8B07 mov ax, [bx] 0 000008AA 8B5F02 mov bx, [bx+2] 0 000008AD 1F pop ds 0 000008AE CD00 int 0 69 <1> %%intr_1: 70 <1> 0 000008B0 9C pushf 0 000008B1 1E push ds 0 000008B2 53 push bx 0 000008B3 89E3 mov bx, sp 75 <1> %if %1 == 4 76 <1> %ifdef WATCOM 77 <1> lds bx, [ss:bx+(14+8)+4] 78 <1> %else 0 000008B5 36C55F14 lds bx, [ss:bx+14+.rp-bp] 80 <1> %endif 81 <1> %else 82 <1> mov ds, [ss:bx+8] 83 <1> %ifdef WATCOM 84 <1> mov bx, [ss:bx+26] 85 <1> %else 86 <1> mov bx, [ss:bx+14+.rp-bp] 87 <1> %endif 88 <1> %endif 0 000008B9 8907 mov [bx], ax 0 000008BB 8F4702 pop word [bx+2] 0 000008BE 894F04 mov [bx+4], cx 0 000008C1 895706 mov [bx+6], dx 0 000008C4 897708 mov [bx+8], si 0 000008C7 897F0A mov [bx+10], di 0 000008CA 896F0C mov [bx+12], bp 0 000008CD 8F470E pop word [bx+14] 0 000008D0 8C4710 mov [bx+16], es 0 000008D3 8F4716 pop word [bx+22] 99 <1> 100 <1> 0 000008D6 9D popf 0 000008D7 1F pop ds 103 <1> %ifdef WATCOM 104 <1> pop es 105 <1> pop dx 106 <1> pop cx 107 <1> pop bx 108 <1> %endif 0 000008D8 5F pop di 0 000008D9 5E pop si 0 000008DA 5D pop bp 0 000008DB C20600 ret 6 123 124 ;; COUNT ASMPASCAL res_DosExec(COUNT mode, exec_blk * ep, BYTE * lp) 125 global RES_DOSEXEC 126 RES_DOSEXEC: 0 000008DE 07 pop es ; ret address 128 popargs ax,bx,dx ; mode, exec block, filename 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000008DF 58 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000008E0 5B pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000008E1 5A pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 0 000008E2 06 push es ; ret address 0 000008E3 B44B mov ah, 4bh 0 000008E5 1E push ds 0 000008E6 07 pop es ; es = ds 0 000008E7 CD21 int 21h 0 000008E9 7202 jc short no_exec_error 0 000008EB 31C0 xor ax, ax 136 no_exec_error: 0 000008ED C3 ret 138 139 ;; UCOUNT ASMPASCAL res_read(int fd, void *buf, UCOUNT count); 140 global RES_READ 141 RES_READ: 0 000008EE 58 pop ax ; ret address 143 popargs bx,dx,cx ; fd, buf, count 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000008EF 5B pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000008F0 5A pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000008F1 59 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 0 000008F2 50 push ax ; ret address 0 000008F3 B43F mov ah, 3fh 0 000008F5 CD21 int 21h 0 000008F7 7303 jnc no_read_error 0 000008F9 B8FFFF mov ax, -1 149 no_read_error: 0 000008FC C3 ret 151 === Switch to base=00E0E0h -> "INIT_TEXT" 152 segment INIT_TEXT 153 ; 154 ; void init_call_intr(nr, rp) 155 ; REG int nr 156 ; REG struct REGPACK *rp 157 ; 158 global INIT_CALL_INTR 159 INIT_CALL_INTR: 160 INTR 2 ; rp is near, WORD argument 32 <1> 0 000001D3 55 push bp 0 000001D4 89E5 mov bp,sp 0 000001D6 56 push si 0 000001D7 57 push di 37 <1> %ifdef WATCOM 38 <1> push bx 39 <1> push cx 40 <1> push dx 41 <1> push es 42 <1> %endif 0 000001D8 1E push ds 0 000001D9 9C pushf 45 <1> 46 <1> arg nr, {rp,%1} 229 <2> %assign .argloc 4 230 <2> %rep %0 231 <2> %ifdef PASCAL 232 <2> %rotate -1 233 <2> %endif 234 <2> definearg %1 235 <2> %ifdef STDCALL 236 <2> %rotate 1 237 <2> %endif 238 <2> %endrep 231 <3> %ifdef PASCAL 232 <3> %rotate -1 233 <3> %endif 234 <3> definearg %1 224 <4> %xdefine .%1 bp+.argloc 225 <4> %assign .argloc .argloc+%2 235 <3> %ifdef STDCALL 236 <3> %rotate 1 237 <3> %endif 231 <3> %ifdef PASCAL 232 <3> %rotate -1 233 <3> %endif 234 <3> definearg %1 224 <4> %xdefine .%1 bp+.argloc 225 <4> %assign .argloc .argloc+%2 235 <3> %ifdef STDCALL 236 <3> %rotate 1 237 <3> %endif 0 000001DA 8B4604 mov ax, [.nr] 0 000001DD 2EA2[3300] mov [cs:%%intr_1-1], al 0 000001E1 EB00 jmp short %%intr_2 50 <1> %%intr_2: 51 <1> %if %1 == 4 52 <1> lds bx, [.rp] 53 <1> %else 0 000001E3 8B5E06 mov bx, [.rp] 55 <1> %endif 0 000001E6 8B4F04 mov cx, [bx+4] 0 000001E9 8B5706 mov dx, [bx+6] 0 000001EC 8B7708 mov si, [bx+8] 0 000001EF 8B7F0A mov di, [bx+10] 0 000001F2 8B6F0C mov bp, [bx+12] 0 000001F5 FF770E push word [bx+14] 0 000001F8 8E4710 mov es, [bx+16] 0 000001FB 8A6716 mov ah, byte [bx+22] 0 000001FE 9E sahf 0 000001FF 8B07 mov ax, [bx] 0 00000201 8B5F02 mov bx, [bx+2] 0 00000204 1F pop ds 0 00000205 CD00 int 0 69 <1> %%intr_1: 70 <1> 0 00000207 9C pushf 0 00000208 1E push ds 0 00000209 53 push bx 0 0000020A 89E3 mov bx, sp 75 <1> %if %1 == 4 76 <1> %ifdef WATCOM 77 <1> lds bx, [ss:bx+(14+8)+4] 78 <1> %else 79 <1> lds bx, [ss:bx+14+.rp-bp] 80 <1> %endif 81 <1> %else 0 0000020C 368E5F08 mov ds, [ss:bx+8] 83 <1> %ifdef WATCOM 84 <1> mov bx, [ss:bx+26] 85 <1> %else 0 00000210 368B5F14 mov bx, [ss:bx+14+.rp-bp] 87 <1> %endif 88 <1> %endif 0 00000214 8907 mov [bx], ax 0 00000216 8F4702 pop word [bx+2] 0 00000219 894F04 mov [bx+4], cx 0 0000021C 895706 mov [bx+6], dx 0 0000021F 897708 mov [bx+8], si 0 00000222 897F0A mov [bx+10], di 0 00000225 896F0C mov [bx+12], bp 0 00000228 8F470E pop word [bx+14] 0 0000022B 8C4710 mov [bx+16], es 0 0000022E 8F4716 pop word [bx+22] 99 <1> 100 <1> 0 00000231 9D popf 0 00000232 1F pop ds 103 <1> %ifdef WATCOM 104 <1> pop es 105 <1> pop dx 106 <1> pop cx 107 <1> pop bx 108 <1> %endif 0 00000233 5F pop di 0 00000234 5E pop si 0 00000235 5D pop bp 0 00000236 C20400 ret 4 162 163 ; 164 ; int init_call_XMScall( (WORD FAR * driverAddress)(), WORD AX, WORD DX) 165 ; 166 ; this calls HIMEM.SYS 167 ; 168 global INIT_CALL_XMSCALL 169 INIT_CALL_XMSCALL: 0 00000239 5B pop bx ; ret address 171 popargs {es,cx},ax,dx 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 0000023A 59 pop %1 243 <4> %rotate -1 0 0000023B 07 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 0000023C 58 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 0000023D 5A pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 172 0 0000023E 0E push cs ; ret address 0 0000023F 53 push bx 0 00000240 06 push es ; driver address ("jmp es:cx") 0 00000241 51 push cx 0 00000242 CB retf 178 179 ; void FAR *DetectXMSDriver(VOID) 180 global DETECTXMSDRIVER 181 DETECTXMSDRIVER: 0 00000243 B80043 mov ax, 4300h 0 00000246 CD2F int 2fh ; XMS installation check 184 0 00000248 3C80 cmp al, 80h 0 0000024A 7405 je detected 0 0000024C 31C0 xor ax, ax 0 0000024E 31D2 xor dx, dx 0 00000250 C3 ret 190 191 detected: 0 00000251 06 push es 0 00000252 53 push bx 0 00000253 B81043 mov ax, 4310h ; XMS get driver address 0 00000256 CD2F int 2fh 196 0 00000258 89D8 mov ax, bx 0 0000025A 8CC2 mov dx, es 0 0000025C 5B pop bx 0 0000025D 07 pop es 0 0000025E C3 ret 202 203 global KEYCHECK 204 KEYCHECK: 0 0000025F B401 mov ah, 1 0 00000261 CD16 int 16h 0 00000263 C3 ret 208 209 ;; int open(const char *pathname, int flags); 210 global INIT_DOSOPEN 211 INIT_DOSOPEN: 212 ;; init calling DOS through ints: 0 00000264 5B pop bx ; ret address 214 popargs dx,ax ; pathname, flags 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 00000265 5A pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 00000266 58 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 0 00000267 53 push bx ; ret address 0 00000268 B43D mov ah, 3dh 217 ;; AX will have the file handle 218 219 common_int21: 0 0000026A CD21 int 21h 0 0000026C 7303 jnc common_no_error 0 0000026E B8FFFF mov ax, -1 223 common_no_error: 0 00000271 C3 ret 225 226 ;; int close(int fd); 227 global CLOSE 228 CLOSE: 0 00000272 58 pop ax ; ret address 0 00000273 5B pop bx ; fd 0 00000274 50 push ax ; ret address 0 00000275 B43E mov ah, 3eh 0 00000277 EBF1 jmp short common_int21 234 235 ;; UCOUNT read(int fd, void *buf, UCOUNT count); 236 global READ 237 READ: 0 00000279 58 pop ax ; ret address 239 popargs bx,dx,cx ; fd,buf,count 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 0000027A 5B pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 0000027B 5A pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 0000027C 59 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 0 0000027D 50 push ax ; ret address 0 0000027E B43F mov ah, 3fh 0 00000280 EBE8 jmp short common_int21 243 244 ;; int dup2(int oldfd, int newfd); 245 global DUP2 246 DUP2: 0 00000282 58 pop ax ; ret address 248 popargs bx,cx ; oldfd,newfd 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 00000283 5B pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 00000284 59 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 0 00000285 50 push ax ; ret address 0 00000286 B446 mov ah, 46h 0 00000288 EBE0 jmp short common_int21 252 253 ; 254 ; ULONG ASMPASCAL lseek(int fd, long position); 255 ; 256 global LSEEK 257 LSEEK: 0 0000028A 58 pop ax ; ret address 259 popargs bx,{cx,dx} ; fd, position high:low 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 0000028B 5B pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 0000028C 5A pop %1 243 <4> %rotate -1 0 0000028D 59 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 0 0000028E 50 push ax ; ret address 0 0000028F B80042 mov ax,4200h ; origin: start of file 0 00000292 CD21 int 21h 0 00000294 7304 jnc seek_ret ; CF=1? 0 00000296 19C0 sbb ax,ax ; then dx:ax = -1, else unchanged 0 00000298 19D2 sbb dx,dx 266 seek_ret: 0 0000029A C3 ret 268 269 ;; VOID init_PSPSet(seg psp_seg) 270 global INIT_PSPSET 271 INIT_PSPSET: 0 0000029B 58 pop ax ; ret address 0 0000029C 5B pop bx ; psp_seg 0 0000029D 50 push ax ; ret_address 0 0000029E B450 mov ah, 50h 0 000002A0 CD21 int 21h 0 000002A2 C3 ret 278 279 ;; COUNT init_DosExec(COUNT mode, exec_blk * ep, BYTE * lp) 280 global INIT_DOSEXEC 281 INIT_DOSEXEC: 0 000002A3 07 pop es ; ret address 283 popargs ax,bx,dx ; mode, exec block, filename 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000002A4 58 pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000002A5 5B pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000002A6 5A pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 0 000002A7 06 push es ; ret address 0 000002A8 B44B mov ah, 4bh 0 000002AA 1E push ds 0 000002AB 07 pop es ; es = ds 0 000002AC CD21 int 21h 0 000002AE 7202 jc short exec_no_error 0 000002B0 31C0 xor ax, ax 291 exec_no_error: 0 000002B2 C3 ret 293 294 ;; int init_setdrive(int drive) 295 global INIT_SETDRIVE 296 INIT_SETDRIVE: 0 000002B3 B40E mov ah, 0x0e 298 common_dl_int21: 0 000002B5 5B pop bx ; ret address 0 000002B6 5A pop dx ; drive/char 0 000002B7 53 push bx 0 000002B8 CD21 int 21h 0 000002BA C3 ret 304 305 ;; int init_switchar(int char) 306 global INIT_SWITCHAR 307 INIT_SWITCHAR: 0 000002BB B80137 mov ax, 0x3701 0 000002BE EBF5 jmp short common_dl_int21 310 311 ; 312 ; seg ASMPASCAL allocmem(UWORD size); 313 ; 314 global ALLOCMEM 315 ALLOCMEM: 0 000002C0 58 pop ax ; ret address 0 000002C1 5B pop bx ; size 0 000002C2 50 push ax ; ret address 0 000002C3 B448 mov ah, 48h 0 000002C5 CD21 int 21h 0 000002C7 19DB sbb bx, bx ; carry=1 -> ax=-1 0 000002C9 09D8 or ax, bx ; segment 0 000002CB C3 ret 324 325 ;; void set_DTA(void far *dta) 326 global SET_DTA 327 SET_DTA: 0 000002CC 58 pop ax ; ret address 329 popargs {bx,dx} ; seg:off(dta) 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 250 <2> %ifdef PASCAL 251 <2> %rotate -1 252 <2> %endif 253 <2> multipop %1 242 <3> %rep %0 243 <3> %rotate -1 244 <3> pop %1 245 <3> %endrep 243 <4> %rotate -1 0 000002CD 5A pop %1 243 <4> %rotate -1 0 000002CE 5B pop %1 254 <2> %ifdef STDCALL 255 <2> %rotate 1 256 <2> %endif 0 000002CF 50 push ax ; ret address 0 000002D0 B41A mov ah, 1ah 0 000002D2 1E push ds 0 000002D3 8EDB mov ds, bx 0 000002D5 CD21 int 21h 0 000002D7 1F pop ds 0 000002D8 C3 ret === Trace listing source: ioctl.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=ioctl.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccRz65tX.s output file : ioctl.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .global _DosDevIOctl 7 .type _DosDevIOctl, @function 8 _DosDevIOctl: 0 000096AA 56 push si 0 000096AB 57 push di 0 000096AC 55 push bp 0 000096AD 89E5 mov bp, sp 0 000096AF 1E push ds 0 000096B0 8B7608 mov si, word ptr [bp+8] 0 000096B3 8A04 mov al, byte ptr [si] 0 000096B5 3C11 cmp al, 17 0 000096B7 760D jbe _.L2 18 _.L14: 0 000096B9 B8FFFF mov ax, -1 20 _.L1: 0 000096BC 89EC mov sp, bp 0 000096BE 5D pop bp 0 000096BF 5F pop di 0 000096C0 5E pop si 0 000096C1 16 push ss 0 000096C2 1F pop ds 0 000096C3 C20200 ret 2 28 _.L2: 0 000096C6 3C10 cmp al, 16 0 000096C8 7603E98E01 ja _.L4 0 000096CD 30E4 xor ah, ah 0 000096CF D1E0 shl ax, 1 0 000096D1 89C3 mov bx, ax 0 000096D3 36FFA7[0000] jmp word ptr ss:[bx+_.L6] === Switch to base=012B40h -> ".RODATA" 35 .section .rodata 36 .p2align 1 37 .p2align 2 38 _.L6: 0 00001844 [4500] .hword _.L5 0 00001846 [4500] .hword _.L5 0 00001848 [4500] .hword _.L5 0 0000184A [4500] .hword _.L5 0 0000184C [B101] .hword _.L4 0 0000184E [B101] .hword _.L4 0 00001850 [4500] .hword _.L5 0 00001852 [4500] .hword _.L5 0 00001854 [B101] .hword _.L4 0 00001856 [B101] .hword _.L4 0 00001858 [4500] .hword _.L5 0 0000185A [2E00] .hword _.L7 0 0000185C [4500] .hword _.L5 0 0000185E [B101] .hword _.L4 0 00001860 [B101] .hword _.L4 0 00001862 [B101] .hword _.L4 0 00001864 [4500] .hword _.L5 === Switch to base=002270h -> ".TEXT" 56 .text 57 _.L7: 0 000096D8 8B4404 mov ax, word ptr [si+4] 0 000096DB A2[0000] mov byte ptr [_NetDelay], al 0 000096DE 8B5406 mov dx, word ptr [si+6] 0 000096E1 89D0 mov ax, dx 0 000096E3 85D2 test dx, dx 0 000096E5 74D5 je _.L1 0 000096E7 8816[0000] mov byte ptr [_NetRetry], dl 65 _.L74: 0 000096EB 31C0 xor ax, ax 0 000096ED EBCD jmp _.L1 68 _.L5: 0 000096EF 36FF7402 push word ptr ss:[si+2] 0 000096F3 E8[FEFF] call _get_sft 0 000096F6 89C3 mov bx, ax 0 000096F8 83F8FF cmp ax, -1 0 000096FB 7508 jne _.L51 0 000096FD 83FAFF cmp dx, -1 0 00009700 7503E99D02 je _.L71 76 _.L51: 0 00009705 8EC2 mov es, dx 0 00009707 268B4705 mov ax, word ptr es:[bx+5] 0 0000970B 8A0C mov cl, byte ptr [si] 0 0000970D 80F901 cmp cl, 1 0 00009710 7457 je _.L10 0 00009712 7234 jc _.L11 0 00009714 80F90A cmp cl, 10 0 00009717 7475 je _.L12 0 00009719 258000 and ax, 128 0 0000971C 7403E98500 jne _.L15 0 00009721 80F906 cmp cl, 6 0 00009724 7573 jne _.L16 0 00009726 B101 mov cl, 1 0 00009728 8EC2 mov es, dx 0 0000972A 268B4713 mov ax, word ptr es:[bx+19] 0 0000972E 263B4717 cmp ax, word ptr es:[bx+23] 0 00009732 770E ja _.L17 0 00009734 750A jne _.L18 0 00009736 268B4711 mov ax, word ptr es:[bx+17] 0 0000973A 263B4715 cmp ax, word ptr es:[bx+21] 0 0000973E 7702 ja _.L17 98 _.L18: 0 00009740 30C9 xor cl, cl 100 _.L17: 0 00009742 F6D9 neg cl 0 00009744 880C mov byte ptr [si], cl 0 00009746 EBA3 jmp _.L74 104 _.L11: 0 00009748 89C1 mov cx, ax 0 0000974A 30ED xor ch, ch 0 0000974C 890C mov word ptr [si], cx 0 0000974E A880 test al, -128 0 00009750 7410 je _.L13 0 00009752 8EC2 mov es, dx 0 00009754 26C47F07 les di, dword ptr es:[bx+7] 0 00009758 268B4504 mov ax, word ptr es:[di+4] 0 0000975C 30C0 xor al, al 0 0000975E 09C8 or ax, cx 0 00009760 8904 mov word ptr [si], ax 116 _.L13: 0 00009762 8B04 mov ax, word ptr [si] 0 00009764 894406 mov word ptr [si+6], ax 0 00009767 EB82 jmp _.L74 120 _.L10: 0 00009769 A880 test al, -128 0 0000976B 7503E949FF je _.L14 0 00009770 36807C0700 cmp byte ptr ss:[si+7], 0 0 00009775 7403E92E02 jne _.L44 0 0000977A 8EC2 mov es, dx 0 0000977C 268A4705 mov al, byte ptr es:[bx+5] 0 00009780 8804 mov byte ptr [si], al 0 00009782 8A4406 mov al, byte ptr [si+6] 0 00009785 0C80 or al, -128 0 00009787 26884705 mov byte ptr es:[bx+5], al 0 0000978B E95DFF jmp _.L74 132 _.L12: 0 0000978E 894406 mov word ptr [si+6], ax 134 _.L75: 0 00009791 36C7040000 mov word ptr ss:[si], 0 0 00009796 E952FF jmp _.L74 137 _.L16: 0 00009799 80F907 cmp cl, 7 0 0000979C 7403E918FF jne _.L14 0 000097A1 8804 mov byte ptr [si], al 0 000097A3 E916FF jmp _.L1 142 _.L15: 0 000097A6 8EC2 mov es, dx 0 000097A8 268E5F07 mov ds, word ptr es:[bx+7] 0 000097AC 268B5709 mov dx, word ptr es:[bx+9] 0 000097B0 36C606[0100]00 mov byte ptr ss:[_CharReqHdr+1], 0 147 _.L19: 0 000097B6 368A04 mov al, byte ptr ss:[si] 0 000097B9 3C0F cmp al, 15 0 000097BB 7603E97101 ja _.L46 0 000097C0 3C08 cmp al, 8 0 000097C2 7603E97001 ja _.L47 0 000097C7 7503E97101 je _.L48 0 000097CC 3C06 cmp al, 5+1 0 000097CE F5 cmc 0 000097CF 19C9 sbb cx, cx 0 000097D1 80CD40 or ch, 64 158 _.L32: 0 000097D4 8EC2 mov es, dx 0 000097D6 8CDB mov bx, ds 0 000097D8 26854F04 test cx, word ptr es:[bx+4] 0 000097DC 7503E9D8FE je _.L14 0 000097E1 BF[0000] mov di, offset _CharReqHdr 0 000097E4 BB[2200] mov bx, offset _cmd 0 000097E7 36D7 xlat ss:[bx] 0 000097E9 36884502 mov byte ptr ss:[di+2], al 0 000097ED 368A04 mov al, byte ptr ss:[si] 0 000097F0 88C4 mov ah, al 0 000097F2 80C4F4 add ah, -12 0 000097F5 80FC02 cmp ah, 1+1 0 000097F8 7207 jc _.L52 0 000097FA 3C10 cmp al, 15+1 0 000097FC 7303E94201 jc _.L33 174 _.L52: 0 00009801 368A4405 mov al, byte ptr ss:[si+5] 0 00009805 3688450D mov byte ptr ss:[di+13], al 0 00009809 368A4404 mov al, byte ptr ss:[si+4] 0 0000980D 3688450E mov byte ptr ss:[di+14], al 0 00009811 36C44408 les ax, dword ptr ss:[si+8] 0 00009815 3689450F mov word ptr ss:[di+15], ax 0 00009819 368C4511 mov word ptr ss:[di+17], es 0 0000981D 368B4C0C mov cx, word ptr ss:[si+12] 0 00009821 368B4406 mov ax, word ptr ss:[si+6] 0 00009825 36894513 mov word ptr ss:[di+19], ax 0 00009829 36894D15 mov word ptr ss:[di+21], cx 186 _.L35: 0 0000982D 36C606[0000]1E mov byte ptr ss:[_CharReqHdr], 30 0 00009833 36C706[0300]0000 mov word ptr ss:[_CharReqHdr+3], 0 0 0000983A 52 push dx 0 0000983B 1E push ds 0 0000983C 16 push ss 0 0000983D 57 push di 0 0000983E 16 push ss 0 0000983F 1F pop ds 0 00009840 E8[FEFF] call _execrh 0 00009843 8B4503 mov ax, word ptr [di+3] 0 00009846 85C0 test ax, ax 0 00009848 7C03E91101 jge _.L36 0 0000984D 30E4 xor ah, ah 0 0000984F 83C013 add ax, 19 0 00009852 A3[0000] mov word ptr [_CritErrCode], ax 0 00009855 B8FBFF mov ax, -5 0 00009858 E961FE jmp _.L1 204 _.L4: 0 0000985B 8A4402 mov al, byte ptr [si+2] 0 0000985E 241F and al, 31 0 00009860 7571 jne _.L20 0 00009862 A0[0000] mov al, byte ptr [_default_drive] 0 00009865 98 cbw 210 _.L21: 0 00009866 50 push ax 0 00009867 E8[FEFF] call _get_dpb 0 0000986A 89C7 mov di, ax 0 0000986C 8956FE mov word ptr [bp-2], dx 0 0000986F 09C2 or dx, ax 0 00009871 7465 je _.L22 0 00009873 8E46FE mov es, word ptr [bp-2] 0 00009876 268A4501 mov al, byte ptr es:[di+1] 0 0000987A A2[0100] mov byte ptr [_CharReqHdr+1], al 0 0000987D 268E5D13 mov ds, word ptr es:[di+19] 0 00009881 268B5515 mov dx, word ptr es:[di+21] 0 00009885 8EC2 mov es, dx 0 00009887 8CDB mov bx, ds 0 00009889 268B4F04 mov cx, word ptr es:[bx+4] 225 _.L24: 0 0000988D 368A04 mov al, byte ptr ss:[si] 0 00009890 3C09 cmp al, 9 0 00009892 745B je _.L25 0 00009894 3C0D cmp al, 13 0 00009896 7503E98400 je _.L26 0 0000989B 3C08 cmp al, 8 0 0000989D 7403E914FF jne _.L19 0 000098A2 368A4402 mov al, byte ptr ss:[si+2] 0 000098A6 241F and al, 31 0 000098A8 30E4 xor ah, ah 0 000098AA 50 push ax 0 000098AB 16 push ss 0 000098AC 1F pop ds 0 000098AD E8[FEFF] call _get_cds1 0 000098B0 89C3 mov bx, ax 0 000098B2 09D0 or ax, dx 0 000098B4 742A je _.L28 0 000098B6 8EC2 mov es, dx 0 000098B8 26837F4300 cmp word ptr es:[bx+67], 0 0 000098BD 7D03E9F7FD jl _.L14 0 000098C2 8E46FE mov es, word ptr [bp-2] 0 000098C5 26807D1801 cmp byte ptr es:[di+24], 1 0 000098CA 19C0 sbb ax, ax 0 000098CC F7D8 neg ax 250 _.L41: 0 000098CE 8904 mov word ptr [si], ax 0 000098D0 E918FE jmp _.L74 253 _.L20: 0 000098D3 30E4 xor ah, ah 0 000098D5 48 dec ax 0 000098D6 EB8E jmp _.L21 257 _.L22: 0 000098D8 8A04 mov al, byte ptr [si] 0 000098DA 04F8 add al, -8 0 000098DC 3C01 cmp al, 1 0 000098DE 7606 jbe _.L45 262 _.L28: 0 000098E0 B8F1FF mov ax, -15 0 000098E3 E9D6FD jmp _.L1 265 _.L45: 0 000098E6 B90010 mov cx, 4096 0 000098E9 8EDA mov ds, dx 0 000098EB 89D2 mov dx, dx 0 000098ED EB9E jmp _.L24 270 _.L25: 0 000098EF 894EFE mov word ptr [bp-2], cx 0 000098F2 368A4402 mov al, byte ptr ss:[si+2] 0 000098F6 241F and al, 31 0 000098F8 30E4 xor ah, ah 0 000098FA 50 push ax 0 000098FB 16 push ss 0 000098FC 1F pop ds 0 000098FD E8[FEFF] call _get_cds1 0 00009900 89C3 mov bx, ax 0 00009902 09D0 or ax, dx 0 00009904 74DA je _.L28 0 00009906 8EC2 mov es, dx 0 00009908 26F6474410 test byte ptr es:[bx+68], 16 0 0000990D 8B4EFE mov cx, word ptr [bp-2] 0 00009910 7403 je _.L31 0 00009912 80CD80 or ch, -128 287 _.L31: 0 00009915 C7040003 mov word ptr [si], 768 0 00009919 894C06 mov word ptr [si+6], cx 0 0000991C E9CCFD jmp _.L74 291 _.L26: 0 0000991F 368B4404 mov ax, word ptr ss:[si+4] 0 00009923 25DEBF and ax, -16418 0 00009926 3D4A08 cmp ax, 2122 0 00009929 7403E988FE jne _.L19 0 0000992E E960FE jmp _.L75 297 _.L46: 0 00009931 B98000 mov cx, 128 0 00009934 E99DFE jmp _.L32 300 _.L47: 0 00009937 B94000 mov cx, 64 0 0000993A E997FE jmp _.L32 303 _.L48: 0 0000993D B90008 mov cx, 2048 0 00009940 E991FE jmp _.L32 306 _.L33: 0 00009943 368B4404 mov ax, word ptr ss:[si+4] 0 00009947 36894512 mov word ptr ss:[di+18], ax 0 0000994B 368B4C0C mov cx, word ptr ss:[si+12] 0 0000994F 368B4406 mov ax, word ptr ss:[si+6] 0 00009953 3689450E mov word ptr ss:[di+14], ax 0 00009957 36894D10 mov word ptr ss:[di+16], cx 0 0000995B E9CFFE jmp _.L35 314 _.L36: 0 0000995E 8A14 mov dl, byte ptr [si] 0 00009960 80FA05 cmp dl, 5 0 00009963 7706 ja _.L37 0 00009965 8B4512 mov ax, word ptr [di+18] 0 00009968 E963FF jmp _.L41 320 _.L37: 0 0000996B 80FA07 cmp dl, 7 0 0000996E 7710 ja _.L38 0 00009970 F6C402 test ah, 2 0 00009973 7506 jne _.L50 0 00009975 B8FF00 mov ax, 255 0 00009978 E953FF jmp _.L41 327 _.L50: 0 0000997B 31C0 xor ax, ax 0 0000997D E94EFF jmp _.L41 330 _.L38: 0 00009980 80FA08 cmp dl, 8 0 00009983 750A jne _.L40 0 00009985 B109 mov cl, 9 0 00009987 D3E8 shr ax, cl 0 00009989 83E001 and ax, 1 0 0000998C E93FFF jmp _.L41 337 _.L40: 0 0000998F 80C2F2 add dl, -14 0 00009992 80FA01 cmp dl, 1 0 00009995 7603E934FF ja _.L41 0 0000999A 8A4501 mov al, byte ptr [di+1] 0 0000999D 8804 mov byte ptr [si], al 0 0000999F E949FD jmp _.L74 344 _.L71: 0 000099A2 B8FAFF mov ax, -6 0 000099A5 E914FD jmp _.L1 347 _.L44: 0 000099A8 B8F3FF mov ax, -13 0 000099AB E90EFD jmp _.L1 350 .size _DosDevIOctl, .-_DosDevIOctl === Switch to base=012B40h -> ".RODATA" 351 .section .rodata 352 .type _cmd, @object 353 .size _cmd, 18 354 _cmd: 0 00001866 00 .byte 0 0 00001867 00 .byte 0 0 00001868 03 .byte 3 0 00001869 0C .byte 12 0 0000186A 03 .byte 3 0 0000186B 0C .byte 12 0 0000186C 06 .byte 6 0 0000186D 0A .byte 10 0 0000186E 0F .byte 15 0 0000186F 00 .byte 0 0 00001870 00 .byte 0 0 00001871 00 .byte 0 0 00001872 13 .byte 19 0 00001873 13 .byte 19 0 00001874 17 .byte 23 0 00001875 18 .byte 24 0 00001876 19 .byte 25 0 00001877 19 .byte 25 373 .ident "GCC: (GNU) 6.3.0" === Trace listing source: io.lst 1 ; 2 ; File: 3 ; io.asm 4 ; Description: 5 ; DOS-C I/O Subsystem 6 ; 7 ; Copyright (c) 1998 8 ; Pasquale J. Villani 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; You should have received a copy of the GNU General Public 24 ; License along with DOS-C; see the file COPYING. If not, 25 ; write to the Free Software Foundation, 675 Mass Ave, 26 ; Cambridge, MA 02139, USA. 27 ; 28 ; $Header$ 29 ; 30 31 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 32 %include "stacks.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; stacks.inc 4 <1> ; Description: 5 <1> ; Macro support for register stack frame 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Id: stacks.inc 1591 2011-05-06 01:46:55Z bartoldeman $ 29 <1> ; 30 <1> 31 <1> ; 32 <1> ; Standard stack frame used throughout DOS-C 33 <1> ; 34 <1> ; MS-DOS specific 35 <1> ; 36 <1> ; +---------------+ 37 <1> ; | irp hi | 26 38 <1> ; +---------------+ 39 <1> ; | irp low | 24 40 <1> ; +---------------+ 41 <1> ; | flags | 22 42 <1> ; +---------------+ 43 <1> ; | cs | 20 44 <1> ; +---------------+ 45 <1> ; | ip | 18 46 <1> ; +---------------+ 47 <1> ; | es | 16 48 <1> ; +---------------+ 49 <1> ; | ds | 14 50 <1> ; +---------------+ 51 <1> ; | bp | 12 52 <1> ; +---------------+ 53 <1> ; | di | 10 54 <1> ; +---------------+ 55 <1> ; | si | 8 56 <1> ; +---------------+ 57 <1> ; | dx | 6 58 <1> ; +---------------+ 59 <1> ; | cx | 4 60 <1> ; +---------------+ 61 <1> ; | bx | 2 62 <1> ; +---------------+ 63 <1> ; | ax | 0 64 <1> ; +---------------+ 65 <1> ; 66 <1> 67 <1> ;; Note: The order of the pushed registers _must_ match with the definition 68 <1> ;; of the "iregs" structure within PCB.H, because a pointer to the last 69 <1> ;; pushed register is used as a pointer to a "iregs" structure within the 70 <1> ;; called C sources! -- 2000/03/22 ska 71 <1> 72 <1> ; Don't use `struc RegFrame' etc. here because it interferes with segment 73 <1> ; definitions. 74 <1> reg_ax equ 0 75 <1> reg_bx equ 2 76 <1> reg_cx equ 4 77 <1> reg_dx equ 6 78 <1> reg_si equ 8 79 <1> reg_di equ 10 80 <1> reg_bp equ 12 81 <1> reg_ds equ 14 82 <1> reg_es equ 16 83 <1> reg_ip equ 18 84 <1> reg_cs equ 20 85 <1> reg_flags equ 22 86 <1> irp_low equ 24 87 <1> irp_hi equ 26 88 <1> 89 <1> %macro PUSH$ALL 0 90 <1> push es 91 <1> push ds 92 <1> push bp 93 <1> push di 94 <1> push si 95 <1> push dx 96 <1> push cx 97 <1> push bx 98 <1> push ax 99 <1> %endmacro 100 <1> 101 <1> %macro POP$ALL 0 102 <1> pop ax 103 <1> pop bx 104 <1> pop cx 105 <1> pop dx 106 <1> pop si 107 <1> pop di 108 <1> pop bp 109 <1> pop ds 110 <1> pop es 111 <1> %endmacro 112 <1> 113 <1> ; I386.inc - 10/25/01 by tom ehlert 114 <1> ; 115 <1> ; compiling the kernel for 386 will (sometimes) change the 116 <1> ; high part of (some) registers, which will be (sometimes) be used 117 <1> ; later 118 <1> ; 119 <1> ; assumption: 120 <1> ; we have never seen MSVC to use anything but eax, ecx, edx, 121 <1> ; nor have we seen Borland C to use anything but eax, ebx, edx, 122 <1> ; so we only protect eax, ebx or ecx, edx to conserve stack space 123 <1> ; 124 <1> ; to save even more stack space, we save only HIGH part of regs 125 <1> ; at some expense of slower execution. it's easier anyway :-) 126 <1> ; 127 <1> ; WATCOM only uses FS: and GS: (using -zff and -zgf) and never 128 <1> ; any high part of the 386 registers 129 <1> ; 130 <1> 131 <1> 132 <1> %IF XCPU < 386 133 <1> ; no need to save/restore anything 134 <1> 135 <1> ; error 1 2 3 136 <1> %macro Protect386Registers 0 137 <1> %endmacro 138 <1> 139 <1> %assign Size386Registers 0 140 <1> 141 <1> %macro RestoreSP 0 142 <1> mov sp, bp 143 <1> %endmacro 144 <1> 145 <1> %macro Restore386Registers 0 146 <1> %endmacro 147 <1> 148 <1> %ELSE 149 <1> %ifdef WATCOM 150 <1> 151 <1> %macro Protect386Registers 0 152 <1> push fs 153 <1> push gs 154 <1> %endmacro 155 <1> 156 <1> %assign Size386Registers 4 157 <1> 158 <1> %macro RestoreSP 0 159 <1> lea sp, [bp - Size386Registers] 160 <1> %endmacro 161 <1> 162 <1> %macro Restore386Registers 0 163 <1> pop gs 164 <1> pop fs 165 <1> %endmacro 166 <1> 167 <1> %else 168 <1> 169 <1> %macro Protect386Registers 0 170 <1> push eax 171 <1> pop ax 172 <1> %ifdef MSCL8 173 <1> push ecx 174 <1> pop cx 175 <1> %else ;BC5 176 <1> push ebx 177 <1> pop bx 178 <1> %endif 179 <1> push edx 180 <1> pop dx 181 <1> %endmacro 182 <1> 183 <1> %assign Size386Registers 6 184 <1> 185 <1> %macro RestoreSP 0 186 <1> lea sp, [bp - Size386Registers] 187 <1> %endmacro 188 <1> 189 <1> %macro Restore386Registers 0 190 <1> push dx 191 <1> pop edx 192 <1> %ifdef MSCL8 193 <1> push cx 194 <1> pop ecx 195 <1> %else ;BC5 196 <1> push bx 197 <1> pop ebx 198 <1> %endif 199 <1> push ax 200 <1> pop eax 201 <1> %endmacro 202 <1> 203 <1> %endif 204 <1> %ENDIF 205 <1> 206 <1> ; macros to define stack arguments 207 <1> ; arg a, {b,4}, c 208 <1> ; defines a and c as "word" arguments and b as a "dword" argument 209 <1> ; for STDCALL defines .a as [bp+4], .b as [bp+6] and .c as [bp+10] 210 <1> ; for PASCAL defines .a as [bp+10], .b as [bp+6] and .c as [bp+4] 211 <1> ; 212 <1> ; popargs bx, {dx,ax}, cx pops these arguments of the stack (for PASCAL 213 <1> ; in reverse order). Here dx,ax is a dword argument dx:ax where dx is 214 <1> ; the high word. The caller is responsible for dealing with instruction 215 <1> ; pointer (ip) on the stack. 216 <1> 217 <1> %ifdef gcc 218 <1> %define STDCALL 219 <1> %else 220 <1> %define PASCAL 221 <1> %endif 222 <1> 223 <1> %macro definearg 1-2 2 224 <1> %xdefine .%1 bp+.argloc 225 <1> %assign .argloc .argloc+%2 226 <1> %endmacro 227 <1> 228 <1> %macro arg 1-* 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 239 <1> %endmacro 240 <1> 241 <1> %macro multipop 1-* 242 <1> %rep %0 243 <1> %rotate -1 244 <1> pop %1 245 <1> %endrep 246 <1> %endmacro 247 <1> 248 <1> %macro popargs 1-* 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 258 <1> %endmacro 33 34 extern ConTable 35 extern LptTable 36 extern ComTable 37 extern uPrtNo 38 extern CommonNdRdExit 39 ;!! extern _NumFloppies 40 extern blk_stk_top 41 extern clk_stk_top 42 extern _reloc_call_blk_driver 43 extern _reloc_call_clk_driver 44 45 extern _TEXT_DGROUP 46 47 ;--------------------------------------------------- 48 ; 49 ; Device entry points 50 ; 51 ; This really should be a struct and go into a request.inc file 52 ; 53 cmdlen equ 0 ; Length of this command 54 unit equ 1 ; Subunit Specified 55 cmd equ 2 ; Command Code 56 status equ 3 ; Status 57 media equ 13 ; Media Descriptor 58 trans equ 14 ; Transfer Address 59 count equ 18 ; Count of blocks or characters 60 start equ 20 ; First block to transfer 61 vid equ 22 ; Volume id pointer 62 huge equ 26 ; First block (32-bit) to transfer 63 64 ; 65 ; The following is the "array" of device driver headers for the internal 66 ; devices. There is one header per device including special aux: and prn: 67 ; pseudo devices. These psuedo devices are necessary for printer 68 ; redirection, i.e., serial or parallel ports, and com port aux selection. 69 ; 70 ; The devices are linked into each other and terminate with a -1 next 71 ; pointer. This saves some time on boot up and also allows us to throw all 72 ; device initialization into a single io_init function that may be placed 73 ; into a discardable code segmemnt. 74 ; === Switch to base=000100h -> "_IO_FIXED_DATA" 75 segment _IO_FIXED_DATA 76 77 ; 78 ; The "CON" device 79 ; 80 ; This device is the standard console device used by 81 ; DOS-C and kernel 82 ; 83 global _con_dev 84 _con_dev equ $ 0 0000054A [1200][0000] dw _prn_dev,LGROUP 0 0000054E 1380 dw 8013h ; con device (stdin & stdout) 0 00000550 [0600] dw GenStrategy 0 00000552 [1100] dw ConIntr 0 00000554 434F4E2020202020 db 'CON ' 90 91 ; 92 ; Generic prn device that can be redirected via mode 93 ; 94 global _prn_dev 0 0000055C [2400][0000] _prn_dev dw _aux_dev,LGROUP 0 00000560 40A0 dw 0A040h 0 00000562 [0600] dw GenStrategy 0 00000564 [1700] dw PrnIntr 0 00000566 50524E2020202020 db 'PRN ' 100 101 ; 102 ; Generic aux device that can be redirected via mode 103 ; 104 global _aux_dev 0 0000056E [3600][0000] _aux_dev dw _Lpt1Dev,LGROUP 0 00000572 0080 dw 8000h 0 00000574 [0600] dw GenStrategy 0 00000576 [3D00] dw AuxIntr 0 00000578 4155582020202020 db 'AUX ' 110 111 ; 112 ; Printer device drivers 113 ; 0 00000580 [4800][0000] _Lpt1Dev dw _Lpt2Dev,LGROUP 0 00000584 40A0 dw 0A040h 0 00000586 [0600] dw GenStrategy 0 00000588 [1D00] dw Lpt1Intr 0 0000058A 4C50543120202020 db 'LPT1 ' 0 00000592 [5A00][0000] _Lpt2Dev dw _Lpt3Dev,LGROUP 0 00000596 40A0 dw 0A040h 0 00000598 [0600] dw GenStrategy 0 0000059A [2500] dw Lpt2Intr 0 0000059C 4C50543220202020 db 'LPT2 ' 0 000005A4 [6C00][0000] _Lpt3Dev dw _Com1Dev,LGROUP 0 000005A8 40A0 dw 0A040h 0 000005AA [0600] dw GenStrategy 0 000005AC [2D00] dw Lpt3Intr 0 000005AE 4C50543320202020 db 'LPT3 ' 129 130 ; 131 ; Com device drivers 132 ; 0 000005B6 [7E00][0000] _Com1Dev dw _Com2Dev,LGROUP 0 000005BA 0080 dw 8000h 0 000005BC [0600] dw GenStrategy 0 000005BE [3D00] dw AuxIntr 0 000005C0 434F4D3120202020 db 'COM1 ' 0 000005C8 [9000][0000] _Com2Dev dw _Com3Dev,LGROUP 0 000005CC 0080 dw 8000h 0 000005CE [0600] dw GenStrategy 0 000005D0 [4300] dw Com2Intr 0 000005D2 434F4D3220202020 db 'COM2 ' 0 000005DA [A200][0000] _Com3Dev dw _Com4Dev,LGROUP 0 000005DE 0080 dw 8000h 0 000005E0 [0600] dw GenStrategy 0 000005E2 [4900] dw Com3Intr 0 000005E4 434F4D3320202020 db 'COM3 ' 0 000005EC [B400][0000] _Com4Dev dw _clk_dev,LGROUP 0 000005F0 0080 dw 8000h 0 000005F2 [0600] dw GenStrategy 0 000005F4 [4F00] dw Com4Intr 0 000005F6 434F4D3420202020 db 'COM4 ' 153 154 ; 155 ; Header for clock device 156 ; 157 global _clk_dev 158 _clk_dev equ $ 0 000005FE [C600][0000] dw _blk_dev,LGROUP 0 00000602 0880 dw 8008h ; clock device 0 00000604 [0600] dw GenStrategy 0 00000606 [FF00] dw clk_entry 0 00000608 434C4F434B242020 db 'CLOCK$ ' 164 165 ; 166 ; Header for device 167 ; 168 global _blk_dev 169 _blk_dev equ $ 0 00000610 FFFFFFFF dd -1 0 00000614 C208 dw 08c2h ; block device with ioctl 0 00000616 [0600] dw GenStrategy 0 00000618 [0601] dw blk_entry 0 0000061A 04 db 4 0 0000061B 00000000000000 db 0,0,0,0,0,0,0 176 177 178 ; 179 ; Temporary table until next release 180 ; 181 segment _IO_FIXED_DATA 0 00000622 00 DiskTable db 0 183 184 185 ; 186 ; Local storage 187 ; 188 %if 0 === Switch to base=000790h -> "_BSS" 189 segment _BSS 190 blk_dos_stk resw 1 191 blk_dos_seg resw 1 192 clk_dos_stk resw 1 193 clk_dos_seg resw 1 194 %endif 195 === Switch to base=000100h -> "_IO_TEXT" 196 segment _IO_TEXT 197 global _ReqPktPtr 0 00000212 00000000 _ReqPktPtr dd 0 0 00000216 0000 uUnitNumber dw 0 200 201 202 ; 203 ; Name: 204 ; GenStrategy 205 ; 206 ; Function: 207 ; Store the pointer to the request packet passed in es:bx 208 ; 209 ; Description: 210 ; Generic strategy routine. Unlike the original multitasking versions, 211 ; this version assumes that no more thank one device driver is active 212 ; at any time. The request is stored into memory in the one and only 213 ; location available for that purpose. 214 ; 215 global GenStrategy 216 GenStrategy: 0 00000218 2E891E[0000] mov word [cs:_ReqPktPtr],bx 0 0000021D 2E8C06[0200] mov word [cs:_ReqPktPtr+2],es 0 00000222 CB retf 220 221 222 ; 223 ; Name: 224 ; XXXXIntr 225 ; 226 ; Function: 227 ; Individual Interrupt routines for each device driver 228 ; 229 ; Description: 230 ; This is actually a single routine with entry points for each device. 231 ; The name used for the entry point is the device name with Intr 232 ; appended to it. 233 ; 234 ; Funtionally, each device driver has an entry and an associated 235 ; table. The table is a structure that consists of a control byte 236 ; followed by an array of pointers to C functions or assembly 237 ; subroutines that implement the individual device driver functions. 238 ; This allows the usage of common error dummy filler code to be used. 239 ; It also allows standardization of the calling procedure for these 240 ; internal device driver functions. 241 ; 242 ; Assembler call/return convention: 243 ; Each driver function is entered by a jump into the function and 244 ; exits by a jump to the appropriate success or error exit routine. 245 ; This speeds up the call and return and helps to minimize the stack 246 ; useage. The contents of the request packet are passed to each 247 ; routine in registers as follows: 248 ; 249 ; Register Function Description 250 ; -------- -------- ----------- 251 ; al unit Subunit Specified 252 ; ah media Media Descriptor 253 ; cx count Count of blocks or characters 254 ; dx start First block to transfer 255 ; es:di trans Transfer Address 256 ; ds:bx reqptr Request pointer 257 ; cs kernel code segment 258 ; ds kernel data segment 259 ; 260 ; The exit routines generally set the status based on the individual 261 ; routine. For example, _IOSuccess will clear the count where 262 ; _IOErrCnt will subtract the remaining amount in cx from the original 263 ; count. See each utility routine for expectations. 264 ; 265 ; C call/return convention: 266 ; The C calling convention simply sets up the C stack and passes the 267 ; request packet pointer as a far pointer to the function. Although 268 ; the utility routine names are such that they are accesible from the 269 ; C name space, they are cannot used. Instead, the common interrupt 270 ; code expects a return status to set in the request packet. It is up 271 ; to the device driver function to set the appropriate fields such as 272 ; count when an error occurs. 273 ; 274 ; How to differntiate between the two calling conventions: 275 ; This code is entirely table driven. The table is a structure that 276 ; is generally in the _IO_FIXED_DATA segment. It consists of a flag 277 ; byte followed by short pointers to the driver functions. Selecting 278 ; a driver type is accomplished by setting the type bit in the flag 279 ; (see below). 280 ; 281 ; 7 6 5 4 3 2 1 0 282 ; +---+---+---+---+---+---+---+---+ 283 ; | | | | | | | | | 284 ; +---+---+---+---+---+---+---+---+ 285 ; | | | |--- Number of table entries 286 ; | | +-------------------+ 287 ; | | |----------------------- Reserved 288 ; | +-------+ 289 ; +--------------------------------- type bit (1 == C / 0 == asm) 290 ; 291 ConIntr: 0 00000223 56 push si 0 00000224 BE[0000] mov si,ConTable 0 00000227 EB47 jmp short CharIntrEntry 295 296 PrnIntr: 0 00000229 56 push si 0 0000022A 50 push ax 0 0000022B 31C0 xor ax,ax 0 0000022D EB16 jmp short LptCmnIntr 301 302 Lpt1Intr: 0 0000022F 56 push si 0 00000230 50 push ax 0 00000231 30C0 xor al,al 0 00000233 B401 mov ah,1 0 00000235 EB0E jmp short LptCmnIntr 308 309 Lpt2Intr: 0 00000237 56 push si 0 00000238 50 push ax 0 00000239 B001 mov al,1 0 0000023B B402 mov ah,2 0 0000023D EB06 jmp short LptCmnIntr 315 316 Lpt3Intr: 0 0000023F 56 push si 0 00000240 50 push ax 0 00000241 B002 mov al,2 0 00000243 B403 mov ah,3 321 322 LptCmnIntr: 0 00000245 BE[0000] mov si,LptTable 0 00000248 2E8826[0000] mov [cs:uPrtNo],ah 0 0000024D EB22 jmp short DiskIntrEntry 326 327 328 AuxIntr: 0 0000024F 56 push si 0 00000250 50 push ax 0 00000251 30C0 xor al,al 0 00000253 EB12 jmp short ComCmnIntr 333 334 Com2Intr: 0 00000255 56 push si 0 00000256 50 push ax 0 00000257 B001 mov al,1 0 00000259 EB0C jmp short ComCmnIntr 339 340 Com3Intr: 0 0000025B 56 push si 0 0000025C 50 push ax 0 0000025D B002 mov al,2 0 0000025F EB06 jmp short ComCmnIntr 345 346 Com4Intr: 0 00000261 56 push si 0 00000262 50 push ax 0 00000263 B003 mov al,3 0 00000265 EB00 jmp short ComCmnIntr 351 352 ComCmnIntr: 0 00000267 BE[0000] mov si,ComTable 0 0000026A EB05 jmp short DiskIntrEntry 355 356 357 DskIntr: 0 0000026C 56 push si 0 0000026D BE[D800] mov si,DiskTable 360 CharIntrEntry: 0 00000270 50 push ax 362 DiskIntrEntry: 0 00000271 51 push cx 0 00000272 52 push dx 0 00000273 57 push di 0 00000274 55 push bp 0 00000275 1E push ds 0 00000276 06 push es 0 00000277 53 push bx 0 00000278 2EA2[0400] mov byte [cs:uUnitNumber],al 0 0000027C 2EC51E[0000] lds bx,[cs:_ReqPktPtr] 0 00000281 2EF60480 test byte [cs:si],80h 0 00000285 7420 je AsmType 374 0 00000287 8A4702 mov al,[bx+cmd] 0 0000028A 2E3A04 cmp al,[cs:si] 0 0000028D 7762 ja _IOCommandError 0 0000028F 98 cbw 0 00000290 D1E0 shl ax,1 0 00000292 01C6 add si,ax 0 00000294 97 xchg di,ax 382 0 00000295 1E push ds 0 00000296 53 push bx 0 00000297 89E5 mov bp,sp 0 00000299 2E8E1E[0000] mov ds,[cs:_TEXT_DGROUP] 0 0000029E FC cld 0 0000029F 2EFF5401 call word [cs:si+1] 0 000002A3 59 pop cx 0 000002A4 59 pop cx 0 000002A5 EB34 jmp short StoreStatus 392 0 000002A7 8A4701 AsmType: mov al,[bx+unit] 0 000002AA 8A670D mov ah,[bx+media] 0 000002AD 8B4F12 mov cx,[bx+count] 0 000002B0 8B5714 mov dx,[bx+start] 0 000002B3 97 xchg di,ax 0 000002B4 8A4702 mov al,[bx+cmd] 0 000002B7 2E3A04 cmp al,[cs:si] 0 000002BA 7735 ja _IOCommandError 0 000002BC 98 cbw 0 000002BD D1E0 shl ax,1 0 000002BF 01C6 add si,ax 0 000002C1 97 xchg di,ax 405 0 000002C2 C47F0E les di,[bx+trans] 0 000002C5 2E8E1E[0000] mov ds,[cs:_TEXT_DGROUP] 0 000002CA FC cld 0 000002CB 2EFF6401 jmp word [cs:si+1] 410 411 ; 412 ; Name: 413 ; _IOXXXXXXX 414 ; 415 ; Function: 416 ; Exit routines for internal device drivers. 417 ; 418 ; Description: 419 ; These routines are the exit for internal device drivers. _IOSuccess 420 ; is for read/write functions and correctly returns for a successful 421 ; read/write operation by setting the remainng count to zero. _IOExit 422 ; simply sets success bit and returns. _IODone returns complete and 423 ; busy status. _IOCommandError returns and error status for invalid 424 ; commands. _IOErrCnt corrects the remaining bytes for errors that 425 ; occurred during partial read/write operation. _IOErrorExit is a 426 ; generic error exit that sets done and error. 427 ; 428 global _IOSuccess 429 _IOSuccess: 0 000002CF 2EC51E[0000] lds bx,[cs:_ReqPktPtr] 0 000002D4 31C0 xor ax,ax 0 000002D6 894712 mov [bx+count],ax 433 434 global _IOExit 435 _IOExit: 0 000002D9 B401 mov ah,1 437 438 StoreStatus: 0 000002DB 2EC51E[0000] lds bx,[cs:_ReqPktPtr] 0 000002E0 894703 mov [bx+status],ax 0 000002E3 5B pop bx 0 000002E4 07 pop es 0 000002E5 1F pop ds 0 000002E6 5D pop bp 0 000002E7 5F pop di 0 000002E8 5A pop dx 0 000002E9 59 pop cx 0 000002EA 58 pop ax 0 000002EB 5E pop si 0 000002EC CB retf 451 452 453 global _IODone 454 _IODone: 0 000002ED B403 mov ah,3 0 000002EF EBEA jmp short StoreStatus 457 458 global _IOCommandError 459 _IOCommandError: 0 000002F1 B003 mov al,3 461 462 global _IOErrCnt 463 _IOErrCnt: 0 000002F3 2EC51E[0000] lds bx,[cs:_ReqPktPtr] 0 000002F8 294F12 sub [bx+count],cx 466 global _IOErrorExit 467 _IOErrorExit: 0 000002FB B481 mov ah,81h 0 000002FD EBDC jmp short StoreStatus 470 471 ; 472 ; Name: 473 ; GetUnitNum 474 ; 475 ; Function: 476 ; Return the internally set unit number. 477 ; 478 ; Description: 479 ; Simply return the contents of uUnitNumber. This version relies on 480 ; no segment registers and makes a safe call regardless of driver 481 ; state. 482 ; 483 global GetUnitNum 484 GetUnitNum: 0 000002FF 2E8B16[0400] mov dx,[cs:uUnitNumber] 0 00000304 C3 ret 487 488 ; 489 ; These are still old style DOS-C drivers. I'll replace 490 ; them in the next release 491 ; 492 493 494 ; 495 ; block device interrupt 496 ; 497 ; NOTE: This code is not standard device driver handlers 498 ; It is written for sperate code and data space. 499 ; 500 501 blk_driver_params: 0 00000305 [0000] dw blk_stk_top 0 00000307 [0000] dw _reloc_call_blk_driver 0 00000309 [0000] dw DGROUP 505 506 clk_driver_params: 0 0000030B [0000] dw clk_stk_top 0 0000030D [0000] dw _reloc_call_clk_driver 0 0000030F [0000] dw DGROUP 510 511 ; clock device interrupt 512 clk_entry: 0 00000311 9C pushf 0 00000312 53 push bx 515 0 00000313 BB[F900] mov bx, clk_driver_params 517 0 00000316 EB05 jmp short clk_and_blk_common 519 520 521 ; block device interrupt 522 blk_entry: 0 00000318 9C pushf 0 00000319 53 push bx 525 0 0000031A BB[F300] mov bx, blk_driver_params 527 528 clk_and_blk_common: 529 0 0000031D 50 push ax 0 0000031E 51 push cx 0 0000031F 52 push dx 533 534 535 ; small model 0 00000320 89E0 mov ax,sp ; use internal stack 0 00000322 8CD2 mov dx,ss 0 00000324 9C pushf ; put flags in cx 0 00000325 59 pop cx 0 00000326 FA cli ; no interrupts 0 00000327 2E8E16[0000] mov ss,[cs:_TEXT_DGROUP] 0 0000032C 2E8B27 mov sp,[cs:bx] 543 0 0000032F 51 push cx 0 00000330 9D popf ; restore interrupt flag 546 547 548 0 00000331 50 push ax ; save old SS/SP 0 00000332 52 push dx 551 552 ; push these registers on 0 00000333 1E push ds ; BLK_STACK 0 00000334 55 push bp ; to save stack space 0 00000335 56 push si 0 00000336 57 push di 0 00000337 06 push es 558 Protect386Registers 559 0 00000338 2E8E1E[0000] mov ds,[cs:_TEXT_DGROUP] ; 561 562 0 0000033D 2EFF36[0200] push word [cs:_ReqPktPtr+2] 0 00000342 2EFF36[0000] push word [cs:_ReqPktPtr] 0 00000347 2EFF5F02 call far [cs:bx+2] 0 0000034B 59 pop cx 0 0000034C 59 pop cx 568 0 0000034D 2EC41E[0000] les bx,[cs:_ReqPktPtr] ; now return completion code 0 00000352 26894703 mov word [es:bx+status],ax ; mark operation complete 571 572 573 Restore386Registers 0 00000356 07 pop es 0 00000357 5F pop di 0 00000358 5E pop si 0 00000359 5D pop bp 0 0000035A 1F pop ds 579 580 0 0000035B 5A pop dx ; get back old SS/SP 0 0000035C 58 pop ax 583 0 0000035D FA cli ; no interrupts 0 0000035E 8ED2 mov ss,dx ; use dos stack 0 00000360 89C4 mov sp,ax 587 588 0 00000362 5A pop dx 0 00000363 59 pop cx 0 00000364 58 pop ax 0 00000365 5B pop bx 0 00000366 9D popf 0 00000367 CB retf === Trace listing source: iprf.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=iprf.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/cc7wcAav.s output file : iprf.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:23.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .global _init_put_console 7 .type _init_put_console, @function 8 _init_put_console: 0 00003469 55 push bp 0 0000346A 89E5 mov bp, sp 0 0000346C 837E040A cmp word ptr [bp+4], 10 0 00003470 7507 jne _.L2 0 00003472 B80D00 mov ax, 13 0 00003475 50 push ax 0 00003476 E8[FEFF] call _init_put_console 16 _.L2: 0 00003479 8B4604 mov ax, word ptr [bp+4] 18 #APP 19 ;# 129 "prf.c" 1 1 /****************************************************************/ 2 /* */ 3 /* prf.c */ 4 /* */ 5 /* Abbreviated printf Function */ 6 /* */ 7 /* Copyright (c) 1995 */ 8 /* Pasquale J. Villani */ 9 /* All Rights Reserved */ 10 /* */ 11 /* This file is part of DOS-C. */ 12 /* */ 13 /* DOS-C is free software; you can redistribute it and/or */ 14 /* modify it under the terms of the GNU General Public License */ 15 /* as published by the Free Software Foundation; either version */ 16 /* 2, or (at your option) any later version. */ 17 /* */ 18 /* DOS-C is distributed in the hope that it will be useful, but */ 19 /* WITHOUT ANY WARRANTY; without even the implied warranty of */ 20 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See */ 21 /* the GNU General Public License for more details. */ 22 /* */ 23 /* You should have received a copy of the GNU General Public */ 24 /* License along with DOS-C; see the file COPYING. If not, */ 25 /* write to the Free Software Foundation, 675 Mass Ave, */ 26 /* Cambridge, MA 02139, USA. */ 27 /****************************************************************/ 28 29 #include "portab.h" 30 31 #ifdef FORSYS 32 #ifdef __GNUC__ 33 #include 34 #else 35 #include 36 #endif 37 #include 38 #endif 39 40 #ifdef _INIT 41 #define handle_char init_handle_char 42 #define put_console init_put_console 43 #define ltob init_ltob 44 #define do_printf init_do_printf 45 #define printf init_printf 46 #define sprintf init_sprintf 47 #define charp init_charp 48 #endif 49 50 #include "debug.h" /* must be below xx to init_xx */ 51 52 /* special console output routine */ 53 /*#define DOSEMU */ 54 #ifdef DOSEMU 55 56 #define MAX_BUFSIZE 80 /* adjust if necessary */ 57 static int buff_offset = 0; 58 static char buff[MAX_BUFSIZE]; 59 60 void put_console(int c) 61 { 62 if (buff_offset >= MAX_BUFSIZE) 63 { 64 buff_offset = 0; 65 DebugPrintf(("Printf buffer overflow!\n")); 66 } 67 if (c == '\n') 68 { 69 buff[buff_offset] = 0; 70 buff_offset = 0; 71 #ifdef __TURBOC__ 72 _ES = FP_SEG(buff); 73 _DX = FP_OFF(buff); 74 _AX = 0x13; 75 __int__(0xe6); 76 #elif defined(__GNUC__) 77 asm volatile( 78 "{ int $0xe6 | int 0xe6 }" 79 : /* outputs */ 80 : /* inputs */ "a"(0x13), "e"(FP_SEG(buff)), "d"(FP_OFF(buff)) 81 ); 82 #elif defined(I86) 83 asm 84 { 85 push ds; 86 pop es; 87 mov dx, offset buff; 88 mov ax, 0x13; 89 int 0xe6; 90 } 91 #endif 92 } 93 else 94 { 95 buff[buff_offset] = c; 96 buff_offset++; 97 } 98 } 99 #else 100 #ifdef __WATCOMC__ 101 void int29(char c); 102 #pragma aux int29 = "int 0x29" __parm [__al] __modify __exact [__bx]; 103 104 #ifdef DEBUG_PRINT_COMPORT 105 void fastComPrint(char c); 106 #pragma aux fastComPrint = \ 107 "mov bx, 0xFD05" \ 108 "int 0x29" __parm [__al] __modify __exact [__bx]; 109 #endif 110 #endif 111 112 void put_console(int c) 113 { 114 if (c == '\n') 115 put_console('\r'); 116 117 #ifdef FORSYS 118 write(1, &c, 1); /* write character to stdout */ 119 #else 120 #if defined(__TURBOC__) 121 _AL = c; 122 __int__(0x29); 123 #elif defined(__WATCOMC__) 124 int29(c); 125 #if defined DEBUG_PRINT_COMPORT 126 fastComPrint(c); 127 #endif 128 #elif defined(__GNUC__) 0 0000347C CD29 asm volatile("{ int $0x29 | int 0x29 }" : : "a"(c) : "bx"); 130 #elif defined(I86) 20 int 0x29 21 ;# 0 "" 2 22 #NO_APP 0 0000347E 89EC mov sp, bp 0 00003480 5D pop bp 0 00003481 C20200 ret 2 26 .size _init_put_console, .-_init_put_console 27 .type _init_handle_char, @function 28 _init_handle_char: 0 00003484 89E3 mov bx, sp 0 00003486 8B4702 mov ax, word ptr [bx+2] 0 00003489 8B1E[0000] mov bx, word ptr [_init_charp] 0 0000348D 85DB test bx, bx 0 0000348F 7502 jne _.L5 0 00003491 EBD6 jmp _init_put_console 35 _.L5: 0 00003493 8D5701 lea dx, [1+bx] 0 00003496 8916[0000] mov word ptr [_init_charp], dx 0 0000349A 8807 mov byte ptr [bx], al 0 0000349C C20200 ret 2 40 .size _init_handle_char, .-_init_handle_char 41 .global _init_sprintf 42 .type _init_sprintf, @function 43 _init_sprintf: 0 0000349F 55 push bp 0 000034A0 89E5 mov bp, sp 0 000034A2 1E push ds 0 000034A3 8B4604 mov ax, word ptr [bp+4] 0 000034A6 A3[0000] mov word ptr [_init_charp], ax 0 000034A9 8D4608 lea ax, [8+bp] 0 000034AC 50 push ax 0 000034AD FF7606 push word ptr [bp+6] 0 000034B0 E81000 call _init_do_printf 0 000034B3 31C0 xor ax, ax 0 000034B5 50 push ax 0 000034B6 8946FE mov word ptr [bp-2], ax 0 000034B9 E8C8FF call _init_handle_char 0 000034BC 8B46FE mov ax, word ptr [bp-2] 0 000034BF 89EC mov sp, bp 0 000034C1 5D pop bp 0 000034C2 C3 ret 61 .size _init_sprintf, .-_init_sprintf === Switch to base=012B40h -> ".RODATA.STR1.1" 62 .section .rodata.str1.1,"aMS",@progbits,1 63 _.LC0: 0 00000D19 253034783A253034 .string "%04x:%04x" 0 00000D21 7800 65 _.LC1: 0 00000D23 3031323334353637 .string "0123456789abcdef" 0 00000D2B 3839616263646566 0 00000D33 00 === Switch to base=002270h -> ".TEXT" 67 .text 68 .type _init_do_printf, @function 69 _init_do_printf: 0 000034C3 56 push si 0 000034C4 57 push di 0 000034C5 55 push bp 0 000034C6 89E5 mov bp, sp 0 000034C8 83EC20 sub sp, 32 0 000034CB 8B7608 mov si, word ptr [bp+8] 0 000034CE 8B7E0A mov di, word ptr [bp+10] 77 _.L10: 0 000034D1 8A04 mov al, byte ptr [si] 0 000034D3 84C0 test al, al 0 000034D5 7508 jne _.L54 81 _.L9: 0 000034D7 89EC mov sp, bp 0 000034D9 5D pop bp 0 000034DA 5F pop di 0 000034DB 5E pop si 0 000034DC C20400 ret 4 87 _.L54: 0 000034DF 3C25 cmp al, 37 0 000034E1 7408 je _.L11 90 _.L87: 0 000034E3 98 cbw 0 000034E4 50 push ax 0 000034E5 E89CFF call _init_handle_char 0 000034E8 E98501 jmp _.L12 95 _.L11: 0 000034EB 807C012D cmp byte ptr [si+1], 45 0 000034EF 7436 je _.L13 0 000034F1 46 inc si 0 000034F2 C646EA01 mov byte ptr [bp-22], 1 100 _.L14: 0 000034F6 803C30 cmp byte ptr [si], 48 0 000034F9 7505 jne _.L15 0 000034FB 804EEA02 or byte ptr [bp-22], 2 0 000034FF 46 inc si 105 _.L15: 0 00003500 C746E80000 mov word ptr [bp-24], 0 107 _.L17: 0 00003505 8A04 mov al, byte ptr [si] 0 00003507 88C4 mov ah, al 0 00003509 80C4D0 add ah, -48 0 0000350C 8866F0 mov byte ptr [bp-16], ah 0 0000350F C646F100 mov byte ptr [bp-15], 0 0 00003513 80FC09 cmp ah, 9 0 00003516 7718 ja _.L16 0 00003518 46 inc si 0 00003519 B80A00 mov ax, 10 0 0000351C F766E8 mul word ptr [bp-24] 0 0000351F 0346F0 add ax, word ptr [bp-16] 0 00003522 8946E8 mov word ptr [bp-24], ax 0 00003525 EBDE jmp _.L17 121 _.L13: 0 00003527 83C602 add si, 2 0 0000352A C646EA00 mov byte ptr [bp-22], 0 0 0000352E EBC6 jmp _.L14 125 _.L16: 0 00003530 3C6C cmp al, 108 0 00003532 7505 jne _.L18 0 00003534 804EEA04 or byte ptr [bp-22], 4 0 00003538 46 inc si 130 _.L18: 0 00003539 8A04 mov al, byte ptr [si] 0 0000353B 3C64 cmp al, 100 0 0000353D 7503E9E001 je _.L56 0 00003542 7F3C jg _.L21 0 00003544 3C46 cmp al, 70 0 00003546 7503E9C301 je _.L22 0 0000354B 7F13 jg _.L23 0 0000354D 84C0 test al, al 0 0000354F 7486 je _.L9 0 00003551 3C25 cmp al, 37 0 00003553 7407 je _.L25 142 _.L19: 0 00003555 B83F00 mov ax, 63 0 00003558 50 push ax 0 00003559 E828FF call _init_handle_char 146 _.L25: 0 0000355C 8A04 mov al, byte ptr [si] 0 0000355E EB83 jmp _.L87 149 _.L23: 0 00003560 3C58 cmp al, 88 0 00003562 7503E9B301 je _.L26 0 00003567 3C63 cmp al, 99 0 00003569 7503E9F200 je _.L27 0 0000356E 3C53 cmp al, 83 0 00003570 75E3 jne _.L19 156 _.L28: 0 00003572 8B0D mov cx, word ptr [di] 0 00003574 8B4502 mov ax, word ptr [di+2] 0 00003577 8946F0 mov word ptr [bp-16], ax 0 0000357A 83C704 add di, 4 0 0000357D E92901 jmp _.L34 162 _.L21: 0 00003580 3C70 cmp al, 112 0 00003582 7503E9ED00 je _.L29 0 00003587 7E03E9B500 jg _.L30 0 0000358C 3C69 cmp al, 105 0 0000358E 7503E98F01 je _.L56 0 00003593 3C6F cmp al, 111 0 00003595 75BE jne _.L19 0 00003597 C746F00800 mov word ptr [bp-16], 8 171 _.L20: 0 0000359C 89F8 mov ax, di 0 0000359E F646EA04 test byte ptr [bp-22], 4 0 000035A2 7503E98301 je _.L35 0 000035A7 83C004 add ax, 4 0 000035AA 8946E6 mov word ptr [bp-26], ax 0 000035AD 8B0D mov cx, word ptr [di] 0 000035AF 8B4502 mov ax, word ptr [di+2] 179 _.L36: 0 000035B2 894EEE mov word ptr [bp-18], cx 0 000035B5 8946EC mov word ptr [bp-20], ax 0 000035B8 837EF0F6 cmp word ptr [bp-16], -10 0 000035BC 7403E98801 jne _.L86 0 000035C1 85C0 test ax, ax 0 000035C3 7C03E97C01 jge _.L58 0 000035C8 31D2 xor dx, dx 0 000035CA 89D7 mov di, dx 0 000035CC 29CA sub dx, cx 0 000035CE 8956EE mov word ptr [bp-18], dx 0 000035D1 19C7 sbb di, ax 0 000035D3 897EEC mov word ptr [bp-20], di 0 000035D6 C646F32D mov byte ptr [bp-13], 45 0 000035DA C746F00A00 mov word ptr [bp-16], 10 0 000035DF 8D4EF4 lea cx, [-12+bp] 195 _.L38: 0 000035E2 89CB mov bx, cx 0 000035E4 8B46F0 mov ax, word ptr [bp-16] 0 000035E7 99 cwd 0 000035E8 8956E4 mov word ptr [bp-28], dx 200 _.L40: 0 000035EB 894EE0 mov word ptr [bp-32], cx 0 000035EE 43 inc bx 0 000035EF 895EE2 mov word ptr [bp-30], bx 0 000035F2 FF76E4 push word ptr [bp-28] 0 000035F5 FF76F0 push word ptr [bp-16] 0 000035F8 FF76EC push word ptr [bp-20] 0 000035FB FF76EE push word ptr [bp-18] 0 000035FE E8[FEFF] call ___umodsi3 0 00003601 BF[0A00] mov di, offset _.LC1 0 00003604 93 xchg bx, ax 0 00003605 8A01 mov al, byte ptr [bx+di] 0 00003607 8B5EE2 mov bx, word ptr [bp-30] 0 0000360A 8847FF mov byte ptr [bx-1], al 0 0000360D FF76E4 push word ptr [bp-28] 0 00003610 FF76F0 push word ptr [bp-16] 0 00003613 FF76EC push word ptr [bp-20] 0 00003616 FF76EE push word ptr [bp-18] 0 00003619 E8[FEFF] call ___udivsi3 0 0000361C 8946EE mov word ptr [bp-18], ax 0 0000361F 8956EC mov word ptr [bp-20], dx 0 00003622 09D0 or ax, dx 0 00003624 8B5EE2 mov bx, word ptr [bp-30] 0 00003627 8B4EE0 mov cx, word ptr [bp-32] 0 0000362A 75BF jne _.L40 0 0000362C 8807 mov byte ptr [bx], al 226 _.L41: 0 0000362E 4B dec bx 0 0000362F 39D9 cmp cx, bx 0 00003631 7303E91901 jc _.L42 0 00003636 8D4EF3 lea cx, [-13+bp] 0 00003639 8C56F0 mov word ptr [bp-16], ss 0 0000363C 8B7EE6 mov di, word ptr [bp-26] 0 0000363F EB68 jmp _.L34 234 _.L30: 0 00003641 3C75 cmp al, 117 0 00003643 7503E9CA00 je _.L32 0 00003648 3C78 cmp al, 120 0 0000364A 7503E9CB00 je _.L26 0 0000364F 3C73 cmp al, 115 0 00003651 7403E9FFFE jne _.L19 0 00003656 8B0D mov cx, word ptr [di] 0 00003658 8C56F0 mov word ptr [bp-16], ss 0 0000365B 83C702 add di, 2 0 0000365E EB49 jmp _.L34 245 _.L27: 0 00003660 89F8 mov ax, di 0 00003662 83C002 add ax, 2 0 00003665 8946F0 mov word ptr [bp-16], ax 0 00003668 FF35 push word ptr [di] 0 0000366A E817FE call _init_handle_char 0 0000366D 8B7EF0 mov di, word ptr [bp-16] 252 _.L12: 0 00003670 46 inc si 0 00003671 E95DFE jmp _.L10 255 _.L29: 0 00003674 8B16[0000] mov dx, word ptr [_init_charp] 0 00003678 8956EC mov word ptr [bp-20], dx 0 0000367B 89F8 mov ax, di 0 0000367D 83C004 add ax, 4 0 00003680 8946EE mov word ptr [bp-18], ax 0 00003683 FF35 push word ptr [di] 0 00003685 FF7502 push word ptr [di+2] 0 00003688 B8[0000] mov ax, offset _.LC0 0 0000368B 50 push ax 0 0000368C 8D4EF3 lea cx, [-13+bp] 0 0000368F 51 push cx 0 00003690 894EF0 mov word ptr [bp-16], cx 0 00003693 E8[FEFF] call _init_sprintf 0 00003696 8B4EF0 mov cx, word ptr [bp-16] 0 00003699 8C56F0 mov word ptr [bp-16], ss 0 0000369C 8B56EC mov dx, word ptr [bp-20] 0 0000369F 8916[0000] mov word ptr [_init_charp], dx 0 000036A3 83C408 add sp, 8 0 000036A6 8B7EEE mov di, word ptr [bp-18] 275 _.L34: 0 000036A9 31C0 xor ax, ax 277 _.L43: 0 000036AB 89C3 mov bx, ax 0 000036AD 01CB add bx, cx 0 000036AF 8E46F0 mov es, word ptr [bp-16] 0 000036B2 26803F00 cmp byte ptr es:[bx], 0 0 000036B6 7403E9A200 jne _.L44 0 000036BB 8B56E8 mov dx, word ptr [bp-24] 0 000036BE 29C2 sub dx, ax 0 000036C0 89D0 mov ax, dx 0 000036C2 F646EA01 test byte ptr [bp-22], 1 0 000036C6 7420 je _.L50 0 000036C8 F646EA02 test byte ptr [bp-22], 2 0 000036CC 7503E99000 je _.L59 0 000036D1 BB3000 mov bx, 48 291 _.L46: 0 000036D4 89C2 mov dx, ax 293 _.L47: 0 000036D6 85D2 test dx, dx 0 000036D8 7E03E98A00 jg _.L48 0 000036DD 89C2 mov dx, ax 0 000036DF 85C0 test ax, ax 0 000036E1 7D02 jge _.L49 0 000036E3 31D2 xor dx, dx 300 _.L49: 0 000036E5 29D0 sub ax, dx 0 000036E7 92 xchg dx, ax 303 _.L50: 0 000036E8 8E46F0 mov es, word ptr [bp-16] 0 000036EB 89CB mov bx, cx 0 000036ED 268A07 mov al, byte ptr es:[bx] 0 000036F0 84C0 test al, al 0 000036F2 7403E99000 jne _.L51 309 _.L52: 0 000036F7 85D2 test dx, dx 0 000036F9 7F03E972FF jle _.L12 0 000036FE 8956F0 mov word ptr [bp-16], dx 0 00003701 B82000 mov ax, 32 0 00003704 50 push ax 0 00003705 E87CFD call _init_handle_char 0 00003708 8B56F0 mov dx, word ptr [bp-16] 0 0000370B 4A dec dx 0 0000370C EBE9 jmp _.L52 319 _.L22: 0 0000370E 46 inc si 0 0000370F E960FE jmp _.L28 322 _.L32: 0 00003712 C746F00A00 mov word ptr [bp-16], 10 0 00003717 E982FE jmp _.L20 325 _.L26: 0 0000371A C746F01000 mov word ptr [bp-16], 16 0 0000371F E97AFE jmp _.L20 328 _.L56: 0 00003722 C746F0F6FF mov word ptr [bp-16], -10 0 00003727 E972FE jmp _.L20 331 _.L35: 0 0000372A 83C002 add ax, 2 0 0000372D 8946E6 mov word ptr [bp-26], ax 0 00003730 8B05 mov ax, word ptr [di] 0 00003732 89C1 mov cx, ax 0 00003734 99 cwd 0 00003735 92 xchg dx, ax 0 00003736 837EF000 cmp word ptr [bp-16], 0 0 0000373A 7D03E973FE jl _.L36 0 0000373F 31C0 xor ax, ax 0 00003741 E96EFE jmp _.L36 342 _.L58: 0 00003744 C746F00A00 mov word ptr [bp-16], 10 344 _.L86: 0 00003749 8D4EF3 lea cx, [-13+bp] 0 0000374C E993FE jmp _.L38 347 _.L42: 0 0000374F 89CF mov di, cx 0 00003751 8A05 mov al, byte ptr [di] 0 00003753 8A27 mov ah, byte ptr [bx] 0 00003755 8825 mov byte ptr [di], ah 0 00003757 8807 mov byte ptr [bx], al 0 00003759 41 inc cx 0 0000375A E9D1FE jmp _.L41 355 _.L44: 0 0000375D 40 inc ax 0 0000375E E94AFF jmp _.L43 358 _.L59: 0 00003761 BB2000 mov bx, 32 0 00003764 E96DFF jmp _.L46 361 _.L48: 0 00003767 894EE8 mov word ptr [bp-24], cx 0 0000376A 8946EA mov word ptr [bp-22], ax 0 0000376D 8956EC mov word ptr [bp-20], dx 0 00003770 53 push bx 0 00003771 895EEE mov word ptr [bp-18], bx 0 00003774 E80DFD call _init_handle_char 0 00003777 8B56EC mov dx, word ptr [bp-20] 0 0000377A 4A dec dx 0 0000377B 8B4EE8 mov cx, word ptr [bp-24] 0 0000377E 8B46EA mov ax, word ptr [bp-22] 0 00003781 8B5EEE mov bx, word ptr [bp-18] 0 00003784 E94FFF jmp _.L47 374 _.L51: 0 00003787 894EEC mov word ptr [bp-20], cx 0 0000378A 8956EE mov word ptr [bp-18], dx 0 0000378D 98 cbw 0 0000378E 50 push ax 0 0000378F E8F2FC call _init_handle_char 0 00003792 8B4EEC mov cx, word ptr [bp-20] 0 00003795 41 inc cx 0 00003796 8B56EE mov dx, word ptr [bp-18] 0 00003799 E94CFF jmp _.L50 384 .size _init_do_printf, .-_init_do_printf 385 .global _init_printf 386 .type _init_printf, @function 387 _init_printf: 0 0000379C 55 push bp 0 0000379D 89E5 mov bp, sp 0 0000379F C706[0000]0000 mov word ptr [_init_charp], 0 0 000037A5 8D4606 lea ax, [6+bp] 0 000037A8 50 push ax 0 000037A9 FF7604 push word ptr [bp+4] 0 000037AC E814FD call _init_do_printf 0 000037AF 31C0 xor ax, ax 0 000037B1 89EC mov sp, bp 0 000037B3 5D pop bp 0 000037B4 C3 ret 399 .size _init_printf, .-_init_printf 400 .local _init_charp 401 .comm _init_charp,2,2 402 .ident "GCC: (GNU) 6.3.0" === Trace listing source: irqstack.lst 1 ; File: 2 ; irqstack.asm 3 ; Description: 4 ; Assembly support routines for hardware stack support 5 ; 6 ; Copyright (c) 1997, 1998 7 ; Svante Frey 8 ; All Rights Reserved 9 ; 10 ; This file is part of DOS-C. 11 ; 12 ; DOS-C is free software; you can redistribute it and/or 13 ; modify it under the terms of the GNU General Public License 14 ; as published by the Free Software Foundation; either version 15 ; 2, or (at your option) any later version. 16 ; 17 ; DOS-C is distributed in the hope that it will be useful, but 18 ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 ; the GNU General Public License for more details. 21 ; 22 ; You should have received a copy of the GNU General Public 23 ; License along with DOS-C; see the file COPYING. If not, 24 ; write to the Free Software Foundation, 675 Mass Ave, 25 ; Cambridge, MA 02139, USA. 26 ; 27 ; $Id: irqstack.asm 1567 2011-04-09 02:03:20Z bartoldeman $ 28 ; 29 30 31 ; Code for stack switching during hardware interrupts. 32 33 ; Format of interrupt sharing protocol interrupt handler entry point: 34 ; Offset Size Description (Table 02568) 35 ; 00h 2 BYTEs short jump to actual start of interrupt handler, immediately 36 ; following this data block (EBh 10h) 37 ; 02h DWORD address of next handler in chain 38 ; 06h WORD signature 424Bh 39 ; 08h BYTE EOI flag 40 ; 00h software interrupt or secondary hardware interrupt handler 41 ; 80h primary hardware interrupt handler (will issue EOI to 42 ; interrupt controller) 43 ; 09h 2 BYTEs short jump to hardware reset routine 44 ; must point at a valid FAR procedure (may be just RETF) 45 ; 0Bh 7 BYTEs reserved (0) by IBM for future expansion 46 47 ; Ralf Brown documents that irq 2, 3, 4, 5, 6, 10, 11, 12, 14, 15 use the above 48 ; protocol.. 49 ; MS (http://support.microsoft.com/kb/84300/) 50 ; documents that STACKS= implements stacks for interrupt vectors 51 ; 02H, 08-0EH, 70H, and 72-77H. 52 ; that means that we need to redirect NMI (INT 2), irq 0, 1, 8, 13 without sharing 53 ; irq 9 (==irq2) and irq 7 (printer) are not handled at all 54 55 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 56 === Switch to base=000100h -> "_IRQTEXT" 57 segment _IRQTEXT 58 0 00000000 0000 stack_size dw 0 0 00000002 0000 stack_top dw 0 0 00000004 0000 stack_offs dw 0 0 00000006 0000 stack_seg dw 0 63 64 %macro irq 0 65 call general_irq_service 66 dd 0 67 %endmacro 68 69 %macro irqshare 1 70 jmp short %%1 71 dd 0 72 dw 424bh 73 db 0 74 jmp short retf%1 75 times 7 db 0 76 %%1: call general_irq_service_share 77 %endmacro 78 79 nmi: irq 79 <1> nmi: 0 00000008 E8[0000] call general_irq_service 0 0000000B 00000000 dd 0 80 irq_0: irq 80 <1> irq_0: 0 0000000F E8[0000] call general_irq_service 0 00000012 00000000 dd 0 81 irq_1: irq 81 <1> irq_1: 0 00000016 E8[0000] call general_irq_service 0 00000019 00000000 dd 0 82 irq_08: irq 82 <1> irq_08: 0 0000001D E8[0000] call general_irq_service 0 00000020 00000000 dd 0 83 irq_0d: irq 83 <1> irq_0d: 0 00000024 E8[0000] call general_irq_service 0 00000027 00000000 dd 0 84 0 0000002B CB retf1: retf 86 irq_2: irqshare 1 86 <1> irq_2: 0 0000002C EB10 jmp short %%1 0 0000002E 00000000 dd 0 0 00000032 4B42 dw 424bh 0 00000034 00 db 0 0 00000035 EBF4 jmp short retf%1 0 00000037 00 times 7 db 0 0 0000003E E8[0900] %%1: call general_irq_service_share 87 irq_3: irqshare 1 87 <1> irq_3: 0 00000041 EB10 jmp short %%1 0 00000043 00000000 dd 0 0 00000047 4B42 dw 424bh 0 00000049 00 db 0 0 0000004A EBDF jmp short retf%1 0 0000004C 00 times 7 db 0 0 00000053 E8[0900] %%1: call general_irq_service_share 88 irq_4: irqshare 1 88 <1> irq_4: 0 00000056 EB10 jmp short %%1 0 00000058 00000000 dd 0 0 0000005C 4B42 dw 424bh 0 0000005E 00 db 0 0 0000005F EBCA jmp short retf%1 0 00000061 00 times 7 db 0 0 00000068 E8[0900] %%1: call general_irq_service_share 89 irq_5: irqshare 1 89 <1> irq_5: 0 0000006B EB10 jmp short %%1 0 0000006D 00000000 dd 0 0 00000071 4B42 dw 424bh 0 00000073 00 db 0 0 00000074 EBB5 jmp short retf%1 0 00000076 00 times 7 db 0 0 0000007D E8[0900] %%1: call general_irq_service_share 90 irq_6: irqshare 1 90 <1> irq_6: 0 00000080 EB10 jmp short %%1 0 00000082 00000000 dd 0 0 00000086 4B42 dw 424bh 0 00000088 00 db 0 0 00000089 EBA0 jmp short retf%1 0 0000008B 00 times 7 db 0 0 00000092 E8[0900] %%1: call general_irq_service_share 91 irq_0a: irqshare 2 91 <1> irq_0a: 0 00000095 EB10 jmp short %%1 0 00000097 00000000 dd 0 0 0000009B 4B42 dw 424bh 0 0000009D 00 db 0 0 0000009E EB5E jmp short retf%1 0 000000A0 00 times 7 db 0 0 000000A7 E8[0900] %%1: call general_irq_service_share 92 irq_0b: irqshare 2 92 <1> irq_0b: 0 000000AA EB10 jmp short %%1 0 000000AC 00000000 dd 0 0 000000B0 4B42 dw 424bh 0 000000B2 00 db 0 0 000000B3 EB49 jmp short retf%1 0 000000B5 00 times 7 db 0 0 000000BC E8[0900] %%1: call general_irq_service_share 93 irq_0c: irqshare 2 93 <1> irq_0c: 0 000000BF EB10 jmp short %%1 0 000000C1 00000000 dd 0 0 000000C5 4B42 dw 424bh 0 000000C7 00 db 0 0 000000C8 EB34 jmp short retf%1 0 000000CA 00 times 7 db 0 0 000000D1 E8[0900] %%1: call general_irq_service_share 94 irq_0e: irqshare 2 94 <1> irq_0e: 0 000000D4 EB10 jmp short %%1 0 000000D6 00000000 dd 0 0 000000DA 4B42 dw 424bh 0 000000DC 00 db 0 0 000000DD EB1F jmp short retf%1 0 000000DF 00 times 7 db 0 0 000000E6 E8[0900] %%1: call general_irq_service_share 95 irq_0f: irqshare 2 95 <1> irq_0f: 0 000000E9 EB10 jmp short %%1 0 000000EB 00000000 dd 0 0 000000EF 4B42 dw 424bh 0 000000F1 00 db 0 0 000000F2 EB0A jmp short retf%1 0 000000F4 00 times 7 db 0 0 000000FB E8[0900] %%1: call general_irq_service_share 0 000000FE CB retf2: retf 97 98 ; align to 100h to align _LOWTEXT for interrupt vectors 99 ; in kernel.asm 0 000000FF 00 times (100h - ($ - stack_size)) db 0 101 === Switch to base=000100h -> "_IO_TEXT" 102 segment _IO_TEXT 103 104 general_irq_service: 0 000004F6 53 push bx 0 000004F7 89E3 mov bx, sp 0 000004F9 368B5F02 mov bx, [ss:bx+2] ; return address->old ivec 0 000004FD EB0A jmp short common_irq 109 110 general_irq_service_share: 0 000004FF 53 push bx 0 00000500 89E3 mov bx, sp 0 00000502 368B5F02 mov bx, [ss:bx+2] ; return address->old ivec 0 00000506 83EB13 sub bx, byte irq_3 - irq_2 - 2 115 common_irq: 0 00000509 52 push dx 0 0000050A 50 push ax 0 0000050B 1E push ds 119 0 0000050C 8CC8 mov ax, cs 0 0000050E 8ED8 mov ds, ax 122 0 00000510 A1[0200] mov ax, [stack_top] 0 00000513 3B06[0400] cmp ax, [stack_offs] 0 00000517 762B jbe dont_switch 126 0 00000519 8CD2 mov dx, ss 0 0000051B 89E0 mov ax, sp 129 0 0000051D 8E16[0600] mov ss, [stack_seg] 0 00000521 8B26[0200] mov sp, [stack_top] 132 0 00000525 52 push dx ; save old SS:SP on new stack 0 00000526 50 push ax 135 0 00000527 A1[0000] mov ax, [stack_size] 0 0000052A 2906[0200] sub [stack_top], ax 138 0 0000052E 9C pushf 0 0000052F FF1F call far word [bx] 141 0 00000531 FA cli 0 00000532 0106[0200] add [stack_top], ax 144 0 00000536 58 pop ax ; get stored SS:SP 0 00000537 5A pop dx 147 0 00000538 8ED2 mov ss, dx ; switch back to old stack 0 0000053A 89C4 mov sp, ax 150 0 0000053C 1F return: pop ds ; restore registers and return 0 0000053D 58 pop ax 0 0000053E 5A pop dx 0 0000053F 5B pop bx 0 00000540 83C402 add sp, byte 2 0 00000543 CF iret 157 0 00000544 9C dont_switch: pushf 0 00000545 FF1F call far word [bx] 0 00000547 EBF3 jmp short return 161 162 === Switch to base=00E0E0h -> "INIT_TEXT" 163 segment INIT_TEXT 164 165 global _init_stacks 166 ; VOID init_stacks(VOID FAR *stack_base, COUNT nStacks, WORD stackSize); 167 0 000002D9 0208097075 int_numbers: db 2,8,9,70h,75h 0 000002DE 0A0B0C0D0E72737476 int_numbers_share: db 0ah,0bh,0ch,0dh,0eh,72h,73h,74h,76h,77h 0 000002E7 77 170 171 _init_stacks: 0 000002E8 55 push bp 0 000002E9 89E5 mov bp, sp 0 000002EB 1E push ds 0 000002EC 57 push di 0 000002ED 56 push si 177 178 0 000002EE B8[0000] mov ax,LGROUP 0 000002F1 8ED8 mov ds,ax 0 000002F3 8EC0 mov es,ax 182 0 000002F5 8B5E04 mov bx, [bp+4] 0 000002F8 8B5606 mov dx, [bp+6] 0 000002FB 8B4608 mov ax, [bp+8] 0 000002FE 8B4E0A mov cx, [bp+0ah] 187 0 00000301 890E[0000] mov [stack_size], cx 0 00000305 891E[0400] mov [stack_offs], bx 0 00000309 8916[0600] mov [stack_seg], dx 191 0 0000030D F7E1 mul cx 0 0000030F 01D8 add ax, bx 194 ; stack_top = stack_size * nStacks + stack_seg:stack_offs 0 00000311 A3[0200] mov [stack_top], ax 196 0 00000314 31C0 xor ax, ax 0 00000316 8ED8 mov ds, ax 199 0 00000318 BF[0B00] mov di, nmi + 3 0 0000031B BA[0800] mov dx, nmi 0 0000031E BB[0000] mov bx, int_numbers 0 00000321 B90500 mov cx, int_numbers_share - int_numbers 0 00000324 BD0700 mov bp, irq_1 - irq_0 0 00000327 E80F00 call set_vect 206 0 0000032A 42 inc dx ; skip over retf (not di: go from nmi+3 to irq_2+2) 0 0000032B B90A00 mov cx, _init_stacks - int_numbers_share 0 0000032E BD1500 mov bp, irq_3 - irq_2 0 00000331 E80500 call set_vect 211 0 00000334 5E pop si 0 00000335 5F pop di 0 00000336 1F pop ds 0 00000337 5D pop bp 0 00000338 C3 ret 217 218 ; set interrupt vectors: 219 ; in: es=LGROUP, ds=0 220 ; bx: pointer to int_numbers bytes in cs 221 ; cx: number of vectors to set 222 ; dx: pointer to es:nmi and so on (new interrupt vectors) 223 ; di: pointer to es:nmi+3 and so on (pointer to place of old interrupt vectors) 224 ; bp: difference in offset between irq structures 225 ; out: bx, si, di updated, cx=0, ax destroyed 226 set_vect: 0 00000339 2E8A07 mov al, [cs:bx] ; get next int vector offset 0 0000033C 43 inc bx 0 0000033D 98 cbw 0 0000033E 89C6 mov si, ax 0 00000340 D1E6 shl si, 1 0 00000342 D1E6 shl si, 1 ; now ds:si -> int vector, es:di -> nmi+3, etc 233 0 00000344 A5 movsw ; save old vector 0 00000345 A5 movsw 236 0 00000346 FA cli 0 00000347 8954FC mov [si-4], dx ; set new vector 0 0000034A 8C44FE mov [si-2], es 0 0000034D FB sti 241 0 0000034E 01EA add dx, bp 0 00000350 8D7BFC lea di, [di+bp-4] ; update di, compensating for movsw 0 00000353 E2E4 loop set_vect 245 0 00000355 C3 ret === Trace listing source: kernel.lst 1 ; 2 ; File: 3 ; kernel.asm 4 ; Description: 5 ; kernel start-up code 6 ; 7 ; Copyright (c) 1995, 1996 8 ; Pasquale J. Villani 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; You should have received a copy of the GNU General Public 24 ; License along with DOS-C; see the file COPYING. If not, 25 ; write to the Free Software Foundation, 675 Mass Ave, 26 ; Cambridge, MA 02139, USA. 27 ; 28 ; $Id: kernel.asm 1705 2012-02-07 08:10:33Z perditionc $ 29 ; 30 31 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 32 %include "stacks.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; stacks.inc 4 <1> ; Description: 5 <1> ; Macro support for register stack frame 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Id: stacks.inc 1591 2011-05-06 01:46:55Z bartoldeman $ 29 <1> ; 30 <1> 31 <1> ; 32 <1> ; Standard stack frame used throughout DOS-C 33 <1> ; 34 <1> ; MS-DOS specific 35 <1> ; 36 <1> ; +---------------+ 37 <1> ; | irp hi | 26 38 <1> ; +---------------+ 39 <1> ; | irp low | 24 40 <1> ; +---------------+ 41 <1> ; | flags | 22 42 <1> ; +---------------+ 43 <1> ; | cs | 20 44 <1> ; +---------------+ 45 <1> ; | ip | 18 46 <1> ; +---------------+ 47 <1> ; | es | 16 48 <1> ; +---------------+ 49 <1> ; | ds | 14 50 <1> ; +---------------+ 51 <1> ; | bp | 12 52 <1> ; +---------------+ 53 <1> ; | di | 10 54 <1> ; +---------------+ 55 <1> ; | si | 8 56 <1> ; +---------------+ 57 <1> ; | dx | 6 58 <1> ; +---------------+ 59 <1> ; | cx | 4 60 <1> ; +---------------+ 61 <1> ; | bx | 2 62 <1> ; +---------------+ 63 <1> ; | ax | 0 64 <1> ; +---------------+ 65 <1> ; 66 <1> 67 <1> ;; Note: The order of the pushed registers _must_ match with the definition 68 <1> ;; of the "iregs" structure within PCB.H, because a pointer to the last 69 <1> ;; pushed register is used as a pointer to a "iregs" structure within the 70 <1> ;; called C sources! -- 2000/03/22 ska 71 <1> 72 <1> ; Don't use `struc RegFrame' etc. here because it interferes with segment 73 <1> ; definitions. 74 <1> reg_ax equ 0 75 <1> reg_bx equ 2 76 <1> reg_cx equ 4 77 <1> reg_dx equ 6 78 <1> reg_si equ 8 79 <1> reg_di equ 10 80 <1> reg_bp equ 12 81 <1> reg_ds equ 14 82 <1> reg_es equ 16 83 <1> reg_ip equ 18 84 <1> reg_cs equ 20 85 <1> reg_flags equ 22 86 <1> irp_low equ 24 87 <1> irp_hi equ 26 88 <1> 89 <1> %macro PUSH$ALL 0 90 <1> push es 91 <1> push ds 92 <1> push bp 93 <1> push di 94 <1> push si 95 <1> push dx 96 <1> push cx 97 <1> push bx 98 <1> push ax 99 <1> %endmacro 100 <1> 101 <1> %macro POP$ALL 0 102 <1> pop ax 103 <1> pop bx 104 <1> pop cx 105 <1> pop dx 106 <1> pop si 107 <1> pop di 108 <1> pop bp 109 <1> pop ds 110 <1> pop es 111 <1> %endmacro 112 <1> 113 <1> ; I386.inc - 10/25/01 by tom ehlert 114 <1> ; 115 <1> ; compiling the kernel for 386 will (sometimes) change the 116 <1> ; high part of (some) registers, which will be (sometimes) be used 117 <1> ; later 118 <1> ; 119 <1> ; assumption: 120 <1> ; we have never seen MSVC to use anything but eax, ecx, edx, 121 <1> ; nor have we seen Borland C to use anything but eax, ebx, edx, 122 <1> ; so we only protect eax, ebx or ecx, edx to conserve stack space 123 <1> ; 124 <1> ; to save even more stack space, we save only HIGH part of regs 125 <1> ; at some expense of slower execution. it's easier anyway :-) 126 <1> ; 127 <1> ; WATCOM only uses FS: and GS: (using -zff and -zgf) and never 128 <1> ; any high part of the 386 registers 129 <1> ; 130 <1> 131 <1> 132 <1> %IF XCPU < 386 133 <1> ; no need to save/restore anything 134 <1> 135 <1> ; error 1 2 3 136 <1> %macro Protect386Registers 0 137 <1> %endmacro 138 <1> 139 <1> %assign Size386Registers 0 140 <1> 141 <1> %macro RestoreSP 0 142 <1> mov sp, bp 143 <1> %endmacro 144 <1> 145 <1> %macro Restore386Registers 0 146 <1> %endmacro 147 <1> 148 <1> %ELSE 149 <1> %ifdef WATCOM 150 <1> 151 <1> %macro Protect386Registers 0 152 <1> push fs 153 <1> push gs 154 <1> %endmacro 155 <1> 156 <1> %assign Size386Registers 4 157 <1> 158 <1> %macro RestoreSP 0 159 <1> lea sp, [bp - Size386Registers] 160 <1> %endmacro 161 <1> 162 <1> %macro Restore386Registers 0 163 <1> pop gs 164 <1> pop fs 165 <1> %endmacro 166 <1> 167 <1> %else 168 <1> 169 <1> %macro Protect386Registers 0 170 <1> push eax 171 <1> pop ax 172 <1> %ifdef MSCL8 173 <1> push ecx 174 <1> pop cx 175 <1> %else ;BC5 176 <1> push ebx 177 <1> pop bx 178 <1> %endif 179 <1> push edx 180 <1> pop dx 181 <1> %endmacro 182 <1> 183 <1> %assign Size386Registers 6 184 <1> 185 <1> %macro RestoreSP 0 186 <1> lea sp, [bp - Size386Registers] 187 <1> %endmacro 188 <1> 189 <1> %macro Restore386Registers 0 190 <1> push dx 191 <1> pop edx 192 <1> %ifdef MSCL8 193 <1> push cx 194 <1> pop ecx 195 <1> %else ;BC5 196 <1> push bx 197 <1> pop ebx 198 <1> %endif 199 <1> push ax 200 <1> pop eax 201 <1> %endmacro 202 <1> 203 <1> %endif 204 <1> %ENDIF 205 <1> 206 <1> ; macros to define stack arguments 207 <1> ; arg a, {b,4}, c 208 <1> ; defines a and c as "word" arguments and b as a "dword" argument 209 <1> ; for STDCALL defines .a as [bp+4], .b as [bp+6] and .c as [bp+10] 210 <1> ; for PASCAL defines .a as [bp+10], .b as [bp+6] and .c as [bp+4] 211 <1> ; 212 <1> ; popargs bx, {dx,ax}, cx pops these arguments of the stack (for PASCAL 213 <1> ; in reverse order). Here dx,ax is a dword argument dx:ax where dx is 214 <1> ; the high word. The caller is responsible for dealing with instruction 215 <1> ; pointer (ip) on the stack. 216 <1> 217 <1> %ifdef gcc 218 <1> %define STDCALL 219 <1> %else 220 <1> %define PASCAL 221 <1> %endif 222 <1> 223 <1> %macro definearg 1-2 2 224 <1> %xdefine .%1 bp+.argloc 225 <1> %assign .argloc .argloc+%2 226 <1> %endmacro 227 <1> 228 <1> %macro arg 1-* 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 239 <1> %endmacro 240 <1> 241 <1> %macro multipop 1-* 242 <1> %rep %0 243 <1> %rotate -1 244 <1> pop %1 245 <1> %endrep 246 <1> %endmacro 247 <1> 248 <1> %macro popargs 1-* 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 258 <1> %endmacro 33 %include "ludivmul.inc" 1 <1> ; this one adapted from elks, http://elks.sourceforge.net 2 <1> ; multiply cx:bx * dx:ax, result in dx:ax 3 <1> 4 <1> %macro LMULU 0 5 <1> 6 <1> push si 7 <1> push cx 8 <1> mov si, ax ; save _ax in si 9 <1> mov ax, bx ; cx:ax = _cx:_bx 10 <1> mul dx ; dx:ax = _bx*_dx (forget dx) 11 <1> xchg cx, ax ; cx = low(_dx*_bx) 12 <1> mul si ; dx:ax = _cx*_ax (forget dx) 13 <1> add cx, ax ; cx = low(_cx*_ax + _dx*_bx) 14 <1> mov ax, si ; restore _ax 15 <1> mul bx ; dx:ax = _bx*_ax 16 <1> add dx, cx ; dx = high(_bx*_ax)+low(_cx*_ax + _dx*_bx) 17 <1> pop cx 18 <1> pop si 19 <1> ret 20 <1> 21 <1> %endmacro 22 <1> 23 <1> ; divide dx:ax / cx:bx, quotient in dx:ax, remainder in cx:bx 24 <1> 25 <1> %macro LDIVMODU 0 26 <1> ; this one is adapted from an assembly gem: 27 <1> ; gem writer: Norbert Juffa, norbert.juffa@amd.com 28 <1> 29 <1> ; Dividing 64-bit unsigned integers Assembler / 80386 30 <1> 31 <1> ; Here is a division routine for dividing two 64-bit unsigned integers. 32 <1> ; I derived it by modifying some old 33 <1> ; 16-bit code for dividing 32-bit integers that I did several years ago for a 34 <1> ; Turbo-Pascal replacement library. 35 <1> ; If a 64-bit signed integer division is needed, appropriate shell code for 36 <1> ; this routine can easily be written. 37 <1> ; 38 <1> ; (adapted back to 32-bit by Bart Oldeman ;-)) 39 <1> ; 40 <1> ; __U4D divides two unsigned long numbers, the dividend and the divisor 41 <1> ; resulting in a quotient and a remainder. 42 <1> ; 43 <1> ; input: 44 <1> ; dx:ax = dividend 45 <1> ; cx:bx = divisor 46 <1> ; 47 <1> ; output: 48 <1> ; dx:ax = quotient of division of dividend by divisor 49 <1> ; cx:bx = remainder of division of dividend by divisor 50 <1> ; 51 <1> ; destroys: 52 <1> ; flags 53 <1> ; 54 <1> %ifdef STDCALL 55 <1> push bp 56 <1> mov bp, sp 57 <1> mov ax, [bp+6] 58 <1> mov dx, [bp+8] 59 <1> mov bx, [bp+10] 60 <1> mov cx, [bp+12] 61 <1> pop bp 62 <1> %endif 63 <1> 64 <1> test cx, cx ; divisor > 2^16-1 ? 65 <1> jnz %%big_divisor ; yes, divisor > 2^16-1 66 <1> cmp dx, bx ; only one division needed ? (cx = 0) 67 <1> jb %%one_div ; yes, one division sufficient 68 <1> 69 <1> 70 <1> xchg cx, ax ; save dividend-lo in cx, ax=0 71 <1> xchg ax, dx ; get dividend-hi in ax, dx=0 72 <1> div bx ; quotient-hi in ax 73 <1> xchg ax, cx ; cx = quotient-hi, ax =dividend-lo 74 <1> 75 <1> %%one_div: 76 <1> div bx ; ax = quotient-lo 77 <1> mov bx, dx ; bx = remainder-lo 78 <1> mov dx, cx ; dx = quotient-hi(quotient in dx:ax) 79 <1> xor cx, cx ; cx = remainder-hi (rem. in cx:bx) 80 <1> ret 81 <1> 82 <1> %%big_divisor: 83 <1> push si ; save temp 84 <1> push di ; variables 85 <1> push dx ; save 86 <1> push ax ; dividend 87 <1> mov si, bx ; divisor now in 88 <1> mov di, cx ; di:si and cx:bx 89 <1> %%shift_loop: 90 <1> shr dx, 1 ; shift both 91 <1> rcr ax, 1 ; dividend 92 <1> shr cx, 1 ; and divisor 93 <1> rcr bx, 1 ; right by 1 bit 94 <1> jnz %%shift_loop ; loop if di non-zero (rcr does not touch ZF) 95 <1> div bx ; compute quotient dx:ax>>x / cx:bx>>x (stored in ax; remainder in dx not used) 96 <1> pop bx ; get dividend lo-word 97 <1> mov cx, ax ; save quotient 98 <1> mul di ; quotient * divisor hi-word (low only) 99 <1> pop dx ; dividend high 100 <1> sub dx,ax ; dividend high - divisor high * quotient, no overflow (carry/borrow) possible here 101 <1> push dx ; save dividend high 102 <1> mov ax, cx ; ax=quotient 103 <1> mul si ; quotient * divisor lo-word 104 <1> sub bx, ax ; dividend-lo - (quot.*divisor-lo)-lo 105 <1> mov ax, cx ; get quotient 106 <1> pop cx ; restore dividend hi-word 107 <1> sbb cx, dx ; subtract (divisor-lo * quot.)-hi from dividend-hi 108 <1> sbb dx, dx ; 0 if remainder > 0, else FFFFFFFFh 109 <1> and si, dx ; nothing to add 110 <1> and di, dx ; back if remainder positive di:si := di:si(cx:bx) & dx:dx 111 <1> add bx, si ; correct remainder cx:bx += di:si 112 <1> adc cx, di ; and 113 <1> add ax, dx ; quotient if necessary ax += dx 114 <1> xor dx, dx ; clear hi-word of quot (ax<=FFFFh) dx := 0 115 <1> pop di ; restore temp 116 <1> pop si ; variables 117 <1> ret 118 <1> 119 <1> %endmacro 120 <1> 121 <1> %macro LSHLU 0 122 <1> pop bx 123 <1> popargs {dx,ax},cx 124 <1> push bx 125 <1> jcxz %%ret 126 <1> %%loop: shl ax, 1 127 <1> rcl dx, 1 128 <1> loop %%loop 129 <1> %%ret: ret 130 <1> %endmacro 131 <1> 132 <1> %macro LSHRU 0 133 <1> pop bx 134 <1> popargs {dx,ax},cx 135 <1> push bx 136 <1> jcxz %%ret 137 <1> %%loop: shr dx, 1 138 <1> rcr ax, 1 139 <1> loop %%loop 140 <1> %%ret: ret 141 <1> %endmacro 34 35 === Switch to base=000000h -> "PSP" 36 segment PSP 37 38 extern _ReqPktPtr 39 40 STACK_SIZE equ 384/2 ; stack allocated in words 41 42 ;************************************************************ 43 ; KERNEL BEGINS HERE, i.e. this is byte 0 of KERNEL.SYS 44 ;************************************************************ 45 46 %ifidn __OUTPUT_FORMAT__, obj 47 ..start: 48 %endif 49 bootloadunit: ; (byte of short jump re-used) 50 entry: 0 00000000 EB1E jmp short realentry 52 53 ;************************************************************ 54 ; KERNEL CONFIGURATION AREA 55 ; this is copied up on the very beginning 56 ; it's a good idea to keep this in sync with KConfig.h 57 ;************************************************************ 58 global _LowKernelConfig 59 _LowKernelConfig: 60 config_signature: 0 00000002 434F4E464947 db 'CONFIG' ; constant 0 00000008 0F00 dw configend-configstart; size of config area 63 ; to be checked !!! 64 65 configstart: 66 0 0000000A 00 DLASortByDriveNo db 0 ; sort disks by drive order 0 0000000B 01 InitDiskShowDriveAssignment db 1 ; 0 0000000C 02 SkipConfigSeconds db 2 ; 0 0000000D 00 ForceLBA db 0 ; 0 0000000E 01 GlobalEnableLBAsupport db 1 ; 0 0000000F 00 BootHarddiskSeconds db 0 ; 73 74 ; The following VERSION resource must be keep in sync with VERSION.H 0 00000010 FD Version_OemID db 0xFD ; OEM_ID 0 00000011 02 Version_Major db 2 0 00000012 2B00 Version_Revision dw 43 ; REVISION_SEQ 0 00000014 0100 Version_Release dw 1 ; 0=release build, >0=svn# 79 0 00000016 00 CheckDebugger: db 0 ; 0 = no check, 1 = check, 2 = assume present 0 00000017 00 Verbose db 0 ; -1 = quiet, 0 = normal, 1 = verbose 82 0 00000018 1F PartitionMode db 0x1f ; bits 0-1: 01=GPT if found, 00=MBR if found, 11=Hybrid, GPT first then MBR, 10=Hybrid, MBR first then GPT 84 ; in hybrid mode, EE partitions ignored, drives assigned by GPT or MBR first based on hybrid type 85 ; bits 2-4: 001=mount ESP (usually FAT32) partition, 010=mount MS Basic partitions, 100=mount unknown partitions 86 ; 111=attempt to mount all paritions, 110=attempt to mount all but ESP partitions 87 ; bits 5-7: reserved, 0 else undefined behavior 88 89 configend: 90 kernel_config_size: equ configend - config_signature 91 ; must be below-or-equal the size of struct _KernelConfig 92 ; in the file kconfig.h ! 93 0 00000019 00 times (32 - 4) - ($ - $$) db 0 0 0000001C 00000000 bootloadstack: dd 0 96 97 98 ;************************************************************ 99 ; KERNEL CONFIGURATION AREA END 100 ;************************************************************ 101 102 103 ;************************************************************ 104 ; KERNEL real entry (at ~60:20) 105 ; 106 ; moves the INIT part of kernel.sys to high memory (~9000:0) 107 ; then jumps there 108 ; to aid debugging, some '123' messages are output 109 ; this area is discardable and used as temporary PSP for the 110 ; init sequence 111 ;************************************************************ 112 113 cpu 8086 ; (keep initial entry compatible) 114 115 global realentry 116 realentry: ; execution continues here 0 00000020 0E push cs 0 00000021 1F pop ds 0 00000022 31FF xor di, di 0 00000024 881D mov byte [di + bootloadunit - $$], bl 0 00000026 55 push bp 0 00000027 89651C mov word [di + bootloadstack - $$], sp 0 0000002A 8C551E mov word [di + bootloadstack + 2 - $$], ss 0 0000002D E99000 jmp entry_common 125 126 0 00000030 90 times 0C0h - ($ - $$) nop ; magic offset (used by exeflat) 128 entry_common: 129 %ifndef QUIET 0 000000C0 50 push ax 0 000000C1 53 push bx 0 000000C2 9C pushf 0 000000C3 B8310E mov ax, 0e31h ; '1' Tracecode - kernel entered 0 000000C6 BBF000 mov bx, 00f0h 0 000000C9 CD10 int 010h 0 000000CB 9D popf 0 000000CC 5B pop bx 0 000000CD 58 pop ax 139 %endif 140 0 000000CE 0E push cs 0 000000CF 1F pop ds 0 000000D0 EA[0000][0000] jmp IGROUP:kernel_start 144 0 000000D5 00 beyond_entry: times 256-(beyond_entry-entry) db 0 146 ; scratch area for data (DOS_PSP) 147 _master_env equ $ - 128 148 global _master_env 149 === Switch to base=00E0E0h -> "INIT_TEXT" 150 segment INIT_TEXT 151 152 %ifdef TEST_FILL_INIT_TEXT 153 %macro step 0 154 %if _LFSR & 1 155 %assign _LFSR (_LFSR >> 1) ^ 0x80200003 156 %else 157 %assign _LFSR (_LFSR >> 1) 158 %endif 159 %endmacro 160 161 align 16 162 %assign _LFSR 1 163 %rep 1024 * 8 164 dd _LFSR 165 step 166 %endrep 167 %endif 168 169 extern _FreeDOSmain 170 extern _query_cpu 171 172 ; 173 ; kernel start-up 174 ; 175 kernel_start: 0 00000000 FC cld 177 178 %ifndef QUIET 0 00000001 53 push bx 0 00000002 9C pushf 0 00000003 B8320E mov ax, 0e32h ; '2' Tracecode - kernel entered 0 00000006 BBF000 mov bx, 00f0h 0 00000009 CD10 int 010h 0 0000000B 9D popf 0 0000000C 5B pop bx 186 %endif 187 188 189 extern _kernel_command_line 190 191 ; INP: ds => entry section, with CONFIG block 192 ; and compressed entry help data 193 ; (actually always used now) 194 initialise_command_line_buffer: 0 0000000D BA[0000] mov dx, I_GROUP 0 00000010 8EC2 mov es, dx 197 0 00000012 8A1E[0000] mov bl, [bootloadunit] 0 00000016 C536[1C00] lds si, [bootloadstack] ; -> original ss:sp - 2 0 0000001A 8D4402 lea ax, [si + 2] ; ax = original sp 0 0000001D 8B34 mov si, word [si] ; si = original bp 202 203 ; Note that the kernel command line buffer in 204 ; the init data segment is pre-initialised to 205 ; hold 0x00 0xFF in the first two bytes. This 206 ; is used to indicate no command line present, 207 ; as opposed to an empty command line which 208 ; will hold 0x00 0x00. 209 ; If any of the branches to .none are taken then 210 ; the buffer is not modified so it retains the 211 ; 0x00 0xFF contents. 0 0000001F 81FE1401 cmp si, 114h ; buffer fits below ss:bp ? 0 00000023 7222 jb .none ; no --> 0 00000025 817CEC434C cmp word [si - 14h], "CL" ; signature passed to us ? 0 0000002A 751B jne .none ; no --> 0 0000002C 8DB4ECFE lea si, [si - 114h] ; -> command line buffer 0 00000030 39F0 cmp ax, si ; stack top starts below-or-equal buffer ? 0 00000032 7713 ja .none ; no --> 0 00000034 BF[0000] mov di, _kernel_command_line ; our buffer 0 00000037 B9FF00 mov cx, 255 0 0000003A 31C0 xor ax, ax 0 0000003C 57 push di 0 0000003D F3A4 rep movsb ; copy up to 255 bytes 0 0000003F AA stosb ; truncate 0 00000040 5F pop di 0 00000041 B501 mov ch, 1 ; cx = 256 0 00000043 F2AE repne scasb ; scan for terminator 0 00000045 F3AA rep stosb ; clear remainder of buffer 229 ; (make sure we do not have 0x00 0xFF 230 ; even if the command line given is 231 ; actually the empty string) 232 .none: 233 0 00000047 FA cli 0 00000048 8ED2 mov ss, dx 0 0000004A BC[0004] mov sp, init_tos 0 0000004D CD12 int 12h ; move init text+data to higher memory 0 0000004F B106 mov cl,6 0 00000051 D3E0 shl ax,cl ; convert kb to para 0 00000053 BA[0F00] mov dx,15 + INITSIZE 0 00000056 B104 mov cl,4 0 00000058 D3EA shr dx,cl 0 0000005A 29D0 sub ax,dx 0 0000005C 8EC0 mov es,ax 0 0000005E BA[0000] mov dx,INITTEXTSIZE ; para aligned 0 00000061 D3EA shr dx,cl 0 00000063 01D0 add ax,dx 0 00000065 8ED0 mov ss,ax ; set SS to init data segment 0 00000067 FB sti ; now enable them 0 00000068 8CC8 mov ax,cs 0 0000006A BA[0000] mov dx,__HMATextEnd ; para aligned 0 0000006D D3EA shr dx,cl 253 %ifdef WATCOM 254 add ax,dx 255 %endif 0 0000006F 8ED8 mov ds,ax 0 00000071 BE[FEFF] mov si,-2 + INITSIZE; word aligned 0 00000074 8D4C02 lea cx,[si+2] 0 00000077 89F7 mov di,si 0 00000079 D1E9 shr cx,1 0 0000007B FD std ; if there's overlap only std is safe 0 0000007C F3A5 rep movsw 263 264 ; move HMA_TEXT to higher memory 0 0000007E 29D0 sub ax,dx 0 00000080 8ED8 mov ds,ax ; ds = HMA_TEXT 0 00000082 8CC0 mov ax,es 0 00000084 29D0 sub ax,dx 0 00000086 8EC0 mov es,ax ; es = new HMA_TEXT 270 0 00000088 BE[FEFF] mov si,-2 + __HMATextEnd 0 0000008B 8D4C02 lea cx,[si+2] 0 0000008E 89F7 mov di,si 0 00000090 D1E9 shr cx,1 0 00000092 F3A5 rep movsw 276 0 00000094 FC cld 278 %ifndef WATCOM ; for WATCOM: CS equal for HMA and INIT 0 00000095 01D0 add ax,dx 0 00000097 8EC0 mov es,ax ; otherwise CS -> init_text 281 %endif 0 00000099 06 push es 0 0000009A B8[9F00] mov ax,cont 0 0000009D 50 push ax 0 0000009E CB retf 286 cont: ; Now set up call frame 0 0000009F 2E8E1E[E900] mov ds,[cs:_INIT_DGROUP] 0 000000A4 89E5 mov bp,sp ; and set up stack frame for c 289 290 %ifndef QUIET 0 000000A6 53 push bx 0 000000A7 9C pushf 0 000000A8 B8330E mov ax, 0e33h ; '3' Tracecode - kernel entered 0 000000AB BBF000 mov bx, 00f0h 0 000000AE CD10 int 010h 0 000000B0 9D popf 0 000000B1 5B pop bx 298 %endif 299 0 000000B2 881E[6900] mov byte [_BootDrive],bl ; tell where we came from 301 302 ;!! int 11h 303 ;!! mov cl,6 304 ;!! shr al,cl 305 ;!! inc al 306 ;!! mov byte [_NumFloppies],al ; and how many 307 0 000000B6 E8[0000] call _query_cpu 309 %if XCPU != 86 310 %if XCPU < 186 || (XCPU % 100) != 86 || (XCPU / 100) > 9 311 %fatal Unknown CPU level defined 312 %endif 313 cmp al, (XCPU / 100) 314 jb cpu_abort ; if CPU not supported --> 315 316 cpu XCPU 317 %endif 0 000000B9 A2[6A00] mov [_CPULevel], al 319 320 initialise_kernel_config: 321 extern _InitKernelConfig 322 0 000000BC 8CD0 mov ax, ss ; => init data segment 0 000000BE BE6000 mov si, 60h 0 000000C1 8EDE mov ds, si ; => entry section 0 000000C3 BE[0200] mov si, _LowKernelConfig ; -> our CONFIG block 0 000000C6 8EC0 mov es, ax ; => init data segment 0 000000C8 BF[0000] mov di, _InitKernelConfig ; -> init's CONFIG block buffer 0 000000CB B90B00 mov cx, kernel_config_size / 2 ; size that we support 0 000000CE F3A5 rep movsw ; copy it over 331 %if kernel_config_size & 1 0 000000D0 A4 movsb ; allow odd size 333 %endif 0 000000D1 8ED8 mov ds, ax ; => init data segment 335 336 check_debugger_present: 337 extern _debugger_present 338 0 000000D3 B001 mov al, 1 ; assume debugger present 0 000000D5 807DFD01 cmp byte [di - kernel_config_size + (CheckDebugger - config_signature)], 1 0 000000D9 7708 ja .skip_ints_00_06 ; 2 means assume present 0 000000DB 7204 jb .absent ; 0 means assume absent 0 000000DD F8 clc ; 1 means check 0 000000DE CC int3 ; break to debugger 0 000000DF 7202 jc .skip_ints_00_06 346 ; The debugger should set CY here to indicate its 347 ; presence. The flag set is checked later to skip 348 ; overwriting the interrupt vectors 00h, 01h, 03h, 349 ; and 06h. This logic is taken from lDOS init. 350 .absent: 0 000000E1 31C0 xor ax, ax ; no debugger present 352 .skip_ints_00_06: 0 000000E3 A2[0000] mov byte [_debugger_present], al 354 0 000000E6 E9[0000] jmp _FreeDOSmain 356 357 %if XCPU != 86 358 cpu 8086 359 360 cpu_abort: 361 mov ah, 0Fh 362 int 10h ; get video mode, bh = active page 363 364 call .first ; print string that follows (address pushed by call) 365 366 %define LOADNAME "FreeDOS" 367 db 13,10 ; (to emit a blank line after the tracecodes) 368 db 13,10 369 db LOADNAME, " load error: An 80", '0'+(XCPU / 100) 370 db "86 processor or higher is required by this build.",13,10 371 db "To use ", LOADNAME, " on this processor please" 372 db " obtain a compatible build.",13,10 373 db 13,10 374 db "Press any key to reboot.",13,10 375 db 0 376 377 .display: 378 mov ah, 0Eh 379 mov bl, 07h ; page in bh, bl = colour for some modes 380 int 10h ; write character (may change bp!) 381 382 db 0A8h ; [test al,imm8] skip "pop si" [=imm8] after the first iteration 383 .first: 384 pop si ; (first iteration only) get message address from stack 385 cs lodsb ; get character 386 test al, al ; zero ? 387 jnz .display ; no, display and get next character --> 388 389 xor ax, ax 390 xor dx, dx 391 int 13h ; reset floppy disks 392 xor ax, ax 393 mov dl, 80h 394 int 13h ; reset hard disks 395 396 ; this "test ax, imm16" opcode is used to 397 db 0A9h ; skip "sti" \ "hlt" [=imm16] during first iteration 398 .wait: 399 sti 400 hlt ; idle while waiting for keystroke 401 mov ah, 01h 402 int 16h ; get keystroke 403 jz .wait ; none available, loop --> 404 405 mov ah, 00h 406 int 16h ; remove keystroke from buffer 407 408 int 19h ; reboot 409 jmp short $ ; (in case it returns, which it shouldn't) 410 411 cpu XCPU 412 %endif ; XCPU != 86 413 414 === Switch to base=00E0E0h -> "INIT_TEXT_END" 415 segment INIT_TEXT_END 416 417 418 ;************************************************************ 419 ; KERNEL CODE AREA END 420 ; the NUL device 421 ;************************************************************ 422 === Switch to base=000790h -> "CONST" 423 segment CONST 424 425 ; 426 ; NUL device strategy 427 ; 428 global _nul_strtgy 429 extern GenStrategy 430 _nul_strtgy: 0 000012B2 EA[0000][0000] jmp LGROUP:GenStrategy 432 433 ; 434 ; NUL device interrupt 435 ; 436 global _nul_intr 437 _nul_intr: 0 000012B7 06 push es 0 000012B8 53 push bx 0 000012B9 BB[0000] mov bx,LGROUP 0 000012BC 8EC3 mov es,bx 0 000012BE 26C41E[0000] les bx,[es:_ReqPktPtr] ;es:bx--> rqheadr 0 000012C3 26807F0204 cmp byte [es:bx+2],4 ;if read, set 0 read 0 000012C8 7506 jne no_nul_read 0 000012CA 26C747120000 mov word [es:bx+12h],0 446 no_nul_read: 0 000012D0 26814F030001 or word [es:bx+3],100h ;set "done" flag 0 000012D6 5B pop bx 0 000012D7 07 pop es 0 000012D8 CB retf 451 === Switch to base=000100h -> "_LOWTEXT" 452 segment _LOWTEXT 453 454 ; low interrupt vectors 10h,13h,15h,19h,1Bh 455 ; these need to be at 0070:0100 (see RBIL memory.lst) 456 global _intvec_table 0 00000100 10 _intvec_table: db 10h 0 00000101 00000000 dd 0 459 ; used by int13 handler and get/set via int 2f/13h 460 global _BIOSInt13 ; BIOS provided disk handler 461 global _UserInt13 ; actual disk handler used by kernel 0 00000105 13 db 13h 0 00000106 00000000 _BIOSInt13: dd 0 0 0000010A 15 db 15h 0 0000010B 00000000 dd 0 466 ; used for cleanup on reboot 467 global _BIOSInt19 0 0000010F 19 db 19h 0 00000110 00000000 _BIOSInt19: dd 0 0 00000114 1B db 1Bh 0 00000115 00000000 dd 0 472 ; default to using BIOS provided disk handler 0 00000119 13 db 13h 0 0000011A 00000000 _UserInt13: dd 0 475 476 ; floppy parameter table 477 global _int1e_table 0 0000011E 00 _int1e_table: times 0eh db 0 479 480 ;************************************************************ 481 ; KERNEL FIXED DATA AREA 482 ;************************************************************ 483 484 === Switch to base=000790h -> "_FIXED_DATA" 485 segment _FIXED_DATA 486 487 ; Because of the following bytes of data, THIS MODULE MUST BE THE FIRST 488 ; IN THE LINK SEQUENCE. THE BYTE AT DS:0004 determines the SDA format in 489 ; use. A 0 indicates MS-DOS 3.X style, a 1 indicates MS-DOS 4.0-6.X style. 490 global DATASTART 491 DATASTART: 492 global _DATASTART 493 _DATASTART: 0 00000000 00 dos_data db 0 0 00000001 [0000] dw kernel_start 0 00000003 00 db 0 ; padding 0 00000004 0100 dw 1 ; Hardcoded MS-DOS 4.0+ style 498 0 00000006 00 times (0eh - ($ - DATASTART)) db 0 500 global _NetBios 0 0000000E 0000 _NetBios dw 0 ; NetBios Number 502 0 00000010 00 times (26h - 0ch - ($ - DATASTART)) db 0 504 505 ; Globally referenced variables - WARNING: DO NOT CHANGE ORDER 506 ; BECAUSE THEY ARE DOCUMENTED AS UNDOCUMENTED (?) AND HAVE 507 ; MANY MULTIPLEX PROGRAMS AND TSRs ACCESSING THEM 508 global _NetRetry 0 0000001A 0300 _NetRetry dw 3 ;-000c network retry count 510 global _NetDelay 0 0000001C 0100 _NetDelay dw 1 ;-000a network delay count 512 global _DskBuffer 0 0000001E FFFFFFFF _DskBuffer dd -1 ;-0008 current dos disk buffer 514 global _inputptr 0 00000022 0000 _inputptr dw 0 ;-0004 Unread con input 516 global _first_mcb 0 00000024 0000 _first_mcb dw 0 ;-0002 Start of user memory 518 global _DPBp 519 global MARK0026H 520 ; A reference seems to indicate that this should start at offset 26h. 521 MARK0026H equ $ 0 00000026 FFFFFFFF _DPBp dd -1 ; 0000 First drive Parameter Block 523 global _sfthead 0 0000002A 00000000 _sfthead dd 0 ; 0004 System File Table head 525 global _clock 0 0000002E 00000000 _clock dd 0 ; 0008 CLOCK$ device 527 global _syscon 0 00000032 [0000][0000] _syscon dw _con_dev,LGROUP ; 000c console device 529 global _maxsecsize 0 00000036 0002 _maxsecsize dw 512 ; 0010 maximum bytes/sector of any block device 0 00000038 00000000 dd 0 ; 0012 pointer to buffers info structure 532 global _CDSp 0 0000003C 00000000 _CDSp dd 0 ; 0016 Current Directory Structure 534 global _FCBp 0 00000040 00000000 _FCBp dd 0 ; 001a FCB table pointer 536 global _nprotfcb 0 00000044 0000 _nprotfcb dw 0 ; 001e number of protected fcbs 538 global _nblkdev 0 00000046 00 _nblkdev db 0 ; 0020 number of block devices 540 global _lastdrive 0 00000047 00 _lastdrive db 0 ; 0021 value of last drive 542 global _nul_dev 543 _nul_dev: ; 0022 device chain root 544 extern _con_dev 0 00000048 [0000][0000] dw _con_dev, LGROUP 546 ; next is con_dev at init time. 0 0000004C 0480 dw 8004h ; attributes = char device, NUL bit set 0 0000004E [0000] dw _nul_strtgy 0 00000050 [0500] dw _nul_intr 0 00000052 4E554C2020202020 db 'NUL ' 551 global _njoined 0 0000005A 00 _njoined db 0 ; 0034 number of joined devices 0 0000005B 0000 dw 0 ; 0035 DOS 4 near pointer to special names (always zero in DOS 5) [setver precursor] 554 global _setverPtr 0 0000005D 00000000 _setverPtr dw 0,0 ; 0037 setver list (far pointer, set by setver driver) 0 00000061 0000 dw 0 ; 003B cs offset for fix a20 0 00000063 0000 dw 0 ; 003D psp of last umb exec 558 global _LoL_nbuffers 0 00000065 0100 _LoL_nbuffers dw 1 ; 003F number of buffers 0 00000067 0100 dw 1 ; 0041 size of pre-read buffer 561 global _BootDrive 0 00000069 01 _BootDrive db 1 ; 0043 drive we booted from 563 564 global _CPULevel 0 0000006A 00 _CPULevel db 0 ; 0044 cpu type (MSDOS >0 indicates dword moves ok, ie 386+) 566 ; unless compatibility issues arise FD uses 567 ; 0=808x, 1=18x, 2=286, 3=386+ 568 ; see cpu.asm, use >= as may add checks for 486 ... 569 0 0000006B 0000 dw 0 ; 0045 Extended memory in KBytes 571 buf_info: 572 global _firstbuf 0 0000006D 00000000 _firstbuf dd 0 ; 0047 disk buffer chain 0 00000071 0000 dw 0 ; 004B Number of dirty buffers 0 00000073 00000000 dd 0 ; 004D pre-read buffer 0 00000077 0000 dw 0 ; 0051 number of look-ahead buffers 577 global _bufloc 0 00000079 00 _bufloc db 0 ; 0053 00=conv 01=HMA 579 global _deblock_buf 0 0000007A 00000000 _deblock_buf dd 0 ; 0054 deblock buffer 0 0000007E 00 times 3 db 0 ; 0058 unknown 0 00000081 0000 dw 0 ; 005B unknown 0 00000083 00FF00 db 0, 0FFh, 0 ; 005D unknown 584 global _VgaSet 0 00000086 00 _VgaSet db 0 ; 0060 unknown 0 00000087 0000 dw 0 ; 0061 unknown 587 global _uppermem_link 0 00000089 00 _uppermem_link db 0 ; 0063 upper memory link flag 0 0000008A 0000 _min_pars dw 0 ; 0064 minimum paragraphs of memory 590 ; required by program being EXECed 591 global _uppermem_root 0 0000008C FFFF _uppermem_root dw 0ffffh ; 0066 dmd_upper_root (usually 9fff) 0 0000008E 0000 _last_para dw 0 ; 0068 para of last mem search 594 SysVarEnd: 595 596 ;; FreeDOS specific entries 597 ;; all variables below this point are subject to relocation. 598 ;; programs should not rely on any values below this point!!! 599 600 global _os_setver_minor 0 00000090 00 _os_setver_minor db 0 602 global _os_setver_major 0 00000091 05 _os_setver_major db 5 604 global _os_minor 0 00000092 00 _os_minor db 0 606 global _os_major 0 00000093 05 _os_major db 5 0 00000094 00 _rev_number db 0 609 global _version_flags 0 00000095 00 _version_flags db 0 611 612 global os_release 613 extern _os_release 0 00000096 [0000] os_release dw _os_release 615 616 %IFDEF WIN31SUPPORT 617 global _winStartupInfo, _winInstanced 618 _winInstanced dw 0 ; set to 1 on WinInit broadcast, 0 on WinExit broadcast 619 _winStartupInfo: 620 dw 0 ; structure version (same as windows version) 621 dd 0 ; next startup info structure, 0:0h marks end 622 dd 0 ; far pointer to name virtual device file or 0:0h 623 dd 0 ; far pointer, reference data for virtual device driver 624 %ifnidni __OUTPUT_FORMAT__, elf 625 dw instance_table,seg instance_table ; array of instance data 626 %else 627 dw instance_table ; array of instance data 628 global _winseg1 629 _winseg1: dw 0 630 %endif 631 instance_table: ; should include stacks, Win may auto determine SDA region 632 ; we simply include whole DOS data segment 633 %ifnidni __OUTPUT_FORMAT__, elf 634 dw seg _DATASTART, 0 ; [SEG:OFF] address of region's base 635 dw _markEndInstanceData wrt seg _DATASTART ; size in bytes 636 %else 637 global _winseg2 638 _winseg2: dw 0 639 dw 0 ; [SEG:OFF] address of region's base 640 global _winseg3 641 _winseg3: dw 0 ; size in bytes 642 %endif 643 dd 0 ; 0 marks end of table 644 dw 0 ; and 0 length for end of instance_table entry 645 global _winPatchTable 646 _winPatchTable: ; returns offsets to various internal variables 647 dw 0x0006 ; DOS version, major# in low byte, eg. 6.00 648 dw save_DS ; where DS stored during int21h dispatch 649 dw save_BX ; where BX stored during int21h dispatch 650 dw _InDOS ; offset of InDOS flag 651 dw _MachineId ; offset to variable containing MachineID 652 dw _CritPatch ; offset of to array of offsets to patch 653 ; NOTE: this points to a null terminated 654 ; array of offsets of critical section bytes 655 ; to patch, for now we can just point this 656 ; to an empty table 657 ; ie we just point to a 0 word to mark end 658 dw _uppermem_root ; seg of last arena header in conv memory 659 ; this matches MS DOS's location, but 660 ; do we have the same meaning? 661 %ENDIF ; WIN31SUPPORT 662 663 ;; The first 5 sft entries appear to have to be at DS:00cc 0 00000098 00 times (0cch - ($ - DATASTART)) db 0 665 global _firstsftt 666 _firstsftt: 0 000000CC FFFFFFFF dd -1 ; link to next 0 000000D0 0500 dw 5 ; count 0 000000D2 00 times 5*59 db 0 ; reserve space for the 5 sft entries 0 000001F9 00 db 0 ; pad byte so next value on even boundary 671 672 ; Some references seem to indicate that this data should start at 01fbh in 673 ; order to maintain 100% MS-DOS compatibility. 0 000001FA 00 times (01fbh - ($ - DATASTART)) db 0 675 676 global MARK01FBH 677 MARK01FBH equ $ 678 global _local_buffer ; local_buffer is 256 bytes long 679 ; so it overflows into kb_buf!! 680 ; only when kb_buf is used, local_buffer is limited to 128 bytes. 0 000001FB 00 _local_buffer: times 128 db 0 682 global _kb_buf 0 0000027B 8000 _kb_buf db 128,0 ; initialise buffer to empty 0 0000027D 00 times 128+1 db 0 ; room for 128 byte readline + LF 685 ; 686 ; Variables that follow are documented as part of the DOS 4.0-6.X swappable 687 ; data area in Ralf Browns Interrupt List #56 688 ; 689 ; this byte is used for ^P support 690 global _PrinterEcho 0 000002FE 00 _PrinterEcho db 0 ;-34 - 0 = no printer echo, ~0 echo 692 global _verify_ena 0 000002FF 00 _verify_ena db 0 ; ~0, write with verify 694 695 ; this byte is used for TABs (shared by all char device writes??) 696 global _scr_pos 0 00000300 00 _scr_pos db 0 ; Current Cursor Column 698 global _switchar 0 00000301 2F _switchar db '/' ;-31 - switch char 700 global _mem_access_mode 0 00000302 00 _mem_access_mode db 0 ;-30 - memory allocation strategy 702 global sharing_flag 0 00000303 00 sharing_flag db 0 ; 00 = sharing module not loaded 704 ; 01 = sharing module loaded, but 705 ; open/close for block devices 706 ; disabled 707 ; FF = sharing module loaded, 708 ; open/close for block devices 709 ; enabled (not implemented) 710 global _net_set_count 0 00000304 01 _net_set_count db 1 ;-28 - count the name below was set 712 global _net_name 0 00000305 202020202020202020 _net_name db ' ' ;-27 - 15 Character Network Name 0 0000030E 202020202020 0 00000314 00 db 00 ; Terminating 0 byte 715 716 717 ; 718 ; Variables contained the the "STATE_DATA" segment contain 719 ; information about the STATE of the current DOS Process. These 720 ; variables must be preserved regardless of the state of the INDOS 721 ; flag. 722 ; 723 ; All variables that appear in "STATE_DATA" **MUST** be declared 724 ; in this file as the offsets from the INTERNAL_DATA variable are 725 ; critical to the DOS applications that modify this data area. 726 ; 727 ; 728 global _ErrorMode, _InDOS 729 global _CritErrLocus, _CritErrCode 730 global _CritErrAction, _CritErrClass 731 global _CritErrDev, _CritErrDrive 732 global _dta 733 global _cu_psp, _default_drive 734 global _break_ena 735 global _return_code 736 global _internal_data 737 738 ; ensure offset of critical patch table remains fixed, some programs hard code offset 739 times (0315h - ($ - DATASTART)) db 0 740 global _CritPatch 0 00000315 0000 _CritPatch dw 0 ;-11 zero list of patched critical 0 00000317 0000 dw 0 ; section variables 0 00000319 0000 dw 0 ; DOS puts 0d0ch here but some 0 0000031B 0000 dw 0 ; progs really write to that addr. 0 0000031D 0000 dw 0 ;-03 - critical patch list terminator 0 0000031F 90 db 90h ;-01 - unused, NOP pad byte 747 _internal_data: ; <-- Address returned by INT21/5D06 0 00000320 00 _ErrorMode db 0 ; 00 - Critical Error Flag 0 00000321 00 _InDOS db 0 ; 01 - Indos Flag 0 00000322 00 _CritErrDrive db 0 ; 02 - Drive on write protect error 0 00000323 00 _CritErrLocus db 0 ; 03 - Error Locus 0 00000324 0000 _CritErrCode dw 0 ; 04 - DOS format error Code 0 00000326 00 _CritErrAction db 0 ; 06 - Error Action Code 0 00000327 00 _CritErrClass db 0 ; 07 - Error Class 0 00000328 00000000 _CritErrDev dd 0 ; 08 - Failing Device Address 0 0000032C 00000000 _dta dd 0 ; 0C - current DTA 0 00000330 0000 _cu_psp dw 0 ; 10 - Current PSP 0 00000332 0000 break_sp dw 0 ; 12 - used in int 23 0 00000334 0000 _return_code dw 0 ; 14 - return code from process 0 00000336 00 _default_drive db 0 ; 16 - Current Drive 0 00000337 01 _break_ena db 1 ; 17 - Break Flag (default TRUE) 0 00000338 00 db 0 ; 18 - flag, code page switching 0 00000339 00 db 0 ; 19 - flag, copy of 18 on int 24h abort 764 765 global _swap_always, _swap_indos 766 _swap_always: 767 768 global _Int21AX 0 0000033A 0000 _Int21AX dw 0 ; 1A - AX from last Int 21 770 771 global owning_psp, _MachineId 0 0000033C 0000 owning_psp dw 0 ; 1C - owning psp 0 0000033E 0000 _MachineId dw 0 ; 1E - remote machine ID 0 00000340 0000 dw 0 ; 20 - First usable mcb 0 00000342 0000 dw 0 ; 22 - Best usable mcb 0 00000344 0000 dw 0 ; 24 - Last usable mcb 0 00000346 0000 dw 0 ; 26 - memory size in paragraphs 0 00000348 0000 dw 0 ; 28 - unknown 0 0000034A 00 db 0 ; 2A - unknown 0 0000034B 00 db 0 ; 2B - unknown 0 0000034C 00 db 0 ; 2C - unknown 782 global _break_flg 0 0000034D 00 _break_flg db 0 ; 2D - Program aborted by ^C 0 0000034E 00 db 0 ; 2E - unknown 0 0000034F 00 db 0 ; 2F - not referenced 786 global _DayOfMonth 0 00000350 01 _DayOfMonth db 1 ; 30 - day of month 788 global _Month 0 00000351 01 _Month db 1 ; 31 - month 790 global _YearsSince1980 0 00000352 0000 _YearsSince1980 dw 0 ; 32 - year since 1980 0 00000354 FFFF daysSince1980 dw 0FFFFh ; 34 - number of days since epoch 793 ; force rebuild on first clock read 794 global _DayOfWeek 0 00000356 02 _DayOfWeek db 2 ; 36 - day of week 0 00000357 00 _console_swap db 0 ; 37 console swapped during read from dev 797 global _dosidle_flag 0 00000358 01 _dosidle_flag db 1 ; 38 - safe to call int28 if nonzero 799 global _abort_progress 0 00000359 00 _abort_progress db 0 ; 39 - abort in progress 801 global _CharReqHdr 802 _CharReqHdr: 803 global _ClkReqHdr 0 0000035A 00 _ClkReqHdr times 30 db 0 ; 3A - Device driver request header 0 00000378 00000000 dd 0 ; 58 - pointer to driver entry 806 global _MediaReqHdr 0 0000037C 00 _MediaReqHdr times 22 db 0 ; 5C - Device driver request header 808 global _IoReqHdr 0 00000392 00 _IoReqHdr times 30 db 0 ; 72 - Device driver request header 0 000003B0 00 times 6 db 0 ; 90 - unknown 811 global _ClkRecord 0 000003B6 00 _ClkRecord times 6 db 0 ; 96 - CLOCK$ transfer record 0 000003BC 0000 dw 0 ; 9C - unknown 814 global __PriPathBuffer 0 000003BE 00 __PriPathBuffer times 80h db 0 ; 9E - buffer for file name 816 global __SecPathBuffer 0 0000043E 00 __SecPathBuffer times 80h db 0 ;11E - buffer for file name 818 global _sda_tmp_dm 0 000004BE 00 _sda_tmp_dm times 21 db 0 ;19E - 21 byte srch state 820 global _SearchDir 0 000004D3 00 _SearchDir times 32 db 0 ;1B3 - 32 byte dir entry 822 global _TempCDS 0 000004F3 00 _TempCDS times 88 db 0 ;1D3 - TemporaryCDS buffer 824 global _DirEntBuffer 0 0000054B 00 _DirEntBuffer times 32 db 0 ;22B - space enough for 1 dir entry 826 global _wAttr 0 0000056B 0000 _wAttr dw 0 ;24B - extended FCB file attribute 828 829 830 global _SAttr 0 0000056D 00 _SAttr db 0 ;24D - Attribute Mask for Dir Search 832 global _OpenMode 0 0000056E 00 _OpenMode db 0 ;24E - File Open Attribute 834 0 0000056F 00 times 3 db 0 836 global _Server_Call 0 00000572 00 _Server_Call db 0 ;252 - Server call Func 5D sub 0 0 00000573 00 db 0 839 ; Pad to 05CCh 0 00000574 00 times (25ch - ($ - _internal_data)) db 0 841 842 global _term_type ; used by break and critical error 0 0000057C 00 _term_type db 0 ;25C - handlers during termination 844 ; ecm: 00h = normal terminate, 845 ; 01h = control-c terminate, 846 ; 02h = critical error abort, 847 ; 03h = TSR terminate 0 0000057D 00 db 0 ;25D - padding 849 global term_psp 0 0000057E 0000 term_psp dw 0 ;25E - 0?? 851 global int24_esbp 0 00000580 0000 int24_esbp times 2 dw 0 ;260 - pointer to criticalerr DPB 853 global _user_r, int21regs_off, int21regs_seg 854 _user_r: 0 00000584 0000 int21regs_off dw 0 ;264 - pointer to int21h stack frame 0 00000586 0000 int21regs_seg dw 0 ; i.e. points stack frame (SS:SP) with user registers when int21h called 857 global critical_sp 0 00000588 0000 critical_sp dw 0 ;268 - critical error internal stack, store SP during int24h 859 global current_ddsc 0 0000058A 0000 current_ddsc times 2 dw 0 ;26A - pointer to DPB for ??? 861 0 0000058E 0000 diskbuf_seg dw 0 ;26E - segment of disk buffer 0 00000590 00000000 dd 0 ;270 - saving partial cluster number??? - see https://faydoc.tripod.com/structures/16/1690.htm 0 00000594 0000 dw 0 0 00000596 0000 dw 0 ;276 - temp word 0 00000598 00 db 0 ;278 - media id returned by AH=1Bh,1Ch 0 00000599 00 db 0 ;279 - unused 868 869 ; Pad to 059ah 870 times (27ah - ($ - _internal_data)) db 0 871 global current_device 0 0000059A 0000 current_device times 2 dw 0 ;27A - point to device header if filename is character device 873 global _lpCurSft 0 0000059E 0000 _lpCurSft times 2 dw 0 ;27e - Current SFT 875 global _current_ldt 0 000005A2 0000 _current_ldt times 2 dw 0 ;282 - Current CDS 877 global _sda_lpFcb 0 000005A6 0000 _sda_lpFcb times 2 dw 0 ;286 - pointer to callers FCB 879 global _current_sft_idx 0 000005AA 0000 _current_sft_idx dw 0 ;28A - SFT index for next open 881 ; used by MS NET 0 000005AC 0000 dw 0 ;28C - temp file handler 0 000005AE 00000000 dd 0 ;28E - pointer to JFT entry (for file being opened) in process handle table 884 885 ; Pad to 05b2h 886 times (292h - ($ - _internal_data)) db 0 0 000005B2 [BE03] dw __PriPathBuffer ; 292 - "sda_WFP_START" offset in DOS DS of first filename argument 0 000005B4 [3E04] dw __SecPathBuffer ; 294 - "sda_REN_WFP" offset in DOS DS of second filename argument 0 000005B6 FFFF dw 0ffffh ; 296 - 0xffff or offset of last component in filename 890 891 ; Pad to 05ceh 0 000005B8 00 times (2aeh - ($ - _internal_data)) db 0 893 global _current_filepos 0 000005CE 0000 _current_filepos times 2 dw 0 ;2AE - current offset in file 895 896 ; Pad to 05eah 0 000005D2 00 times (2cah - ($ - _internal_data)) db 0 898 ;global _save_BX 899 ;global _save_DS 0 000005EA 0000 save_BX dw 0 ;2CA - unused by FreeDOS, for Win3.x 0 000005EC 0000 save_DS dw 0 ; compatibility, match MS's positions 0 000005EE 0000 dw 0 ; store DS,BX on entry to int21h (ie caller's values) 903 global _prev_user_r 904 global prev_int21regs_off 905 global prev_int21regs_seg 906 _prev_user_r: 0 000005F0 0000 prev_int21regs_off dw 0 ;2D0 - pointer to prev int 21 frame (see offset 264h) 0 000005F2 0000 prev_int21regs_seg dw 0 909 910 ; Pad to 05fdh, 2D4 through 2E4 used for int21h/ax=6C00h 0 000005F4 00 times (2ddh - ($ - _internal_data)) db 0 912 global _ext_open_action 913 global _ext_open_attrib 914 global _ext_open_mode 0 000005FD 0000 _ext_open_action dw 0 ;2DD - extended open action 0 000005FF 0000 _ext_open_attrib dw 0 ;2DF - extended open attrib 0 00000601 0000 _ext_open_mode dw 0 ;2E1 - extended open mode 0 00000603 00000000 open_filename dd 0 ;2E3 pointer to filename to open (see ax=6C00h) 919 920 ; Pad to 0620h 0 00000607 00 times (300h - ($ - _internal_data)) db 0 922 923 global apistk_bottom 924 apistk_bottom: 925 ; use bottom of error stack as scratch buffer 926 ; - only used during int 21 call 927 global _sda_tmp_dm_ren 0 00000620 90 _sda_tmp_dm_ren:times 21 db 0x90 ;300 - 21 byte srch state for rename 929 global _SearchDir_ren 0 00000635 90 _SearchDir_ren: times 32 db 0x90 ;315 - 32 byte dir entry for rename 931 932 ; stacks are made to initialize to no-ops so that high-water 933 ; testing can be performed 0 00000655 90 times STACK_SIZE*2-($-apistk_bottom) db 0x90 935 ; critical error stack 331 bytes?, disk stack 384 bytes, character i/o 384 bytes 936 ;300 - Error Processing Stack 937 global _error_tos 938 _error_tos: 0 000007A0 9090 times STACK_SIZE dw 0x9090 ;480 - Disk Function Stack 940 global _disk_api_tos 941 _disk_api_tos: 0 00000920 9090 times STACK_SIZE dw 0x9090 ;600 - Char Function Stack 943 global _char_api_tos 944 _char_api_tos: 945 apistk_top: 0 00000AA0 00 db 0 ;780 device driver look-ahead (printer), see ah=64h 0 00000AA1 00 _VolChange db 0 ;781 - volume change 0 00000AA2 00 _VirtOpen db 0 ;782 - virtual open flag 949 950 ; 783h to 788h are fastseek drive, 1st cluster, logical cluster, returned logical cluster 951 ; 78Ah dw ? temp location of SYSINIT 952 953 ; controlled variables end at offset 78Ch so pad to end 0 00000AA3 00 times (78ch - ($ - _internal_data)) db 0 955 956 ; MSDOS 7.1+ with FAT32 SDA extended 957 ;78Ch - 47 bytes of ??? 0 00000AAC 00 times (7bbh - ($ - _internal_data)) db 0 0 00000ADB 00 absrdwrflg db 0 ;7bbh - 0=int 25h/26h absolute read/write, 1=int 21h/ax=7305h 0 00000ADC 0000 times 12 dw 0 ;7bch to 7d2h, high word of 32bit values, see offsets 0x 2a2, 29c, 2bc, 29a, 276, 244, & registers ebx,edx,edi,ecx 0 00000AF4 0000 times 3 dw 0 ; ??? 962 963 ; 964 ; end of controlled variables 965 ; 966 === Switch to base=000790h -> "_BSS" 967 segment _BSS 968 ;!! global _NumFloppies 969 ;!!_NumFloppies resw 1 970 ;!!intr_dos_stk resw 1 971 ;!!intr_dos_seg resw 1 972 973 974 ; mark front and end of bss area to clear === Switch to base=012B40h -> "IB_B" 975 segment IB_B 976 global __ib_start 977 __ib_start: === Switch to base=012B40h -> "IB_E" 978 segment IB_E 979 global __ib_end 980 __ib_end: 981 ;; do not clear the other init BSS variables + STACK: too late. 982 983 ; kernel startup stack 984 global init_tos 985 00000000 resw 512 986 init_tos: 987 ; the last paragraph of conventional memory might become an MCB 988 00000400 resb 16 989 global __init_end 990 __init_end: 991 init_end: 992 === Switch to base=000790h -> "_DATA" 993 segment _DATA 994 ; blockdev private stack 995 global blk_stk_top 0 00000DAE 0000 times 256 dw 0 997 blk_stk_top: 998 999 ; clockdev private stack 1000 global clk_stk_top 0 00000FAE 0000 times 128 dw 0 1002 clk_stk_top: 1003 1004 ; int2fh private stack 1005 global int2f_stk_top 0 000010AE 0000 times 128 dw 0 1007 int2f_stk_top: 1008 1009 ; Dynamic data: 1010 ; member of the DOS DATA GROUP 1011 ; and marks definitive end of all used data in kernel data segment 1012 ; 1013 === Switch to base=000790h -> "_DATAEND" 1014 segment _DATAEND 1015 1016 _swap_indos: 1017 ; we don't know precisely what needs to be swapped before this, so set it here. 1018 ; this is just after FIXED_DATA+BSS+DATA and before (D)CONST+BSS 1019 ; probably, the clock and block stacks and disktransferbuffer should go past 1020 ; _swap_indos but only if int2a ah=80/81 (critical section start/end) 1021 ; are called upon entry and exit of the device drivers 1022 0 000011F2 9090 times 96 dw 0x9090 ; Process 0 Stack 1024 global _p_0_tos 1025 _p_0_tos: 1026 === Switch to base=000790h -> "DYN_DATA" 1027 segment DYN_DATA 1028 1029 global _Dyn 1030 _Dyn: 0 00001AD3 0000 DynAllocated dw 0 1032 ;times DynAllocated db ? ; allocated at runtime, need to add DynAllocated to _markEndInstanceData 1033 1034 global _markEndInstanceData 1035 _markEndInstanceData: ; mark end of DOS data seg we say needs instancing 1036 1037 === Switch to base=012B40h -> "ID_B" 1038 segment ID_B 1039 global __INIT_DATA_START 1040 __INIT_DATA_START: === Switch to base=012B40h -> "ID_E" 1041 segment ID_E 1042 global __INIT_DATA_END 1043 __INIT_DATA_END: 1044 1045 === Switch to base=00E0E0h -> "INIT_TEXT_START" 1046 segment INIT_TEXT_START 1047 global __InitTextStart 1048 __InitTextStart: ; and c version 1049 === Switch to base=00E0E0h -> "INIT_TEXT_END" 1050 segment INIT_TEXT_END 1051 global __InitTextEnd 1052 __InitTextEnd: ; and c version 1053 1054 ; 1055 ; start end end of HMA area 1056 === Switch to base=002270h -> "HMA_TEXT_START" 1057 segment HMA_TEXT_START 1058 global __HMATextAvailable 1059 __HMATextAvailable: 1060 global __HMATextStart 1061 __HMATextStart: 1062 1063 ; 1064 ; the HMA area is filled with 1eh+3(=sizeof VDISK) = 33 byte dummy data, 1065 ; so nothing will ever be below 0xffff:0031 1066 ; === Switch to base=002270h -> "HMA_TEXT" 1067 segment HMA_TEXT 1068 begin_hma: 0 00000000 00 times 10h db 0 ; filler [ffff:0..ffff:10] 0 00000010 00 times 20h db 0 0 00000030 00 db 0 1072 1073 ; to minimize relocations 1074 global _DGROUP_ 0 00000031 [0000] _DGROUP_ dw DGROUP 1076 1077 %ifdef WATCOM 1078 ; 32 bit multiplication + division 1079 global __U4M 1080 __U4M: 1081 LMULU 1082 global __U4D 1083 __U4D: 1084 LDIVMODU 1085 %endif 1086 1087 %ifdef gcc 1088 %macro ULONG_HELPERS 1 1089 global %1udivsi3 1090 %1udivsi3: call %1ldivmodu 1091 ret 8 1092 1093 global %1umodsi3 1094 %1umodsi3: call %1ldivmodu 1095 mov dx, cx 1096 mov ax, bx 1097 ret 8 1098 1099 %1ldivmodu: LDIVMODU 1100 1101 global %1ashlsi3 1102 %1ashlsi3: LSHLU 1103 1104 global %1lshrsi3 1105 %1lshrsi3: LSHRU 1106 %endmacro 1107 ULONG_HELPERS ___ 1089 <1> global %1udivsi3 0 00000033 E80D00 %1udivsi3: call %1ldivmodu 0 00000036 C20800 ret 8 1092 <1> 1093 <1> global %1umodsi3 0 00000039 E80700 %1umodsi3: call %1ldivmodu 0 0000003C 89CA mov dx, cx 0 0000003E 89D8 mov ax, bx 0 00000040 C20800 ret 8 1098 <1> 1099 <1> %1ldivmodu: LDIVMODU 1099 <2> ___ldivmodu: 26 <2> 27 <2> 28 <2> 29 <2> 30 <2> 31 <2> 32 <2> 33 <2> 34 <2> 35 <2> 36 <2> 37 <2> 38 <2> 39 <2> 40 <2> 41 <2> 42 <2> 43 <2> 44 <2> 45 <2> 46 <2> 47 <2> 48 <2> 49 <2> 50 <2> 51 <2> 52 <2> 53 <2> 54 <2> %ifdef STDCALL 0 00000043 55 push bp 0 00000044 89E5 mov bp, sp 0 00000046 8B4606 mov ax, [bp+6] 0 00000049 8B5608 mov dx, [bp+8] 0 0000004C 8B5E0A mov bx, [bp+10] 0 0000004F 8B4E0C mov cx, [bp+12] 0 00000052 5D pop bp 62 <2> %endif 63 <2> 0 00000053 85C9 test cx, cx 0 00000055 7512 jnz %%big_divisor 0 00000057 39DA cmp dx, bx 0 00000059 7205 jb %%one_div 68 <2> 69 <2> 0 0000005B 91 xchg cx, ax 0 0000005C 92 xchg ax, dx 0 0000005D F7F3 div bx 0 0000005F 91 xchg ax, cx 74 <2> 75 <2> %%one_div: 0 00000060 F7F3 div bx 0 00000062 89D3 mov bx, dx 0 00000064 89CA mov dx, cx 0 00000066 31C9 xor cx, cx 0 00000068 C3 ret 81 <2> 82 <2> %%big_divisor: 0 00000069 56 push si 0 0000006A 57 push di 0 0000006B 52 push dx 0 0000006C 50 push ax 0 0000006D 89DE mov si, bx 0 0000006F 89CF mov di, cx 89 <2> %%shift_loop: 0 00000071 D1EA shr dx, 1 0 00000073 D1D8 rcr ax, 1 0 00000075 D1E9 shr cx, 1 0 00000077 D1DB rcr bx, 1 0 00000079 75F6 jnz %%shift_loop 0 0000007B F7F3 div bx 0 0000007D 5B pop bx 0 0000007E 89C1 mov cx, ax 0 00000080 F7E7 mul di 0 00000082 5A pop dx 0 00000083 29C2 sub dx,ax 0 00000085 52 push dx 0 00000086 89C8 mov ax, cx 0 00000088 F7E6 mul si 0 0000008A 29C3 sub bx, ax 0 0000008C 89C8 mov ax, cx 0 0000008E 59 pop cx 0 0000008F 19D1 sbb cx, dx 0 00000091 19D2 sbb dx, dx 0 00000093 21D6 and si, dx 0 00000095 21D7 and di, dx 0 00000097 01F3 add bx, si 0 00000099 11F9 adc cx, di 0 0000009B 01D0 add ax, dx 0 0000009D 31D2 xor dx, dx 0 0000009F 5F pop di 0 000000A0 5E pop si 0 000000A1 C3 ret 118 <2> 1100 <1> 1101 <1> global %1ashlsi3 1102 <1> %1ashlsi3: LSHLU 1102 <2> ___ashlsi3: 0 000000A2 5B pop bx 123 <2> popargs {dx,ax},cx 249 <3> %rep %0 250 <3> %ifdef PASCAL 251 <3> %rotate -1 252 <3> %endif 253 <3> multipop %1 254 <3> %ifdef STDCALL 255 <3> %rotate 1 256 <3> %endif 257 <3> %endrep 250 <4> %ifdef PASCAL 251 <4> %rotate -1 252 <4> %endif 253 <4> multipop %1 242 <5> %rep %0 243 <5> %rotate -1 244 <5> pop %1 245 <5> %endrep 243 <6> %rotate -1 0 000000A3 58 pop %1 243 <6> %rotate -1 0 000000A4 5A pop %1 254 <4> %ifdef STDCALL 255 <4> %rotate 1 256 <4> %endif 250 <4> %ifdef PASCAL 251 <4> %rotate -1 252 <4> %endif 253 <4> multipop %1 242 <5> %rep %0 243 <5> %rotate -1 244 <5> pop %1 245 <5> %endrep 243 <6> %rotate -1 0 000000A5 59 pop %1 254 <4> %ifdef STDCALL 255 <4> %rotate 1 256 <4> %endif 0 000000A6 53 push bx 0 000000A7 E306 jcxz %%ret 0 000000A9 D1E0 %%loop: shl ax, 1 0 000000AB D1D2 rcl dx, 1 0 000000AD E2FA loop %%loop 0 000000AF C3 %%ret: ret 1103 <1> 1104 <1> global %1lshrsi3 1105 <1> %1lshrsi3: LSHRU 1105 <2> ___lshrsi3: 0 000000B0 5B pop bx 134 <2> popargs {dx,ax},cx 249 <3> %rep %0 250 <3> %ifdef PASCAL 251 <3> %rotate -1 252 <3> %endif 253 <3> multipop %1 254 <3> %ifdef STDCALL 255 <3> %rotate 1 256 <3> %endif 257 <3> %endrep 250 <4> %ifdef PASCAL 251 <4> %rotate -1 252 <4> %endif 253 <4> multipop %1 242 <5> %rep %0 243 <5> %rotate -1 244 <5> pop %1 245 <5> %endrep 243 <6> %rotate -1 0 000000B1 58 pop %1 243 <6> %rotate -1 0 000000B2 5A pop %1 254 <4> %ifdef STDCALL 255 <4> %rotate 1 256 <4> %endif 250 <4> %ifdef PASCAL 251 <4> %rotate -1 252 <4> %endif 253 <4> multipop %1 242 <5> %rep %0 243 <5> %rotate -1 244 <5> pop %1 245 <5> %endrep 243 <6> %rotate -1 0 000000B3 59 pop %1 254 <4> %ifdef STDCALL 255 <4> %rotate 1 256 <4> %endif 0 000000B4 53 push bx 0 000000B5 E306 jcxz %%ret 0 000000B7 D1EA %%loop: shr dx, 1 0 000000B9 D1D8 rcr ax, 1 0 000000BB E2FA loop %%loop 0 000000BD C3 %%ret: ret 1108 %endif 1109 0 000000BE 00 times 0xd0 - ($-begin_hma) db 0 1111 ; reserve space for far jump to cp/m routine 0 000000D0 00 times 5 db 0 1113 1114 ;End of HMA segment === Switch to base=002270h -> "HMA_TEXT_END" 1115 segment HMA_TEXT_END 1116 global __HMATextEnd 1117 __HMATextEnd: ; and c version 1118 1119 1120 1121 ; The default stack (_TEXT:0) will overwrite the data area, so I create a dummy 1122 ; stack here to ease debugging. -- ror4 1123 === Switch to base=0151DAh -> "_STACK" 1124 segment _STACK class(STACK) nobits stack 1125 1126 1127 1128 1129 === Switch to base=000790h -> "CONST" 1130 segment CONST 1131 ; dummy interrupt return handlers 1132 1133 global _int22_handler 1134 global _int28_handler 1135 global _int2a_handler 1136 global _empty_handler 1137 _int22_handler: 1138 _int28_handler: 1139 _int2a_handler: 1140 _empty_handler: 0 000012D9 CF iret 1142 1143 1144 global _initforceEnableA20 1145 initforceEnableA20: 0 000012DA E88000 call near forceEnableA20 0 000012DD CB retf 1148 1149 global __HMARelocationTableStart 1150 __HMARelocationTableStart: 1151 1152 global _int2f_handler 1153 extern reloc_call_int2f_handler 0 000012DE EA[0000]0000 _int2f_handler: jmp 0:reloc_call_int2f_handler 0 000012E3 E87700 call near forceEnableA20 1156 1157 global _int20_handler 1158 extern reloc_call_int20_handler 0 000012E6 EA[0000]0000 _int20_handler: jmp 0:reloc_call_int20_handler 0 000012EB E86F00 call near forceEnableA20 1161 1162 global _int21_handler 1163 extern reloc_call_int21_handler 0 000012EE EA[0000]0000 _int21_handler: jmp 0:reloc_call_int21_handler 0 000012F3 E86700 call near forceEnableA20 1166 1167 1168 global _low_int25_handler 1169 extern reloc_call_low_int25_handler 0 000012F6 EA[0000]0000 _low_int25_handler: jmp 0:reloc_call_low_int25_handler 0 000012FB E85F00 call near forceEnableA20 1172 1173 global _low_int26_handler 1174 extern reloc_call_low_int26_handler 0 000012FE EA[0000]0000 _low_int26_handler: jmp 0:reloc_call_low_int26_handler 0 00001303 E85700 call near forceEnableA20 1177 1178 global _int27_handler 1179 extern reloc_call_int27_handler 0 00001306 EA[0000]0000 _int27_handler: jmp 0:reloc_call_int27_handler 0 0000130B E84F00 call near forceEnableA20 1182 1183 global _int0_handler 1184 extern reloc_call_int0_handler 0 0000130E EA[0000]0000 _int0_handler: jmp 0:reloc_call_int0_handler 0 00001313 E84700 call near forceEnableA20 1187 1188 global _int6_handler 1189 extern reloc_call_int6_handler 0 00001316 EA[0000]0000 _int6_handler: jmp 0:reloc_call_int6_handler 0 0000131B E83F00 call near forceEnableA20 1192 1193 global _int19_handler 1194 extern reloc_call_int19_handler 0 0000131E EA[0000]0000 _int19_handler: jmp 0:reloc_call_int19_handler 0 00001323 E83700 call near forceEnableA20 1197 1198 global _cpm_entry 1199 extern reloc_call_cpm_entry 0 00001326 EA[0000]0000 _cpm_entry: jmp 0:reloc_call_cpm_entry 0 0000132B E82F00 call near forceEnableA20 1202 1203 global _reloc_call_blk_driver 1204 extern _blk_driver 1205 _reloc_call_blk_driver: 0 0000132E EA[0000]0000 jmp 0:_blk_driver 0 00001333 E82700 call near forceEnableA20 1208 1209 global _reloc_call_clk_driver 1210 extern _clk_driver 1211 _reloc_call_clk_driver: 0 00001336 EA[0000]0000 jmp 0:_clk_driver 0 0000133B E81F00 call near forceEnableA20 1214 1215 global _CharMapSrvc ; in _DATA (see AARD) 1216 extern _reloc_call_CharMapSrvc 0 0000133E EA[0000]0000 _CharMapSrvc: jmp 0:_reloc_call_CharMapSrvc 0 00001343 E81700 call near forceEnableA20 1219 1220 global _init_call_p_0 1221 extern reloc_call_p_0 0 00001346 EA[0000]0000 _init_call_p_0: jmp 0:reloc_call_p_0 0 0000134B E80F00 call near forceEnableA20 1224 1225 1226 global __HMARelocationTableEnd 1227 __HMARelocationTableEnd: 1228 1229 ; 1230 ; if we were lucky, we found all entries from the outside to the kernel. 1231 ; if not, BUMS 1232 ; 1233 ; 1234 ; this routine makes the HMA area available. PERIOD. 1235 ; must conserve ALL registers 1236 ; will be only ever called, if HMA (DOS=HIGH) is enabled. 1237 ; for obvious reasons it should be located at the relocation table 1238 ; 1239 1240 global _ENABLEA20 1241 _ENABLEA20: 0 0000134E B405 mov ah,5 1243 UsingXMSdriver: 1244 1245 global _XMS_Enable_Patch 1246 _XMS_Enable_Patch: ; SMC: patch to nop (90h) to enable use of XMS 0 00001350 CB retf 1248 0 00001351 53 push bx 0 00001352 9A00000000 call 0:0 ; (immediate far address patched) 1251 global _XMSDriverAddress 1252 _XMSDriverAddress: equ $ - 4 ; XMS driver, if detected 0 00001357 5B pop bx 0 00001358 CB retf 1255 1256 global _DISABLEA20 1257 _DISABLEA20: 0 00001359 B406 mov ah,6 0 0000135B EBF3 jmp short UsingXMSdriver 1260 1261 1262 global forceEnableA20 1263 forceEnableA20: 1264 0 0000135D 1E push ds 0 0000135E 06 push es 0 0000135F 50 push ax 0 00001360 56 push si 0 00001361 57 push di 0 00001362 51 push cx 0 00001363 9C pushf 0 00001364 FC cld 1273 1274 .retry: 0 00001365 31F6 xor si, si ; = 0000h 0 00001367 8EDE mov ds, si ; => low memory (IVT) 0 00001369 4E dec si ; = FFFFh 0 0000136A 8EC6 mov es, si ; => HMA at offset 10h 0 0000136C 46 inc si ; back to 0, -> IVT entry 0 and 1 0 0000136D BF1000 mov di, 10h ; -> HMA, or wrapping around to 0:0 0 00001370 B90400 mov cx, 4 0 00001373 F3A7 repe cmpsw ; compare up to 4 words 0 00001375 7408 je .enable 1284 1285 .success: 0 00001377 9D popf 0 00001378 59 pop cx 0 00001379 5F pop di 0 0000137A 5E pop si 0 0000137B 58 pop ax 0 0000137C 07 pop es 0 0000137D 1F pop ds 0 0000137E C3 retn 1294 1295 .enable: 1296 ; ok, we have to enable A20 (at least seems so) 0 0000137F 0E push cs ; make far call stack frame 0 00001380 E8CBFF call _ENABLEA20 0 00001383 EBE0 jmp short .retry 1300 1301 1302 ; global f*cking compatibility issues: 1303 ; 1304 ; very old brain dead software (PKLITE, copyright 1990) 1305 ; forces us to execute with A20 disabled 1306 ; 1307 1308 global _ExecUserDisableA20 1309 _ExecUserDisableA20: 0 00001385 50 push ax 0 00001386 0E push cs ; make far call stack frame 0 00001387 E8CFFF call _DISABLEA20 ; (no-op if not in HMA, patched otherwise) 0 0000138A 58 pop ax 0 0000138B CF iret 1315 1316 1317 ; Default Int 24h handler -- always returns fail 1318 ; so we have not to relocate it (now) 1319 ; 1320 FAIL equ 03h 1321 1322 global _int24_handler 0 0000138C B003 _int24_handler: mov al,FAIL 0 0000138E CF iret 1325 1326 ; 1327 ; this makes some things easier 1328 ; 1329 === Switch to base=000100h -> "_LOWTEXT" 1330 segment _LOWTEXT 1331 global _TEXT_DGROUP 0 0000012C [0000] _TEXT_DGROUP dw DGROUP 1333 === Switch to base=00E0E0h -> "INIT_TEXT" 1334 segment INIT_TEXT 1335 global _INIT_DGROUP 0 000000E9 [0000] _INIT_DGROUP dw DGROUP 1337 1338 %ifdef gcc 1339 ULONG_HELPERS _init_ 1089 <1> global %1udivsi3 0 000000EB E80D00 %1udivsi3: call %1ldivmodu 0 000000EE C20800 ret 8 1092 <1> 1093 <1> global %1umodsi3 0 000000F1 E80700 %1umodsi3: call %1ldivmodu 0 000000F4 89CA mov dx, cx 0 000000F6 89D8 mov ax, bx 0 000000F8 C20800 ret 8 1098 <1> 1099 <1> %1ldivmodu: LDIVMODU 1099 <2> _init_ldivmodu: 26 <2> 27 <2> 28 <2> 29 <2> 30 <2> 31 <2> 32 <2> 33 <2> 34 <2> 35 <2> 36 <2> 37 <2> 38 <2> 39 <2> 40 <2> 41 <2> 42 <2> 43 <2> 44 <2> 45 <2> 46 <2> 47 <2> 48 <2> 49 <2> 50 <2> 51 <2> 52 <2> 53 <2> 54 <2> %ifdef STDCALL 0 000000FB 55 push bp 0 000000FC 89E5 mov bp, sp 0 000000FE 8B4606 mov ax, [bp+6] 0 00000101 8B5608 mov dx, [bp+8] 0 00000104 8B5E0A mov bx, [bp+10] 0 00000107 8B4E0C mov cx, [bp+12] 0 0000010A 5D pop bp 62 <2> %endif 63 <2> 0 0000010B 85C9 test cx, cx 0 0000010D 7512 jnz %%big_divisor 0 0000010F 39DA cmp dx, bx 0 00000111 7205 jb %%one_div 68 <2> 69 <2> 0 00000113 91 xchg cx, ax 0 00000114 92 xchg ax, dx 0 00000115 F7F3 div bx 0 00000117 91 xchg ax, cx 74 <2> 75 <2> %%one_div: 0 00000118 F7F3 div bx 0 0000011A 89D3 mov bx, dx 0 0000011C 89CA mov dx, cx 0 0000011E 31C9 xor cx, cx 0 00000120 C3 ret 81 <2> 82 <2> %%big_divisor: 0 00000121 56 push si 0 00000122 57 push di 0 00000123 52 push dx 0 00000124 50 push ax 0 00000125 89DE mov si, bx 0 00000127 89CF mov di, cx 89 <2> %%shift_loop: 0 00000129 D1EA shr dx, 1 0 0000012B D1D8 rcr ax, 1 0 0000012D D1E9 shr cx, 1 0 0000012F D1DB rcr bx, 1 0 00000131 75F6 jnz %%shift_loop 0 00000133 F7F3 div bx 0 00000135 5B pop bx 0 00000136 89C1 mov cx, ax 0 00000138 F7E7 mul di 0 0000013A 5A pop dx 0 0000013B 29C2 sub dx,ax 0 0000013D 52 push dx 0 0000013E 89C8 mov ax, cx 0 00000140 F7E6 mul si 0 00000142 29C3 sub bx, ax 0 00000144 89C8 mov ax, cx 0 00000146 59 pop cx 0 00000147 19D1 sbb cx, dx 0 00000149 19D2 sbb dx, dx 0 0000014B 21D6 and si, dx 0 0000014D 21D7 and di, dx 0 0000014F 01F3 add bx, si 0 00000151 11F9 adc cx, di 0 00000153 01D0 add ax, dx 0 00000155 31D2 xor dx, dx 0 00000157 5F pop di 0 00000158 5E pop si 0 00000159 C3 ret 118 <2> 1100 <1> 1101 <1> global %1ashlsi3 1102 <1> %1ashlsi3: LSHLU 1102 <2> _init_ashlsi3: 0 0000015A 5B pop bx 123 <2> popargs {dx,ax},cx 249 <3> %rep %0 250 <3> %ifdef PASCAL 251 <3> %rotate -1 252 <3> %endif 253 <3> multipop %1 254 <3> %ifdef STDCALL 255 <3> %rotate 1 256 <3> %endif 257 <3> %endrep 250 <4> %ifdef PASCAL 251 <4> %rotate -1 252 <4> %endif 253 <4> multipop %1 242 <5> %rep %0 243 <5> %rotate -1 244 <5> pop %1 245 <5> %endrep 243 <6> %rotate -1 0 0000015B 58 pop %1 243 <6> %rotate -1 0 0000015C 5A pop %1 254 <4> %ifdef STDCALL 255 <4> %rotate 1 256 <4> %endif 250 <4> %ifdef PASCAL 251 <4> %rotate -1 252 <4> %endif 253 <4> multipop %1 242 <5> %rep %0 243 <5> %rotate -1 244 <5> pop %1 245 <5> %endrep 243 <6> %rotate -1 0 0000015D 59 pop %1 254 <4> %ifdef STDCALL 255 <4> %rotate 1 256 <4> %endif 0 0000015E 53 push bx 0 0000015F E306 jcxz %%ret 0 00000161 D1E0 %%loop: shl ax, 1 0 00000163 D1D2 rcl dx, 1 0 00000165 E2FA loop %%loop 0 00000167 C3 %%ret: ret 1103 <1> 1104 <1> global %1lshrsi3 1105 <1> %1lshrsi3: LSHRU 1105 <2> _init_lshrsi3: 0 00000168 5B pop bx 134 <2> popargs {dx,ax},cx 249 <3> %rep %0 250 <3> %ifdef PASCAL 251 <3> %rotate -1 252 <3> %endif 253 <3> multipop %1 254 <3> %ifdef STDCALL 255 <3> %rotate 1 256 <3> %endif 257 <3> %endrep 250 <4> %ifdef PASCAL 251 <4> %rotate -1 252 <4> %endif 253 <4> multipop %1 242 <5> %rep %0 243 <5> %rotate -1 244 <5> pop %1 245 <5> %endrep 243 <6> %rotate -1 0 00000169 58 pop %1 243 <6> %rotate -1 0 0000016A 5A pop %1 254 <4> %ifdef STDCALL 255 <4> %rotate 1 256 <4> %endif 250 <4> %ifdef PASCAL 251 <4> %rotate -1 252 <4> %endif 253 <4> multipop %1 242 <5> %rep %0 243 <5> %rotate -1 244 <5> pop %1 245 <5> %endrep 243 <6> %rotate -1 0 0000016B 59 pop %1 254 <4> %ifdef STDCALL 255 <4> %rotate 1 256 <4> %endif 0 0000016C 53 push bx 0 0000016D E306 jcxz %%ret 0 0000016F D1EA %%loop: shr dx, 1 0 00000171 D1D8 rcr ax, 1 0 00000173 E2FA loop %%loop 0 00000175 C3 %%ret: ret 1340 %endif === Trace listing source: lfnapi.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=lfnapi.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccuWu8MH.s output file : lfnapi.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP 5 .ident "GCC: (GNU) 6.3.0" NO DEFINED SYMBOLS NO UNDEFINED SYMBOLS === Trace listing source: main.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=main.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/cccMS3Ph.s output file : main.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:23.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=012B40h -> ".RODATA.STR1.1" 5 .section .rodata.str1.1,"aMS",@progbits,1 6 _.LC0: 0 00000639 4450427000 .string "DPBp" === Switch to base=002270h -> ".TEXT" 8 .text 9 .type _update_dcb, @function 10 _update_dcb: 0 000004E9 56 push si 0 000004EA 57 push di 0 000004EB 55 push bp 0 000004EC 89E5 mov bp, sp 0 000004EE 83EC0E sub sp, 14 0 000004F1 8B4608 mov ax, word ptr [bp+8] 0 000004F4 8946F4 mov word ptr [bp-12], ax 0 000004F7 8B460A mov ax, word ptr [bp+10] 0 000004FA 8946F2 mov word ptr [bp-14], ax 0 000004FD 8EC0 mov es, ax 0 000004FF 8B5EF4 mov bx, word ptr [bp-12] 0 00000502 268A470A mov al, byte ptr es:[bx+10] 0 00000506 8846FF mov byte ptr [bp-1], al 0 00000509 8846F8 mov byte ptr [bp-8], al 0 0000050C 8166F8FF00 and word ptr [bp-8], 255 0 00000511 7503E9E400 je _.L1 0 00000516 36C41E0000 les bx, dword ptr ss:[_LoL] 0 0000051B 26837F2400 cmp word ptr es:[bx+36], 0 0 00000520 7503E9DF00 je _.L3 0 00000525 A00000 mov al, byte ptr [_Config] 0 00000528 30E4 xor ah, ah 0 0000052A 50 push ax 0 0000052B B045 mov al, 69 0 0000052D 50 push ax 0 0000052E B03D mov al, 61 0 00000530 F666FF mul byte ptr [bp-1] 0 00000533 50 push ax 0 00000534 E8FEFF call _KernelAlloc 39 _.L20: 0 00000537 91 xchg cx, ax 0 00000538 36C4360000 les si, dword ptr ss:[_LoL] 0 0000053D 26807C4600 cmp byte ptr es:[si+70], 0 0 00000542 7403E9D700 jne _.L5 0 00000547 26894C26 mov word ptr es:[si+38], cx 0 0000054B 26895428 mov word ptr es:[si+40], dx 46 _.L6: 0 0000054F 89CB mov bx, cx 0 00000551 C746FC0000 mov word ptr [bp-4], 0 49 _.L10: 0 00000556 89D8 mov ax, bx 0 00000558 83C03D add ax, 61 0 0000055B 8946F6 mov word ptr [bp-10], ax 0 0000055E 8EDA mov ds, dx 0 00000560 894719 mov word ptr [bx+25], ax 0 00000563 89571B mov word ptr [bx+27], dx 0 00000566 36C5360000 lds si, dword ptr ss:[_LoL] 0 0000056B 8A4446 mov al, byte ptr [si+70] 0 0000056E 8EDA mov ds, dx 0 00000570 8807 mov byte ptr [bx], al 0 00000572 8A46FC mov al, byte ptr [bp-4] 0 00000575 884701 mov byte ptr [bx+1], al 0 00000578 8B46F4 mov ax, word ptr [bp-12] 0 0000057B 894713 mov word ptr [bx+19], ax 0 0000057E 8B46F2 mov ax, word ptr [bp-14] 0 00000581 894715 mov word ptr [bx+21], ax 0 00000584 C64718FF mov byte ptr [bx+24], -1 0 00000588 36C53E0000 lds di, dword ptr ss:[_LoL] 0 0000058D 8B453E mov ax, word ptr [di+62] 0 00000590 8946FA mov word ptr [bp-6], ax 0 00000593 8B753C mov si, word ptr [di+60] 0 00000596 09F0 or ax, si 0 00000598 7436 je _.L8 0 0000059A 8A4546 mov al, byte ptr [di+70] 0 0000059D 3A4547 cmp al, byte ptr [di+71] 0 000005A0 732E jnc _.L8 0 000005A2 B458 mov ah, 88 0 000005A4 F6E4 mul ah 0 000005A6 01C6 add si, ax 0 000005A8 8E46FA mov es, word ptr [bp-6] 0 000005AB 26895C45 mov word ptr es:[si+69], bx 0 000005AF 8E46FA mov es, word ptr [bp-6] 0 000005B2 26895447 mov word ptr es:[si+71], dx 0 000005B6 8A4546 mov al, byte ptr [di+70] 0 000005B9 B458 mov ah, 88 0 000005BB F6E4 mul ah 0 000005BD 8B5D3E mov bx, word ptr [di+62] 0 000005C0 895EFA mov word ptr [bp-6], bx 0 000005C3 03453C add ax, word ptr [di+60] 0 000005C6 93 xchg bx, ax 0 000005C7 8E46FA mov es, word ptr [bp-6] 0 000005CA 26C747430040 mov word ptr es:[bx+67], 16384 92 _.L8: 0 000005D0 FE4546 inc byte ptr [di+70] 0 000005D3 FF46FC inc word ptr [bp-4] 0 000005D6 8B5EF6 mov bx, word ptr [bp-10] 0 000005D9 8B46FC mov ax, word ptr [bp-4] 0 000005DC 3946F8 cmp word ptr [bp-8], ax 0 000005DF 7E03E972FF jg _.L10 0 000005E4 B03D mov al, 61 0 000005E6 F666FF mul byte ptr [bp-1] 0 000005E9 01C8 add ax, cx 0 000005EB 93 xchg bx, ax 0 000005EC 8EC2 mov es, dx 0 000005EE 26C747DCFFFF mov word ptr es:[bx-36], -1 0 000005F4 26C747DEFFFF mov word ptr es:[bx-34], -1 106 _.L1: 0 000005FA 89EC mov sp, bp 0 000005FC 5D pop bp 0 000005FD 5F pop di 0 000005FE 5E pop si 0 000005FF 16 push ss 0 00000600 1F pop ds 0 00000601 C20400 ret 4 114 _.L3: 0 00000604 B83D00 mov ax, 61 0 00000607 50 push ax 0 00000608 B80000 mov ax, offset _blk_dev@OZSEG16 0 0000060B 8EC0 mov es, ax 0 0000060D 26A00A00 mov al, byte ptr es:[_blk_dev+10] 0 00000611 30E4 xor ah, ah 0 00000613 50 push ax 0 00000614 B80000 mov ax, offset _.LC0 0 00000617 50 push ax 0 00000618 E8FEFF call _DynAlloc 0 0000061B E919FF jmp _.L20 126 _.L5: 0 0000061E 268B5C26 mov bx, word ptr es:[si+38] 0 00000622 268B4428 mov ax, word ptr es:[si+40] 129 _.L7: 0 00000626 8EC0 mov es, ax 0 00000628 268B7F19 mov di, word ptr es:[bx+25] 0 0000062C 268B771B mov si, word ptr es:[bx+27] 0 00000630 83FFFF cmp di, -1 0 00000633 7510 jne _.L11 0 00000635 83FEFF cmp si, -1 0 00000638 750B jne _.L11 0 0000063A 26894F19 mov word ptr es:[bx+25], cx 0 0000063E 2689571B mov word ptr es:[bx+27], dx 0 00000642 E90AFF jmp _.L6 140 _.L11: 0 00000645 89FB mov bx, di 0 00000647 96 xchg si, ax 0 00000648 EBDC jmp _.L7 144 .size _update_dcb, .-_update_dcb === Switch to base=012B40h -> ".RODATA" 145 .section .rodata 146 _.LC1: 0 00000619 413A5C00 .string "A:\\" 0 0000061D 00 .string "" === Switch to base=012B40h -> ".RODATA.STR1.1" 149 .section .rodata.str1.1 150 _.LC2: 0 0000063E 41555800 .string "AUX" 152 _.LC3: 0 00000642 434F4E00 .string "CON" 154 _.LC4: 0 00000646 50524E00 .string "PRN" === Switch to base=002270h -> ".TEXT" 156 .text 157 .type _FsConfig, @function 158 _FsConfig: 0 0000064A 56 push si 0 0000064B 57 push di 0 0000064C 55 push bp 0 0000064D 89E5 mov bp, sp 0 0000064F 83EC08 sub sp, 8 0 00000652 36C41E0000 les bx, dword ptr ss:[_LoL] 0 00000657 268B4726 mov ax, word ptr es:[bx+38] 0 0000065B 268B4F28 mov cx, word ptr es:[bx+40] 0 0000065F C746F80000 mov word ptr [bp-8], 0 168 _.L22: 0 00000664 36C51E0000 lds bx, dword ptr ss:[_LoL] 0 00000669 8A5747 mov dl, byte ptr [bx+71] 0 0000066C 30F6 xor dh, dh 0 0000066E 3956F8 cmp word ptr [bp-8], dx 0 00000671 7C46 jl _.L26 0 00000673 8A4769 mov al, byte ptr [bx+105] 0 00000676 30E4 xor ah, ah 0 00000678 48 dec ax 0 00000679 50 push ax 0 0000067A 16 push ss 0 0000067B 1F pop ds 0 0000067C E8FEFF call _init_setdrive 0 0000067F BE0200 mov si, 2 0 00000682 56 push si 0 00000683 B80500 mov ax, offset _.LC2 0 00000686 50 push ax 0 00000687 E8FEFF call _init_DosOpen 0 0000068A 56 push si 0 0000068B B80900 mov ax, offset _.LC3 0 0000068E 50 push ax 0 0000068F E8FEFF call _init_DosOpen 0 00000692 B80300 mov ax, 3 0 00000695 50 push ax 0 00000696 31C0 xor ax, ax 0 00000698 50 push ax 0 00000699 E8FEFF call _dup2 0 0000069C 31C0 xor ax, ax 0 0000069E 50 push ax 0 0000069F BF0100 mov di, 1 0 000006A2 57 push di 0 000006A3 E8FEFF call _dup2 0 000006A6 56 push si 0 000006A7 57 push di 0 000006A8 E8FEFF call _dup2 0 000006AB 57 push di 0 000006AC B80D00 mov ax, offset _.LC4 0 000006AF 50 push ax 0 000006B0 E8FEFF call _init_DosOpen 0 000006B3 89EC mov sp, bp 0 000006B5 5D pop bp 0 000006B6 5F pop di 0 000006B7 5E pop si 0 000006B8 C3 ret 212 _.L26: 0 000006B9 894EFE mov word ptr [bp-2], cx 0 000006BC 8946FC mov word ptr [bp-4], ax 0 000006BF B85800 mov ax, 88 0 000006C2 F766F8 mul word ptr [bp-8] 0 000006C5 8B773E mov si, word ptr [bx+62] 0 000006C8 03473C add ax, word ptr [bx+60] 0 000006CB BA0400 mov dx, 4 0 000006CE 52 push dx 0 000006CF 16 push ss 0 000006D0 BA0000 mov dx, offset _.LC1 0 000006D3 52 push dx 0 000006D4 56 push si 0 000006D5 50 push ax 0 000006D6 8946FA mov word ptr [bp-6], ax 0 000006D9 16 push ss 0 000006DA 1F pop ds 0 000006DB E8FEFF call _init_fmemcpy 0 000006DE 8EC6 mov es, si 0 000006E0 8B5EFA mov bx, word ptr [bp-6] 0 000006E3 8A66F8 mov ah, byte ptr [bp-8] 0 000006E6 260027 add byte ptr es:[bx], ah 0 000006E9 36C43E0000 les di, dword ptr ss:[_LoL] 0 000006EE 268A5546 mov dl, byte ptr es:[di+70] 0 000006F2 30F6 xor dh, dh 0 000006F4 3956F8 cmp word ptr [bp-8], dx 0 000006F7 8B46FC mov ax, word ptr [bp-4] 0 000006FA 8B4EFE mov cx, word ptr [bp-2] 0 000006FD 7D47 jge _.L23 0 000006FF 83F8FF cmp ax, -1 0 00000702 7505 jne _.L27 0 00000704 83F9FF cmp cx, -1 0 00000707 743D je _.L23 245 _.L27: 0 00000709 8EC6 mov es, si 0 0000070B 26894745 mov word ptr es:[bx+69], ax 0 0000070F 26894F47 mov word ptr es:[bx+71], cx 0 00000713 26C747430040 mov word ptr es:[bx+67], 16384 0 00000719 89C2 mov dx, ax 0 0000071B 8EC1 mov es, cx 0 0000071D 97 xchg di, ax 0 0000071E 268B4519 mov ax, word ptr es:[di+25] 0 00000722 268B4D1B mov cx, word ptr es:[di+27] 255 _.L25: 0 00000726 8EC6 mov es, si 0 00000728 26C74749FFFF mov word ptr es:[bx+73], -1 0 0000072E 26C7474BFFFF mov word ptr es:[bx+75], -1 0 00000734 26C7474DFFFF mov word ptr es:[bx+77], -1 0 0000073A 26C7474F0200 mov word ptr es:[bx+79], 2 0 00000740 FF46F8 inc word ptr [bp-8] 0 00000743 E91EFF jmp _.L22 263 _.L23: 0 00000746 8EC6 mov es, si 0 00000748 26C747430000 mov word ptr es:[bx+67], 0 0 0000074E EBD6 jmp _.L25 267 .size _FsConfig, .-_FsConfig 268 .type _EmulatedDriveStatus.constprop.0, @function 269 _EmulatedDriveStatus.constprop.0: 0 00000750 55 push bp 0 00000751 89E5 mov bp, sp 0 00000753 83EC2C sub sp, 44 0 00000756 C646D513 mov byte ptr [bp-43], 19 0 0000075A C746E8004B mov word ptr [bp-24], 19200 0 0000075F 8B4604 mov ax, word ptr [bp+4] 0 00000762 8846EE mov byte ptr [bp-18], al 0 00000765 8D46D5 lea ax, [-43+bp] 0 00000768 8946F0 mov word ptr [bp-16], ax 0 0000076B 8D46E8 lea ax, [-24+bp] 0 0000076E 50 push ax 0 0000076F B81300 mov ax, 19 0 00000772 50 push ax 0 00000773 E8FEFF call _init_call_intr 0 00000776 8B46FE mov ax, word ptr [bp-2] 0 00000779 F7D0 not ax 0 0000077B 83E001 and ax, 1 0 0000077E 89EC mov sp, bp 0 00000780 5D pop bp 0 00000781 C20200 ret 2 290 .size _EmulatedDriveStatus.constprop.0, .-_EmulatedDriveStatus.constprop.0 291 .global _InitializeAllBPBs 292 .type _InitializeAllBPBs, @function 293 _InitializeAllBPBs: 0 00000784 BA4300 mov dx, 67 0 00000787 C41E0000 les bx, dword ptr [_LoL] 0 0000078B 268A4746 mov al, byte ptr es:[bx+70] 0 0000078F 30E4 xor ah, ah 0 00000791 83C040 add ax, 64 0 00000794 39C2 cmp dx, ax 0 00000796 7E01 jle _.L37 301 _.L38: 0 00000798 C3 ret 303 _.L37: 0 00000799 55 push bp 0 0000079A 89E5 mov bp, sp 0 0000079C 1E push ds 307 _.L34: 0 0000079D BB0000 mov bx, offset _filename.1897 0 000007A0 8817 mov byte ptr [bx], dl 0 000007A2 8956FE mov word ptr [bp-2], dx 0 000007A5 31C0 xor ax, ax 0 000007A7 50 push ax 0 000007A8 53 push bx 0 000007A9 E8FEFF call _init_DosOpen 0 000007AC 85C0 test ax, ax 0 000007AE 8B56FE mov dx, word ptr [bp-2] 0 000007B1 7C07 jl _.L33 0 000007B3 50 push ax 0 000007B4 E8FEFF call _close 0 000007B7 8B56FE mov dx, word ptr [bp-2] 321 _.L33: 0 000007BA 42 inc dx 0 000007BB C41E0000 les bx, dword ptr [_LoL] 0 000007BF 268A4746 mov al, byte ptr es:[bx+70] 0 000007C3 30E4 xor ah, ah 0 000007C5 83C040 add ax, 64 0 000007C8 39C2 cmp dx, ax 0 000007CA 7ED1 jle _.L34 0 000007CC 89EC mov sp, bp 0 000007CE 5D pop bp 0 000007CF EBC7 jmp _.L38 332 .size _InitializeAllBPBs, .-_InitializeAllBPBs 333 .global _init_getvec 334 .type _init_getvec, @function 335 _init_getvec: 0 000007D1 89E3 mov bx, sp 337 #APP 338 ;# 150 "../hdr/portab.h" 1 1 /****************************************************************/ 2 /* */ 3 /* portab.h */ 4 /* */ 5 /* DOS-C portability typedefs, etc. */ 6 /* */ 7 /* May 1, 1995 */ 8 /* */ 9 /* Copyright (c) 1995 */ 10 /* Pasquale J. Villani */ 11 /* All Rights Reserved */ 12 /* */ 13 /* This file is part of DOS-C. */ 14 /* */ 15 /* DOS-C is free software; you can redistribute it and/or */ 16 /* modify it under the terms of the GNU General Public License */ 17 /* as published by the Free Software Foundation; either version */ 18 /* 2, or (at your option) any later version. */ 19 /* */ 20 /* DOS-C is distributed in the hope that it will be useful, but */ 21 /* WITHOUT ANY WARRANTY; without even the implied warranty of */ 22 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See */ 23 /* the GNU General Public License for more details. */ 24 /* */ 25 /* You should have received a copy of the GNU General Public */ 26 /* License along with DOS-C; see the file COPYING. If not, */ 27 /* write to the Free Software Foundation, 675 Mass Ave, */ 28 /* Cambridge, MA 02139, USA. */ 29 /****************************************************************/ 30 31 #ifdef MAIN 32 #ifdef VERSION_STRINGS 33 static char *portab_hRcsId = 34 "$Id: portab.h 1121 2005-03-15 15:25:08Z perditionc $"; 35 #endif 36 #endif 37 38 /****************************************************************/ 39 /* */ 40 /* Machine dependant portable types. Note that this section is */ 41 /* used primarily for segmented architectures. Common types and */ 42 /* types used relating to segmented operations are found here. */ 43 /* */ 44 /* Be aware that segmented architectures impose on linear */ 45 /* architectures because they require special types to be used */ 46 /* throught the code that must be reduced to empty preprocessor */ 47 /* replacements in the linear machine. */ 48 /* */ 49 /* #ifdef */ 50 /* # define FAR far */ 51 /* # define NEAR near */ 52 /* #endif */ 53 /* */ 54 /* #ifdef */ 55 /* # define FAR */ 56 /* # define NEAR */ 57 /* #endif */ 58 /* */ 59 /****************************************************************/ 60 61 /* commandline overflow - removing -DI86 TE */ 62 #if defined(__TURBOC__) 63 64 #define I86 65 #define CDECL cdecl 66 #if __TURBOC__ > 0x202 67 /* printf callers do the right thing for tc++ 1.01 but not tc 2.01 */ 68 #define VA_CDECL 69 #else 70 #define VA_CDECL cdecl 71 #endif 72 #define PASCAL pascal 73 void __int__(int); 74 #ifndef FORSYS 75 void __emit__(char, ...); 76 #define disable() __emit__(0xfa) 77 #define enable() __emit__(0xfb) 78 #endif 79 80 #elif defined(_MSC_VER) 81 82 #define I86 83 #define asm __asm 84 #pragma warning(disable: 4761) /* "integral size mismatch in argument; 85 conversion supplied" */ 86 #define CDECL _cdecl 87 #define VA_CDECL 88 #define PASCAL pascal 89 #define __int__(intno) asm int intno; 90 #define disable() asm cli 91 #define enable() asm sti 92 #define _CS getCS() 93 static unsigned short __inline getCS(void) 94 { 95 asm mov ax, cs; 96 } 97 #define _SS getSS() 98 static unsigned short __inline getSS(void) 99 { 100 asm mov ax, ss; 101 } 102 103 #elif defined(__WATCOMC__) /* don't know a better way */ 104 105 #if defined(_M_I86) 106 107 #define I86 108 #define __int__(intno) asm int intno; 109 void disable(void); 110 #pragma aux disable = "cli" __modify __exact []; 111 void enable(void); 112 #pragma aux enable = "sti" __modify __exact []; 113 #define asm __asm 114 #define far __far 115 #define CDECL __cdecl 116 #define VA_CDECL 117 #define PASCAL pascal 118 #define _CS getCS() 119 unsigned short getCS(void); 120 #pragma aux getCS = "mov dx,cs" __value [__dx] __modify __exact[__dx]; 121 #define _SS getSS() 122 unsigned short getSS(void); 123 #pragma aux getSS = "mov dx,ss" __value [__dx] __modify __exact[__dx]; 124 #if !defined(FORSYS) && !defined(EXEFLAT) && _M_IX86 >= 300 125 #pragma aux __default __parm [__ax __dx __cx] __modify [__ax __dx __es __fs] /* min.unpacked size */ 126 #endif 127 128 /* enable Possible loss of precision warning for compatibility with Borland */ 129 #pragma enable_message(130) 130 131 #else 132 133 /* workaround for building some utils with OpenWatcom (flat model) */ 134 #define MC68K 135 136 #endif 137 138 #elif defined (_MYMC68K_COMILER_) 139 140 #define MC68K 141 142 #elif defined(__GNUC__) 143 144 #ifdef __FAR 145 #define I86 146 #define STRINGIFY(x) #x 147 #define __int__(intno) asm volatile(STRINGIFY(int $##intno)) 148 static inline void disable(void) 149 { 0 000007D3 FA asm volatile("cli"); 151 } 339 cli 340 ;# 0 "" 2 341 ;# 154 "../hdr/portab.h" 1 152 static inline void enable(void) 153 { 0 000007D4 FB asm volatile("sti"); 155 } 342 sti 343 ;# 0 "" 2 344 #NO_APP 0 000007D5 8A4702 mov al, byte ptr [bx+2] 0 000007D8 30E4 xor ah, ah 0 000007DA B102 mov cl, 2 0 000007DC D3E0 shl ax, cl 0 000007DE 89C3 mov bx, ax 0 000007E0 99 cwd 0 000007E1 8EC2 mov es, dx 0 000007E3 268B07 mov ax, word ptr es:[bx] 0 000007E6 268B5702 mov dx, word ptr es:[bx+2] 0 000007EA C20200 ret 2 355 .size _init_getvec, .-_init_getvec 356 .global _setvec 357 .type _setvec, @function 358 _setvec: 0 000007ED 57 push di 0 000007EE 89E3 mov bx, sp 0 000007F0 8E5F08 mov ds, word ptr [bx+8] 362 #APP 363 ;# 150 "../hdr/portab.h" 1 364 cli 365 ;# 0 "" 2 366 #NO_APP 0 000007F4 368A4704 mov al, byte ptr ss:[bx+4] 0 000007F8 30E4 xor ah, ah 0 000007FA B102 mov cl, 2 0 000007FC D3E0 shl ax, cl 0 000007FE 99 cwd 0 000007FF 368B5F06 mov bx, word ptr ss:[bx+6] 0 00000803 8EC2 mov es, dx 0 00000805 89C7 mov di, ax 0 00000807 26891D mov word ptr es:[di], bx 0 0000080A 93 xchg bx, ax 0 0000080B 268C5F02 mov word ptr es:[bx+2], ds 378 #APP 379 ;# 154 "../hdr/portab.h" 1 380 sti 381 ;# 0 "" 2 382 #NO_APP 0 00000810 5F pop di 0 00000811 16 push ss 0 00000812 1F pop ds 0 00000813 C20600 ret 6 387 .size _setvec, .-_setvec === Switch to base=012B40h -> ".RODATA.STR1.1" 388 .section .rodata.str1.1 389 _.LC5: 0 0000064A 0A00 .string "\n" === Switch to base=002270h -> ".TEXT" 391 .text 392 .global _init_device 393 .type _init_device, @function 394 _init_device: 0 00000816 56 push si 0 00000817 57 push di 0 00000818 55 push bp 0 00000819 89E5 mov bp, sp 0 0000081B 83EC2A sub sp, 42 0 0000081E 8B4608 mov ax, word ptr [bp+8] 0 00000821 8946D8 mov word ptr [bp-40], ax 0 00000824 8B760A mov si, word ptr [bp+10] 0 00000827 837E0C00 cmp word ptr [bp+12], 0 0 0000082B 745C je _.L44 0 0000082D 8B460C mov ax, word ptr [bp+12] 0 00000830 8946D6 mov word ptr [bp-42], ax 0 00000833 91 xchg cx, ax 408 _.L45: 0 00000834 89CB mov bx, cx 0 00000836 8A07 mov al, byte ptr [bx] 0 00000838 A8DF test al, -33 0 0000083A 7428 je _.L48 0 0000083C 3C09 cmp al, 9 0 0000083E 7424 je _.L48 0 00000840 41 inc cx 0 00000841 3C5C cmp al, 92 0 00000843 9F lahf 0 00000844 D0E4 shl ah, 1 0 00000846 99 cwd 0 00000847 88D4 mov ah, dl 0 00000849 F6DC neg ah 0 0000084B 88E3 mov bl, ah 0 0000084D 3C2F cmp al, 47 0 0000084F 9F lahf 0 00000850 D0E4 shl ah, 1 0 00000852 99 cwd 0 00000853 F6DA neg dl 0 00000855 88DC mov ah, bl 0 00000857 08D4 or ah, dl 0 00000859 7504 jne _.L67 0 0000085B 3C3A cmp al, 58 0 0000085D 75D5 jne _.L45 433 _.L67: 0 0000085F 894ED6 mov word ptr [bp-42], cx 0 00000862 EBD0 jmp _.L45 436 _.L48: 0 00000864 31DB xor bx, bx 0 00000866 88DC mov ah, bl 439 _.L52: 0 00000868 88E0 mov al, ah 0 0000086A 3B4ED6 cmp cx, word ptr [bp-42] 0 0000086D 740F je _.L51 0 0000086F 8B7ED6 mov di, word ptr [bp-42] 0 00000872 8A05 mov al, byte ptr [di] 0 00000874 3C2E cmp al, 46 0 00000876 7503E90901 je _.L62 0 0000087B FF46D6 inc word ptr [bp-42] 448 _.L51: 0 0000087E 89EF mov di, bp 0 00000880 8841DA mov byte ptr [bx+di-38], al 0 00000883 43 inc bx 0 00000884 83FB08 cmp bx, 8 0 00000887 75DF jne _.L52 454 _.L44: 0 00000889 C646E300 mov byte ptr [bp-29], 0 0 0000088D C746E50000 mov word ptr [bp-27], 0 0 00000892 C646E400 mov byte ptr [bp-28], 0 0 00000896 C646E21E mov byte ptr [bp-30], 30 0 0000089A 8B5E10 mov bx, word ptr [bp+16] 0 0000089D C407 les ax, dword ptr [bx] 0 0000089F 8946F0 mov word ptr [bp-16], ax 0 000008A2 8C46F2 mov word ptr [bp-14], es 0 000008A5 8B560C mov dx, word ptr [bp+12] 0 000008A8 8CD0 mov ax, ss 0 000008AA 85D2 test dx, dx 0 000008AC 7505 jne _.L53 0 000008AE BA1100 mov dx, offset _.LC5 0 000008B1 8CD0 mov ax, ss 469 _.L53: 0 000008B3 8956F4 mov word ptr [bp-12], dx 0 000008B6 8946F6 mov word ptr [bp-10], ax 0 000008B9 C41E0000 les bx, dword ptr [_LoL] 0 000008BD 268A4746 mov al, byte ptr es:[bx+70] 0 000008C1 8846F8 mov byte ptr [bp-8], al 0 000008C4 56 push si 0 000008C5 FF76D8 push word ptr [bp-40] 0 000008C8 8D46E2 lea ax, [-30+bp] 0 000008CB 16 push ss 0 000008CC 50 push ax 0 000008CD E8FEFF call _init_execrh 0 000008D0 8B46E5 mov ax, word ptr [bp-27] 0 000008D3 250081 and ax, -32512 0 000008D6 3D0080 cmp ax, -32768 0 000008D9 7503E9C100 je _.L65 0 000008DE 837E0C00 cmp word ptr [bp+12], 0 0 000008E2 7459 je _.L55 0 000008E4 8B5EF0 mov bx, word ptr [bp-16] 0 000008E7 8B46F2 mov ax, word ptr [bp-14] 0 000008EA 395ED8 cmp word ptr [bp-40], bx 0 000008ED 7507 jne _.L68 0 000008EF 39C6 cmp si, ax 0 000008F1 7503E9A900 je _.L65 493 _.L68: 0 000008F6 8EC6 mov es, si 0 000008F8 8B7ED8 mov di, word ptr [bp-40] 0 000008FB 26837D0400 cmp word ptr es:[di+4], 0 0 00000900 7C09 jl _.L57 0 00000902 807EEF00 cmp byte ptr [bp-17], 0 0 00000906 7503E99400 je _.L65 500 _.L57: 0 0000090B 8EC6 mov es, si 0 0000090D 8B7ED8 mov di, word ptr [bp-40] 0 00000910 26833DFF cmp word ptr es:[di], -1 0 00000914 7219 jc _.L58 0 00000916 FF760E push word ptr [bp+14] 0 00000919 8D56DA lea dx, [-38+bp] 0 0000091C 52 push dx 0 0000091D B244 mov dl, 68 0 0000091F 52 push dx 0 00000920 29F0 sub ax, si 0 00000922 83C30F add bx, 15 0 00000925 B104 mov cl, 4 0 00000927 D3EB shr bx, cl 0 00000929 01D8 add ax, bx 0 0000092B 50 push ax 0 0000092C E8FEFF call _KernelAllocPara 517 _.L58: 0 0000092F 8B46F0 mov ax, word ptr [bp-16] 0 00000932 8B5E10 mov bx, word ptr [bp+16] 0 00000935 8907 mov word ptr [bx], ax 0 00000937 8B46F2 mov ax, word ptr [bp-14] 0 0000093A 894702 mov word ptr [bx+2], ax 523 _.L55: 0 0000093D 8EC6 mov es, si 0 0000093F 8B5ED8 mov bx, word ptr [bp-40] 0 00000942 26837F0400 cmp word ptr es:[bx+4], 0 0 00000947 7C12 jl _.L59 0 00000949 8A46EF mov al, byte ptr [bp-17] 0 0000094C 84C0 test al, al 0 0000094E 740B je _.L59 0 00000950 2688470A mov byte ptr es:[bx+10], al 0 00000954 56 push si 0 00000955 FF76D8 push word ptr [bp-40] 0 00000958 E88EFB call _update_dcb 535 _.L59: 0 0000095B 8EC6 mov es, si 0 0000095D 8B5ED8 mov bx, word ptr [bp-40] 0 00000960 268B4704 mov ax, word ptr es:[bx+4] 0 00000964 89C2 mov dx, ax 0 00000966 83E201 and dx, 1 0 00000969 741E je _.L60 0 0000096B C41E0000 les bx, dword ptr [_LoL] 0 0000096F 8B56D8 mov dx, word ptr [bp-40] 0 00000972 26895732 mov word ptr es:[bx+50], dx 0 00000976 26897734 mov word ptr es:[bx+52], si 546 _.L85: 0 0000097A 31C0 xor ax, ax 548 _.L43: 0 0000097C 89EC mov sp, bp 0 0000097E 5D pop bp 0 0000097F 5F pop di 0 00000980 5E pop si 0 00000981 C20A00 ret 10 554 _.L62: 0 00000984 88E0 mov al, ah 0 00000986 E9F5FE jmp _.L51 557 _.L60: 0 00000989 83E008 and ax, 8 0 0000098C 74EE je _.L43 0 0000098E C41E0000 les bx, dword ptr [_LoL] 0 00000992 8B4ED8 mov cx, word ptr [bp-40] 0 00000995 26894F2E mov word ptr es:[bx+46], cx 0 00000999 26897730 mov word ptr es:[bx+48], si 0 0000099D EBDB jmp _.L85 565 _.L65: 0 0000099F B80100 mov ax, 1 0 000009A2 EBD8 jmp _.L43 568 .size _init_device, .-_init_device === Switch to base=012B40h -> ".RODATA.STR1.1" 569 .section .rodata.str1.1 570 _.LC6: 0 0000064C 202F5900 .string " /Y" 572 _.LC7: 0 00000650 202F4400 .string " /D" 574 _.LC8: 0 00000654 466C6F70707900 .string "Floppy" 576 _.LC9: 0 0000065B 0A0A0A2020202020 .string "\n\n\n Hit any key within %d seconds to continue boot from %s\n Hit 'H' or wait %d seconds to boot from Harddisk\n" 0 00000663 48697420616E7920 0 0000066B 6B65792077697468 0 00000673 696E202564207365 0 0000067B 636F6E647320746F 0 00000683 20636F6E74696E75 0 0000068B 6520626F6F742066 0 00000693 726F6D2025730A20 0 0000069B 2020202048697420 0 000006A3 274827206F722020 0 000006AB 2020776169742025 0 000006B3 64207365636F6E64 0 000006BB 7320746F20626F6F 0 000006C3 742066726F6D2048 0 000006CB 6172646469736B0A 0 000006D3 00 578 _.LC10: 0 000006D4 0A25530A0A00 .string "\n%S\n\n" 580 _.LC11: 0 000006DA 0A25534B65726E65 .string "\n%SKernel compatibility %d.%d - GNUC - 808x compatible - FAT32 support\n\n%s" 0 000006E2 6C20636F6D706174 0 000006EA 6962696C69747920 0 000006F2 25642E2564202D20 0 000006FA 474E5543202D2038 0 00000702 30387820636F6D70 0 0000070A 617469626C65202D 0 00000712 2046415433322073 0 0000071A 7570706F72740A0A 0 00000722 257300 === Switch to base=012B40h -> ".RODATA" 582 .section .rodata 583 _.LC12: 0 0000061E 504154483D2E00 .string "PATH=." 0 00000625 00 .string "" 0 00000626 00 .string "" 0 00000627 00 .string "" 0 00000628 00 .string "" === Switch to base=002270h -> ".TEXT" 589 .text 590 .global _FreeDOSmain 591 .type _FreeDOSmain, @function 592 _FreeDOSmain: 0 000009A4 56 push si 0 000009A5 57 push di 0 000009A6 55 push bp 0 000009A7 89E5 mov bp, sp 0 000009A9 81EC8400 sub sp, 132 0 000009AD B80000 mov ax, offset __ib_end 0 000009B0 2D0000 sub ax, offset __ib_start 0 000009B3 50 push ax 0 000009B4 31FF xor di, di 0 000009B6 57 push di 0 000009B7 B80000 mov ax, offset __ib_start 0 000009BA 50 push ax 0 000009BB E8FEFF call _init_memset 0 000009BE C41E0000 les bx, dword ptr [_LoL] 0 000009C2 268A4769 mov al, byte ptr es:[bx+105] 0 000009C6 8EC7 mov es, di 0 000009C8 26A2E005 mov byte ptr es:[1504], al 0 000009CC FEC0 inc al 0 000009CE 7902 jns _.L87 0 000009D0 B003 mov al, 3 613 _.L87: 0 000009D2 C41E0000 les bx, dword ptr [_LoL] 0 000009D6 26884769 mov byte ptr es:[bx+105], al 0 000009DA BE0000 mov si, offset _intvec_table@OZSEG16 0 000009DD BB0000 mov bx, offset _intvec_table 618 _.L146: 0 000009E0 8EC6 mov es, si 0 000009E2 26FF37 push word ptr es:[bx] 0 000009E5 899E7EFF mov word ptr [bp-130], bx 0 000009E9 E8FEFF call _init_getvec 0 000009EC 8EC6 mov es, si 0 000009EE 8B9E7EFF mov bx, word ptr [bp-130] 0 000009F2 26894701 mov word ptr es:[bx+1], ax 0 000009F6 26895703 mov word ptr es:[bx+3], dx 0 000009FA 83C305 add bx, 5 0 000009FD 81FB1E00 cmp bx, offset _intvec_table+30 0 00000A01 72DD jc _.L146 0 00000A03 B023 mov al, 35 631 _.L90: 0 00000A05 BE0000 mov si, offset _empty_handler@OZSEG16 0 00000A08 56 push si 0 00000A09 BA0000 mov dx, offset _empty_handler 0 00000A0C 52 push dx 0 00000A0D 50 push ax 0 00000A0E 88867EFF mov byte ptr [bp-130], al 0 00000A12 E8FEFF call _setvec 0 00000A15 8A867EFF mov al, byte ptr [bp-130] 0 00000A19 FEC0 inc al 0 00000A1B 3C40 cmp al, 64 0 00000A1D 75E6 jne _.L90 0 00000A1F B80000 mov ax, offset _HaltCpuWhileIdle@OZSEG16 0 00000A22 8EC0 mov es, ax 0 00000A24 26C606000000 mov byte ptr es:[_HaltCpuWhileIdle], 0 0 00000A2A BB0F00 mov bx, offset _vectors.1921 647 _.L93: 0 00000A2D 8A07 mov al, byte ptr [bx] 0 00000A2F 84C0 test al, al 0 00000A31 7D07 jge _.L91 0 00000A33 803E000000 cmp byte ptr [_debugger_present], 0 0 00000A38 7512 jne _.L92 653 _.L91: 0 00000A3A 56 push si 0 00000A3B FF7701 push word ptr [bx+1] 0 00000A3E 899E7EFF mov word ptr [bp-130], bx 0 00000A42 247F and al, 127 0 00000A44 50 push ax 0 00000A45 E8FEFF call _setvec 0 00000A48 8B9E7EFF mov bx, word ptr [bp-130] 661 _.L92: 0 00000A4C 83C303 add bx, 3 0 00000A4F 81FB3C00 cmp bx, offset _vectors.1921+45 0 00000A53 72D8 jc _.L93 0 00000A55 8EC7 mov es, di 0 00000A57 26C606C000EA mov byte ptr es:[192], -22 0 00000A5D 26C706C1000000 mov word ptr es:[193], offset _cpm_entry 0 00000A64 B80000 mov ax, offset _cpm_entry@OZSEG16 0 00000A67 26A3C300 mov word ptr es:[195], ax 670 #APP 671 ;# 150 "../hdr/portab.h" 1 672 cli 673 ;# 0 "" 2 674 #NO_APP 0 00000A6C 26C7066C000000 mov word ptr es:[108], offset _got_cbreak 0 00000A73 B80000 mov ax, offset _got_cbreak@OZSEG16 0 00000A76 26A36E00 mov word ptr es:[110], ax 678 #APP 679 ;# 154 "../hdr/portab.h" 1 680 sti 681 ;# 0 "" 2 682 ;# 150 "../hdr/portab.h" 1 683 cli 684 ;# 0 "" 2 685 #NO_APP 0 00000A7C 26C706A4000000 mov word ptr es:[164], offset _int29_handler 0 00000A83 B80000 mov ax, offset _int29_handler@OZSEG16 0 00000A86 26A3A600 mov word ptr es:[166], ax 689 #APP 690 ;# 154 "../hdr/portab.h" 1 691 sti 692 ;# 0 "" 2 693 #NO_APP 0 00000A8B BE0000 mov si, offset _kernel_command_line 0 00000A8E 56 push si 0 00000A8F E8FEFF call _init_strlen 0 00000A92 A30000 mov word ptr [_kernel_command_line_length], ax 0 00000A95 89F3 mov bx, si 699 _.L94: 0 00000A97 8A07 mov al, byte ptr [bx] 0 00000A99 84C0 test al, al 0 00000A9B 7403E9F502 jne _.L96 0 00000AA0 BE0000 mov si, offset _InitKernelConfig 0 00000AA3 8A440D mov al, byte ptr [si+13] 0 00000AA6 84C0 test al, al 0 00000AA8 7441 je _.L99 0 00000AAA C41E0000 les bx, dword ptr [_LoL] 0 00000AAE 26807F6902 cmp byte ptr es:[bx+105], 2 0 00000AB3 7736 ja _.L99 0 00000AB5 98 cbw 0 00000AB6 50 push ax 0 00000AB7 BA1B00 mov dx, offset _.LC8 0 00000ABA 52 push dx 0 00000ABB 50 push ax 0 00000ABC B82200 mov ax, offset _.LC9 0 00000ABF 50 push ax 0 00000AC0 E8FEFF call _init_printf 0 00000AC3 8A440D mov al, byte ptr [si+13] 0 00000AC6 98 cbw 0 00000AC7 50 push ax 0 00000AC8 E8FEFF call _GetBiosKey 0 00000ACB 83C408 add sp, 8 0 00000ACE 83F8FF cmp ax, -1 0 00000AD1 7503E9CA02 je _.L98 0 00000AD6 25DF00 and ax, 223 0 00000AD9 83F848 cmp ax, 72 0 00000ADC 7503E9BF02 je _.L98 0 00000AE1 B81100 mov ax, offset _.LC5 0 00000AE4 50 push ax 0 00000AE5 E8FEFF call _init_printf 0 00000AE8 83C402 add sp, 2 732 _.L99: 0 00000AEB 807C1500 cmp byte ptr [si+21], 0 0 00000AEF C41E0000 les bx, dword ptr [_LoL] 0 00000AF3 268B979600 mov dx, word ptr es:[bx+150] 0 00000AF8 7C03E9DE02 jge _.L100 0 00000AFD 06 push es 0 00000AFE 52 push dx 0 00000AFF B89B00 mov ax, offset _.LC10 0 00000B02 50 push ax 0 00000B03 E8FEFF call _init_printf 0 00000B06 83C406 add sp, 6 743 _.L101: 0 00000B09 C41E0000 les bx, dword ptr [_LoL] 0 00000B0D 26C687930007 mov byte ptr es:[bx+147], 7 0 00000B13 26C7879100070A mov word ptr es:[bx+145], 2567 0 00000B1A 26C68790000A mov byte ptr es:[bx+144], 10 0 00000B20 E8FEFF call _init_oem 0 00000B23 A30000 mov word ptr [_ram_top], ax 750 #APP 751 ;# 165 "../hdr/portab.h" 1 156 #define far __far 157 #define CDECL __attribute__((cdecl)) 158 #define VA_CDECL 159 #define PASCAL 160 161 #define _CS getCS() 162 static inline unsigned short getCS(void) 163 { 164 unsigned short ret; 0 00000B26 8CC8 asm volatile("{ mov %%cs, %0 | mov %0, cs }" : "=r"(ret)); 166 return ret; 752 mov ax, cs 753 ;# 0 "" 2 754 #NO_APP 0 00000B28 BA0F00 mov dx, offset ___ia16_near_alias.15+15 0 00000B2B B104 mov cl, 4 0 00000B2D D3EA shr dx, cl 0 00000B2F 29D0 sub ax, dx 0 00000B31 A30200 mov word ptr [_lpTop+2], ax 0 00000B34 C70600000000 mov word ptr [_lpTop], 0 0 00000B3A 50 push ax 0 00000B3B E8FEFF call _MoveKernel 0 00000B3E A10200 mov ax, word ptr [_lpTop+2] 0 00000B41 0501F0 add ax, -4095 0 00000B44 C7060000F0FF mov word ptr [_lpTop], -16 0 00000B4A A30200 mov word ptr [_lpTop+2], ax 0 00000B4D 8B360000 mov si, word ptr [_LoL] 0 00000B51 83C648 add si, 72 0 00000B54 8B160200 mov dx, word ptr [_LoL+2] 770 _.L102: 0 00000B58 B80000 mov ax, offset _lpTop 0 00000B5B 50 push ax 0 00000B5C 57 push di 0 00000B5D 57 push di 0 00000B5E 52 push dx 0 00000B5F 89967EFF mov word ptr [bp-130], dx 0 00000B63 56 push si 0 00000B64 E8FEFF call _init_device 0 00000B67 89F3 mov bx, si 0 00000B69 8B967EFF mov dx, word ptr [bp-130] 0 00000B6D 8EC2 mov es, dx 0 00000B6F 268B34 mov si, word ptr es:[si] 0 00000B72 268B5702 mov dx, word ptr es:[bx+2] 0 00000B76 83FEFF cmp si, -1 0 00000B79 75DD jne _.L102 0 00000B7B 8D4680 lea ax, [-128+bp] 0 00000B7E 50 push ax 0 00000B7F B91100 mov cx, 17 0 00000B82 51 push cx 0 00000B83 898E7CFF mov word ptr [bp-132], cx 0 00000B87 E8FEFF call _init_call_intr 0 00000B8A 8B4680 mov ax, word ptr [bp-128] 0 00000B8D B10E mov cl, 14 0 00000B8F D3E8 shr ax, cl 0 00000B91 89867EFF mov word ptr [bp-130], ax 0 00000B95 8D7401 lea si, [1+si] 797 _.L103: 0 00000B98 39B67EFF cmp word ptr [bp-130], si 0 00000B9C 7E03E95502 jg _.L104 0 00000BA1 8D4680 lea ax, [-128+bp] 0 00000BA4 50 push ax 0 00000BA5 FFB67CFF push word ptr [bp-132] 0 00000BA9 E8FEFF call _init_call_intr 0 00000BAC 8B7680 mov si, word ptr [bp-128] 0 00000BAF B109 mov cl, 9 0 00000BB1 D3EE shr si, cl 0 00000BB3 83E607 and si, 7 0 00000BB6 31D2 xor dx, dx 809 _.L105: 0 00000BB8 39D6 cmp si, dx 0 00000BBA B81400 mov ax, 20 0 00000BBD 7403E94B02 jne _.L106 0 00000BC2 89867EFF mov word ptr [bp-130], ax 0 00000BC6 BE6000 mov si, 96 0 00000BC9 56 push si 0 00000BCA E8FEFF call _init_PSPSet 0 00000BCD 56 push si 0 00000BCE BA8000 mov dx, 128 0 00000BD1 52 push dx 0 00000BD2 E8FEFF call _set_DTA 0 00000BD5 BA0001 mov dx, 256 0 00000BD8 52 push dx 0 00000BD9 57 push di 0 00000BDA 56 push si 0 00000BDB 57 push di 0 00000BDC E8FEFF call _init_fmemset 0 00000BDF 8EC6 mov es, si 0 00000BE1 26C7060000CD20 mov word ptr es:[0], 8397 0 00000BE8 26C60605009A mov byte ptr es:[5], -102 0 00000BEE 26C7060600C000 mov word ptr es:[6], 192 0 00000BF5 26897D08 mov word ptr es:[di+8], di 0 00000BF9 26C7065000CD21 mov word ptr es:[80], 8653 0 00000C00 26C6065200CB mov byte ptr es:[82], -53 0 00000C06 2689361600 mov word ptr es:[22], si 0 00000C0B 26C7063800FFFF mov word ptr es:[56], -1 0 00000C12 26C7063A00FFFF mov word ptr es:[58], -1 0 00000C19 26C7062C006800 mov word ptr es:[44], 104 838 #APP 839 ;# 150 "../hdr/portab.h" 1 840 cli 841 ;# 0 "" 2 842 #NO_APP 0 00000C21 8EC7 mov es, di 0 00000C23 268B168800 mov dx, word ptr es:[136] 0 00000C28 268B0E8A00 mov cx, word ptr es:[138] 846 #APP 847 ;# 154 "../hdr/portab.h" 1 848 sti 849 ;# 0 "" 2 850 #NO_APP 0 00000C2E 8EC6 mov es, si 0 00000C30 2689160A00 mov word ptr es:[10], dx 0 00000C35 26890E0C00 mov word ptr es:[12], cx 854 #APP 855 ;# 150 "../hdr/portab.h" 1 856 cli 857 ;# 0 "" 2 858 #NO_APP 0 00000C3B 8EC7 mov es, di 0 00000C3D 268B168C00 mov dx, word ptr es:[140] 0 00000C42 268B0E8E00 mov cx, word ptr es:[142] 862 #APP 863 ;# 154 "../hdr/portab.h" 1 864 sti 865 ;# 0 "" 2 866 #NO_APP 0 00000C48 8EC6 mov es, si 0 00000C4A 2689160E00 mov word ptr es:[14], dx 0 00000C4F 26890E1000 mov word ptr es:[16], cx 870 #APP 871 ;# 150 "../hdr/portab.h" 1 872 cli 873 ;# 0 "" 2 874 #NO_APP 0 00000C55 8EC7 mov es, di 0 00000C57 268B169000 mov dx, word ptr es:[144] 0 00000C5C 268B0E9200 mov cx, word ptr es:[146] 878 #APP 879 ;# 154 "../hdr/portab.h" 1 880 sti 881 ;# 0 "" 2 882 #NO_APP 0 00000C62 8EC6 mov es, si 0 00000C64 2689161200 mov word ptr es:[18], dx 0 00000C69 26890E1400 mov word ptr es:[20], cx 0 00000C6E 8B867EFF mov ax, word ptr [bp-130] 0 00000C72 26A33200 mov word ptr es:[50], ax 0 00000C76 BA1800 mov dx, 24 0 00000C79 50 push ax 0 00000C7A B8FF00 mov ax, 255 0 00000C7D 50 push ax 0 00000C7E 56 push si 0 00000C7F 52 push dx 0 00000C80 89967EFF mov word ptr [bp-130], dx 0 00000C84 E8FEFF call _init_fmemset 0 00000C87 8EC6 mov es, si 0 00000C89 8B967EFF mov dx, word ptr [bp-130] 0 00000C8D 2689163400 mov word ptr es:[52], dx 0 00000C92 2689363600 mov word ptr es:[54], si 0 00000C97 C41E0000 les bx, dword ptr [_LoL] 0 00000C9B 268A879000 mov al, byte ptr es:[bx+144] 0 00000CA0 B108 mov cl, 8 0 00000CA2 D3E0 shl ax, cl 0 00000CA4 268A979100 mov dl, byte ptr es:[bx+145] 0 00000CA9 30F6 xor dh, dh 0 00000CAB 01D0 add ax, dx 0 00000CAD 8EC6 mov es, si 0 00000CAF 26A34000 mov word ptr es:[64], ax 0 00000CB3 B80B00 mov ax, 11 0 00000CB6 50 push ax 0 00000CB7 B82000 mov ax, 32 0 00000CBA 50 push ax 0 00000CBB 89867EFF mov word ptr [bp-130], ax 0 00000CBF 56 push si 0 00000CC0 BA5D00 mov dx, 93 0 00000CC3 52 push dx 0 00000CC4 E8FEFF call _init_fmemset 0 00000CC7 B80B00 mov ax, 11 0 00000CCA 50 push ax 0 00000CCB 8B867EFF mov ax, word ptr [bp-130] 0 00000CCF 50 push ax 0 00000CD0 56 push si 0 00000CD1 B86D00 mov ax, 109 0 00000CD4 50 push ax 0 00000CD5 E8FEFF call _init_fmemset 0 00000CD8 E8FEFF call _Init_clk_driver 0 00000CDB C41E0000 les bx, dword ptr [_LoL] 0 00000CDF 26C647471A mov byte ptr es:[bx+71], 26 0 00000CE4 E8FEFF call _dsk_init 0 00000CE7 BE0000 mov si, offset _blk_dev@OZSEG16 0 00000CEA 8EC6 mov es, si 0 00000CEC 26A20A00 mov byte ptr es:[_blk_dev+10], al 0 00000CF0 E8FEFF call _PreConfig 0 00000CF3 8EC6 mov es, si 0 00000CF5 26803E0A0000 cmp byte ptr es:[_blk_dev+10], 0 0 00000CFB C7867EFF0B00 mov word ptr [bp-130], 11 0 00000D01 7408 je _.L107 0 00000D03 56 push si 0 00000D04 B80000 mov ax, offset _blk_dev 0 00000D07 50 push ax 0 00000D08 E8DEF7 call _update_dcb 942 _.L107: 0 00000D0B E83CF9 call _FsConfig 0 00000D0E 57 push di 0 00000D0F E8FEFF call _DoConfig 0 00000D12 B80100 mov ax, 1 0 00000D15 50 push ax 0 00000D16 E8FEFF call _DoConfig 0 00000D19 E8FEFF call _PreConfig2 0 00000D1C B80200 mov ax, 2 0 00000D1F 50 push ax 0 00000D20 E8FEFF call _DoConfig 0 00000D23 31F6 xor si, si 954 _.L108: 0 00000D25 56 push si 0 00000D26 E8FEFF call _close 0 00000D29 46 inc si 0 00000D2A 83FE14 cmp si, 20 0 00000D2D 75F6 jne _.L108 0 00000D2F E8FEFF call _PostConfig 0 00000D32 E815F9 call _FsConfig 0 00000D35 E8FEFF call _configDone 0 00000D38 E8FEFF call _InitializeAllBPBs 0 00000D3B E8FEFF call _DoInstall 0 00000D3E BB0000 mov bx, offset _master_env 0 00000D41 B80000 mov ax, offset _master_env@OZSEG16 0 00000D44 8EC0 mov es, ax 0 00000D46 26803F00 cmp byte ptr es:[bx], 0 0 00000D4A 750E jne _.L109 0 00000D4C FFB67EFF push word ptr [bp-130] 0 00000D50 16 push ss 0 00000D51 BA0500 mov dx, offset _.LC12 0 00000D54 52 push dx 0 00000D55 50 push ax 0 00000D56 53 push bx 0 00000D57 E8FEFF call _init_fmemcpy 977 _.L109: 0 00000D5A B87F00 mov ax, 127 0 00000D5D 50 push ax 0 00000D5E 57 push di 0 00000D5F 8D7680 lea si, [-128+bp] 0 00000D62 8D7C01 lea di, [1+si] 0 00000D65 57 push di 0 00000D66 E8FEFF call _init_memset 0 00000D69 FF360800 push word ptr [_Config+8] 0 00000D6D 57 push di 0 00000D6E E8FEFF call _init_strcpy 0 00000D71 C6468000 mov byte ptr [bp-128], 0 0 00000D75 31DB xor bx, bx 0 00000D77 88D8 mov al, bl 0 00000D79 88DC mov ah, bl 0 00000D7B B201 mov dl, 1 993 _.L110: 0 00000D7D 3C7F cmp al, 127 0 00000D7F 7403E9A500 jne _.L112 0 00000D84 84E4 test ah, ah 0 00000D86 7403 je _.L114 0 00000D88 884680 mov byte ptr [bp-128], al 999 _.L114: 0 00000D8B 16 push ss 0 00000D8C B80000 mov ax, offset _Config 0 00000D8F 50 push ax 0 00000D90 9A00000000 call (_init_call_p_0@OZSEG16):_init_call_p_0 1004 _.L96: 0 00000D95 3C3B cmp al, 59 0 00000D97 7503 jne _.L95 0 00000D99 C60700 mov byte ptr [bx], 0 1008 _.L95: 0 00000D9C 43 inc bx 0 00000D9D E9F7FC jmp _.L94 1011 _.L98: 0 00000DA0 57 push di 0 00000DA1 E8ACF9 call _EmulatedDriveStatus.constprop.0 0 00000DA4 BA8000 mov dx, 128 0 00000DA7 52 push dx 0 00000DA8 89967EFF mov word ptr [bp-130], dx 0 00000DAC E8A1F9 call _EmulatedDriveStatus.constprop.0 0 00000DAF C746800102 mov word ptr [bp-128], 513 0 00000DB4 C746840100 mov word ptr [bp-124], 1 0 00000DB9 8B967EFF mov dx, word ptr [bp-130] 0 00000DBD 895686 mov word ptr [bp-122], dx 0 00000DC0 C74682007C mov word ptr [bp-126], 31744 0 00000DC5 897E90 mov word ptr [bp-112], di 0 00000DC8 8D4680 lea ax, [-128+bp] 0 00000DCB 50 push ax 0 00000DCC B81300 mov ax, 19 0 00000DCF 50 push ax 0 00000DD0 E8FEFF call _init_call_intr 1029 #APP 1030 ;# 843 "main.c" 1 1 /****************************************************************/ 2 /* */ 3 /* main.c */ 4 /* DOS-C */ 5 /* */ 6 /* Main Kernel Functions */ 7 /* */ 8 /* Copyright (c) 1995, 1996 */ 9 /* Pasquale J. Villani */ 10 /* All Rights Reserved */ 11 /* */ 12 /* This file is part of DOS-C. */ 13 /* */ 14 /* DOS-C is free software; you can redistribute it and/or */ 15 /* modify it under the terms of the GNU General Public License */ 16 /* as published by the Free Software Foundation; either version */ 17 /* 2, or (at your option) any later version. */ 18 /* */ 19 /* DOS-C is distributed in the hope that it will be useful, but */ 20 /* WITHOUT ANY WARRANTY; without even the implied warranty of */ 21 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See */ 22 /* the GNU General Public License for more details. */ 23 /* */ 24 /* You should have received a copy of the GNU General Public */ 25 /* License along with DOS-C; see the file COPYING. If not, */ 26 /* write to the Free Software Foundation, Inc., */ 27 /* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ 28 /****************************************************************/ 29 30 #include "portab.h" 31 #include "init-mod.h" 32 #include "dyndata.h" 33 #include "debug.h" 34 35 36 static char copyright[] = 37 "(C) Copyright 1995-2023 Pasquale J. Villani and The FreeDOS Project.\n" 38 "All Rights Reserved. This is free software and comes with ABSOLUTELY NO\n" 39 "WARRANTY; you can redistribute it and/or modify it under the terms of the\n" 40 "GNU General Public License as published by the Free Software Foundation;\n" 41 "either version 2, or (at your option) any later version.\n"; 42 43 STATIC VOID InitIO(void); 44 45 STATIC VOID update_dcb(struct dhdr FAR *); 46 STATIC VOID init_kernel(VOID); 47 STATIC VOID signon(VOID); 48 STATIC VOID kernel(VOID); 49 STATIC VOID FsConfig(VOID); 50 STATIC VOID InitPrinters(VOID); 51 STATIC VOID InitSerialPorts(VOID); 52 STATIC void CheckContinueBootFromHarddisk(void); 53 STATIC void setup_int_vectors(void); 54 55 #ifdef _MSC_VER 56 BYTE _acrtused = 0; 57 58 __segment DosDataSeg = 0; /* serves for all references to the DOS DATA segment 59 necessary for MSC+our funny linking model 60 */ 61 __segment DosTextSeg = 0; 62 63 #endif 64 65 struct lol FAR *LoL = &DATASTART; 66 67 struct _KernelConfig ASM InitKernelConfig = { -1 }; 68 char ASM kernel_command_line[256] = { 0, -1 }; /* special none value */ 69 int kernel_command_line_length BSS_INIT(0); 70 UBYTE ASM debugger_present = 0xFF; /* initialised in kernel.asm 71 do NOT set 0 here or compiler may 72 move it into bss that we zero out */ 73 74 VOID ASMCFUNC FreeDOSmain(void) 75 { 76 unsigned char drv; 77 unsigned char FAR *p; 78 char * pp; 79 80 #ifdef _MSC_VER 81 extern FAR prn_dev; 82 DosDataSeg = (__segment) & DATASTART; 83 DosTextSeg = (__segment) & prn_dev; 84 #endif 85 86 /* clear the Init BSS area (what normally the RTL does */ 87 memset(_ib_start, 0, _ib_end - _ib_start); 88 89 /* if the kernel has been UPX'ed, 90 CONFIG info is stored at 50:e2 ..fc 91 and the bootdrive (passed from BIOS) 92 at 50:e0 93 */ 94 95 drv = LoL->BootDrive + 1; 96 p = MK_FP(0, 0x5e0); 97 { 98 *p = drv - 1; /* compatibility with older kernels */ 99 } 100 101 if (drv >= 0x80) 102 drv = 3; /* C: */ 103 LoL->BootDrive = drv; 104 105 /* install DOS API and other interrupt service routines, basic kernel functionality works */ 106 setup_int_vectors(); 107 108 #ifdef DEBUG 109 /* printf must go after setup_int_vectors call */ 110 if (kernel_command_line[0] == 0 && kernel_command_line[1] == (char)-1) { 111 printf("\nKERNEL: Command line is not specified.\n"); 112 } else { 113 printf("\nKERNEL: Command line is \"%s\"\n", kernel_command_line); 114 } 115 #endif 116 117 kernel_command_line_length = strlen(kernel_command_line); 118 for (pp = kernel_command_line; *pp; ++pp) { 119 if (*pp == ';') { 120 *pp = 0; 121 } 122 } 123 124 /* check if booting from floppy/CD */ 125 CheckContinueBootFromHarddisk(); 126 127 /* display copyright info and kernel emulation status */ 128 signon(); 129 130 /* initialize all internal variables, process CONFIG.SYS, load drivers, etc */ 131 init_kernel(); 132 133 #ifdef DEBUG 134 /* Non-portable message kludge alert! */ 135 printf("KERNEL: Boot drive = %c\n", 'A' + LoL->BootDrive - 1); 136 #endif 137 138 DoInstall(); 139 140 kernel(); 141 } 142 143 /* 144 InitializeAllBPBs() 145 146 or MakeNortonDiskEditorHappy() 147 148 it has been determined, that FDOS's BPB tables are initialized, 149 only when used (like DIR H:). 150 at least one known utility (norton DE) seems to access them directly. 151 ok, so we access for all drives, that the stuff gets build 152 */ 153 void InitializeAllBPBs(VOID) 154 { 155 static char filename[] = "A:-@JUNK@-.TMP"; 156 int drive, fileno; 157 for (drive = 'C'; drive < 'A' + LoL->nblkdev; drive++) 158 { 159 filename[0] = drive; 160 if ((fileno = open(filename, O_RDONLY)) >= 0) 161 close(fileno); 162 } 163 } 164 165 STATIC void PSPInit(void) 166 { 167 psp far *p = MK_FP(DOS_PSP, 0); 168 169 /* Clear out new psp first */ 170 fmemset(p, 0, sizeof(psp)); 171 /* high half is used as environment */ 172 173 /* initialize all entries and exits */ 174 /* CP/M-like exit point */ 175 p->ps_exit = 0x20cd; 176 177 /* CP/M-like entry point - call far to special entry */ 178 p->ps_farcall = 0x9a; 179 p->ps_reentry = MK_FP(0, 0x30 * 4); 180 /* unix style call - 0xcd 0x21 0xcb (int 21, retf) */ 181 p->ps_unix[0] = 0xcd; 182 p->ps_unix[1] = 0x21; 183 p->ps_unix[2] = 0xcb; 184 185 /* Now for parent-child relationships */ 186 /* parent psp segment */ 187 p->ps_parent = FP_SEG(p); 188 /* previous psp pointer */ 189 p->ps_prevpsp = MK_FP(0xffff,0xffff); 190 191 /* Environment and memory useage parameters */ 192 /* memory size in paragraphs */ 193 /* p->ps_size = 0; clear from above */ 194 /* environment paragraph */ 195 p->ps_environ = DOS_PSP + 8; 196 /* terminate address */ 197 p->ps_isv22 = getvec(0x22); 198 /* break address */ 199 p->ps_isv23 = getvec(0x23); 200 /* critical error address */ 201 p->ps_isv24 = getvec(0x24); 202 203 /* user stack pointer - int 21 */ 204 /* p->ps_stack = NULL; clear from above */ 205 206 /* File System parameters */ 207 /* maximum open files */ 208 p->ps_maxfiles = 20; 209 fmemset(p->ps_files, 0xff, 20); 210 211 /* open file table pointer */ 212 p->ps_filetab = p->ps_files; 213 214 /* default system version for int21/ah=30 */ 215 p->ps_retdosver = (LoL->os_setver_minor << 8) + LoL->os_setver_major; 216 217 /* first command line argument */ 218 /* p->ps_fcb1.fcb_drive = 0; already set */ 219 fmemset(p->ps_fcb1.fcb_fname, ' ', FNAME_SIZE + FEXT_SIZE); 220 /* second command line argument */ 221 /* p->ps_fcb2.fcb_drive = 0; already set */ 222 fmemset(p->ps_fcb2.fcb_fname, ' ', FNAME_SIZE + FEXT_SIZE); 223 224 /* do not modify command line tail, used as environment */ 225 } 226 227 #ifndef __WATCOMC__ 228 /* for WATCOMC we can use the ones in task.c */ 229 intvec getvec(unsigned char intno) 230 { 231 intvec iv; 232 disable(); 233 iv = *(intvec FAR *)MK_FP(0,4 * (intno)); 234 enable(); 235 return iv; 236 } 237 238 void setvec(unsigned char intno, intvec vector) 239 { 240 disable(); 241 *(intvec FAR *)MK_FP(0,4 * intno) = vector; 242 enable(); 243 } 244 #endif 245 246 STATIC void setup_int_vectors(void) 247 { 248 static struct vec 249 { 250 unsigned char intno; 251 size_t handleroff; 252 } vectors[] = 253 { 254 /* all of these are in the DOS DS */ 255 { 0x80 | 0x0, FP_OFF(int0_handler) }, /* zero divide */ 256 { 0x80 | 0x1, FP_OFF(empty_handler) }, /* single step */ 257 { 0x80 | 0x3, FP_OFF(empty_handler) }, /* debug breakpoint */ 258 { 0x80 | 0x6, FP_OFF(int6_handler) }, /* invalid opcode */ 259 { 0x19, FP_OFF(int19_handler) }, /* BIOS bootstrap loader, vdisk */ 260 { 0x20, FP_OFF(int20_handler) }, 261 { 0x21, FP_OFF(int21_handler) }, /* primary DOS API */ 262 { 0x22, FP_OFF(int22_handler) }, 263 { 0x24, FP_OFF(int24_handler) }, 264 { 0x25, FP_OFF(low_int25_handler) }, /* DOS abs read/write calls */ 265 { 0x26, FP_OFF(low_int26_handler) }, 266 { 0x27, FP_OFF(int27_handler) }, 267 { 0x28, FP_OFF(int28_handler) }, 268 { 0x2a, FP_OFF(int2a_handler) }, 269 { 0x2f, FP_OFF(int2f_handler) } /* multiplex int */ 270 }; 271 struct vec *pvec; 272 struct lowvec FAR *plvec; 273 int i; 274 275 /* save current int vectors so can restore on reboot and call original directly */ 276 for (plvec = intvec_table; plvec < intvec_table + 6; plvec++) 277 plvec->isv = getvec(plvec->intno); 278 279 /* install default handlers */ 280 for (i = 0x23; i <= 0x3f; i++) 281 setvec(i, empty_handler); /* note: int 31h segment should be DOS DS */ 282 HaltCpuWhileIdle = 0; 283 for (pvec = vectors; pvec < vectors + (sizeof vectors/sizeof *pvec); pvec++) 284 if ((pvec->intno & 0x80) == 0 || debugger_present == 0) 285 setvec(pvec->intno & 0x7F, (intvec)MK_FP(FP_SEG(empty_handler), pvec->handleroff)); 286 pokeb(0, 0x30 * 4, 0xea); 287 pokel(0, 0x30 * 4 + 1, (ULONG)cpm_entry); 288 289 /* handlers for int 0x1b and 0x29 are in the device driver area LOWTEXT (0x70) */ 290 setvec(0x1b, got_cbreak); 291 setvec(0x29, int29_handler); /* required for printf! */ 292 } 293 294 STATIC void init_kernel(void) 295 { 296 COUNT i; 297 298 LoL->os_setver_major = LoL->os_major = MAJOR_RELEASE; 299 LoL->os_setver_minor = LoL->os_minor = MINOR_RELEASE; 300 301 /* Init oem hook - returns memory size in KB */ 302 ram_top = init_oem(); 303 304 /* Note: HMA_TEXT and init code already moved higher in 305 conventional memory by startup code, however, we still 306 need to adjust any references to new location. So use 307 current CS as that is where we were moved to and perform 308 any fixups needed. Note this will also re-copy the === Switch to base=002270h -> "HMA_TEXT" 309 HMA_TEXT segment, so be sure not to overwrite it prior 310 to the MoveKernel() call. Kernel moved to around 8F??:0000 311 */ 312 #ifdef __WATCOMC__ 313 lpTop = MK_FP(_CS, 0); 314 #else 315 lpTop = MK_FP(_CS - (FP_OFF(_HMATextEnd) + 15) / 16, 0); 316 #endif 317 318 MoveKernel(FP_SEG(lpTop)); 319 lpTop = MK_FP(FP_SEG(lpTop) - 0xfff, 0xfff0); 320 321 /* Initialize IO subsystem */ 322 InitIO(); 323 InitPrinters(); 324 InitSerialPorts(); 325 326 init_PSPSet(DOS_PSP); 327 set_DTA(MK_FP(DOS_PSP, 0x80)); 328 PSPInit(); 329 330 Init_clk_driver(); 331 332 /* Do first initialization of system variable buffers so that */ 333 /* we can read config.sys later. */ 334 335 /* use largest possible value for the initial CDS */ 336 LoL->lastdrive = 26; 337 338 /* init_device((struct dhdr FAR *)&blk_dev, NULL, 0, &ram_top); */ 339 /* WARNING: dsk_init() must be called prior to update_dcb() to ensure 340 _Dyn (start of Dynamic memory block) is the start of drive data table (see getddt() in dsk.c) 341 */ 342 blk_dev.dh_name[0] = dsk_init(); 343 344 PreConfig(); 345 346 /* Number of units */ 347 if (blk_dev.dh_name[0] > 0) 348 update_dcb(&blk_dev); 349 350 /* Now config the temporary file system */ 351 FsConfig(); 352 353 /* Now process CONFIG.SYS */ 354 DoConfig(0); 355 DoConfig(1); 356 357 /* initialize near data and MCBs */ 358 PreConfig2(); 359 /* and process CONFIG.SYS one last time for device drivers */ 360 DoConfig(2); 361 362 363 /* Close all (device) files */ 364 for (i = 0; i < 20; i++) 365 close(i); 366 367 /* and do final buffer allocation. */ 368 PostConfig(); 369 370 /* Init the file system one more time */ 371 FsConfig(); 372 373 configDone(); 374 375 InitializeAllBPBs(); 376 } 377 378 STATIC VOID FsConfig(VOID) 379 { 380 struct dpb FAR *dpb = LoL->DPBp; 381 int i; 382 383 /* Initialize the current directory structures */ 384 for (i = 0; i < LoL->lastdrive; i++) 385 { 386 struct cds FAR *pcds_table = &LoL->CDSp[i]; 387 388 fmemcpy(pcds_table->cdsCurrentPath, "A:\\\0", 4); 389 390 pcds_table->cdsCurrentPath[0] += i; 391 392 if (i < LoL->nblkdev && (ULONG) dpb != 0xffffffffl) 393 { 394 pcds_table->cdsDpb = dpb; 395 pcds_table->cdsFlags = CDSPHYSDRV; 396 dpb = dpb->dpb_next; 397 } 398 else 399 { 400 pcds_table->cdsFlags = 0; 401 } 402 pcds_table->cdsStrtClst = 0xffff; 403 pcds_table->cdsParam = 0xffff; 404 pcds_table->cdsStoreUData = 0xffff; 405 pcds_table->cdsJoinOffset = 2; 406 } 407 408 /* Log-in the default drive. */ 409 init_setdrive(LoL->BootDrive - 1); 410 411 /* The system file tables need special handling and are "hand */ 412 /* built. Included is the stdin, stdout, stdaux and stdprn. */ 413 /* a little bit of shuffling is necessary for compatibility */ 414 415 /* sft_idx=0 is /dev/aux */ 416 open("AUX", O_RDWR); 417 418 /* handle 1, sft_idx=1 is /dev/con (stdout) */ 419 open("CON", O_RDWR); 420 421 /* 3 is /dev/aux */ 422 dup2(STDIN, STDAUX); 423 424 /* 0 is /dev/con (stdin) */ 425 dup2(STDOUT, STDIN); 426 427 /* 2 is /dev/con (stdin) */ 428 dup2(STDOUT, STDERR); 429 430 /* 4 is /dev/prn */ 431 open("PRN", O_WRONLY); 432 433 /* Initialize the disk buffer management functions */ 434 /* init_call_init_buffers(); done from CONFIG.C */ 435 } 436 437 STATIC VOID signon() 438 { 439 if (InitKernelConfig.Verbose < 0) 440 { 441 #ifdef CUSTOM_BRANDING 442 printf("\n" CUSTOM_BRANDING "\n\n"); 443 #else 444 printf("\n%S\n\n", MK_FP(FP_SEG(LoL), FP_OFF(LoL->os_release))); 445 #endif 446 } else { 447 #ifdef CUSTOM_BRANDING 448 printf("\n" CUSTOM_BRANDING "\n\n%s", copyright); 449 #else 450 printf("\n%S" 451 "Kernel compatibility %d.%d - " 452 #if defined(__BORLANDC__) 453 "BORLANDC" 454 #elif defined(__TURBOC__) 455 "TURBOC" 456 #elif defined(_MSC_VER) 457 "MSC" 458 #elif defined(__WATCOMC__) 459 "WATCOMC" 460 #elif defined(__GNUC__) 461 "GNUC" /* this is hypothetical only */ 462 #else 463 #error Unknown compiler 464 generate some bullshit error here, as the compiler should be known 465 #endif 466 #if defined (I386) 467 " - 80386 CPU required" 468 #elif defined (I186) 469 " - 80186 CPU required" 470 #else 471 " - 808x compatible" 472 #endif 473 474 #ifdef WITHFAT32 475 " - FAT32 support" 476 #endif 477 "\n\n%s", 478 MK_FP(FP_SEG(LoL), FP_OFF(LoL->os_release)), 479 MAJOR_RELEASE, MINOR_RELEASE, copyright); 480 #endif 481 } 482 } 483 484 STATIC void kernel() 485 { 486 CommandTail Cmd; 487 488 if (master_env[0] == '\0') /* some shells panic on empty master env. */ 489 fmemcpy(master_env, "PATH=.\0\0\0\0", sizeof("PATH=.\0\0\0\0")); 490 491 /* process 0 */ 492 /* Execute command.com from the drive we just booted from */ 493 memset(Cmd.ctBuffer, 0, sizeof(Cmd.ctBuffer)); 494 strcpy(Cmd.ctBuffer, Config.cfgInitTail); 495 496 for (Cmd.ctCount = 0; Cmd.ctCount < sizeof(Cmd.ctBuffer); Cmd.ctCount++) 497 if (Cmd.ctBuffer[Cmd.ctCount] == '\r') 498 break; 499 500 /* if stepping CONFIG.SYS (F5/F8), tell COMMAND.COM about it */ 501 502 /* 3 for string + 2 for "\r\n" */ 503 if (Cmd.ctCount < sizeof(Cmd.ctBuffer) - 5) 504 { 505 char *insertString = NULL; 506 507 if (singleStep) 508 insertString = " /Y"; /* single step AUTOEXEC */ 509 510 if (SkipAllConfig) 511 insertString = " /D"; /* disable AUTOEXEC */ 512 513 if (insertString) 514 { 515 516 /* insert /D, /Y as first argument */ 517 char *p, *q; 518 519 for (p = Cmd.ctBuffer; p < &Cmd.ctBuffer[Cmd.ctCount]; p++) 520 { 521 if (*p == ' ' || *p == '\t' || *p == '\r') 522 { 523 for (q = &Cmd.ctBuffer[Cmd.ctCount + 1]; q >= p; q--) 524 q[3] = q[0]; 525 memcpy(p, insertString, 3); 526 break; 527 } 528 } 529 /* save buffer -- on the stack it's fine here */ 530 Config.cfgInitTail = Cmd.ctBuffer; 531 } 532 } 533 init_call_p_0(&Config); /* go execute process 0 (the shell) */ 534 } 535 536 /* check for a block device and update device control block */ 537 STATIC VOID update_dcb(struct dhdr FAR * dhp) 538 { 539 REG COUNT Index; 540 COUNT nunits = dhp->dh_name[0]; 541 struct dpb FAR *dpb; 542 543 /* printf("nblkdev = %i\n", LoL->nblkdev); */ 544 545 /* if no units, nothing to do, ensure at least 1 unit for rest of logic */ 546 if (nunits == 0) return; 547 548 /* allocate memory for new device control blocks, insert into chain [at end], and update our pointer to new end */ 549 if ( LoL->first_mcb ) { 550 dpb = (struct dpb FAR *)KernelAlloc(nunits * sizeof(struct dpb), 'E', Config.cfgDosDataUmb); 551 } 552 else { 553 dpb = DynAlloc("DPBp", blk_dev.dh_name[0], sizeof(struct dpb)); 554 } 555 556 /* find end of dpb chain or initialize root if needed */ 557 if (LoL->nblkdev == 0) 558 { 559 /* update root pointer to new end (our just allocated block) */ 560 LoL->DPBp = dpb; 561 } 562 else 563 { 564 struct dpb FAR *tmp_dpb; 565 /* find current end of dpb chain by following next pointers to end */ 566 for (tmp_dpb = LoL->DPBp; (ULONG) tmp_dpb->dpb_next != 0xffffffffl; tmp_dpb = tmp_dpb->dpb_next) 567 ; 568 /* insert into chain [at end] */ 569 tmp_dpb->dpb_next = dpb; 570 } 571 /* dpb points to last block, one just allocated */ 572 573 for (Index = 0; Index < nunits; Index++) 574 { 575 /* printf("processing unit %i of %i nunits\n", Index, nunits); */ 576 dpb->dpb_next = dpb + 1; /* memory allocated as array, so next is just next element */ 577 dpb->dpb_unit = LoL->nblkdev; 578 dpb->dpb_subunit = Index; 579 dpb->dpb_device = dhp; 580 dpb->dpb_flags = M_CHANGED; 581 if ((LoL->CDSp != 0) && (LoL->nblkdev < LoL->lastdrive)) 582 { 583 LoL->CDSp[LoL->nblkdev].cdsDpb = dpb; 584 LoL->CDSp[LoL->nblkdev].cdsFlags = CDSPHYSDRV; 585 } 586 587 ++dpb; /* dbp = dbp->dpb_next; */ 588 ++LoL->nblkdev; 589 } 590 /* note that always at least 1 valid dpb due to above early exit if nunits==0 */ 591 (dpb - 1)->dpb_next = (void FAR *)0xFFFFFFFFl; 592 593 /* printf("processed %i nunits\n", nunits); */ 594 } 595 596 /* If cmdLine is NULL, this is an internal driver */ 597 598 BOOL init_device(struct dhdr FAR * dhp, char *cmdLine, COUNT mode, 599 char FAR **r_top) 600 { 601 request rq; 602 char name[8]; 603 604 if (cmdLine) { 605 char *p, *q, ch; 606 int i; 607 608 p = q = cmdLine; 609 for (;;) 610 { 611 ch = *p; 612 if (ch == '\0' || ch == ' ' || ch == '\t') 613 break; 614 p++; 615 if (ch == '\\' || ch == '/' || ch == ':') 616 q = p; /* remember position after path */ 617 } 618 for (i = 0; i < 8; i++) { 619 ch = '\0'; 620 if (p != q && *q != '.') 621 ch = *q++; 622 /* copy name, without extension */ 623 name[i] = ch; 624 } 625 } 626 627 rq.r_unit = 0; 628 rq.r_status = 0; 629 rq.r_command = C_INIT; 630 rq.r_length = sizeof(request); 631 rq.r_endaddr = *r_top; 632 rq.r_bpbptr = (void FAR *)(cmdLine ? cmdLine : "\n"); 633 rq.r_firstunit = LoL->nblkdev; 634 635 execrh((request FAR *) & rq, dhp); 636 637 /* 638 * Added needed Error handle 639 */ 640 if ((rq.r_status & (S_ERROR | S_DONE)) == S_ERROR) 641 return TRUE; 642 643 if (cmdLine) 644 { 645 /* Don't link in device drivers which do not take up memory */ 646 if (rq.r_endaddr == (BYTE FAR *) dhp) 647 return TRUE; 648 649 /* Don't link in block device drivers which indicate no units */ 650 if (!(dhp->dh_attr & ATTR_CHAR) && !rq.r_nunits) 651 { 652 rq.r_endaddr = (BYTE FAR *) dhp; 653 return TRUE; 654 } 655 656 657 /* Fix for multisegmented device drivers: */ 658 /* If there are multiple device drivers in a single driver file, */ 659 /* only the END ADDRESS returned by the last INIT call should be */ 660 /* the used. It is recommended that all the device drivers in */ 661 /* the file return the same address */ 662 663 if (FP_OFF(dhp->dh_next) == 0xffff) 664 { 665 KernelAllocPara(FP_SEG(rq.r_endaddr) + (FP_OFF(rq.r_endaddr) + 15)/16 666 - FP_SEG(dhp), 'D', name, mode); 667 } 668 669 /* Another fix for multisegmented device drivers: */ 670 /* To help emulate the functionallity experienced with other DOS */ 671 /* operating systems when calling multiple device drivers in a */ 672 /* single driver file, save the end address returned from the */ 673 /* last INIT call which will then be passed as the end address */ 674 /* for the next INIT call. */ 675 676 *r_top = (char FAR *)rq.r_endaddr; 677 } 678 679 if (!(dhp->dh_attr & ATTR_CHAR) && (rq.r_nunits != 0)) 680 { 681 dhp->dh_name[0] = rq.r_nunits; 682 update_dcb(dhp); 683 } 684 685 if (dhp->dh_attr & ATTR_CONIN) 686 LoL->syscon = dhp; 687 else if (dhp->dh_attr & ATTR_CLOCK) 688 LoL->clock = dhp; 689 690 return FALSE; 691 } 692 693 STATIC void InitIO(void) 694 { 695 struct dhdr far *device = &LoL->nul_dev; 696 697 /* Initialize driver chain */ 698 do { 699 init_device(device, NULL, 0, &lpTop); 700 device = device->dh_next; 701 } 702 while (FP_OFF(device) != 0xffff); 703 } 704 705 /* issue an internal error message */ 706 VOID init_fatal(BYTE * err_msg) 707 { 708 printf("\nInternal kernel error - %s\nSystem halted\n", err_msg); 709 for (;;) ; 710 } 711 712 /* 713 Initialize all printers 714 715 this should work. IMHO, this might also be done on first use 716 of printer, as I never liked the noise by a resetting printer, and 717 I usually much more often reset my system, then I print :-) 718 */ 719 720 STATIC VOID InitPrinters(VOID) 721 { 722 iregs r; 723 int num_printers, i; 724 725 init_call_intr(0x11, &r); /* get equipment list */ 726 727 num_printers = (r.a.x >> 14) & 3; /* bits 15-14 */ 728 729 for (i = 0; i < num_printers; i++) 730 { 731 r.a.x = 0x0100; /* initialize printer */ 732 r.d.x = i; 733 init_call_intr(0x17, &r); 734 } 735 } 736 737 STATIC VOID InitSerialPorts(VOID) 738 { 739 iregs r; 740 int serial_ports, i; 741 742 init_call_intr(0x11, &r); /* get equipment list */ 743 744 serial_ports = (r.a.x >> 9) & 7; /* bits 11-9 */ 745 746 for (i = 0; i < serial_ports; i++) 747 { 748 r.a.x = 0xA3; /* initialize serial port to 2400,n,8,1 */ 749 r.d.x = i; 750 init_call_intr(0x14, &r); 751 } 752 } 753 754 /***************************************************************** 755 if kernel.config.BootHarddiskSeconds is set, 756 the default is to boot from harddisk, because 757 the user is assumed to just have forgotten to 758 remove the floppy/bootable CD from the drive. 759 760 user has some seconds to hit ANY key to continue 761 to boot from floppy/cd, else the system is 762 booted from HD 763 */ 764 765 STATIC int EmulatedDriveStatus(int drive,char statusOnly) 766 { 767 iregs r; 768 char buffer[0x13]; 769 buffer[0] = 0x13; 770 771 r.a.b.h = 0x4b; /* bootable CDROM - get status */ 772 r.a.b.l = statusOnly; 773 r.d.b.l = (char)drive; 774 r.si = (int)buffer; 775 init_call_intr(0x13, &r); 776 777 if (r.flags & 1) 778 return FALSE; 779 780 return TRUE; 781 } 782 783 STATIC void CheckContinueBootFromHarddisk(void) 784 { 785 char *bootedFrom = "Floppy/CD"; 786 iregs r; 787 int key; 788 789 if (InitKernelConfig.BootHarddiskSeconds == 0) 790 return; 791 792 if (LoL->BootDrive >= 3) 793 { 794 #if 0 795 if (!EmulatedDriveStatus(0x80,1)) 796 #endif 797 { 798 /* already booted from HD */ 799 return; 800 } 801 } 802 else { 803 #if 0 804 if (!EmulatedDriveStatus(0x00,1)) 805 #endif 806 bootedFrom = "Floppy"; 807 } 808 809 printf("\n" 810 "\n" 811 "\n" 812 " Hit any key within %d seconds to continue boot from %s\n" 813 " Hit 'H' or wait %d seconds to boot from Harddisk\n", 814 InitKernelConfig.BootHarddiskSeconds, 815 bootedFrom, 816 InitKernelConfig.BootHarddiskSeconds 817 ); 818 819 key = GetBiosKey(InitKernelConfig.BootHarddiskSeconds); 820 821 if (key != -1 && (key & 0xff) != 'h' && (key & 0xff) != 'H') 822 { 823 /* user has hit a key, continue to boot from floppy/CD */ 824 printf("\n"); 825 return; 826 } 827 828 /* reboot from harddisk */ 829 EmulatedDriveStatus(0x00,0); 830 EmulatedDriveStatus(0x80,0); 831 832 /* now jump and run */ 833 r.a.x = 0x0201; 834 r.c.x = 0x0001; 835 r.d.x = 0x0080; 836 r.b.x = 0x7c00; 837 r.es = 0; 838 839 init_call_intr(0x13, &r); 840 841 { 842 #if __GNUC__ 0 00002B5A EA007C0000 asm volatile("{ jmp $0,$0x7c00 | jmp 0,0x7c00 }"::); 844 #else 1031 jmp 0,0x7c00 1032 ;# 0 "" 2 1033 #NO_APP 0 00002B5F E910FD jmp _.L99 1035 _.L100: 0 00002B62 B95801 mov cx, offset _copyright 0 00002B65 51 push cx 0 00002B66 B90A00 mov cx, 10 0 00002B69 51 push cx 0 00002B6A B90700 mov cx, 7 0 00002B6D 51 push cx 0 00002B6E 06 push es 0 00002B6F 52 push dx 0 00002B70 B8A100 mov ax, offset _.LC11 0 00002B73 50 push ax 0 00002B74 E8FEFF call _init_printf 0 00002B77 83C40C add sp, 12 0 00002B7A E913FD jmp _.L101 1049 _.L104: 0 00002B7D C746800001 mov word ptr [bp-128], 256 0 00002B82 897686 mov word ptr [bp-122], si 0 00002B85 8D4680 lea ax, [-128+bp] 0 00002B88 50 push ax 0 00002B89 B81700 mov ax, 23 0 00002B8C 50 push ax 0 00002B8D E8FEFF call _init_call_intr 0 00002B90 46 inc si 0 00002B91 E98BFD jmp _.L103 1059 _.L106: 0 00002B94 C74680A300 mov word ptr [bp-128], 163 0 00002B99 895686 mov word ptr [bp-122], dx 0 00002B9C 89967EFF mov word ptr [bp-130], dx 0 00002BA0 8D4E80 lea cx, [-128+bp] 0 00002BA3 51 push cx 0 00002BA4 50 push ax 0 00002BA5 E8FEFF call _init_call_intr 0 00002BA8 8B967EFF mov dx, word ptr [bp-130] 0 00002BAC 42 inc dx 0 00002BAD E98FFD jmp _.L105 1070 _.L112: 0 00002BB0 88C6 mov dh, al 0 00002BB2 FEC6 inc dh 0 00002BB4 8D4F01 lea cx, [1+bx] 0 00002BB7 8078010D cmp byte ptr [bx+si+1], 13 0 00002BBB 7409 je _.L111 0 00002BBD 89CB mov bx, cx 0 00002BBF 88F0 mov al, dh 0 00002BC1 88D4 mov ah, dl 0 00002BC3 E93EFF jmp _.L110 1080 _.L111: 0 00002BC6 84E4 test ah, ah 0 00002BC8 7403 je _.L115 0 00002BCA 884680 mov byte ptr [bp-128], al 1084 _.L115: 0 00002BCD 3C79 cmp al, 121 0 00002BCF 7603E93EFF ja _.L114 0 00002BD4 803E000000 cmp byte ptr [_singleStep], 0 0 00002BD9 7449 je _.L126 0 00002BDB BA1300 mov dx, offset _.LC6 1090 _.L117: 0 00002BDE 803E000000 cmp byte ptr [_SkipAllConfig], 0 0 00002BE3 7543 jne _.L127 0 00002BE5 85D2 test dx, dx 0 00002BE7 7503E926FF je _.L114 1095 _.L118: 0 00002BEC 8D7680 lea si, [-128+bp] 0 00002BEF 8D7C01 lea di, [1+si] 0 00002BF2 8D7001 lea si, [1+bx+si] 1099 _.L119: 0 00002BF5 39F7 cmp di, si 0 00002BF7 7322 jnc _.L124 0 00002BF9 8A05 mov al, byte ptr [di] 0 00002BFB 88C4 mov ah, al 0 00002BFD 80E4FB and ah, -5 0 00002C00 80FC09 cmp ah, 9 0 00002C03 7404 je _.L129 0 00002C05 3C20 cmp al, 32 0 00002C07 752C jne _.L120 1109 _.L129: 0 00002C09 89DE mov si, bx 0 00002C0B 8D5A82 lea bx, [-126+bp+si] 1112 _.L122: 0 00002C0E 39DF cmp di, bx 0 00002C10 761B jbe _.L123 0 00002C12 B80300 mov ax, 3 0 00002C15 50 push ax 0 00002C16 52 push dx 0 00002C17 57 push di 0 00002C18 E8FEFF call _init_memcpy 1120 _.L124: 0 00002C1B 8D4681 lea ax, [-127+bp] 0 00002C1E A30800 mov word ptr [_Config+8], ax 0 00002C21 E9EEFE jmp _.L114 1124 _.L126: 0 00002C24 31D2 xor dx, dx 0 00002C26 EBB6 jmp _.L117 1127 _.L127: 0 00002C28 BA1700 mov dx, offset _.LC7 0 00002C2B EBBF jmp _.L118 1130 _.L123: 0 00002C2D 8A07 mov al, byte ptr [bx] 0 00002C2F 884703 mov byte ptr [bx+3], al 0 00002C32 4B dec bx 0 00002C33 EBD9 jmp _.L122 1135 _.L120: 0 00002C35 47 inc di 0 00002C36 EBBD jmp _.L119 1138 .size _FreeDOSmain, .-_FreeDOSmain === Switch to base=012B40h -> ".RODATA.STR1.1" 1139 .section .rodata.str1.1 1140 _.LC13: 0 00000725 0A496E7465726E61 .string "\nInternal kernel error - %s\nSystem halted\n" 0 0000072D 6C206B65726E656C 0 00000735 206572726F72202D 0 0000073D 2025730A53797374 0 00000745 656D2068616C7465 0 0000074D 640A00 === Switch to base=002270h -> ".TEXT" 1142 .text 1143 .global _init_fatal 1144 .type _init_fatal, @function 1145 _init_fatal: 0 00000EB1 55 push bp 0 00000EB2 89E5 mov bp, sp 0 00000EB4 FF7604 push word ptr [bp+4] 0 00000EB7 B8EC00 mov ax, offset _.LC13 0 00000EBA 50 push ax 0 00000EBB E8FEFF call _init_printf 0 00000EBE 83C404 add sp, 4 1153 _.L155: 0 00000EC1 EBFE jmp _.L155 1155 .size _init_fatal, .-_init_fatal === Switch to base=000790h -> ".DATA" 1156 .data 1157 .type _filename.1897, @object 1158 .size _filename.1897, 15 1159 _filename.1897: 0 00000000 413A2D404A554E4B .string "A:-@JUNK@-.TMP" 0 00000008 402D2E544D5000 1161 .type _vectors.1921, @object 1162 .size _vectors.1921, 45 1163 _vectors.1921: 0 0000000F 80 .byte -128 0 00000010 0000 .hword ___ia16_near_alias.0 0 00000012 81 .byte -127 0 00000013 0000 .hword ___ia16_near_alias.1 0 00000015 83 .byte -125 0 00000016 0000 .hword ___ia16_near_alias.2 0 00000018 86 .byte -122 0 00000019 0000 .hword ___ia16_near_alias.3 0 0000001B 19 .byte 25 0 0000001C 0000 .hword ___ia16_near_alias.4 0 0000001E 20 .byte 32 0 0000001F 0000 .hword ___ia16_near_alias.5 0 00000021 21 .byte 33 0 00000022 0000 .hword ___ia16_near_alias.6 0 00000024 22 .byte 34 0 00000025 0000 .hword ___ia16_near_alias.7 0 00000027 24 .byte 36 0 00000028 0000 .hword ___ia16_near_alias.8 0 0000002A 25 .byte 37 0 0000002B 0000 .hword ___ia16_near_alias.9 0 0000002D 26 .byte 38 0 0000002E 0000 .hword ___ia16_near_alias.10 0 00000030 27 .byte 39 0 00000031 0000 .hword ___ia16_near_alias.11 0 00000033 28 .byte 40 0 00000034 0000 .hword ___ia16_near_alias.12 0 00000036 2A .byte 42 0 00000037 0000 .hword ___ia16_near_alias.13 0 00000039 2F .byte 47 0 0000003A 0000 .hword ___ia16_near_alias.14 1194 .global _debugger_present 1195 .type _debugger_present, @object 1196 .size _debugger_present, 1 1197 _debugger_present: 0 0000003C FF .byte -1 1199 .global _kernel_command_line_length === Switch to base=012B40h -> ".BSS" 1200 .bss 1201 .p2align 1 1202 .type _kernel_command_line_length, @object 1203 .size _kernel_command_line_length, 2 1204 _kernel_command_line_length: 0 00001224 0000 .skip 2,0 1206 .global _kernel_command_line === Switch to base=000790h -> ".DATA" 1207 .data 1208 .type _kernel_command_line, @object 1209 .size _kernel_command_line, 256 1210 _kernel_command_line: 0 0000003D 00 .byte 0 0 0000003E FF .byte -1 0 0000003F 0000000000000000 .skip 254,0 0 00000047 0000000000000000 0 0000004F 0000000000000000 0 00000057 0000000000000000 0 0000005F 0000000000000000 0 00000067 0000000000000000 0 0000006F 0000000000000000 0 00000077 0000000000000000 0 0000007F 0000000000000000 0 00000087 0000000000000000 0 0000008F 0000000000000000 0 00000097 0000000000000000 0 0000009F 0000000000000000 0 000000A7 0000000000000000 0 000000AF 0000000000000000 0 000000B7 0000000000000000 0 000000BF 0000000000000000 0 000000C7 0000000000000000 0 000000CF 0000000000000000 0 000000D7 0000000000000000 0 000000DF 0000000000000000 0 000000E7 0000000000000000 0 000000EF 0000000000000000 0 000000F7 0000000000000000 0 000000FF 0000000000000000 0 00000107 0000000000000000 0 0000010F 0000000000000000 0 00000117 0000000000000000 0 0000011F 0000000000000000 0 00000127 0000000000000000 0 0000012F 0000000000000000 0 00000137 000000000000 1214 .global _InitKernelConfig 1215 .type _InitKernelConfig, @object 1216 .size _InitKernelConfig, 23 1217 _InitKernelConfig: 0 0000013D FF .byte -1 0 0000013E 0000000000 .skip 5,0 0 00000143 0000000000000000 .skip 17,0 0 0000014B 0000000000000000 0 00000153 00 1221 .global _LoL 1222 .p2align 1 1223 .type _LoL, @object 1224 .size _LoL, 4 1225 _LoL: 0 00000154 0000 .hword _DATASTART 1227 .reloc ., R_386_OZSEG16, _DATASTART 0 00000156 0000 .hword 0 1229 .type _copyright, @object 1230 .size _copyright, 346 1231 _copyright: 0 00000158 28432920436F7079 .ascii "(C) Copyright 1995-2023 Pasquale J. Villani and The FreeDOS " 0 00000160 7269676874203139 0 00000168 39352D3230323320 0 00000170 5061737175616C65 0 00000178 204A2E2056696C6C 0 00000180 616E6920616E6420 0 00000188 5468652046726565 0 00000190 444F5320 0 00000194 50726F6A6563742E .ascii "Project.\nAll Rights Reserved." 0 0000019C 0A416C6C20526967 0 000001A4 6874732052657365 0 000001AC 727665642E 0 000001B1 2054686973206973 .string " This is free software and comes with ABSOLUTELY NO\nWARRANTY; you can redistribute it and/or modify it under the terms of the\nGNU General Public License as published by the Free Software 0 000001B9 206672656520736F 0 000001C1 6674776172652061 0 000001C9 6E6420636F6D6573 0 000001D1 2077697468204142 0 000001D9 534F4C5554454C59 0 000001E1 204E4F0A57415252 0 000001E9 414E54593B20796F 0 000001F1 752063616E207265 0 000001F9 6469737472696275 0 00000201 746520697420616E 0 00000209 642F6F72206D6F64 0 00000211 6966792069742075 0 00000219 6E64657220746865 0 00000221 207465726D73206F 0 00000229 66207468650A474E 0 00000231 552047656E657261 0 00000239 6C205075626C6963 0 00000241 204C6963656E7365 0 00000249 206173207075626C 0 00000251 6973686564206279 0 00000259 2074686520467265 0 00000261 6520536F66747761 0 00000269 726520466F756E64 0 00000271 6174696F6E3B0A65 0 00000279 6974686572207665 0 00000281 7273696F6E20322C 0 00000289 206F722028617420 0 00000291 796F7572206F7074 0 00000299 696F6E2920616E79 0 000002A1 206C617465722076 0 000002A9 657273696F6E2E0A 0 000002B1 00 1235 .weakref ___ia16_near_alias.15,__HMATextEnd 1236 .weakref ___ia16_near_alias.14,_int2f_handler 1237 .weakref ___ia16_near_alias.13,_int2a_handler 1238 .weakref ___ia16_near_alias.12,_int28_handler 1239 .weakref ___ia16_near_alias.11,_int27_handler 1240 .weakref ___ia16_near_alias.10,_low_int26_handler 1241 .weakref ___ia16_near_alias.9,_low_int25_handler 1242 .weakref ___ia16_near_alias.8,_int24_handler 1243 .weakref ___ia16_near_alias.7,_int22_handler 1244 .weakref ___ia16_near_alias.6,_int21_handler 1245 .weakref ___ia16_near_alias.5,_int20_handler 1246 .weakref ___ia16_near_alias.4,_int19_handler 1247 .weakref ___ia16_near_alias.3,_int6_handler 1248 .weakref ___ia16_near_alias.2,_empty_handler 1249 .weakref ___ia16_near_alias.1,_empty_handler 1250 .weakref ___ia16_near_alias.0,_int0_handler 1251 .ident "GCC: (GNU) 6.3.0" === Trace listing source: memdisk.lst 1 ; File: 2 ; memdisk.asm 3 ; Description: 4 ; Query for memdisk provided config.sys parameters 5 ; 6 ; DOS-C 7 ; Copyright (c) 2011 8 ; FreeDOS 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; 24 25 ; requires 386+ registers, check LoL->CPU >=3 prior to calling (or use 386 build) 26 27 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif === Switch to base=00E0E0h -> "INIT_TEXT" 28 segment INIT_TEXT 29 30 CPU 386 31 ;********************************************************************* 32 ; 33 ; query_memdisk() based on similar subroutine in Eric Auer's public domain getargs.asm which is based on IFMEMDSK 34 ; input: drive (in AL) to query if memdisk provided disk 35 ; output: a far * to a memdiskinfo structure as defined by memdisk (see config.c) 36 ; struct memdiskinfo FAR * query_memdisk(UBYTE drive); 37 global _query_memdisk 38 _query_memdisk: 39 ; save registers, assumes enough space on stack & valid stack frame setup, ax & dx return values 0 0000043B 06 push es 0 0000043C 57 push di 0 0000043D 6653 push ebx 0 0000043F 6651 push ecx 0 00000441 6652 push edx ; we only care about high word 0 00000443 6650 push eax ; we only care about high word 0 00000445 66BA00004953 mov edx,53490000h ; magic3 + 0 0000044B 88C2 mov dl, al ; drive number (only argument, assumed to be in AL) 0 0000044D 66B800084D45 mov eax,454d0800h ; magic1 + AH=8 (get geometry) 0 00000453 66B900004D44 mov ecx,444d0000h ; magic2 0 00000459 66BB00004B3F mov ebx,3f4b0000h ; magic4 0 0000045F CD13 int 13h ; BIOS DISK API 0 00000461 66C1E810 shr eax,16 ; ignore AX 0 00000465 66C1EB10 shr ebx,16 ; ignore BX 0 00000469 66C1E910 shr ecx,16 ; ignore CX (geometry C/S) 0 0000046D 66C1EA10 shr edx,16 ; ignore DX (geometry H in DH) 0 00000471 3D214D cmp ax,4d21h ; magic5 0 00000474 7514 jnz nomemdisk 0 00000476 81F9454D cmp cx,4d45h ; magic6 0 0000047A 750E jnz nomemdisk 0 0000047C 81FA4449 cmp dx,4944h ; magic7 0 00000480 7508 jnz nomemdisk 0 00000482 81FB534B cmp bx,4b53h ; magic8 0 00000486 7502 jnz nomemdisk 0 00000488 EB04 jmp cleanup 65 66 nomemdisk: 0 0000048A 31FF xor di, di ; return NULL; 0 0000048C 8EC7 mov es, di 69 70 cleanup: 0 0000048E 6658 pop eax 0 00000490 665A pop edx 0 00000492 89F8 mov ax, di ; return MK_FP(es, di); 0 00000494 8CC2 mov dx, es 0 00000496 6659 pop ecx 0 00000498 665B pop ebx 0 0000049A 5F pop di 0 0000049B 07 pop es 0 0000049C C3 retn === Trace listing source: memmgr.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=memmgr.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccrSaHjk.s output file : memmgr.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _joinMCBs, @function 7 _joinMCBs: 0 000099AE 56 push si 0 000099AF 57 push di 0 000099B0 55 push bp 0 000099B1 89E5 mov bp, sp 0 000099B3 31FF xor di, di 0 000099B5 8B4E08 mov cx, word ptr [bp+8] 0 000099B8 41 inc cx 15 _.L2: 0 000099B9 8E4608 mov es, word ptr [bp+8] 0 000099BC 26803D4D cmp byte ptr es:[di], 77 0 000099C0 7408 je _.L5 19 _.L6: 0 000099C2 31C0 xor ax, ax 21 _.L1: 0 000099C4 5D pop bp 0 000099C5 5F pop di 0 000099C6 5E pop si 0 000099C7 C20200 ret 2 26 _.L5: 0 000099CA 8E4608 mov es, word ptr [bp+8] 0 000099CD 268B360300 mov si, word ptr es:[3] 0 000099D2 89C8 mov ax, cx 0 000099D4 01F0 add ax, si 0 000099D6 8EC0 mov es, ax 0 000099D8 26833E010000 cmp word ptr es:[1], 0 0 000099DE 75E2 jne _.L6 0 000099E0 26833E0300FF cmp word ptr es:[3], -1 0 000099E6 7430 je _.L8 0 000099E8 268A15 mov dl, byte ptr es:[di] 0 000099EB 80FA4D cmp dl, 77 0 000099EE 7405 je _.L9 0 000099F0 80FA5A cmp dl, 90 0 000099F3 7523 jne _.L8 41 _.L9: 0 000099F5 8E4608 mov es, word ptr [bp+8] 0 000099F8 268815 mov byte ptr es:[di], dl 0 000099FB 8EC0 mov es, ax 0 000099FD 268B1E0300 mov bx, word ptr es:[3] 0 00009A02 8D5801 lea bx, [1+bx+si] 0 00009A05 8E4608 mov es, word ptr [bp+8] 0 00009A08 26891E0300 mov word ptr es:[3], bx 0 00009A0D 8EC0 mov es, ax 0 00009A0F 26C7060300FFFF mov word ptr es:[3], -1 0 00009A16 EBA1 jmp _.L2 52 _.L8: 0 00009A18 B8F9FF mov ax, -7 0 00009A1B EBA7 jmp _.L1 55 .size _joinMCBs, .-_joinMCBs 56 .global _adjust_far 57 .type _adjust_far, @function 58 _adjust_far: 0 00009A1D 57 push di 0 00009A1E 55 push bp 0 00009A1F 89E5 mov bp, sp 0 00009A21 8B5E06 mov bx, word ptr [bp+6] 0 00009A24 8B7E08 mov di, word ptr [bp+8] 0 00009A27 89D8 mov ax, bx 0 00009A29 89FA mov dx, di 0 00009A2B 83FFFF cmp di, -1 0 00009A2E 740B je _.L14 0 00009A30 89DA mov dx, bx 0 00009A32 B104 mov cl, 4 0 00009A34 D3EA shr dx, cl 0 00009A36 83E00F and ax, 15 0 00009A39 01FA add dx, di 73 _.L14: 0 00009A3B 5D pop bp 0 00009A3C 5F pop di 0 00009A3D C20400 ret 4 77 .size _adjust_far, .-_adjust_far 78 .global _DosMemAlloc 79 .type _DosMemAlloc, @function 80 _DosMemAlloc: 0 00009A40 56 push si 0 00009A41 57 push di 0 00009A42 55 push bp 0 00009A43 89E5 mov bp, sp 0 00009A45 83EC0A sub sp, 10 0 00009A48 8B4E0A mov cx, word ptr [bp+10] 0 00009A4B 31C0 xor ax, ax 0 00009A4D 8EC0 mov es, ax 89 _.L20: 90 _.L44: 0 00009A4F 368B3E[0000] mov di, word ptr ss:[_first_mcb] 0 00009A54 36F606[0000]01 test byte ptr ss:[_uppermem_link], 1 0 00009A5A 7428 je _.L21 0 00009A5C 368B16[0000] mov dx, word ptr ss:[_uppermem_root] 0 00009A61 83FAFF cmp dx, -1 0 00009A64 741E je _.L21 0 00009A66 89C8 mov ax, cx 0 00009A68 83F9FF cmp cx, -1 0 00009A6B 7506 jne _.L22 0 00009A6D 36A0[0000] mov al, byte ptr ss:[_mem_access_mode] 0 00009A71 30E4 xor ah, ah 102 _.L22: 0 00009A73 83F9FF cmp cx, -1 0 00009A76 7206 jc _.L59 0 00009A78 837E08FF cmp word ptr [bp+8], -1 0 00009A7C 7206 jc _.L21 107 _.L59: 0 00009A7E A8C0 test al, -64 0 00009A80 7402 je _.L21 0 00009A82 89D7 mov di, dx 111 _.L21: 0 00009A84 8CC6 mov si, es 0 00009A86 C746FC0000 mov word ptr [bp-4], 0 0 00009A8B 31C0 xor ax, ax 0 00009A8D 8946FE mov word ptr [bp-2], ax 0 00009A90 92 xchg dx, ax 117 _.L37: 0 00009A91 8EDF mov ds, di 0 00009A93 833E0300FF cmp word ptr [3], -1 0 00009A98 750D jne _.L24 121 _.L26: 0 00009A9A B8F9FF mov ax, -7 123 _.L19: 0 00009A9D 89EC mov sp, bp 0 00009A9F 5D pop bp 0 00009AA0 5F pop di 0 00009AA1 5E pop si 0 00009AA2 16 push ss 0 00009AA3 1F pop ds 0 00009AA4 C20800 ret 8 131 _.L24: 0 00009AA7 8EDF mov ds, di 0 00009AA9 8CC3 mov bx, es 0 00009AAB 8A07 mov al, byte ptr [bx] 0 00009AAD 3C4D cmp al, 77 0 00009AAF 7404 je _.L60 0 00009AB1 3C5A cmp al, 90 0 00009AB3 75E5 jne _.L26 139 _.L60: 0 00009AB5 8EDF mov ds, di 0 00009AB7 833E010000 cmp word ptr [1], 0 0 00009ABC 7403E98900 jne _.L28 0 00009AC1 8C46F6 mov word ptr [bp-10], es 0 00009AC4 8956F8 mov word ptr [bp-8], dx 0 00009AC7 894EFA mov word ptr [bp-6], cx 0 00009ACA 57 push di 0 00009ACB 16 push ss 0 00009ACC 1F pop ds 0 00009ACD E8DEFE call _joinMCBs 0 00009AD0 85C0 test ax, ax 0 00009AD2 75C6 jne _.L26 0 00009AD4 8B46FC mov ax, word ptr [bp-4] 0 00009AD7 09F0 or ax, si 0 00009AD9 8B4EFA mov cx, word ptr [bp-6] 0 00009ADC 8B56F8 mov dx, word ptr [bp-8] 0 00009ADF 8E46F6 mov es, word ptr [bp-10] 0 00009AE2 743A je _.L53 0 00009AE4 8E5EFC mov ds, word ptr [bp-4] 0 00009AE7 8B4403 mov ax, word ptr [si+3] 0 00009AEA 8EDF mov ds, di 0 00009AEC 3B060300 cmp ax, word ptr [3] 0 00009AF0 722C jc _.L53 163 _.L29: 0 00009AF2 8EDF mov ds, di 0 00009AF4 A10300 mov ax, word ptr [3] 0 00009AF7 394608 cmp word ptr [bp+8], ax 0 00009AFA 774E ja _.L28 0 00009AFC 83F940 cmp cx, 64 0 00009AFF 7503E96701 je _.L54 0 00009B04 7F1F jg _.L33 0 00009B06 85C9 test cx, cx 0 00009B08 7503E95E01 je _.L54 0 00009B0D 83F901 cmp cx, 1 0 00009B10 7427 je _.L34 0 00009B12 83F9FF cmp cx, -1 0 00009B15 7433 je _.L28 177 _.L56: 0 00009B17 8C46FE mov word ptr [bp-2], es 0 00009B1A 89FA mov dx, di 0 00009B1C EB2C jmp _.L28 181 _.L53: 0 00009B1E 8CC6 mov si, es 0 00009B20 897EFC mov word ptr [bp-4], di 0 00009B23 EBCD jmp _.L29 185 _.L33: 0 00009B25 81F98000 cmp cx, 128 0 00009B29 7503E93D01 je _.L54 0 00009B2E 81F98100 cmp cx, 129 0 00009B32 7405 je _.L34 0 00009B34 83F941 cmp cx, 65 0 00009B37 75DE jne _.L56 192 _.L34: 0 00009B39 8B5EFE mov bx, word ptr [bp-2] 0 00009B3C 09D3 or bx, dx 0 00009B3E 74D7 je _.L56 0 00009B40 8EDA mov ds, dx 0 00009B42 8B5EFE mov bx, word ptr [bp-2] 0 00009B45 3B4703 cmp ax, word ptr [bx+3] 0 00009B48 72CD jc _.L56 200 _.L28: 0 00009B4A 8EDF mov ds, di 0 00009B4C 8CC3 mov bx, es 0 00009B4E 803F5A cmp byte ptr [bx], 90 0 00009B51 740A je _.L36 0 00009B53 8B1E0300 mov bx, word ptr [3] 0 00009B57 8D7901 lea di, [1+bx+di] 0 00009B5A E934FF jmp _.L37 208 _.L36: 0 00009B5D 83F9FF cmp cx, -1 0 00009B60 7303E9BB00 jc _.L38 0 00009B65 8B46FC mov ax, word ptr [bp-4] 0 00009B68 09F0 or ax, si 0 00009B6A 7503E9B100 je _.L38 0 00009B6F 8E5EFC mov ds, word ptr [bp-4] 0 00009B72 8B4403 mov ax, word ptr [si+3] 0 00009B75 394608 cmp word ptr [bp+8], ax 0 00009B78 7603E9A300 ja _.L38 0 00009B7D 8B5E0E mov bx, word ptr [bp+14] 0 00009B80 368907 mov word ptr ss:[bx], ax 0 00009B83 8976FE mov word ptr [bp-2], si 0 00009B86 8CDA mov dx, ds 222 _.L39: 0 00009B88 8EDA mov ds, dx 0 00009B8A 8B5EFE mov bx, word ptr [bp-2] 0 00009B8D 837F0300 cmp word ptr [bx+3], 0 0 00009B91 7503E99400 je _.L42 227 _.L43: 0 00009B96 83F9FF cmp cx, -1 0 00009B99 7465 je _.L47 230 _.L32: 0 00009B9B 8EC2 mov es, dx 0 00009B9D 8B5EFE mov bx, word ptr [bp-2] 0 00009BA0 268B7703 mov si, word ptr es:[bx+3] 0 00009BA4 397608 cmp word ptr [bp+8], si 0 00009BA7 7457 je _.L47 0 00009BA9 89C8 mov ax, cx 0 00009BAB 83E0BF and ax, -65 0 00009BAE 83F802 cmp ax, 2 0 00009BB1 268A07 mov al, byte ptr es:[bx] 0 00009BB4 7409 je _.L61 0 00009BB6 81F98200 cmp cx, 130 0 00009BBA 7403E9B400 jne _.L48 243 _.L61: 0 00009BBF 8B4E08 mov cx, word ptr [bp+8] 0 00009BC2 F7D1 not cx 0 00009BC4 01CE add si, cx 0 00009BC6 8EC2 mov es, dx 0 00009BC8 8B5EFE mov bx, word ptr [bp-2] 0 00009BCB 26897703 mov word ptr es:[bx+3], si 0 00009BCF 89D3 mov bx, dx 0 00009BD1 8D7001 lea si, [1+bx+si] 0 00009BD4 8EC6 mov es, si 0 00009BD6 8B5EFE mov bx, word ptr [bp-2] 0 00009BD9 268807 mov byte ptr es:[bx], al 0 00009BDC 8EC2 mov es, dx 0 00009BDE 8B5EFE mov bx, word ptr [bp-2] 0 00009BE1 26C6074D mov byte ptr es:[bx], 77 0 00009BE5 89D1 mov cx, dx 0 00009BE7 89F2 mov dx, si 260 _.L50: 0 00009BE9 8EC1 mov es, cx 0 00009BEB 8B5EFE mov bx, word ptr [bp-2] 0 00009BEE 26C747010000 mov word ptr es:[bx+1], 0 0 00009BF4 8EC2 mov es, dx 0 00009BF6 8B4608 mov ax, word ptr [bp+8] 0 00009BF9 8B5EFE mov bx, word ptr [bp-2] 0 00009BFC 26894703 mov word ptr es:[bx+3], ax 268 _.L47: 0 00009C00 36A1[0000] mov ax, word ptr ss:[_cu_psp] 0 00009C04 8EC2 mov es, dx 0 00009C06 8B5EFE mov bx, word ptr [bp-2] 0 00009C09 26894701 mov word ptr es:[bx+1], ax 0 00009C0D 8B5EFE mov bx, word ptr [bp-2] 0 00009C10 26C6470800 mov byte ptr es:[bx+8], 0 0 00009C15 8B5E0C mov bx, word ptr [bp+12] 0 00009C18 368917 mov word ptr ss:[bx], dx 0 00009C1B 31C0 xor ax, ax 0 00009C1D E97DFE jmp _.L19 279 _.L38: 0 00009C20 8B46FE mov ax, word ptr [bp-2] 0 00009C23 09D0 or ax, dx 0 00009C25 7403E95EFF jne _.L39 283 _.L42: 0 00009C2A 83F9FF cmp cx, -1 0 00009C2D 7520 jne _.L40 286 _.L41: 0 00009C2F 837E0E00 cmp word ptr [bp+14], 0 0 00009C33 7414 je _.L57 0 00009C35 8B46FC mov ax, word ptr [bp-4] 0 00009C38 09F0 or ax, si 0 00009C3A 7407 je _.L45 0 00009C3C 8E46FC mov es, word ptr [bp-4] 0 00009C3F 268B4403 mov ax, word ptr es:[si+3] 294 _.L45: 0 00009C43 8B5E0E mov bx, word ptr [bp+14] 0 00009C46 368907 mov word ptr ss:[bx], ax 297 _.L57: 0 00009C49 B8F8FF mov ax, -8 0 00009C4C E94EFE jmp _.L19 300 _.L40: 0 00009C4F F6C180 test cl, -128 0 00009C52 74DB je _.L41 0 00009C54 36F606[0000]01 test byte ptr ss:[_uppermem_link], 1 0 00009C5A 74D3 je _.L41 0 00009C5C 36833E[0000]FF cmp word ptr ss:[_uppermem_root], -1 0 00009C62 74CB je _.L41 0 00009C64 81E17FFF and cx, -129 0 00009C68 E9E4FD jmp _.L44 309 _.L54: 0 00009C6B 8C46FE mov word ptr [bp-2], es 0 00009C6E 89FA mov dx, di 0 00009C70 E928FF jmp _.L32 313 _.L48: 0 00009C73 8B5E08 mov bx, word ptr [bp+8] 0 00009C76 89D7 mov di, dx 0 00009C78 8D4901 lea cx, [1+bx+di] 0 00009C7B 8EC1 mov es, cx 0 00009C7D 8B5EFE mov bx, word ptr [bp-2] 0 00009C80 268807 mov byte ptr es:[bx], al 0 00009C83 8B4608 mov ax, word ptr [bp+8] 0 00009C86 F7D0 not ax 0 00009C88 8EC2 mov es, dx 0 00009C8A 8B5EFE mov bx, word ptr [bp-2] 0 00009C8D 26034703 add ax, word ptr es:[bx+3] 0 00009C91 8EC1 mov es, cx 0 00009C93 26894703 mov word ptr es:[bx+3], ax 0 00009C97 8EC2 mov es, dx 0 00009C99 8B5EFE mov bx, word ptr [bp-2] 0 00009C9C 26C6074D mov byte ptr es:[bx], 77 0 00009CA0 E946FF jmp _.L50 331 .size _DosMemAlloc, .-_DosMemAlloc 332 .global _DosMemLargest 333 .type _DosMemLargest, @function 334 _DosMemLargest: 0 00009CA3 56 push si 0 00009CA4 57 push di 0 00009CA5 55 push bp 0 00009CA6 89E5 mov bp, sp 0 00009CA8 83EC06 sub sp, 6 0 00009CAB 8B7608 mov si, word ptr [bp+8] 0 00009CAE C7040000 mov word ptr [si], 0 0 00009CB2 56 push si 0 00009CB3 8D56FC lea dx, [-4+bp] 0 00009CB6 52 push dx 0 00009CB7 8956FA mov word ptr [bp-6], dx 0 00009CBA BFFFFF mov di, -1 0 00009CBD 57 push di 0 00009CBE 57 push di 0 00009CBF E8[FEFF] call _DosMemAlloc 0 00009CC2 A0[0000] mov al, byte ptr [_mem_access_mode] 0 00009CC5 84C0 test al, al 0 00009CC7 8B56FA mov dx, word ptr [bp-6] 0 00009CCA 7D22 jge _.L116 0 00009CCC C746FE0000 mov word ptr [bp-2], 0 0 00009CD1 247F and al, 127 0 00009CD3 A2[0000] mov byte ptr [_mem_access_mode], al 0 00009CD6 8D46FE lea ax, [-2+bp] 0 00009CD9 50 push ax 0 00009CDA 52 push dx 0 00009CDB 57 push di 0 00009CDC 57 push di 0 00009CDD E8[FEFF] call _DosMemAlloc 0 00009CE0 800E[0000]80 or byte ptr [_mem_access_mode], -128 0 00009CE5 8B46FE mov ax, word ptr [bp-2] 0 00009CE8 3904 cmp word ptr [si], ax 0 00009CEA 7302 jnc _.L116 0 00009CEC 8904 mov word ptr [si], ax 368 _.L116: 0 00009CEE 31C0 xor ax, ax 0 00009CF0 3904 cmp word ptr [si], ax 0 00009CF2 7503 jne _.L115 0 00009CF4 B8F8FF mov ax, -8 373 _.L115: 0 00009CF7 89EC mov sp, bp 0 00009CF9 5D pop bp 0 00009CFA 5F pop di 0 00009CFB 5E pop si 0 00009CFC C20200 ret 2 379 .size _DosMemLargest, .-_DosMemLargest 380 .global _DosMemFree 381 .type _DosMemFree, @function 382 _DosMemFree: 0 00009CFF 55 push bp 0 00009D00 89E5 mov bp, sp 0 00009D02 8B4604 mov ax, word ptr [bp+4] 0 00009D05 85C0 test ax, ax 0 00009D07 742C je _.L125 0 00009D09 31DB xor bx, bx 0 00009D0B 8EC0 mov es, ax 0 00009D0D 268A17 mov dl, byte ptr es:[bx] 0 00009D10 80FA4D cmp dl, 77 0 00009D13 7405 je _.L126 0 00009D15 80FA5A cmp dl, 90 0 00009D18 751B jne _.L125 395 _.L126: 0 00009D1A 8EC0 mov es, ax 0 00009D1C 26C70601000000 mov word ptr es:[1], 0 0 00009D23 BA0800 mov dx, 8 0 00009D26 52 push dx 0 00009D27 53 push bx 0 00009D28 50 push ax 0 00009D29 52 push dx 0 00009D2A E8[FEFF] call _fmemset 0 00009D2D 31C0 xor ax, ax 405 _.L121: 0 00009D2F 89EC mov sp, bp 0 00009D31 5D pop bp 0 00009D32 C20200 ret 2 409 _.L125: 0 00009D35 B8F7FF mov ax, -9 0 00009D38 EBF5 jmp _.L121 412 .size _DosMemFree, .-_DosMemFree 413 .global _DosMemChange 414 .type _DosMemChange, @function 415 _DosMemChange: 0 00009D3A 56 push si 0 00009D3B 57 push di 0 00009D3C 55 push bp 0 00009D3D 89E5 mov bp, sp 0 00009D3F 83EC06 sub sp, 6 0 00009D42 8B7E0A mov di, word ptr [bp+10] 0 00009D45 8B760C mov si, word ptr [bp+12] 0 00009D48 8B4608 mov ax, word ptr [bp+8] 0 00009D4B 48 dec ax 0 00009D4C 8946FE mov word ptr [bp-2], ax 0 00009D4F 31C0 xor ax, ax 0 00009D51 8ED8 mov ds, ax 0 00009D53 8E46FE mov es, word ptr [bp-2] 0 00009D56 26A10300 mov ax, word ptr es:[3] 0 00009D5A 83F8FF cmp ax, -1 0 00009D5D 750D jne _.L132 432 _.L134: 0 00009D5F B8F9FF mov ax, -7 434 _.L131: 0 00009D62 89EC mov sp, bp 0 00009D64 5D pop bp 0 00009D65 5F pop di 0 00009D66 5E pop si 0 00009D67 16 push ss 0 00009D68 1F pop ds 0 00009D69 C20600 ret 6 442 _.L132: 0 00009D6C 8CD9 mov cx, ds 0 00009D6E 8E46FE mov es, word ptr [bp-2] 0 00009D71 8CDB mov bx, ds 0 00009D73 268A17 mov dl, byte ptr es:[bx] 0 00009D76 80FA4D cmp dl, 77 0 00009D79 7405 je _.L140 0 00009D7B 80FA5A cmp dl, 90 0 00009D7E 75DF jne _.L134 451 _.L140: 0 00009D80 39F8 cmp ax, di 0 00009D82 732C jnc _.L136 0 00009D84 894EFA mov word ptr [bp-6], cx 0 00009D87 8C5EFC mov word ptr [bp-4], ds 0 00009D8A FF76FE push word ptr [bp-2] 0 00009D8D 16 push ss 0 00009D8E 1F pop ds 0 00009D8F E81CFC call _joinMCBs 0 00009D92 85C0 test ax, ax 0 00009D94 75C9 jne _.L134 0 00009D96 8E46FE mov es, word ptr [bp-2] 0 00009D99 26A10300 mov ax, word ptr es:[3] 0 00009D9D 39C7 cmp di, ax 0 00009D9F C54EFA lds cx, dword ptr [bp-6] 0 00009DA2 760C jbe _.L136 0 00009DA4 85F6 test si, si 0 00009DA6 7403 je _.L139 0 00009DA8 368904 mov word ptr ss:[si], ax 470 _.L139: 0 00009DAB B8F8FF mov ax, -8 0 00009DAE EBB2 jmp _.L131 473 _.L136: 0 00009DB0 8E46FE mov es, word ptr [bp-2] 0 00009DB3 268B160300 mov dx, word ptr es:[3] 0 00009DB8 39D7 cmp di, dx 0 00009DBA 720F jc _.L137 478 _.L138: 0 00009DBC 36A1[0000] mov ax, word ptr ss:[_cu_psp] 0 00009DC0 8E46FE mov es, word ptr [bp-2] 0 00009DC3 26A30100 mov word ptr es:[1], ax 0 00009DC7 31C0 xor ax, ax 0 00009DC9 EB97 jmp _.L131 484 _.L137: 0 00009DCB 8B5EFE mov bx, word ptr [bp-2] 0 00009DCE 8D7101 lea si, [1+bx+di] 0 00009DD1 89F8 mov ax, di 0 00009DD3 F7D0 not ax 0 00009DD5 01D0 add ax, dx 0 00009DD7 8EC6 mov es, si 0 00009DD9 26A30300 mov word ptr es:[3], ax 0 00009DDD 8E46FE mov es, word ptr [bp-2] 0 00009DE0 8CDB mov bx, ds 0 00009DE2 268A07 mov al, byte ptr es:[bx] 0 00009DE5 8EC6 mov es, si 0 00009DE7 268807 mov byte ptr es:[bx], al 0 00009DEA 8E46FE mov es, word ptr [bp-2] 0 00009DED 26893E0300 mov word ptr es:[3], di 0 00009DF2 8E46FE mov es, word ptr [bp-2] 0 00009DF5 26C60600004D mov byte ptr es:[0], 77 0 00009DFB 8EC6 mov es, si 0 00009DFD 26890E0100 mov word ptr es:[1], cx 0 00009E02 B80800 mov ax, 8 0 00009E05 50 push ax 0 00009E06 51 push cx 0 00009E07 56 push si 0 00009E08 50 push ax 0 00009E09 16 push ss 0 00009E0A 1F pop ds 0 00009E0B E8[FEFF] call _fmemset 0 00009E0E 56 push si 0 00009E0F E89CFB call _joinMCBs 0 00009E12 85C0 test ax, ax 0 00009E14 74A6 je _.L138 0 00009E16 E946FF jmp _.L134 516 .size _DosMemChange, .-_DosMemChange === Switch to base=012B40h -> ".RODATA.STR1.1" 517 .section .rodata.str1.1,"aMS",@progbits,1 518 _.LC0: 0 00001A21 646F73206D656D20 .string "dos mem corrupt, first_mcb=" 0 00001A29 636F72727570742C 0 00001A31 2066697273745F6D 0 00001A39 63623D00 520 _.LC1: 0 00001A3D 0A707265762000 .string "\nprev " 522 _.LC2: 0 00001A44 6E6F744D5A00 .string "notMZ" === Switch to base=002270h -> ".TEXT" 524 .text 525 .global _DosMemCheck 526 .type _DosMemCheck, @function 527 _DosMemCheck: 0 00009E19 56 push si 0 00009E1A 57 push di 0 00009E1B 55 push bp 0 00009E1C 89E5 mov bp, sp 0 00009E1E 83EC06 sub sp, 6 0 00009E21 8B3E[0000] mov di, word ptr [_first_mcb] 0 00009E25 31F6 xor si, si 0 00009E27 89F0 mov ax, si 0 00009E29 89F1 mov cx, si 537 _.L146: 0 00009E2B 8EC7 mov es, di 0 00009E2D 268A14 mov dl, byte ptr es:[si] 0 00009E30 80FA5A cmp dl, 90 0 00009E33 7504 jne _.L149 0 00009E35 31C0 xor ax, ax 0 00009E37 EB44 jmp _.L145 544 _.L149: 0 00009E39 80FA4D cmp dl, 77 0 00009E3C 7445 je _.L147 0 00009E3E 894EFE mov word ptr [bp-2], cx 0 00009E41 8946FC mov word ptr [bp-4], ax 0 00009E44 8976FA mov word ptr [bp-6], si 0 00009E47 BA[0000] mov dx, offset _.LC0 0 00009E4A 52 push dx 0 00009E4B E8[FEFF] call _put_string 0 00009E4E BA0400 mov dx, 4 0 00009E51 52 push dx 0 00009E52 BE1000 mov si, 16 0 00009E55 56 push si 0 00009E56 FF36[0000] push word ptr [_first_mcb] 0 00009E5A E8[FEFF] call _put_unsigned 0 00009E5D 56 push si 0 00009E5E 8B4EFE mov cx, word ptr [bp-2] 0 00009E61 51 push cx 0 00009E62 8B46FC mov ax, word ptr [bp-4] 0 00009E65 50 push ax 0 00009E66 BA[1C00] mov dx, offset _.LC1 0 00009E69 52 push dx 0 00009E6A E8[FEFF] call _hexd 0 00009E6D 56 push si 0 00009E6E 57 push di 0 00009E6F 8B76FA mov si, word ptr [bp-6] 0 00009E72 56 push si 0 00009E73 B8[2300] mov ax, offset _.LC2 0 00009E76 50 push ax 0 00009E77 E8[FEFF] call _hexd 0 00009E7A B8F9FF mov ax, -7 575 _.L145: 0 00009E7D 89EC mov sp, bp 0 00009E7F 5D pop bp 0 00009E80 5F pop di 0 00009E81 5E pop si 0 00009E82 C3 ret 581 _.L147: 0 00009E83 89F0 mov ax, si 0 00009E85 89F9 mov cx, di 0 00009E87 8EC7 mov es, di 0 00009E89 268B1E0300 mov bx, word ptr es:[3] 0 00009E8E 8D7901 lea di, [1+bx+di] 0 00009E91 EB98 jmp _.L146 588 .size _DosMemCheck, .-_DosMemCheck 589 .global _DosUmbLink 590 .type _DosUmbLink, @function 591 _DosUmbLink: 0 00009E93 56 push si 0 00009E94 57 push di 0 00009E95 55 push bp 0 00009E96 89E5 mov bp, sp 0 00009E98 8B4608 mov ax, word ptr [bp+8] 0 00009E9B 8B0E[0000] mov cx, word ptr [_uppermem_root] 0 00009E9F 83F9FF cmp cx, -1 0 00009EA2 7466 je _.L151 0 00009EA4 83F801 cmp ax, 1 0 00009EA7 7761 ja _.L151 0 00009EA9 8A16[0000] mov dl, byte ptr [_uppermem_link] 0 00009EAD 80E201 and dl, 1 0 00009EB0 30F6 xor dh, dh 0 00009EB2 39D0 cmp ax, dx 0 00009EB4 7454 je _.L151 0 00009EB6 8B36[0000] mov si, word ptr [_first_mcb] 0 00009EBA 31FF xor di, di 609 _.L153: 0 00009EBC 39F1 cmp cx, si 0 00009EBE 7436 je _.L154 0 00009EC0 8EC6 mov es, si 0 00009EC2 268A15 mov dl, byte ptr es:[di] 0 00009EC5 80FA5A cmp dl, 90 0 00009EC8 7514 jne _.L155 0 00009ECA 85C0 test ax, ax 0 00009ECC 7438 je _.L158 618 _.L157: 0 00009ECE 8EC6 mov es, si 0 00009ED0 26803D5A cmp byte ptr es:[di], 90 0 00009ED4 7534 jne _.L151 0 00009ED6 26C60600004D mov byte ptr es:[0], 77 0 00009EDC EB28 jmp _.L158 624 _.L155: 0 00009EDE 8EC6 mov es, si 0 00009EE0 268B1E0300 mov bx, word ptr es:[3] 0 00009EE5 80FA4D cmp dl, 77 0 00009EE8 7520 jne _.L151 0 00009EEA 83FBFF cmp bx, -1 0 00009EED 731B jnc _.L151 0 00009EEF 8EDF mov ds, di 0 00009EF1 8D7001 lea si, [1+bx+si] 0 00009EF4 EBC6 jmp _.L153 634 _.L154: 0 00009EF6 85C0 test ax, ax 0 00009EF8 75D4 jne _.L157 0 00009EFA 8CDB mov bx, ds 0 00009EFC 26803F4D cmp byte ptr es:[bx], 77 0 00009F00 7504 jne _.L158 0 00009F02 26C6075A mov byte ptr es:[bx], 90 641 _.L158: 0 00009F06 36A2[0000] mov byte ptr ss:[_uppermem_link], al 643 _.L151: 0 00009F0A 5D pop bp 0 00009F0B 5F pop di 0 00009F0C 5E pop si 0 00009F0D 16 push ss 0 00009F0E 1F pop ds 0 00009F0F C20200 ret 2 650 .size _DosUmbLink, .-_DosUmbLink 651 .global _FreeProcessMem 652 .type _FreeProcessMem, @function 653 _FreeProcessMem: 0 00009F12 56 push si 0 00009F13 57 push di 0 00009F14 55 push bp 0 00009F15 89E5 mov bp, sp 0 00009F17 1E push ds 0 00009F18 A0[0000] mov al, byte ptr [_uppermem_link] 0 00009F1B 8846FF mov byte ptr [bp-1], al 0 00009F1E B80100 mov ax, 1 0 00009F21 50 push ax 0 00009F22 E8[FEFF] call _DosUmbLink 0 00009F25 8B36[0000] mov si, word ptr [_first_mcb] 0 00009F29 31FF xor di, di 666 _.L172: 0 00009F2B 8EC6 mov es, si 0 00009F2D 26833E0300FF cmp word ptr es:[3], -1 0 00009F33 7440 je _.L174 0 00009F35 268A05 mov al, byte ptr es:[di] 0 00009F38 3C4D cmp al, 77 0 00009F3A 7404 je _.L175 0 00009F3C 3C5A cmp al, 90 0 00009F3E 7535 jne _.L174 675 _.L175: 0 00009F40 8EC6 mov es, si 0 00009F42 26A10100 mov ax, word ptr es:[1] 0 00009F46 3B4608 cmp ax, word ptr [bp+8] 0 00009F49 7504 jne _.L170 0 00009F4B 56 push si 0 00009F4C E8[FEFF] call _DosMemFree 682 _.L170: 0 00009F4F 8EC6 mov es, si 0 00009F51 26803D5A cmp byte ptr es:[di], 90 0 00009F55 740A je _.L171 0 00009F57 268B1E0300 mov bx, word ptr es:[3] 0 00009F5C 8D7001 lea si, [1+bx+si] 0 00009F5F EBCA jmp _.L172 689 _.L171: 0 00009F61 8A46FF mov al, byte ptr [bp-1] 0 00009F64 2401 and al, 1 0 00009F66 98 cbw 0 00009F67 50 push ax 0 00009F68 E8[FEFF] call _DosUmbLink 0 00009F6B 31C0 xor ax, ax 696 _.L167: 0 00009F6D 89EC mov sp, bp 0 00009F6F 5D pop bp 0 00009F70 5F pop di 0 00009F71 5E pop si 0 00009F72 C20200 ret 2 702 _.L174: 0 00009F75 B8F9FF mov ax, -7 0 00009F78 EBF3 jmp _.L167 705 .size _FreeProcessMem, .-_FreeProcessMem 706 .ident "GCC: (GNU) 6.3.0" === Trace listing source: misc.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=misc.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccXEqCnA.s output file : misc.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP 5 .ident "GCC: (GNU) 6.3.0" NO DEFINED SYMBOLS NO UNDEFINED SYMBOLS === Trace listing source: network.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=network.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccR26YJP.s output file : network.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .global _get_machine_name 7 .type _get_machine_name, @function 8 _get_machine_name: 0 0000BCAB 55 push bp 0 0000BCAC 89E5 mov bp, sp 0 0000BCAE B81000 mov ax, 16 0 0000BCB1 50 push ax 0 0000BCB2 16 push ss 0 0000BCB3 B8[0000] mov ax, offset _net_name 0 0000BCB6 50 push ax 0 0000BCB7 FF7606 push word ptr [bp+6] 0 0000BCBA FF7604 push word ptr [bp+4] 0 0000BCBD E8[FEFF] call _fmemcpy 0 0000BCC0 A1[0000] mov ax, word ptr [_NetBios] 0 0000BCC3 89EC mov sp, bp 0 0000BCC5 5D pop bp 0 0000BCC6 C20400 ret 4 23 .size _get_machine_name, .-_get_machine_name 24 .global _set_machine_name 25 .type _set_machine_name, @function 26 _set_machine_name: 0 0000BCC9 55 push bp 0 0000BCCA 89E5 mov bp, sp 0 0000BCCC 8B4608 mov ax, word ptr [bp+8] 0 0000BCCF A3[0000] mov word ptr [_NetBios], ax 0 0000BCD2 B80F00 mov ax, 15 0 0000BCD5 50 push ax 0 0000BCD6 FF7606 push word ptr [bp+6] 0 0000BCD9 FF7604 push word ptr [bp+4] 0 0000BCDC 16 push ss 0 0000BCDD B8[0000] mov ax, offset _net_name 0 0000BCE0 50 push ax 0 0000BCE1 E8[FEFF] call _fmemcpy 0 0000BCE4 FE06[0000] inc byte ptr [_net_set_count] 0 0000BCE8 89EC mov sp, bp 0 0000BCEA 5D pop bp 0 0000BCEB C20600 ret 6 43 .size _set_machine_name, .-_set_machine_name 44 .global _network_redirector_fp 45 .type _network_redirector_fp, @function 46 _network_redirector_fp: 0 0000BCEE 55 push bp 0 0000BCEF 89E5 mov bp, sp 0 0000BCF1 31C0 xor ax, ax 0 0000BCF3 50 push ax 0 0000BCF4 FF7608 push word ptr [bp+8] 0 0000BCF7 FF7606 push word ptr [bp+6] 0 0000BCFA FF7604 push word ptr [bp+4] 0 0000BCFD E8[FEFF] call _network_redirector_mx 0 0000BD00 89EC mov sp, bp 0 0000BD02 5D pop bp 0 0000BD03 C20600 ret 6 58 .size _network_redirector_fp, .-_network_redirector_fp 59 .global _network_redirector 60 .type _network_redirector, @function 61 _network_redirector: 0 0000BD06 55 push bp 0 0000BD07 89E5 mov bp, sp 0 0000BD09 31C0 xor ax, ax 0 0000BD0B 50 push ax 0 0000BD0C 50 push ax 0 0000BD0D FF7604 push word ptr [bp+4] 0 0000BD10 E8[FEFF] call _network_redirector_fp 0 0000BD13 89EC mov sp, bp 0 0000BD15 5D pop bp 0 0000BD16 C20200 ret 2 72 .size _network_redirector, .-_network_redirector 73 .ident "GCC: (GNU) 6.3.0" === Trace listing source: newstuff.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=newstuff.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/cc5ztTD4.s output file : newstuff.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .global _SetJFTSize 7 .type _SetJFTSize, @function 8 _SetJFTSize: 0 0000AD43 56 push si 0 0000AD44 57 push di 0 0000AD45 55 push bp 0 0000AD46 89E5 mov bp, sp 0 0000AD48 83EC0A sub sp, 10 0 0000AD4B 8B7608 mov si, word ptr [bp+8] 0 0000AD4E A1[0000] mov ax, word ptr [_cu_psp] 0 0000AD51 8946FA mov word ptr [bp-6], ax 0 0000AD54 31DB xor bx, bx 0 0000AD56 8EC0 mov es, ax 0 0000AD58 2639363200 cmp word ptr es:[50], si 0 0000AD5D 720E jc _.L2 0 0000AD5F 2689363200 mov word ptr es:[50], si 22 _.L6: 0 0000AD64 93 xchg bx, ax 24 _.L1: 0 0000AD65 89EC mov sp, bp 0 0000AD67 5D pop bp 0 0000AD68 5F pop di 0 0000AD69 5E pop si 0 0000AD6A C20200 ret 2 30 _.L2: 0 0000AD6D 895EF8 mov word ptr [bp-8], bx 0 0000AD70 8D46FE lea ax, [-2+bp] 0 0000AD73 50 push ax 0 0000AD74 8D46FC lea ax, [-4+bp] 0 0000AD77 50 push ax 0 0000AD78 A0[0000] mov al, byte ptr [_mem_access_mode] 0 0000AD7B 30E4 xor ah, ah 0 0000AD7D 50 push ax 0 0000AD7E 8D440F lea ax, [15+si] 0 0000AD81 B104 mov cl, 4 0 0000AD83 D3E8 shr ax, cl 0 0000AD85 50 push ax 0 0000AD86 E8[FEFF] call _DosMemAlloc 0 0000AD89 85C0 test ax, ax 0 0000AD8B 7C4E jl _.L4 0 0000AD8D 8B7EFC mov di, word ptr [bp-4] 0 0000AD90 47 inc di 0 0000AD91 897EFC mov word ptr [bp-4], di 0 0000AD94 8E46FA mov es, word ptr [bp-6] 0 0000AD97 26A13200 mov ax, word ptr es:[50] 0 0000AD9B 50 push ax 0 0000AD9C 8946F6 mov word ptr [bp-10], ax 0 0000AD9F 26FF363600 push word ptr es:[54] 0 0000ADA4 26FF363400 push word ptr es:[52] 0 0000ADA9 57 push di 0 0000ADAA 8B5EF8 mov bx, word ptr [bp-8] 0 0000ADAD 53 push bx 0 0000ADAE E8[FEFF] call _fmemcpy 0 0000ADB1 89F2 mov dx, si 0 0000ADB3 8B46F6 mov ax, word ptr [bp-10] 0 0000ADB6 29C2 sub dx, ax 0 0000ADB8 52 push dx 0 0000ADB9 BAFF00 mov dx, 255 0 0000ADBC 52 push dx 0 0000ADBD 57 push di 0 0000ADBE 50 push ax 0 0000ADBF E8[FEFF] call _fmemset 0 0000ADC2 8E46FA mov es, word ptr [bp-6] 0 0000ADC5 2689363200 mov word ptr es:[50], si 0 0000ADCA C45EF8 les bx, dword ptr [bp-8] 0 0000ADCD 26895F34 mov word ptr es:[bx+52], bx 0 0000ADD1 8E46FA mov es, word ptr [bp-6] 0 0000ADD4 26893E3600 mov word ptr es:[54], di 0 0000ADD9 EB89 jmp _.L6 75 _.L4: 0 0000ADDB B8F8FF mov ax, -8 0 0000ADDE EB85 jmp _.L1 78 .size _SetJFTSize, .-_SetJFTSize 79 .global _DosMkTmp 80 .type _DosMkTmp, @function 81 _DosMkTmp: 0 0000ADE0 56 push si 0 0000ADE1 57 push di 0 0000ADE2 55 push bp 0 0000ADE3 89E5 mov bp, sp 0 0000ADE5 83EC12 sub sp, 18 0 0000ADE8 8B7E08 mov di, word ptr [bp+8] 0 0000ADEB 8B460A mov ax, word ptr [bp+10] 0 0000ADEE 8946FC mov word ptr [bp-4], ax 0 0000ADF1 50 push ax 0 0000ADF2 57 push di 0 0000ADF3 E8[FEFF] call _fstrlen 0 0000ADF6 01F8 add ax, di 0 0000ADF8 8946FA mov word ptr [bp-6], ax 0 0000ADFB 803E[0000]05 cmp byte ptr [_os_major], 5 0 0000AE00 7520 jne _.L8 0 0000AE02 89C3 mov bx, ax 0 0000AE04 39C7 cmp di, ax 0 0000AE06 740F je _.L9 0 0000AE08 8E46FC mov es, word ptr [bp-4] 0 0000AE0B 268A47FF mov al, byte ptr es:[bx-1] 0 0000AE0F 3C5C cmp al, 92 0 0000AE11 740F je _.L8 0 0000AE13 3C2F cmp al, 47 0 0000AE15 740B je _.L8 106 _.L9: 0 0000AE17 8E46FC mov es, word ptr [bp-4] 0 0000AE1A 26C6075C mov byte ptr es:[bx], 92 0 0000AE1E 43 inc bx 0 0000AE1F 895EFA mov word ptr [bp-6], bx 111 _.L8: 0 0000AE22 C45EFA les bx, dword ptr [bp-6] 0 0000AE25 26C6470800 mov byte ptr es:[bx+8], 0 0 0000AE2A E8[FEFF] call _dos_getdate 0 0000AE2D 96 xchg si, ax 0 0000AE2E E8[FEFF] call _dos_gettime 0 0000AE31 8946FE mov word ptr [bp-2], ax 0 0000AE34 89F3 mov bx, si 0 0000AE36 050010 add ax, 4096 0 0000AE39 8946F0 mov word ptr [bp-16], ax 0 0000AE3C 96 xchg si, ax 0 0000AE3D 83D000 adc ax, 0 0 0000AE40 8946EE mov word ptr [bp-18], ax 124 _.L28: 0 0000AE43 8B46FE mov ax, word ptr [bp-2] 0 0000AE46 83C001 add ax, 1 0 0000AE49 8946F6 mov word ptr [bp-10], ax 0 0000AE4C 89D8 mov ax, bx 0 0000AE4E 83D000 adc ax, 0 0 0000AE51 8946F4 mov word ptr [bp-12], ax 0 0000AE54 BA0800 mov dx, 8 0 0000AE57 C746F80700 mov word ptr [bp-8], 7 0 0000AE5C B50C mov ch, 12 134 _.L11: 0 0000AE5E 8B46FA mov ax, word ptr [bp-6] 0 0000AE61 0346F8 add ax, word ptr [bp-8] 0 0000AE64 96 xchg si, ax 0 0000AE65 8A66FE mov ah, byte ptr [bp-2] 0 0000AE68 80E40F and ah, 15 0 0000AE6B 80C441 add ah, 65 0 0000AE6E 8E46FC mov es, word ptr [bp-4] 0 0000AE71 268824 mov byte ptr es:[si], ah 0 0000AE74 89D8 mov ax, bx 0 0000AE76 88E9 mov cl, ch 0 0000AE78 D3E0 shl ax, cl 0 0000AE7A 96 xchg si, ax 0 0000AE7B 8B46FE mov ax, word ptr [bp-2] 0 0000AE7E B104 mov cl, 4 0 0000AE80 D3E8 shr ax, cl 0 0000AE82 8946F2 mov word ptr [bp-14], ax 0 0000AE85 93 xchg bx, ax 0 0000AE86 D3E8 shr ax, cl 0 0000AE88 89F3 mov bx, si 0 0000AE8A 0B5EF2 or bx, word ptr [bp-14] 0 0000AE8D 895EFE mov word ptr [bp-2], bx 0 0000AE90 93 xchg bx, ax 0 0000AE91 FF4EF8 dec word ptr [bp-8] 0 0000AE94 4A dec dx 0 0000AE95 75C7 jne _.L11 0 0000AE97 380E[0000] cmp byte ptr [_os_major], cl 0 0000AE9B 7E20 jle _.L12 162 _.L18: 0 0000AE9D FF760C push word ptr [bp+12] 0 0000AEA0 B8020C mov ax, 3074 0 0000AEA3 50 push ax 0 0000AEA4 FF76FC push word ptr [bp-4] 0 0000AEA7 57 push di 0 0000AEA8 E8[FEFF] call _DosOpen 0 0000AEAB 83F8B0 cmp ax, -80 0 0000AEAE 7505 jne _.L7 0 0000AEB0 83FAFF cmp dx, -1 0 0000AEB3 7432 je _.L31 173 _.L7: 0 0000AEB5 89EC mov sp, bp 0 0000AEB7 5D pop bp 0 0000AEB8 5F pop di 0 0000AEB9 5E pop si 0 0000AEBA C20600 ret 6 179 _.L12: 0 0000AEBD BE0800 mov si, 8 0 0000AEC0 92 xchg dx, ax 0 0000AEC1 B6EF mov dh, -17 0 0000AEC3 B10A mov cl, 10 184 _.L17: 0 0000AEC5 8B5EFA mov bx, word ptr [bp-6] 0 0000AEC8 01C3 add bx, ax 0 0000AECA 8E46FC mov es, word ptr [bp-4] 0 0000AECD 268A17 mov dl, byte ptr es:[bx] 0 0000AED0 88F5 mov ch, dh 0 0000AED2 80FA4A cmp dl, 74 0 0000AED5 7E02 jle _.L16 0 0000AED7 88CD mov ch, cl 193 _.L16: 0 0000AED9 28EA sub dl, ch 0 0000AEDB 8E46FC mov es, word ptr [bp-4] 0 0000AEDE 268817 mov byte ptr es:[bx], dl 0 0000AEE1 40 inc ax 0 0000AEE2 4E dec si 0 0000AEE3 75E0 jne _.L17 0 0000AEE5 EBB6 jmp _.L18 201 _.L31: 0 0000AEE7 8B4EF6 mov cx, word ptr [bp-10] 0 0000AEEA 894EFE mov word ptr [bp-2], cx 0 0000AEED 8B5EF4 mov bx, word ptr [bp-12] 0 0000AEF0 3B4EF0 cmp cx, word ptr [bp-16] 0 0000AEF3 7403E94BFF jne _.L28 0 0000AEF8 3B5EEE cmp bx, word ptr [bp-18] 0 0000AEFB 7403E943FF jne _.L28 0 0000AF00 EBB3 jmp _.L7 210 .size _DosMkTmp, .-_DosMkTmp === Switch to base=012B40h -> ".RODATA.STR1.1" 211 .section .rodata.str1.1,"aMS",@progbits,1 212 _.LC0: 0 00001A94 44455600 .string "DEV" 214 _.LC1: 0 00001A98 5C4445565C00 .string "\\DEV\\" === Switch to base=002270h -> ".TEXT" 216 .text 217 .global _truename 218 .type _truename, @function 219 _truename: 0 0000AF02 56 push si 0 0000AF03 57 push di 0 0000AF04 55 push bp 0 0000AF05 89E5 mov bp, sp 0 0000AF07 83EC12 sub sp, 18 0 0000AF0A 8B7E0C mov di, word ptr [bp+12] 0 0000AF0D FF760A push word ptr [bp+10] 0 0000AF10 FF7608 push word ptr [bp+8] 0 0000AF13 E8[FEFF] call _adjust_far 0 0000AF16 894608 mov word ptr [bp+8], ax 0 0000AF19 89560A mov word ptr [bp+10], dx 0 0000AF1C 8EC2 mov es, dx 0 0000AF1E 89C3 mov bx, ax 0 0000AF20 268A0F mov cl, byte ptr es:[bx] 0 0000AF23 84C9 test cl, cl 0 0000AF25 7507 jne _.L34 236 _.L92: 0 0000AF27 C746FEFEFF mov word ptr [bp-2], -2 0 0000AF2C EB44 jmp _.L33 239 _.L34: 0 0000AF2E 80F95C cmp cl, 92 0 0000AF31 756D jne _.L36 0 0000AF33 8EC2 mov es, dx 0 0000AF35 89C3 mov bx, ax 0 0000AF37 26807F015C cmp byte ptr es:[bx+1], 92 0 0000AF3C 7562 jne _.L36 0 0000AF3E C746FE8100 mov word ptr [bp-2], 129 247 _.L41: 0 0000AF43 8EC2 mov es, dx 0 0000AF45 268A0F mov cl, byte ptr es:[bx] 0 0000AF48 FF4EFE dec word ptr [bp-2] 0 0000AF4B 7536 jne _.L37 0 0000AF4D B92F00 mov cx, 47 0 0000AF50 51 push cx 0 0000AF51 52 push dx 255 _.L256: 0 0000AF52 50 push ax 257 _.L253: 0 0000AF53 16 push ss 0 0000AF54 1F pop ds 0 0000AF55 E8[FEFF] call _fstrchr 0 0000AF58 09D0 or ax, dx 0 0000AF5A 7511 jne _.L38 0 0000AF5C B85C00 mov ax, 92 0 0000AF5F 50 push ax 0 0000AF60 FF760A push word ptr [bp+10] 0 0000AF63 FF7608 push word ptr [bp+8] 0 0000AF66 E8[FEFF] call _fstrchr 0 0000AF69 09D0 or ax, dx 0 0000AF6B 74BA je _.L92 270 _.L38: 0 0000AF6D C746FEFDFF mov word ptr [bp-2], -3 272 _.L33: 0 0000AF72 8B46FE mov ax, word ptr [bp-2] 0 0000AF75 89EC mov sp, bp 0 0000AF77 5D pop bp 0 0000AF78 5F pop di 0 0000AF79 5E pop si 0 0000AF7A 16 push ss 0 0000AF7B 1F pop ds 0 0000AF7C C20800 ret 8 281 _.L136: 0 0000AF7F 89F7 mov di, si 0 0000AF81 EBC0 jmp _.L41 284 _.L37: 0 0000AF83 89FE mov si, di 0 0000AF85 46 inc si 0 0000AF86 880D mov byte ptr [di], cl 0 0000AF88 43 inc bx 0 0000AF89 84C9 test cl, cl 0 0000AF8B 75F2 jne _.L136 0 0000AF8D C706[0000]FFFF mov word ptr [_current_ldt], -1 0 0000AF93 C706[0200]FFFF mov word ptr [_current_ldt+2], -1 0 0000AF99 C746FE4000 mov word ptr [bp-2], 64 0 0000AF9E EBD2 jmp _.L33 295 _.L36: 0 0000AFA0 8EC2 mov es, dx 0 0000AFA2 93 xchg bx, ax 0 0000AFA3 26807F013A cmp byte ptr es:[bx+1], 58 0 0000AFA8 7403E94501 jne _.L42 0 0000AFAD 51 push cx 0 0000AFAE E8[FEFF] call _DosUpFChar 0 0000AFB1 04BF add al, -65 0 0000AFB3 30E4 xor ah, ah 304 _.L243: 0 0000AFB5 8946FE mov word ptr [bp-2], ax 0 0000AFB8 FF760A push word ptr [bp+10] 0 0000AFBB FF7608 push word ptr [bp+8] 0 0000AFBE E8[FEFF] call _IsDevice 0 0000AFC1 8946F6 mov word ptr [bp-10], ax 0 0000AFC4 8956F4 mov word ptr [bp-12], dx 0 0000AFC7 FF76FE push word ptr [bp-2] 0 0000AFCA E8[FEFF] call _get_cds 0 0000AFCD 8946FA mov word ptr [bp-6], ax 0 0000AFD0 8956F8 mov word ptr [bp-8], dx 0 0000AFD3 92 xchg dx, ax 0 0000AFD4 0B56F8 or dx, word ptr [bp-8] 0 0000AFD7 7403E99600 jne _.L44 0 0000AFDC 8B46F6 mov ax, word ptr [bp-10] 0 0000AFDF 0B46F4 or ax, word ptr [bp-12] 0 0000AFE2 7489 je _.L38 0 0000AFE4 F6460E02 test byte ptr [bp+14], 2 0 0000AFE8 7483 je _.L38 0 0000AFEA A0[0000] mov al, byte ptr [_lastdrive] 0 0000AFED 30E4 xor ah, ah 0 0000AFEF 3946FE cmp word ptr [bp-2], ax 0 0000AFF2 7D03E976FF jl _.L38 0 0000AFF7 C45E08 les bx, dword ptr [bp+8] 0 0000AFFA 8CC0 mov ax, es 0 0000AFFC 268A4F02 mov cl, byte ptr es:[bx+2] 0 0000B000 80F95C cmp cl, 92 0 0000B003 7407 je _.L46 0 0000B005 80F92F cmp cl, 47 0 0000B008 7402 je _.L46 0 0000B00A 88D1 mov cl, dl 335 _.L46: 0 0000B00C 8EC0 mov es, ax 0 0000B00E 26807F0300 cmp byte ptr es:[bx+3], 0 0 0000B013 7503E97906 je _.L48 0 0000B018 884EFC mov byte ptr [bp-4], cl 0 0000B01B BE5C00 mov si, 92 0 0000B01E 56 push si 0 0000B01F 83C303 add bx, 3 0 0000B022 50 push ax 0 0000B023 53 push bx 0 0000B024 E8[FEFF] call _fstrchr 0 0000B027 89C3 mov bx, ax 0 0000B029 09D3 or bx, dx 0 0000B02B 85DB test bx, bx 0 0000B02D 8976FE mov word ptr [bp-2], si 0 0000B030 8A4EFC mov cl, byte ptr [bp-4] 0 0000B033 7403E94F06 jne _.L49 0 0000B038 B82F00 mov ax, 47 0 0000B03B 50 push ax 0 0000B03C 8B4608 mov ax, word ptr [bp+8] 0 0000B03F 83C003 add ax, 3 0 0000B042 FF760A push word ptr [bp+10] 0 0000B045 50 push ax 0 0000B046 E8[FEFF] call _fstrchr 0 0000B049 8A4EFC mov cl, byte ptr [bp-4] 0 0000B04C 84C9 test cl, cl 0 0000B04E 7403E9A600 jne _.L50 0 0000B053 09D0 or ax, dx 0 0000B055 7403E913FF jne _.L38 364 _.L53: 0 0000B05A A0[0000] mov al, byte ptr [_default_drive] 0 0000B05D 98 cbw 0 0000B05E 8946FE mov word ptr [bp-2], ax 0 0000B061 50 push ax 0 0000B062 E8[FEFF] call _get_cds 0 0000B065 8946FA mov word ptr [bp-6], ax 0 0000B068 8956F8 mov word ptr [bp-8], dx 0 0000B06B 09D0 or ax, dx 0 0000B06D 7503E9FBFE je _.L38 374 _.L44: 0 0000B072 B85800 mov ax, 88 0 0000B075 50 push ax 0 0000B076 FF76F8 push word ptr [bp-8] 0 0000B079 FF76FA push word ptr [bp-6] 0 0000B07C BE[0000] mov si, offset _TempCDS 0 0000B07F 16 push ss 0 0000B080 56 push si 0 0000B081 E8[FEFF] call _fmemcpy 0 0000B084 8B46FA mov ax, word ptr [bp-6] 0 0000B087 A3[0000] mov word ptr [_current_ldt], ax 0 0000B08A 8B46F8 mov ax, word ptr [bp-8] 0 0000B08D A3[0200] mov word ptr [_current_ldt+2], ax 0 0000B090 36837C4300 cmp word ptr ss:[si+67], 0 0 0000B095 8976FC mov word ptr [bp-4], si 0 0000B098 7D04 jge _.L54 0 0000B09A 804EFE40 or byte ptr [bp-2], 64 391 _.L54: 0 0000B09E 8B46F6 mov ax, word ptr [bp-10] 0 0000B0A1 0B46F4 or ax, word ptr [bp-12] 0 0000B0A4 7404 je _.L55 0 0000B0A6 804EFE20 or byte ptr [bp-2], 32 396 _.L55: 0 0000B0AA C60500 mov byte ptr [di], 0 0 0000B0AD 8B460E mov ax, word ptr [bp+14] 0 0000B0B0 83E001 and ax, 1 0 0000B0B3 8946F4 mov word ptr [bp-12], ax 0 0000B0B6 7403E9AE00 jne _.L57 0 0000B0BB 8D4608 lea ax, [8+bp] 0 0000B0BE 50 push ax 0 0000B0BF 16 push ss 0 0000B0C0 57 push di 0 0000B0C1 B82311 mov ax, 4387 0 0000B0C4 50 push ax 0 0000B0C5 E8[FEFF] call _network_redirector_mx 0 0000B0C8 85C0 test ax, ax 0 0000B0CA 7403E99A00 jne _.L57 0 0000B0CF 36803D00 cmp byte ptr ss:[di], 0 0 0000B0D3 7503E99100 je _.L57 0 0000B0D8 36807D022F cmp byte ptr ss:[di+2], 47 0 0000B0DD 7403E990FE jne _.L33 0 0000B0E2 F646FE20 test byte ptr [bp-2], 32 0 0000B0E6 7503E987FE je _.L33 0 0000B0EB 8066FEBF and byte ptr [bp-2], -65 0 0000B0EF E980FE jmp _.L33 419 _.L42: 0 0000B0F2 A0[0000] mov al, byte ptr [_default_drive] 0 0000B0F5 98 cbw 0 0000B0F6 E9BCFE jmp _.L243 423 _.L50: 0 0000B0F9 89C1 mov cx, ax 0 0000B0FB 09D1 or cx, dx 0 0000B0FD 7503E96BFE je _.L38 427 _.L135: 0 0000B102 8B4E08 mov cx, word ptr [bp+8] 0 0000B105 8B5E0A mov bx, word ptr [bp+10] 0 0000B108 89CE mov si, cx 0 0000B10A 83C606 add si, 6 0 0000B10D 39F0 cmp ax, si 0 0000B10F 7403E959FE jne _.L38 0 0000B114 39DA cmp dx, bx 0 0000B116 7403E952FE jne _.L38 0 0000B11B B80300 mov ax, 3 0 0000B11E 50 push ax 0 0000B11F 16 push ss 0 0000B120 B8[0000] mov ax, offset _.LC0 0 0000B123 50 push ax 0 0000B124 83C103 add cx, 3 0 0000B127 52 push dx 0 0000B128 51 push cx 0 0000B129 E8[FEFF] call _fmemcmp 0 0000B12C 85C0 test ax, ax 0 0000B12E 7403E93AFE jne _.L38 0 0000B133 FF76FE push word ptr [bp-2] 0 0000B136 8B4608 mov ax, word ptr [bp+8] 0 0000B139 83C007 add ax, 7 0 0000B13C FF760A push word ptr [bp+10] 0 0000B13F 50 push ax 0 0000B140 E8[FEFF] call _fstrchr 0 0000B143 09D0 or ax, dx 0 0000B145 85C0 test ax, ax 0 0000B147 7403E921FE jne _.L38 0 0000B14C B82F00 mov ax, 47 0 0000B14F 50 push ax 0 0000B150 8B4608 mov ax, word ptr [bp+8] 0 0000B153 83C007 add ax, 7 0 0000B156 FF760A push word ptr [bp+10] 0 0000B159 50 push ax 0 0000B15A E8[FEFF] call _fstrchr 0 0000B15D 09D0 or ax, dx 0 0000B15F 85C0 test ax, ax 465 _.L242: 0 0000B161 7503E9F4FE je _.L53 0 0000B166 E904FE jmp _.L38 468 _.L57: 0 0000B169 8A46FE mov al, byte ptr [bp-2] 0 0000B16C 241F and al, 31 0 0000B16E 0441 add al, 65 0 0000B170 8805 mov byte ptr [di], al 0 0000B172 C645013A mov byte ptr [di+1], 58 0 0000B176 C45E08 les bx, dword ptr [bp+8] 0 0000B179 26807F013A cmp byte ptr es:[bx+1], 58 0 0000B17E 7506 jne _.L58 0 0000B180 83C302 add bx, 2 0 0000B183 895E08 mov word ptr [bp+8], bx 479 _.L58: 0 0000B186 C645025C mov byte ptr [di+2], 92 0 0000B18A F646FE20 test byte ptr [bp-2], 32 0 0000B18E 7503E99200 je _.L59 0 0000B193 FF760A push word ptr [bp+10] 0 0000B196 FF7608 push word ptr [bp+8] 0 0000B199 E8[FEFF] call _get_root 0 0000B19C 96 xchg si, ax 0 0000B19D 8B4608 mov ax, word ptr [bp+8] 0 0000B1A0 8B4E0A mov cx, word ptr [bp+10] 0 0000B1A3 39C6 cmp si, ax 0 0000B1A5 7504 jne _.L142 0 0000B1A7 39CA cmp dx, cx 0 0000B1A9 740D je _.L60 493 _.L142: 0 0000B1AB 89C3 mov bx, ax 0 0000B1AD 83C305 add bx, 5 0 0000B1B0 39DE cmp si, bx 0 0000B1B2 7571 jne _.L59 0 0000B1B4 39CA cmp dx, cx 0 0000B1B6 756D jne _.L59 500 _.L60: 0 0000B1B8 89C3 mov bx, ax 0 0000B1BA 83C305 add bx, 5 0 0000B1BD 39DE cmp si, bx 0 0000B1BF 7546 jne _.L64 0 0000B1C1 39CA cmp dx, cx 0 0000B1C3 7542 jne _.L64 0 0000B1C5 8D5D03 lea bx, [3+di] 0 0000B1C8 B90500 mov cx, 5 0 0000B1CB 51 push cx 0 0000B1CC 894EEE mov word ptr [bp-18], cx 0 0000B1CF 52 push dx 0 0000B1D0 8956F0 mov word ptr [bp-16], dx 0 0000B1D3 50 push ax 0 0000B1D4 16 push ss 0 0000B1D5 53 push bx 0 0000B1D6 895EF2 mov word ptr [bp-14], bx 0 0000B1D9 8C56F6 mov word ptr [bp-10], ss 0 0000B1DC E8[FEFF] call _fmemcpy 0 0000B1DF 8B4EEE mov cx, word ptr [bp-18] 0 0000B1E2 51 push cx 0 0000B1E3 8E46F6 mov es, word ptr [bp-10] 0 0000B1E6 06 push es 0 0000B1E7 8B5EF2 mov bx, word ptr [bp-14] 0 0000B1EA 53 push bx 0 0000B1EB E8[FEFF] call _DosUpMem 0 0000B1EE 36807D032F cmp byte ptr ss:[di+3], 47 0 0000B1F3 8B56F0 mov dx, word ptr [bp-16] 0 0000B1F6 7504 jne _.L65 0 0000B1F8 C645035C mov byte ptr [di+3], 92 530 _.L65: 0 0000B1FC 36807D072F cmp byte ptr ss:[di+7], 47 0 0000B201 7504 jne _.L64 0 0000B203 C645075C mov byte ptr [di+7], 92 534 _.L64: 0 0000B207 397608 cmp word ptr [bp+8], si 0 0000B20A 7403E98701 jne _.L67 0 0000B20F 39560A cmp word ptr [bp+10], dx 0 0000B212 7403E97F01 jne _.L67 539 _.L68: 0 0000B217 C645022F mov byte ptr [di+2], 47 0 0000B21B 8066FEBF and byte ptr [bp-2], -65 0 0000B21F 897608 mov word ptr [bp+8], si 0 0000B222 89560A mov word ptr [bp+10], dx 544 _.L59: 0 0000B225 89F8 mov ax, di 0 0000B227 83C002 add ax, 2 0 0000B22A 8946F6 mov word ptr [bp-10], ax 0 0000B22D 36807D022F cmp byte ptr ss:[di+2], 47 0 0000B232 7503E9A101 je _.L138 0 0000B237 C606[4200]00 mov byte ptr [_TempCDS+66], 0 0 0000B23C 8B5EFC mov bx, word ptr [bp-4] 0 0000B23F 36837F4300 cmp word ptr ss:[bx+67], 0 0 0000B244 7C3B jl _.L71 0 0000B246 36FF36[4700] push word ptr ss:[_TempCDS+71] 0 0000B24B 36FF36[4500] push word ptr ss:[_TempCDS+69] 0 0000B250 E8[FEFF] call _media_check 0 0000B253 85C0 test ax, ax 0 0000B255 7D03E913FD jl _.L38 0 0000B25A FF76FC push word ptr [bp-4] 0 0000B25D E8[FEFF] call _dos_cd 0 0000B260 85C0 test ax, ax 0 0000B262 741D je _.L71 0 0000B264 8B5EFC mov bx, word ptr [bp-4] 0 0000B267 8B474F mov ax, word ptr [bx+79] 0 0000B26A 8E46F8 mov es, word ptr [bp-8] 0 0000B26D 96 xchg si, ax 0 0000B26E 8B5EFA mov bx, word ptr [bp-6] 0 0000B271 26C6400100 mov byte ptr es:[bx+si+1], 0 0 0000B276 C684[0100]00 mov byte ptr [si+_TempCDS+1], 0 0 0000B27B FF76FC push word ptr [bp-4] 0 0000B27E E8[FEFF] call _dos_cd 572 _.L71: 0 0000B281 837EF400 cmp word ptr [bp-12], 0 0 0000B285 7403E92B01 jne _.L73 0 0000B28A FF76FC push word ptr [bp-4] 0 0000B28D 57 push di 0 0000B28E E8[FEFF] call _strcpy 0 0000B291 8B5EFC mov bx, word ptr [bp-4] 0 0000B294 36F6474410 test byte ptr ss:[bx+68], 16 0 0000B299 7422 je _.L74 0 0000B29B 36807D013A cmp byte ptr ss:[di+1], 58 0 0000B2A0 751B jne _.L74 0 0000B2A2 8A05 mov al, byte ptr [di] 0 0000B2A4 04BF add al, -65 0 0000B2A6 30E4 xor ah, ah 0 0000B2A8 8A16[0000] mov dl, byte ptr [_lastdrive] 0 0000B2AC 30F6 xor dh, dh 0 0000B2AE 39D0 cmp ax, dx 0 0000B2B0 730B jnc _.L74 0 0000B2B2 8B56FE mov dx, word ptr [bp-2] 0 0000B2B5 83E2E0 and dx, -32 0 0000B2B8 09C2 or dx, ax 0 0000B2BA 8956FE mov word ptr [bp-2], dx 594 _.L74: 0 0000B2BD 89F8 mov ax, di 0 0000B2BF 8B5EFC mov bx, word ptr [bp-4] 0 0000B2C2 3603474F add ax, word ptr ss:[bx+79] 598 _.L244: 0 0000B2C6 8946FC mov word ptr [bp-4], ax 0 0000B2C9 8B5EFC mov bx, word ptr [bp-4] 0 0000B2CC 36803F00 cmp byte ptr ss:[bx], 0 0 0000B2D0 7504 jne _.L76 0 0000B2D2 C6470100 mov byte ptr [bx+1], 0 604 _.L76: 0 0000B2D6 8B5EFC mov bx, word ptr [bp-4] 0 0000B2D9 C6075C mov byte ptr [bx], 92 0 0000B2DC C45E08 les bx, dword ptr [bp+8] 0 0000B2DF 8CC0 mov ax, es 0 0000B2E1 268A17 mov dl, byte ptr es:[bx] 0 0000B2E4 80FA5C cmp dl, 92 0 0000B2E7 7503E9DF00 je _.L77 0 0000B2EC 80FA2F cmp dl, 47 0 0000B2EF 7503E9D700 je _.L77 0 0000B2F4 FF76FC push word ptr [bp-4] 0 0000B2F7 E8[FEFF] call _strlen 0 0000B2FA 0346FC add ax, word ptr [bp-4] 0 0000B2FD 96 xchg si, ax 618 _.L78: 0 0000B2FE 36807CFF5C cmp byte ptr ss:[si-1], 92 0 0000B303 9F lahf 0 0000B304 D0E4 shl ah, 1 0 0000B306 99 cwd 0 0000B307 01D6 add si, dx 624 _.L69: 0 0000B309 31C9 xor cx, cx 0 0000B30B 89F8 mov ax, di 0 0000B30D 83E880 sub ax, -128 0 0000B310 8946F4 mov word ptr [bp-12], ax 629 _.L79: 0 0000B313 8E5E08 mov ds, word ptr [bp+8] 0 0000B316 8B460A mov ax, word ptr [bp+10] 0 0000B319 8EC0 mov es, ax 0 0000B31B 8CDB mov bx, ds 0 0000B31D 26803F00 cmp byte ptr es:[bx], 0 0 0000B321 7403E9BC00 jne _.L118 0 0000B326 F6C101 test cl, 1 0 0000B329 7409 je _.L119 0 0000B32B F6460E04 test byte ptr [bp+14], 4 0 0000B32F 7503E939FC je _.L38 640 _.L119: 0 0000B334 3B76F6 cmp si, word ptr [bp-10] 0 0000B337 7510 jne _.L120 0 0000B339 8D958000 lea dx, [128+di] 0 0000B33D 39D6 cmp si, dx 0 0000B33F 7203E9B700 jnc _.L261 0 0000B344 36C6045C mov byte ptr ss:[si], 92 0 0000B348 46 inc si 648 _.L120: 0 0000B349 36C60400 mov byte ptr ss:[si], 0 0 0000B34D 16 push ss 0 0000B34E FF76FC push word ptr [bp-4] 0 0000B351 16 push ss 0 0000B352 1F pop ds 0 0000B353 E8[FEFF] call _DosUpFString 0 0000B356 36807D022F cmp byte ptr ss:[di+2], 47 0 0000B35B 7409 je _.L127 0 0000B35D F6460E01 test byte ptr [bp+14], 1 0 0000B361 7503E92D02 je _.L123 659 _.L127: 0 0000B366 F6460E02 test byte ptr [bp+14], 2 0 0000B36A 7403E9EA02 jne _.L125 662 _.L126: 0 0000B36F 837E0E04 cmp word ptr [bp+14], 4 0 0000B373 7403E9FAFB jne _.L33 0 0000B378 36803E[0000]06 cmp byte ptr ss:[_os_major], 6 0 0000B37E 750E jne _.L140 0 0000B380 8A46FE mov al, byte ptr [bp-2] 0 0000B383 83E060 and ax, 96 0 0000B386 83F820 cmp ax, 32 0 0000B389 7503E9F102 je _.L141 671 _.L140: 0 0000B38E C746FE0000 mov word ptr [bp-2], 0 0 0000B393 E9DCFB jmp _.L33 674 _.L67: 0 0000B396 8956F6 mov word ptr [bp-10], dx 0 0000B399 B80500 mov ax, 5 0 0000B39C 50 push ax 0 0000B39D B8[0400] mov ax, offset _.LC1 0 0000B3A0 50 push ax 0 0000B3A1 8D4503 lea ax, [3+di] 0 0000B3A4 50 push ax 0 0000B3A5 E8[FEFF] call _memcmp 0 0000B3A8 85C0 test ax, ax 0 0000B3AA 8B56F6 mov dx, word ptr [bp-10] 0 0000B3AD 7503E965FE je _.L68 0 0000B3B2 E970FE jmp _.L59 687 _.L73: 0 0000B3B5 8B5EFC mov bx, word ptr [bp-4] 0 0000B3B8 8B474F mov ax, word ptr [bx+79] 0 0000B3BB 05[0000] add ax, offset _TempCDS 0 0000B3BE 50 push ax 0 0000B3BF FF76F6 push word ptr [bp-10] 0 0000B3C2 E8[FEFF] call _strcpy 0 0000B3C5 8B46F6 mov ax, word ptr [bp-10] 0 0000B3C8 E9FBFE jmp _.L244 696 _.L77: 0 0000B3CB 43 inc bx 0 0000B3CC 895E08 mov word ptr [bp+8], bx 0 0000B3CF 89460A mov word ptr [bp+10], ax 0 0000B3D2 8B76FC mov si, word ptr [bp-4] 0 0000B3D5 E926FF jmp _.L78 702 _.L138: 0 0000B3D8 8B46F6 mov ax, word ptr [bp-10] 0 0000B3DB 8946FC mov word ptr [bp-4], ax 0 0000B3DE 96 xchg si, ax 0 0000B3DF E927FF jmp _.L69 707 _.L118: 0 0000B3E2 F6C101 test cl, 1 0 0000B3E5 7403E983FB jne _.L38 0 0000B3EA 8B5EFC mov bx, word ptr [bp-4] 0 0000B3ED 368A17 mov dl, byte ptr ss:[bx] 0 0000B3F0 363854FF cmp byte ptr ss:[si-1], dl 0 0000B3F4 7412 je _.L82 0 0000B3F6 3B76F4 cmp si, word ptr [bp-12] 0 0000B3F9 7209 jc _.L81 716 _.L261: 0 0000B3FB BA2F00 mov dx, 47 0 0000B3FE 52 push dx 0 0000B3FF 50 push ax 0 0000B400 1E push ds 0 0000B401 E94FFB jmp _.L253 722 _.L81: 0 0000B404 368814 mov byte ptr ss:[si], dl 0 0000B407 46 inc si 725 _.L82: 0 0000B408 C45E08 les bx, dword ptr [bp+8] 0 0000B40B 8CC2 mov dx, es 0 0000B40D 268A07 mov al, byte ptr es:[bx] 0 0000B410 3C2F cmp al, 47 0 0000B412 7460 je _.L83 0 0000B414 3C5C cmp al, 92 0 0000B416 745C je _.L83 0 0000B418 3C2E cmp al, 46 0 0000B41A 7571 jne _.L84 0 0000B41C 8D4701 lea ax, [1+bx] 0 0000B41F 894608 mov word ptr [bp+8], ax 0 0000B422 26807F012E cmp byte ptr es:[bx+1], 46 0 0000B427 7554 jne _.L139 0 0000B429 83C302 add bx, 2 0 0000B42C 895E08 mov word ptr [bp+8], bx 0 0000B42F C746F80200 mov word ptr [bp-8], 2 742 _.L85: 0 0000B434 C55E08 lds bx, dword ptr [bp+8] 0 0000B437 8A07 mov al, byte ptr [bx] 0 0000B439 8846FA mov byte ptr [bp-6], al 0 0000B43C 3C2F cmp al, 47 0 0000B43E 9F lahf 0 0000B43F D0E4 shl ah, 1 0 0000B441 99 cwd 0 0000B442 F6DA neg dl 0 0000B444 3C5C cmp al, 92 0 0000B446 9F lahf 0 0000B447 D0E4 shl ah, 1 0 0000B449 88E0 mov al, ah 0 0000B44B 98 cbw 0 0000B44C F6DC neg ah 0 0000B44E 08E2 or dl, ah 0 0000B450 7506 jne _.L143 0 0000B452 807EFA01 cmp byte ptr [bp-6], 1 0 0000B456 732C jnc _.L86 761 _.L143: 0 0000B458 4E dec si 0 0000B459 837EF802 cmp word ptr [bp-8], 2 0 0000B45D 7403E9B1FE jne _.L79 765 _.L90: 0 0000B462 4E dec si 0 0000B463 36803C5C cmp byte ptr ss:[si], 92 0 0000B467 7503E9A7FE je _.L79 0 0000B46C 3976FC cmp word ptr [bp-4], si 0 0000B46F 72F1 jc _.L90 0 0000B471 E9F9FA jmp _.L38 772 _.L83: 0 0000B474 43 inc bx 0 0000B475 895E08 mov word ptr [bp+8], bx 0 0000B478 89560A mov word ptr [bp+10], dx 0 0000B47B EB8B jmp _.L82 777 _.L139: 0 0000B47D C746F80100 mov word ptr [bp-8], 1 0 0000B482 EBB0 jmp _.L85 780 _.L86: 0 0000B484 B82F00 mov ax, 47 0 0000B487 50 push ax 0 0000B488 1E push ds 0 0000B489 53 push bx 0 0000B48A E9C6FA jmp _.L253 786 _.L84: 0 0000B48D 83E1FD and cx, -3 0 0000B490 C746FA0800 mov word ptr [bp-6], 8 789 _.L94: 0 0000B495 C55E08 lds bx, dword ptr [bp+8] 0 0000B498 8A07 mov al, byte ptr [bx] 0 0000B49A 88C4 mov ah, al 0 0000B49C 80F42F xor ah, 47 0 0000B49F 80FC01 cmp ah, 1 0 0000B4A2 18D2 sbb dl, dl 0 0000B4A4 FEC2 inc dl 0 0000B4A6 88C4 mov ah, al 0 0000B4A8 80F45C xor ah, 92 0 0000B4AB 80FC01 cmp ah, 1 0 0000B4AE 18E4 sbb ah, ah 0 0000B4B0 FEC4 inc ah 0 0000B4B2 84E2 test dl, ah 0 0000B4B4 7503E95AFE je _.L79 0 0000B4B9 84C0 test al, al 0 0000B4BB 7503E953FE je _.L79 0 0000B4C0 8D4701 lea ax, [1+bx] 0 0000B4C3 894608 mov word ptr [bp+8], ax 0 0000B4C6 8C5E0A mov word ptr [bp+10], ds 0 0000B4C9 8A17 mov dl, byte ptr [bx] 0 0000B4CB 8856F8 mov byte ptr [bp-8], dl 0 0000B4CE 80FA2A cmp dl, 42 0 0000B4D1 755C jne _.L95 0 0000B4D3 89F3 mov bx, si 0 0000B4D5 8B56FA mov dx, word ptr [bp-6] 0 0000B4D8 01F2 add dx, si 816 _.L96: 0 0000B4DA 89DE mov si, bx 0 0000B4DC 39D3 cmp bx, dx 0 0000B4DE 753B jne _.L99 0 0000B4E0 C746FA0000 mov word ptr [bp-6], 0 821 _.L100: 0 0000B4E5 83C901 or cx, 1 0 0000B4E8 837EFA00 cmp word ptr [bp-6], 0 0 0000B4EC 74A7 je _.L94 0 0000B4EE FF4EFA dec word ptr [bp-6] 0 0000B4F1 C646F83F mov byte ptr [bp-8], 63 827 _.L108: 0 0000B4F5 894EF2 mov word ptr [bp-14], cx 0 0000B4F8 8A46F8 mov al, byte ptr [bp-8] 0 0000B4FB 98 cbw 0 0000B4FC 50 push ax 0 0000B4FD B8[0000] mov ax, offset __DirChars 0 0000B500 50 push ax 0 0000B501 16 push ss 0 0000B502 1F pop ds 0 0000B503 E8[FEFF] call _strchr 0 0000B506 85C0 test ax, ax 0 0000B508 8B4EF2 mov cx, word ptr [bp-14] 0 0000B50B 7565 jne _.L262 0 0000B50D 3B76F4 cmp si, word ptr [bp-12] 0 0000B510 7360 jnc _.L262 0 0000B512 8A46F8 mov al, byte ptr [bp-8] 0 0000B515 8804 mov byte ptr [si], al 0 0000B517 46 inc si 0 0000B518 E97AFF jmp _.L94 846 _.L99: 0 0000B51B 3B5EF4 cmp bx, word ptr [bp-12] 0 0000B51E 7208 jc _.L97 849 _.L260: 0 0000B520 BA2F00 mov dx, 47 0 0000B523 52 push dx 0 0000B524 1E push ds 0 0000B525 E92AFA jmp _.L256 854 _.L97: 0 0000B528 36C6073F mov byte ptr ss:[bx], 63 0 0000B52C 43 inc bx 0 0000B52D EBAB jmp _.L96 858 _.L95: 0 0000B52F 807EF82E cmp byte ptr [bp-8], 46 0 0000B533 754A jne _.L101 0 0000B535 F6C102 test cl, 2 0 0000B538 75E6 jne _.L260 0 0000B53A 8A4701 mov al, byte ptr [bx+1] 0 0000B53D 3C2F cmp al, 47 0 0000B53F 9F lahf 0 0000B540 D0E4 shl ah, 1 0 0000B542 99 cwd 0 0000B543 88D4 mov ah, dl 0 0000B545 F6DC neg ah 0 0000B547 88E3 mov bl, ah 0 0000B549 3C5C cmp al, 92 0 0000B54B 9F lahf 0 0000B54C D0E4 shl ah, 1 0 0000B54E 99 cwd 0 0000B54F F6DA neg dl 0 0000B551 88DC mov ah, bl 0 0000B553 08D4 or ah, dl 0 0000B555 7403E9B9FD jne _.L79 0 0000B55A 84C0 test al, al 0 0000B55C 7503E9B2FD je _.L79 0 0000B561 83C902 or cx, 2 0 0000B564 C746FA0400 mov word ptr [bp-6], 4 883 _.L104: 0 0000B569 FF4EFA dec word ptr [bp-6] 0 0000B56C 807EF81F cmp byte ptr [bp-8], 31 0 0000B570 7783 ja _.L108 887 _.L262: 0 0000B572 B82F00 mov ax, 47 0 0000B575 50 push ax 0 0000B576 FF760A push word ptr [bp+10] 0 0000B579 FF7608 push word ptr [bp+8] 0 0000B57C E9D4F9 jmp _.L253 893 _.L101: 0 0000B57F 807EF83F cmp byte ptr [bp-8], 63 0 0000B583 7503E95DFF je _.L100 0 0000B588 837EFA00 cmp word ptr [bp-6], 0 0 0000B58C 7503E904FF je _.L94 0 0000B591 EBD6 jmp _.L104 899 _.L123: 0 0000B593 36803E[0000]00 cmp byte ptr ss:[_njoined], 0 0 0000B599 7503E9C8FD je _.L127 0 0000B59E 8B36[0000] mov si, word ptr [_CDSp] 0 0000B5A2 A1[0200] mov ax, word ptr [_CDSp+2] 0 0000B5A5 8946FC mov word ptr [bp-4], ax 0 0000B5A8 C746FA0000 mov word ptr [bp-6], 0 906 _.L128: 0 0000B5AD A0[0000] mov al, byte ptr [_lastdrive] 0 0000B5B0 30E4 xor ah, ah 0 0000B5B2 3946FA cmp word ptr [bp-6], ax 0 0000B5B5 7C03E9ACFD jge _.L127 0 0000B5BA FF76FC push word ptr [bp-4] 0 0000B5BD 56 push si 0 0000B5BE E8[FEFF] call _fstrlen 0 0000B5C1 89C1 mov cx, ax 0 0000B5C3 8E46FC mov es, word ptr [bp-4] 0 0000B5C6 26F6444420 test byte ptr es:[si+68], 32 0 0000B5CB 7503E98000 je _.L129 0 0000B5D0 89F8 mov ax, di 0 0000B5D2 01C8 add ax, cx 0 0000B5D4 8946F8 mov word ptr [bp-8], ax 0 0000B5D7 89CB mov bx, cx 0 0000B5D9 8A01 mov al, byte ptr [bx+di] 0 0000B5DB 3C5C cmp al, 92 0 0000B5DD 7404 je _.L144 0 0000B5DF 84C0 test al, al 0 0000B5E1 756D jne _.L129 927 _.L144: 0 0000B5E3 51 push cx 0 0000B5E4 894EF4 mov word ptr [bp-12], cx 0 0000B5E7 FF76FC push word ptr [bp-4] 0 0000B5EA 56 push si 0 0000B5EB 16 push ss 0 0000B5EC 57 push di 0 0000B5ED E8[FEFF] call _fmemcmp 0 0000B5F0 85C0 test ax, ax 0 0000B5F2 8B4EF4 mov cx, word ptr [bp-12] 0 0000B5F5 7559 jne _.L129 0 0000B5F7 8A56FA mov dl, byte ptr [bp-6] 0 0000B5FA 80C241 add dl, 65 0 0000B5FD 8815 mov byte ptr [di], dl 0 0000B5FF C645013A mov byte ptr [di+1], 58 0 0000B603 8B5EF8 mov bx, word ptr [bp-8] 0 0000B606 36803F00 cmp byte ptr ss:[bx], 0 0 0000B60A 7534 jne _.L131 0 0000B60C C645025C mov byte ptr [di+2], 92 0 0000B610 884503 mov byte ptr [di+3], al 947 _.L132: 0 0000B613 8B46FE mov ax, word ptr [bp-2] 0 0000B616 83E0E0 and ax, -32 0 0000B619 0B46FA or ax, word ptr [bp-6] 0 0000B61C 8936[0000] mov word ptr [_current_ldt], si 0 0000B620 8B56FC mov dx, word ptr [bp-4] 0 0000B623 8916[0200] mov word ptr [_current_ldt+2], dx 0 0000B627 83E0BF and ax, -65 0 0000B62A 8946FE mov word ptr [bp-2], ax 0 0000B62D 8EC2 mov es, dx 0 0000B62F 26837C4300 cmp word ptr es:[si+67], 0 0 0000B634 7C03E939F9 jge _.L33 0 0000B639 804EFE40 or byte ptr [bp-2], 64 0 0000B63D E932F9 jmp _.L33 961 _.L131: 0 0000B640 83F902 cmp cx, 2 0 0000B643 74CE je _.L132 0 0000B645 FF76F8 push word ptr [bp-8] 0 0000B648 FF76F6 push word ptr [bp-10] 0 0000B64B E8[FEFF] call _strcpy 0 0000B64E EBC3 jmp _.L132 968 _.L129: 0 0000B650 FF46FA inc word ptr [bp-6] 0 0000B653 83C658 add si, 88 0 0000B656 E954FF jmp _.L128 972 _.L125: 0 0000B659 8A46FE mov al, byte ptr [bp-2] 0 0000B65C 83E060 and ax, 96 0 0000B65F 83F820 cmp ax, 32 0 0000B662 7403E908FD jne _.L126 0 0000B667 36807D022F cmp byte ptr ss:[di+2], 47 0 0000B66C 7503E9FEFC je _.L126 0 0000B671 57 push di 0 0000B672 E8[FEFF] call _dir_exists 0 0000B675 85C0 test ax, ax 0 0000B677 7403E9F3FC jne _.L126 0 0000B67C E9EEF8 jmp _.L38 984 _.L141: 0 0000B67F C746FE003A mov word ptr [bp-2], 14848 0 0000B684 E9EBF8 jmp _.L33 987 _.L49: 0 0000B687 84C9 test cl, cl 0 0000B689 7403E974FA jne _.L135 0 0000B68E E9DCF8 jmp _.L38 991 _.L48: 0 0000B691 84C9 test cl, cl 0 0000B693 E9CBFA jmp _.L242 994 .size _truename, .-_truename === Switch to base=012B40h -> ".RODATA" 995 .section .rodata 996 .type __DirChars, @object 997 .size __DirChars, 12 998 __DirChars: 0 00001878 225B5D3A7C3C3E2B .string "\"[]:|<>+=;," 0 00001880 3D3B2C00 1000 .ident "GCC: (GNU) 6.3.0" === Trace listing source: nls_hc.lst 1 ; Hardcoded DOS-NLS information for country = 1, codepage = 437 2 ; This is an automatically generated file! 3 ; Any modifications will be lost! 4 5 ; Prerequisites: 6 ;; ==> Assuming that data of tables remains constant all the time 7 ;; ==> Reordering tables 1, 2, 4 and 5 8 9 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif === Switch to base=000790h -> "CONST2" 10 segment CONST2 11 12 GLOBAL _nlsPackageHardcoded 13 _nlsPackageHardcoded: 0 00001390 000000000100B501 DB 000h, 000h, 000h, 000h, 001h, 000h, 0b5h, 001h 0 00001398 0F0059004E000600 DB 00fh, 000h, 059h, 000h, 04eh, 000h, 006h, 000h 0 000013A0 02 DB 002h 0 000013A1 [4800][0000] DW ?table2, DGROUP 0 000013A5 04 DB 004h 0 000013A6 [CA00][0000] DW ?table4, DGROUP 0 000013AA 05 DB 005h 0 000013AB [4C01][0000] DW ?table5, DGROUP 0 000013AF 06 DB 006h 0 000013B0 [6401][0000] DW ?table6, DGROUP 0 000013B4 07 DB 007h 0 000013B5 [6602][0000] DW ?table7, DGROUP 26 GLOBAL _nlsCountryInfoHardcoded 27 _nlsCountryInfoHardcoded: 0 000013B9 01 DB 001h 29 GLOBAL _nlsCntryInfoHardcoded 30 _nlsCntryInfoHardcoded: 31 ?table1: 0 000013BA 1C000100B5010000 DB 01ch, 000h, 001h, 000h, 0b5h, 001h, 000h, 000h 0 000013C2 24000000002C002E DB 024h, 000h, 000h, 000h, 000h, 02ch, 000h, 02eh 0 000013CA 002D003A00000200 DB 000h, 02dh, 000h, 03ah, 000h, 000h, 002h, 000h 35 extern _CharMapSrvc 0 000013D2 [0000][0000] DW _CharMapSrvc, DGROUP 0 000013D6 2C00 DB 02ch, 000h 38 GLOBAL _hcTablesStart 39 _hcTablesStart: 40 GLOBAL _nlsUpcaseHardcoded 41 _nlsUpcaseHardcoded: 42 ?table2: 0 000013D8 8000809A45418E41 DB 080h, 000h, 080h, 09ah, 045h, 041h, 08eh, 041h 0 000013E0 8F80454545494949 DB 08fh, 080h, 045h, 045h, 045h, 049h, 049h, 049h 0 000013E8 8E8F9092924F994F DB 08eh, 08fh, 090h, 092h, 092h, 04fh, 099h, 04fh 0 000013F0 555559999A9B9C9D DB 055h, 055h, 059h, 099h, 09ah, 09bh, 09ch, 09dh 0 000013F8 9E9F41494F55A5A5 DB 09eh, 09fh, 041h, 049h, 04fh, 055h, 0a5h, 0a5h 0 00001400 A6A7A8A9AAABACAD DB 0a6h, 0a7h, 0a8h, 0a9h, 0aah, 0abh, 0ach, 0adh 0 00001408 AEAFB0B1B2B3B4B5 DB 0aeh, 0afh, 0b0h, 0b1h, 0b2h, 0b3h, 0b4h, 0b5h 0 00001410 B6B7B8B9BABBBCBD DB 0b6h, 0b7h, 0b8h, 0b9h, 0bah, 0bbh, 0bch, 0bdh 0 00001418 BEBFC0C1C2C3C4C5 DB 0beh, 0bfh, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h 0 00001420 C6C7C8C9CACBCCCD DB 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh 0 00001428 CECFD0D1D2D3D4D5 DB 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h 0 00001430 D6D7D8D9DADBDCDD DB 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh 0 00001438 DEDFE0E1E2E3E4E5 DB 0deh, 0dfh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h 0 00001440 E6E7E8E9EAEBECED DB 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh 0 00001448 EEEFF0F1F2F3F4F5 DB 0eeh, 0efh, 0f0h, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h 0 00001450 F6F7F8F9FAFBFCFD DB 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0fdh 0 00001458 FEFF DB 0feh, 0ffh 60 GLOBAL _nlsFUpcaseHardcoded 61 _nlsFUpcaseHardcoded: 62 ?table4: 0 0000145A 8000809A45418E41 DB 080h, 000h, 080h, 09ah, 045h, 041h, 08eh, 041h 0 00001462 8F80454545494949 DB 08fh, 080h, 045h, 045h, 045h, 049h, 049h, 049h 0 0000146A 8E8F9092924F994F DB 08eh, 08fh, 090h, 092h, 092h, 04fh, 099h, 04fh 0 00001472 555559999A9B9C9D DB 055h, 055h, 059h, 099h, 09ah, 09bh, 09ch, 09dh 0 0000147A 9E9F41494F55A5A5 DB 09eh, 09fh, 041h, 049h, 04fh, 055h, 0a5h, 0a5h 0 00001482 A6A7A8A9AAABACAD DB 0a6h, 0a7h, 0a8h, 0a9h, 0aah, 0abh, 0ach, 0adh 0 0000148A AEAFB0B1B2B3B4B5 DB 0aeh, 0afh, 0b0h, 0b1h, 0b2h, 0b3h, 0b4h, 0b5h 0 00001492 B6B7B8B9BABBBCBD DB 0b6h, 0b7h, 0b8h, 0b9h, 0bah, 0bbh, 0bch, 0bdh 0 0000149A BEBFC0C1C2C3C4C5 DB 0beh, 0bfh, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h 0 000014A2 C6C7C8C9CACBCCCD DB 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh 0 000014AA CECFD0D1D2D3D4D5 DB 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h 0 000014B2 D6D7D8D9DADBDCDD DB 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh 0 000014BA DEDFE0E1E2E3E4E5 DB 0deh, 0dfh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h 0 000014C2 E6E7E8E9EAEBECED DB 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh 0 000014CA EEEFF0F1F2F3F4F5 DB 0eeh, 0efh, 0f0h, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h 0 000014D2 F6F7F8F9FAFBFCFD DB 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0fdh 0 000014DA FEFF DB 0feh, 0ffh 80 GLOBAL _nlsFnameTermHardcoded 81 _nlsFnameTermHardcoded: 82 ?table5: 0 000014DC 16008E00FF410020 DB 016h, 000h, 08eh, 000h, 0ffh, 041h, 000h, 020h 0 000014E4 EE0E2E222F5C5B5D DB 0eeh, 00eh, 02eh, 022h, 02fh, 05ch, 05bh, 05dh 0 000014EC 3A7C3C3E2B3D3B2C DB 03ah, 07ch, 03ch, 03eh, 02bh, 03dh, 03bh, 02ch 86 GLOBAL _nlsCollHardcoded 87 _nlsCollHardcoded: 88 ?table6: 0 000014F4 0001000102030405 DB 000h, 001h, 000h, 001h, 002h, 003h, 004h, 005h 0 000014FC 060708090A0B0C0D DB 006h, 007h, 008h, 009h, 00ah, 00bh, 00ch, 00dh 0 00001504 0E0F101112131415 DB 00eh, 00fh, 010h, 011h, 012h, 013h, 014h, 015h 0 0000150C 161718191A1B1C1D DB 016h, 017h, 018h, 019h, 01ah, 01bh, 01ch, 01dh 0 00001514 1E1F202122232425 DB 01eh, 01fh, 020h, 021h, 022h, 023h, 024h, 025h 0 0000151C 262728292A2B2C2D DB 026h, 027h, 028h, 029h, 02ah, 02bh, 02ch, 02dh 0 00001524 2E2F303132333435 DB 02eh, 02fh, 030h, 031h, 032h, 033h, 034h, 035h 0 0000152C 363738393A3B3C3D DB 036h, 037h, 038h, 039h, 03ah, 03bh, 03ch, 03dh 0 00001534 3E3F404142434445 DB 03eh, 03fh, 040h, 041h, 042h, 043h, 044h, 045h 0 0000153C 464748494A4B4C4D DB 046h, 047h, 048h, 049h, 04ah, 04bh, 04ch, 04dh 0 00001544 4E4F505152535455 DB 04eh, 04fh, 050h, 051h, 052h, 053h, 054h, 055h 0 0000154C 565758595A5B5C5D DB 056h, 057h, 058h, 059h, 05ah, 05bh, 05ch, 05dh 0 00001554 5E5F604142434445 DB 05eh, 05fh, 060h, 041h, 042h, 043h, 044h, 045h 0 0000155C 464748494A4B4C4D DB 046h, 047h, 048h, 049h, 04ah, 04bh, 04ch, 04dh 0 00001564 4E4F505152535455 DB 04eh, 04fh, 050h, 051h, 052h, 053h, 054h, 055h 0 0000156C 565758595A7B7C7D DB 056h, 057h, 058h, 059h, 05ah, 07bh, 07ch, 07dh 0 00001574 7E7F435545414141 DB 07eh, 07fh, 043h, 055h, 045h, 041h, 041h, 041h 0 0000157C 4143454545494949 DB 041h, 043h, 045h, 045h, 045h, 049h, 049h, 049h 0 00001584 41414541414F4F4F DB 041h, 041h, 045h, 041h, 041h, 04fh, 04fh, 04fh 0 0000158C 5555594F55242424 DB 055h, 055h, 059h, 04fh, 055h, 024h, 024h, 024h 0 00001594 242441494F554E4E DB 024h, 024h, 041h, 049h, 04fh, 055h, 04eh, 04eh 0 0000159C A6A73FA9AAABAC21 DB 0a6h, 0a7h, 03fh, 0a9h, 0aah, 0abh, 0ach, 021h 0 000015A4 2222B0B1B2B3B4B5 DB 022h, 022h, 0b0h, 0b1h, 0b2h, 0b3h, 0b4h, 0b5h 0 000015AC B6B7B8B9BABBBCBD DB 0b6h, 0b7h, 0b8h, 0b9h, 0bah, 0bbh, 0bch, 0bdh 0 000015B4 BEBFC0C1C2C3C4C5 DB 0beh, 0bfh, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h 0 000015BC C6C7C8C9CACBCCCD DB 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh 0 000015C4 CECFD0D1D2D3D4D5 DB 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h 0 000015CC D6D7D8D9DADBDCDD DB 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh 0 000015D4 DEDFE053E2E3E4E5 DB 0deh, 0dfh, 0e0h, 053h, 0e2h, 0e3h, 0e4h, 0e5h 0 000015DC E6E7E8E9EAEBECED DB 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh 0 000015E4 EEEFF0F1F2F3F4F5 DB 0eeh, 0efh, 0f0h, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h 0 000015EC F6F7F8F9FAFBFCFD DB 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0fdh 0 000015F4 FEFF DB 0feh, 0ffh 122 GLOBAL _nlsDBCSHardcoded 123 _nlsDBCSHardcoded: 124 ?table7: 0 000015F6 0000000000000000 DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h 0 000015FE 0000 DB 000h, 000h 127 GLOBAL _hcTablesEnd 128 _hcTablesEnd: === Trace listing source: nls.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=nls.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccaQSvYr.s output file : nls.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _searchPackage, @function 7 _searchPackage: 0 0000B696 56 push si 0 0000B697 57 push di 0 0000B698 89E3 mov bx, sp 0 0000B69A 8B4F06 mov cx, word ptr [bx+6] 0 0000B69D 8B7708 mov si, word ptr [bx+8] 0 0000B6A0 83F9FF cmp cx, -1 0 0000B6A3 BB[0000] mov bx, offset _nlsInfo 0 0000B6A6 7507 jne _.L2 0 0000B6A8 C47F08 les di, dword ptr [bx+8] 0 0000B6AB 268B4D06 mov cx, word ptr es:[di+6] 18 _.L2: 0 0000B6AF 83FEFF cmp si, -1 0 0000B6B2 7507 jne _.L3 0 0000B6B4 C47F08 les di, dword ptr [bx+8] 0 0000B6B7 268B7504 mov si, word ptr es:[di+4] 23 _.L3: 0 0000B6BB 8B470C mov ax, word ptr [bx+12] 0 0000B6BE 8B570E mov dx, word ptr [bx+14] 26 _.L6: 0 0000B6C1 8EC2 mov es, dx 0 0000B6C3 89C3 mov bx, ax 0 0000B6C5 263B4F06 cmp cx, word ptr es:[bx+6] 0 0000B6C9 7506 jne _.L4 0 0000B6CB 263B7704 cmp si, word ptr es:[bx+4] 0 0000B6CF 7410 je _.L1 33 _.L4: 0 0000B6D1 93 xchg bx, ax 0 0000B6D2 8EC2 mov es, dx 0 0000B6D4 268B07 mov ax, word ptr es:[bx] 0 0000B6D7 268B5702 mov dx, word ptr es:[bx+2] 0 0000B6DB 89C3 mov bx, ax 0 0000B6DD 09D3 or bx, dx 0 0000B6DF 75E0 jne _.L6 41 _.L1: 0 0000B6E1 5F pop di 0 0000B6E2 5E pop si 0 0000B6E3 C20400 ret 4 45 .size _searchPackage, .-_searchPackage 46 .type _muxLoadPkg, @function 47 _muxLoadPkg: 0 0000B6E6 56 push si 0 0000B6E7 55 push bp 0 0000B6E8 89E5 mov bp, sp 0 0000B6EA 31F6 xor si, si 0 0000B6EC 56 push si 0 0000B6ED 56 push si 0 0000B6EE 56 push si 0 0000B6EF 56 push si 0 0000B6F0 B802FD mov ax, -766 0 0000B6F3 50 push ax 0 0000B6F4 56 push si 0 0000B6F5 B84B53 mov ax, 21323 0 0000B6F8 50 push ax 0 0000B6F9 E8[FEFF] call _call_nls 0 0000B6FC 3DFF14 cmp ax, 5375 0 0000B6FF 751D jne _.L11 0 0000B701 81FA4B53 cmp dx, 21323 0 0000B705 751C jne _.L12 0 0000B707 56 push si 0 0000B708 56 push si 0 0000B709 56 push si 0 0000B70A FF7606 push word ptr [bp+6] 0 0000B70D FF7608 push word ptr [bp+8] 0 0000B710 FF760A push word ptr [bp+10] 0 0000B713 56 push si 0 0000B714 E8[FEFF] call _call_nls 74 _.L9: 0 0000B717 89EC mov sp, bp 0 0000B719 5D pop bp 0 0000B71A 5E pop si 0 0000B71B C20600 ret 6 79 _.L11: 0 0000B71E B8FEFF mov ax, -2 0 0000B721 EBF4 jmp _.L9 82 _.L12: 0 0000B723 B8F4FF mov ax, -12 0 0000B726 EBEF jmp _.L9 85 .size _muxLoadPkg, .-_muxLoadPkg 86 .type _nlsGetData, @function 87 _nlsGetData: 0 0000B728 56 push si 0 0000B729 57 push di 0 0000B72A 55 push bp 0 0000B72B 89E5 mov bp, sp 0 0000B72D 1E push ds 0 0000B72E 8B5E08 mov bx, word ptr [bp+8] 0 0000B731 8B460A mov ax, word ptr [bp+10] 0 0000B734 C5560E lds dx, dword ptr [bp+14] 0 0000B737 8B7E12 mov di, word ptr [bp+18] 0 0000B73A 89D9 mov cx, bx 0 0000B73C 09C1 or cx, ax 0 0000B73E 7410 je _.L28 0 0000B740 8EC0 mov es, ax 0 0000B742 268B4F0E mov cx, word ptr es:[bx+14] 0 0000B746 83C310 add bx, 16 103 _.L17: 0 0000B749 89CE mov si, cx 0 0000B74B 4E dec si 0 0000B74C 85C9 test cx, cx 0 0000B74E 7505 jne _.L19 108 _.L28: 0 0000B750 B8FFFF mov ax, -1 0 0000B753 EB47 jmp _.L14 111 _.L19: 0 0000B755 8EC0 mov es, ax 0 0000B757 268A0F mov cl, byte ptr es:[bx] 0 0000B75A 3A4E0C cmp cl, byte ptr [bp+12] 0 0000B75D 7407 je _.L18 0 0000B75F 83C305 add bx, 5 0 0000B762 89F1 mov cx, si 0 0000B764 EBE3 jmp _.L17 119 _.L18: 0 0000B766 89D9 mov cx, bx 0 0000B768 09C1 or cx, ax 0 0000B76A 74E4 je _.L28 0 0000B76C 837E0C01 cmp word ptr [bp+12], 1 0 0000B770 7411 je _.L22 0 0000B772 817E0C0101 cmp word ptr [bp+12], 257 0 0000B777 742D je _.L23 0 0000B779 83FF04 cmp di, 4 0 0000B77C 76D2 jbe _.L28 0 0000B77E B90500 mov cx, 5 0 0000B781 EB0D jmp _.L31 131 _.L22: 0 0000B783 8EC0 mov es, ax 0 0000B785 268B4F01 mov cx, word ptr es:[bx+1] 0 0000B789 83C103 add cx, 3 0 0000B78C 39F9 cmp cx, di 0 0000B78E 77C0 ja _.L28 137 _.L31: 0 0000B790 51 push cx 0 0000B791 50 push ax 0 0000B792 53 push bx 0 0000B793 1E push ds 0 0000B794 52 push dx 0 0000B795 16 push ss 0 0000B796 1F pop ds 0 0000B797 E8[FEFF] call _fmemcpy 0 0000B79A 31C0 xor ax, ax 147 _.L14: 0 0000B79C 89EC mov sp, bp 0 0000B79E 5D pop bp 0 0000B79F 5F pop di 0 0000B7A0 5E pop si 0 0000B7A1 16 push ss 0 0000B7A2 1F pop ds 0 0000B7A3 C20C00 ret 12 155 _.L23: 0 0000B7A6 83C307 add bx, 7 0 0000B7A9 83FF17 cmp di, 23 0 0000B7AC 76A2 jbe _.L28 0 0000B7AE B91800 mov cx, 24 0 0000B7B1 EBDD jmp _.L31 161 .size _nlsGetData, .-_nlsGetData 162 .type _upMMem.part.0, @function 163 _upMMem.part.0: 0 0000B7B3 56 push si 0 0000B7B4 57 push di 0 0000B7B5 55 push bp 0 0000B7B6 89E5 mov bp, sp 0 0000B7B8 C44E08 les cx, dword ptr [bp+8] 0 0000B7BB C5760C lds si, dword ptr [bp+12] 0 0000B7BE 8B7E10 mov di, word ptr [bp+16] 171 _.L35: 0 0000B7C1 8A14 mov dl, byte ptr [si] 0 0000B7C3 88D0 mov al, dl 0 0000B7C5 30E4 xor ah, ah 0 0000B7C7 83F860 cmp ax, 96 0 0000B7CA 760A jbe _.L33 0 0000B7CC 83F87A cmp ax, 122 0 0000B7CF 7711 ja _.L34 0 0000B7D1 80C2E0 add dl, -32 0 0000B7D4 8814 mov byte ptr [si], dl 181 _.L33: 0 0000B7D6 46 inc si 0 0000B7D7 4F dec di 0 0000B7D8 75E7 jne _.L35 0 0000B7DA 5D pop bp 0 0000B7DB 5F pop di 0 0000B7DC 5E pop si 0 0000B7DD 16 push ss 0 0000B7DE 1F pop ds 0 0000B7DF C20A00 ret 10 191 _.L34: 0 0000B7E2 83F87F cmp ax, 127 0 0000B7E5 76EF jbe _.L33 0 0000B7E7 01C8 add ax, cx 0 0000B7E9 89C3 mov bx, ax 0 0000B7EB 268A07 mov al, byte ptr es:[bx] 0 0000B7EE 8804 mov byte ptr [si], al 0 0000B7F0 EBE4 jmp _.L33 199 .size _upMMem.part.0, .-_upMMem.part.0 200 .type _xUpMem, @function 201 _xUpMem: 0 0000B7F2 56 push si 0 0000B7F3 55 push bp 0 0000B7F4 89E5 mov bp, sp 0 0000B7F6 1E push ds 0 0000B7F7 8B5E06 mov bx, word ptr [bp+6] 0 0000B7FA C54608 lds ax, dword ptr [bp+8] 0 0000B7FD 8B760C mov si, word ptr [bp+12] 0 0000B800 8B4E0E mov cx, word ptr [bp+14] 0 0000B803 8EC0 mov es, ax 0 0000B805 268B5708 mov dx, word ptr es:[bx+8] 0 0000B809 8956FE mov word ptr [bp-2], dx 0 0000B80C 83E201 and dx, 1 0 0000B80F 741D je _.L39 0 0000B811 85C9 test cx, cx 0 0000B813 7430 je _.L38 0 0000B815 268B5711 mov dx, word ptr es:[bx+17] 0 0000B819 268B4F13 mov cx, word ptr es:[bx+19] 0 0000B81D 83C282 add dx, -126 0 0000B820 895606 mov word ptr [bp+6], dx 0 0000B823 894E08 mov word ptr [bp+8], cx 0 0000B826 16 push ss 0 0000B827 1F pop ds 0 0000B828 89EC mov sp, bp 0 0000B82A 5D pop bp 0 0000B82B 5E pop si 0 0000B82C EB85 jmp _upMMem.part.0 228 _.L39: 0 0000B82E 52 push dx 0 0000B82F 56 push si 0 0000B830 1E push ds 0 0000B831 BA2200 mov dx, 34 0 0000B834 52 push dx 0 0000B835 8EC0 mov es, ax 0 0000B837 26FF7706 push word ptr es:[bx+6] 0 0000B83B 26FF7704 push word ptr es:[bx+4] 0 0000B83F 51 push cx 0 0000B840 16 push ss 0 0000B841 1F pop ds 0 0000B842 E8[FEFF] call _call_nls 241 _.L38: 0 0000B845 89EC mov sp, bp 0 0000B847 5D pop bp 0 0000B848 5E pop si 0 0000B849 16 push ss 0 0000B84A 1F pop ds 0 0000B84B C20A00 ret 10 248 .size _xUpMem, .-_xUpMem 249 .type _nlsYesNo, @function 250 _nlsYesNo: 0 0000B84E 56 push si 0 0000B84F 57 push di 0 0000B850 55 push bp 0 0000B851 89E5 mov bp, sp 0 0000B853 1E push ds 0 0000B854 8B7608 mov si, word ptr [bp+8] 0 0000B857 8B460A mov ax, word ptr [bp+10] 0 0000B85A 8946FE mov word ptr [bp-2], ax 0 0000B85D 8B560C mov dx, word ptr [bp+12] 0 0000B860 84D2 test dl, dl 0 0000B862 7D1A jge _.L46 0 0000B864 BB[0000] mov bx, offset _nlsInfo 0 0000B867 36C47F08 les di, dword ptr ss:[bx+8] 0 0000B86B 26C55D25 lds bx, dword ptr es:[di+37] 0 0000B86F 83C302 add bx, 2 0 0000B872 89D7 mov di, dx 0 0000B874 81E7FF00 and di, 255 268 _.L47: 0 0000B878 8B07 mov ax, word ptr [bx] 0 0000B87A 85C0 test ax, ax 0 0000B87C 7538 jne _.L50 272 _.L46: 0 0000B87E B600 mov dh, 0 0 0000B880 89560C mov word ptr [bp+12], dx 275 #APP 276 ;# 173 "../hdr/portab.h" 1 1 /****************************************************************/ 2 /* */ 3 /* portab.h */ 4 /* */ 5 /* DOS-C portability typedefs, etc. */ 6 /* */ 7 /* May 1, 1995 */ 8 /* */ 9 /* Copyright (c) 1995 */ 10 /* Pasquale J. Villani */ 11 /* All Rights Reserved */ 12 /* */ 13 /* This file is part of DOS-C. */ 14 /* */ 15 /* DOS-C is free software; you can redistribute it and/or */ 16 /* modify it under the terms of the GNU General Public License */ 17 /* as published by the Free Software Foundation; either version */ 18 /* 2, or (at your option) any later version. */ 19 /* */ 20 /* DOS-C is distributed in the hope that it will be useful, but */ 21 /* WITHOUT ANY WARRANTY; without even the implied warranty of */ 22 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See */ 23 /* the GNU General Public License for more details. */ 24 /* */ 25 /* You should have received a copy of the GNU General Public */ 26 /* License along with DOS-C; see the file COPYING. If not, */ 27 /* write to the Free Software Foundation, 675 Mass Ave, */ 28 /* Cambridge, MA 02139, USA. */ 29 /****************************************************************/ 30 31 #ifdef MAIN 32 #ifdef VERSION_STRINGS 33 static char *portab_hRcsId = 34 "$Id: portab.h 1121 2005-03-15 15:25:08Z perditionc $"; 35 #endif 36 #endif 37 38 /****************************************************************/ 39 /* */ 40 /* Machine dependant portable types. Note that this section is */ 41 /* used primarily for segmented architectures. Common types and */ 42 /* types used relating to segmented operations are found here. */ 43 /* */ 44 /* Be aware that segmented architectures impose on linear */ 45 /* architectures because they require special types to be used */ 46 /* throught the code that must be reduced to empty preprocessor */ 47 /* replacements in the linear machine. */ 48 /* */ 49 /* #ifdef */ 50 /* # define FAR far */ 51 /* # define NEAR near */ 52 /* #endif */ 53 /* */ 54 /* #ifdef */ 55 /* # define FAR */ 56 /* # define NEAR */ 57 /* #endif */ 58 /* */ 59 /****************************************************************/ 60 61 /* commandline overflow - removing -DI86 TE */ 62 #if defined(__TURBOC__) 63 64 #define I86 65 #define CDECL cdecl 66 #if __TURBOC__ > 0x202 67 /* printf callers do the right thing for tc++ 1.01 but not tc 2.01 */ 68 #define VA_CDECL 69 #else 70 #define VA_CDECL cdecl 71 #endif 72 #define PASCAL pascal 73 void __int__(int); 74 #ifndef FORSYS 75 void __emit__(char, ...); 76 #define disable() __emit__(0xfa) 77 #define enable() __emit__(0xfb) 78 #endif 79 80 #elif defined(_MSC_VER) 81 82 #define I86 83 #define asm __asm 84 #pragma warning(disable: 4761) /* "integral size mismatch in argument; 85 conversion supplied" */ 86 #define CDECL _cdecl 87 #define VA_CDECL 88 #define PASCAL pascal 89 #define __int__(intno) asm int intno; 90 #define disable() asm cli 91 #define enable() asm sti 92 #define _CS getCS() 93 static unsigned short __inline getCS(void) 94 { 95 asm mov ax, cs; 96 } 97 #define _SS getSS() 98 static unsigned short __inline getSS(void) 99 { 100 asm mov ax, ss; 101 } 102 103 #elif defined(__WATCOMC__) /* don't know a better way */ 104 105 #if defined(_M_I86) 106 107 #define I86 108 #define __int__(intno) asm int intno; 109 void disable(void); 110 #pragma aux disable = "cli" __modify __exact []; 111 void enable(void); 112 #pragma aux enable = "sti" __modify __exact []; 113 #define asm __asm 114 #define far __far 115 #define CDECL __cdecl 116 #define VA_CDECL 117 #define PASCAL pascal 118 #define _CS getCS() 119 unsigned short getCS(void); 120 #pragma aux getCS = "mov dx,cs" __value [__dx] __modify __exact[__dx]; 121 #define _SS getSS() 122 unsigned short getSS(void); 123 #pragma aux getSS = "mov dx,ss" __value [__dx] __modify __exact[__dx]; 124 #if !defined(FORSYS) && !defined(EXEFLAT) && _M_IX86 >= 300 125 #pragma aux __default __parm [__ax __dx __cx] __modify [__ax __dx __es __fs] /* min.unpacked size */ 126 #endif 127 128 /* enable Possible loss of precision warning for compatibility with Borland */ 129 #pragma enable_message(130) 130 131 #else 132 133 /* workaround for building some utils with OpenWatcom (flat model) */ 134 #define MC68K 135 136 #endif 137 138 #elif defined (_MYMC68K_COMILER_) 139 140 #define MC68K 141 142 #elif defined(__GNUC__) 143 144 #ifdef __FAR 145 #define I86 146 #define STRINGIFY(x) #x 147 #define __int__(intno) asm volatile(STRINGIFY(int $##intno)) 148 static inline void disable(void) 149 { 150 asm volatile("cli"); 151 } 152 static inline void enable(void) 153 { 154 asm volatile("sti"); 155 } 156 #define far __far 157 #define CDECL __attribute__((cdecl)) 158 #define VA_CDECL 159 #define PASCAL 160 161 #define _CS getCS() 162 static inline unsigned short getCS(void) 163 { 164 unsigned short ret; 165 asm volatile("{ mov %%cs, %0 | mov %0, cs }" : "=r"(ret)); 166 return ret; 167 } 168 169 #define _SS getSS() 170 static inline unsigned short getSS(void) 171 { 172 unsigned short ret; 0 0000B883 8CD0 asm volatile("{ mov %%ss, %0 | mov %0, ss }" : "=r"(ret)); 174 return ret; 277 mov ax, ss 278 ;# 0 "" 2 279 #NO_APP 0 0000B885 BA0100 mov dx, 1 0 0000B888 52 push dx 0 0000B889 8D560C lea dx, [12+bp] 0 0000B88C 50 push ax 0 0000B88D 52 push dx 0 0000B88E FF76FE push word ptr [bp-2] 0 0000B891 56 push si 0 0000B892 16 push ss 0 0000B893 1F pop ds 0 0000B894 E85BFF call _xUpMem 290 _.L49: 0 0000B897 8B460C mov ax, word ptr [bp+12] 0 0000B89A 8E46FE mov es, word ptr [bp-2] 0 0000B89D 2639440A cmp word ptr es:[si+10], ax 0 0000B8A1 7428 je _.L52 0 0000B8A3 263B440C cmp ax, word ptr es:[si+12] 0 0000B8A7 7427 je _.L53 0 0000B8A9 B80200 mov ax, 2 298 _.L45: 0 0000B8AC 89EC mov sp, bp 0 0000B8AE 5D pop bp 0 0000B8AF 5F pop di 0 0000B8B0 5E pop si 0 0000B8B1 16 push ss 0 0000B8B2 1F pop ds 0 0000B8B3 C20600 ret 6 306 _.L50: 0 0000B8B6 89C1 mov cx, ax 0 0000B8B8 30ED xor ch, ch 0 0000B8BA 39F9 cmp cx, di 0 0000B8BC 7708 ja _.L48 0 0000B8BE B108 mov cl, 8 0 0000B8C0 D3E8 shr ax, cl 0 0000B8C2 39F8 cmp ax, di 0 0000B8C4 73D1 jnc _.L49 315 _.L48: 0 0000B8C6 83C302 add bx, 2 0 0000B8C9 EBAD jmp _.L47 318 _.L52: 0 0000B8CB B80100 mov ax, 1 0 0000B8CE EBDC jmp _.L45 321 _.L53: 0 0000B8D0 31C0 xor ax, ax 0 0000B8D2 EBD8 jmp _.L45 324 .size _nlsYesNo, .-_nlsYesNo === Switch to base=012B40h -> ".RODATA.STR1.1" 325 .section .rodata.str1.1,"aMS",@progbits,1 326 _.LC0: 0 00001A9E 070A6368616E6765 .string "\007\nchange codepage not yet done ska\n" 0 00001AA6 20636F6465706167 0 00001AAE 65206E6F74207965 0 00001AB6 7420646F6E652073 0 00001ABE 6B610A00 === Switch to base=002270h -> ".TEXT" 328 .text 329 .global _nlsCPchange 330 .type _nlsCPchange, @function 331 _nlsCPchange: 0 0000B8D4 55 push bp 0 0000B8D5 89E5 mov bp, sp 0 0000B8D7 C74604[0000] mov word ptr [bp+4], offset _.LC0 0 0000B8DC 5D pop bp 0 0000B8DD E9[FEFF] jmp _put_string 337 .size _nlsCPchange, .-_nlsCPchange 338 .global _DosYesNo 339 .type _DosYesNo, @function 340 _DosYesNo: 0 0000B8E0 56 push si 0 0000B8E1 55 push bp 0 0000B8E2 89E5 mov bp, sp 0 0000B8E4 1E push ds 0 0000B8E5 8B5606 mov dx, word ptr [bp+6] 0 0000B8E8 BE[0000] mov si, offset _nlsInfo 0 0000B8EB C45C08 les bx, dword ptr [si+8] 0 0000B8EE 268B4708 mov ax, word ptr es:[bx+8] 0 0000B8F2 83E004 and ax, 4 0 0000B8F5 740D je _.L58 0 0000B8F7 52 push dx 0 0000B8F8 06 push es 0 0000B8F9 53 push bx 0 0000B8FA E851FF call _nlsYesNo 355 _.L57: 0 0000B8FD 89EC mov sp, bp 0 0000B8FF 5D pop bp 0 0000B900 5E pop si 0 0000B901 C20200 ret 2 360 _.L58: 0 0000B904 50 push ax 0 0000B905 50 push ax 0 0000B906 50 push ax 0 0000B907 B82300 mov ax, 35 0 0000B90A 50 push ax 0 0000B90B B8FFFF mov ax, -1 0 0000B90E 50 push ax 0 0000B90F 50 push ax 0 0000B910 52 push dx 0 0000B911 E8[FEFF] call _call_nls 0 0000B914 EBE7 jmp _.L57 372 .size _DosYesNo, .-_DosYesNo 373 .global _DosUpMem 374 .type _DosUpMem, @function 375 _DosUpMem: 0 0000B916 55 push bp 0 0000B917 89E5 mov bp, sp 0 0000B919 FF7608 push word ptr [bp+8] 0 0000B91C FF7606 push word ptr [bp+6] 0 0000B91F FF7604 push word ptr [bp+4] 0 0000B922 BB[0000] mov bx, offset _nlsInfo 0 0000B925 FF770A push word ptr [bx+10] 0 0000B928 FF7708 push word ptr [bx+8] 0 0000B92B E8C4FE call _xUpMem 0 0000B92E 89EC mov sp, bp 0 0000B930 5D pop bp 0 0000B931 C20600 ret 6 388 .size _DosUpMem, .-_DosUpMem 389 .global _DosUpChar 390 .type _DosUpChar, @function 391 _DosUpChar: 0 0000B934 55 push bp 0 0000B935 89E5 mov bp, sp 394 #APP 395 ;# 173 "../hdr/portab.h" 1 396 mov ax, ss 397 ;# 0 "" 2 398 #NO_APP 0 0000B939 BA0100 mov dx, 1 0 0000B93C 52 push dx 0 0000B93D 50 push ax 0 0000B93E 8D4604 lea ax, [4+bp] 0 0000B941 50 push ax 0 0000B942 E8[FEFF] call _DosUpMem 0 0000B945 8A4604 mov al, byte ptr [bp+4] 0 0000B948 89EC mov sp, bp 0 0000B94A 5D pop bp 0 0000B94B C3 ret 409 .size _DosUpChar, .-_DosUpChar 410 .global _DosUpString 411 .type _DosUpString, @function 412 _DosUpString: 0 0000B94C 56 push si 0 0000B94D 57 push di 0 0000B94E 55 push bp 0 0000B94F 89E5 mov bp, sp 0 0000B951 8B7608 mov si, word ptr [bp+8] 0 0000B954 8B7E0A mov di, word ptr [bp+10] 0 0000B957 57 push di 0 0000B958 56 push si 0 0000B959 E8[FEFF] call _fstrlen 0 0000B95C 50 push ax 0 0000B95D 57 push di 0 0000B95E 56 push si 0 0000B95F E8[FEFF] call _DosUpMem 0 0000B962 89EC mov sp, bp 0 0000B964 5D pop bp 0 0000B965 5F pop di 0 0000B966 5E pop si 0 0000B967 C20400 ret 4 431 .size _DosUpString, .-_DosUpString 432 .global _DosUpFMem 433 .type _DosUpFMem, @function 434 _DosUpFMem: 0 0000B96A 56 push si 0 0000B96B 57 push di 0 0000B96C 55 push bp 0 0000B96D 89E5 mov bp, sp 0 0000B96F 1E push ds 0 0000B970 8E5E08 mov ds, word ptr [bp+8] 0 0000B973 8B760A mov si, word ptr [bp+10] 0 0000B976 8B560C mov dx, word ptr [bp+12] 0 0000B979 BF[0000] mov di, offset _nlsInfo 0 0000B97C 36C45D08 les bx, dword ptr ss:[di+8] 0 0000B980 268B4708 mov ax, word ptr es:[bx+8] 0 0000B984 8946FE mov word ptr [bp-2], ax 0 0000B987 83E002 and ax, 2 0 0000B98A 7425 je _.L68 0 0000B98C 85D2 test dx, dx 0 0000B98E 7417 je _.L67 0 0000B990 52 push dx 0 0000B991 56 push si 0 0000B992 1E push ds 0 0000B993 268B4716 mov ax, word ptr es:[bx+22] 0 0000B997 8946FE mov word ptr [bp-2], ax 0 0000B99A 83C082 add ax, -126 0 0000B99D 26FF7718 push word ptr es:[bx+24] 0 0000B9A1 50 push ax 0 0000B9A2 16 push ss 0 0000B9A3 1F pop ds 0 0000B9A4 E80CFE call _upMMem.part.0 462 _.L67: 0 0000B9A7 89EC mov sp, bp 0 0000B9A9 5D pop bp 0 0000B9AA 5F pop di 0 0000B9AB 5E pop si 0 0000B9AC 16 push ss 0 0000B9AD 1F pop ds 0 0000B9AE C20600 ret 6 470 _.L68: 0 0000B9B1 50 push ax 0 0000B9B2 56 push si 0 0000B9B3 1E push ds 0 0000B9B4 B8A200 mov ax, 162 0 0000B9B7 50 push ax 0 0000B9B8 B8FFFF mov ax, -1 0 0000B9BB 50 push ax 0 0000B9BC 50 push ax 0 0000B9BD 52 push dx 0 0000B9BE 16 push ss 0 0000B9BF 1F pop ds 0 0000B9C0 E8[FEFF] call _call_nls 0 0000B9C3 EBE2 jmp _.L67 484 .size _DosUpFMem, .-_DosUpFMem 485 .global _DosUpFChar 486 .type _DosUpFChar, @function 487 _DosUpFChar: 0 0000B9C5 55 push bp 0 0000B9C6 89E5 mov bp, sp 490 #APP 491 ;# 173 "../hdr/portab.h" 1 492 mov ax, ss 493 ;# 0 "" 2 494 #NO_APP 0 0000B9CA BA0100 mov dx, 1 0 0000B9CD 52 push dx 0 0000B9CE 50 push ax 0 0000B9CF 8D4604 lea ax, [4+bp] 0 0000B9D2 50 push ax 0 0000B9D3 E8[FEFF] call _DosUpFMem 0 0000B9D6 8A4604 mov al, byte ptr [bp+4] 0 0000B9D9 89EC mov sp, bp 0 0000B9DB 5D pop bp 0 0000B9DC C20200 ret 2 505 .size _DosUpFChar, .-_DosUpFChar 506 .global _DosUpFString 507 .type _DosUpFString, @function 508 _DosUpFString: 0 0000B9DF 56 push si 0 0000B9E0 57 push di 0 0000B9E1 55 push bp 0 0000B9E2 89E5 mov bp, sp 0 0000B9E4 8B7608 mov si, word ptr [bp+8] 0 0000B9E7 8B7E0A mov di, word ptr [bp+10] 0 0000B9EA 57 push di 0 0000B9EB 56 push si 0 0000B9EC E8[FEFF] call _fstrlen 0 0000B9EF 50 push ax 0 0000B9F0 57 push di 0 0000B9F1 56 push si 0 0000B9F2 E8[FEFF] call _DosUpFMem 0 0000B9F5 89EC mov sp, bp 0 0000B9F7 5D pop bp 0 0000B9F8 5F pop di 0 0000B9F9 5E pop si 0 0000B9FA C20400 ret 4 527 .size _DosUpFString, .-_DosUpFString 528 .global _DosGetData 529 .type _DosGetData, @function 530 _DosGetData: 0 0000B9FD 56 push si 0 0000B9FE 57 push di 0 0000B9FF 55 push bp 0 0000BA00 89E5 mov bp, sp 0 0000BA02 83EC08 sub sp, 8 0 0000BA05 C47E08 les di, dword ptr [bp+8] 0 0000BA08 8B760C mov si, word ptr [bp+12] 0 0000BA0B 8B460E mov ax, word ptr [bp+14] 0 0000BA0E 8946FE mov word ptr [bp-2], ax 0 0000BA11 8B4610 mov ax, word ptr [bp+16] 0 0000BA14 8946FC mov word ptr [bp-4], ax 0 0000BA17 8B4E12 mov cx, word ptr [bp+18] 0 0000BA1A 09C8 or ax, cx 0 0000BA1C 894EF8 mov word ptr [bp-8], cx 0 0000BA1F 747C je _.L84 0 0000BA21 837EFE01 cmp word ptr [bp-2], 1 0 0000BA25 7276 jc _.L84 0 0000BA27 85FF test di, di 0 0000BA29 7477 je _.L85 0 0000BA2B 56 push si 0 0000BA2C 06 push es 0 0000BA2D 8C46FA mov word ptr [bp-6], es 0 0000BA30 E863FC call _searchPackage 0 0000BA33 89C3 mov bx, ax 0 0000BA35 09D0 or ax, dx 0 0000BA37 C44EF8 les cx, dword ptr [bp-8] 0 0000BA3A 7434 je _.L80 0 0000BA3C 8EC2 mov es, dx 0 0000BA3E 26F6470808 test byte ptr es:[bx+8], 8 0 0000BA43 7420 je _.L82 0 0000BA45 8B46FE mov ax, word ptr [bp-2] 0 0000BA48 894612 mov word ptr [bp+18], ax 0 0000BA4B 8B46FC mov ax, word ptr [bp-4] 0 0000BA4E 89460E mov word ptr [bp+14], ax 0 0000BA51 894E10 mov word ptr [bp+16], cx 0 0000BA54 897E0C mov word ptr [bp+12], di 0 0000BA57 895E08 mov word ptr [bp+8], bx 0 0000BA5A 89560A mov word ptr [bp+10], dx 0 0000BA5D 89EC mov sp, bp 0 0000BA5F 5D pop bp 0 0000BA60 5F pop di 0 0000BA61 5E pop si 0 0000BA62 E9C3FC jmp _nlsGetData 574 _.L82: 0 0000BA65 8EC2 mov es, dx 0 0000BA67 268E4706 mov es, word ptr es:[bx+6] 0 0000BA6B 8EDA mov ds, dx 0 0000BA6D 8B7704 mov si, word ptr [bx+4] 579 _.L80: 0 0000BA70 81FF0101 cmp di, 257 0 0000BA74 751D jne _.L83 0 0000BA76 31C0 xor ax, ax 0 0000BA78 50 push ax 0 0000BA79 51 push cx 0 0000BA7A FF76FC push word ptr [bp-4] 0 0000BA7D B80400 mov ax, 4 587 _.L90: 0 0000BA80 50 push ax 0 0000BA81 06 push es 0 0000BA82 56 push si 0 0000BA83 FF76FE push word ptr [bp-2] 0 0000BA86 16 push ss 0 0000BA87 1F pop ds 0 0000BA88 E8[FEFF] call _call_nls 595 _.L78: 0 0000BA8B 89EC mov sp, bp 0 0000BA8D 5D pop bp 0 0000BA8E 5F pop di 0 0000BA8F 5E pop si 0 0000BA90 C20C00 ret 12 601 _.L83: 0 0000BA93 57 push di 0 0000BA94 51 push cx 0 0000BA95 FF76FC push word ptr [bp-4] 0 0000BA98 B80200 mov ax, 2 0 0000BA9B EBE3 jmp _.L90 607 _.L84: 0 0000BA9D B8F3FF mov ax, -13 0 0000BAA0 EBE9 jmp _.L78 610 _.L85: 0 0000BAA2 B8FFFF mov ax, -1 0 0000BAA5 EBE4 jmp _.L78 613 .size _DosGetData, .-_DosGetData 614 .global _DosGetCountryInformation 615 .type _DosGetCountryInformation, @function 616 _DosGetCountryInformation: 0 0000BAA7 55 push bp 0 0000BAA8 89E5 mov bp, sp 0 0000BAAA FF7608 push word ptr [bp+8] 0 0000BAAD FF7606 push word ptr [bp+6] 0 0000BAB0 B81800 mov ax, 24 0 0000BAB3 50 push ax 0 0000BAB4 FF7604 push word ptr [bp+4] 0 0000BAB7 B8FFFF mov ax, -1 0 0000BABA 50 push ax 0 0000BABB B80101 mov ax, 257 0 0000BABE 50 push ax 0 0000BABF E8[FEFF] call _DosGetData 0 0000BAC2 89EC mov sp, bp 0 0000BAC4 5D pop bp 0 0000BAC5 C20600 ret 6 632 .size _DosGetCountryInformation, .-_DosGetCountryInformation 633 .global _DosSetCountry 634 .type _DosSetCountry, @function 635 _DosSetCountry: 0 0000BAC8 56 push si 0 0000BAC9 57 push di 0 0000BACA 55 push bp 0 0000BACB 89E5 mov bp, sp 0 0000BACD 8B7608 mov si, word ptr [bp+8] 0 0000BAD0 56 push si 0 0000BAD1 BFFFFF mov di, -1 0 0000BAD4 57 push di 0 0000BAD5 E8BEFB call _searchPackage 0 0000BAD8 89C1 mov cx, ax 0 0000BADA 09D1 or cx, dx 0 0000BADC 7413 je _.L94 0 0000BADE BB[0000] mov bx, offset _nlsInfo 0 0000BAE1 894708 mov word ptr [bx+8], ax 0 0000BAE4 89570A mov word ptr [bx+10], dx 0 0000BAE7 31C0 xor ax, ax 652 _.L93: 0 0000BAE9 89EC mov sp, bp 0 0000BAEB 5D pop bp 0 0000BAEC 5F pop di 0 0000BAED 5E pop si 0 0000BAEE C20200 ret 2 658 _.L94: 0 0000BAF1 56 push si 0 0000BAF2 57 push di 0 0000BAF3 B80300 mov ax, 3 0 0000BAF6 50 push ax 0 0000BAF7 E8ECFB call _muxLoadPkg 0 0000BAFA EBED jmp _.L93 665 .size _DosSetCountry, .-_DosSetCountry 666 .global _DosGetCodepage 667 .type _DosGetCodepage, @function 668 _DosGetCodepage: 0 0000BAFC 56 push si 0 0000BAFD 55 push bp 0 0000BAFE 89E5 mov bp, sp 0 0000BB00 BE[0000] mov si, offset _nlsInfo 0 0000BB03 8B4404 mov ax, word ptr [si+4] 0 0000BB06 8B5E08 mov bx, word ptr [bp+8] 0 0000BB09 8907 mov word ptr [bx], ax 0 0000BB0B C45C08 les bx, dword ptr [si+8] 0 0000BB0E 268B4706 mov ax, word ptr es:[bx+6] 0 0000BB12 8B5E06 mov bx, word ptr [bp+6] 0 0000BB15 8907 mov word ptr [bx], ax 0 0000BB17 31C0 xor ax, ax 0 0000BB19 5D pop bp 0 0000BB1A 5E pop si 0 0000BB1B C20400 ret 4 684 .size _DosGetCodepage, .-_DosGetCodepage 685 .global _DosSetCodepage 686 .type _DosSetCodepage, @function 687 _DosSetCodepage: 0 0000BB1E 55 push bp 0 0000BB1F 89E5 mov bp, sp 0 0000BB21 8B4606 mov ax, word ptr [bp+6] 0 0000BB24 83F8FF cmp ax, -1 0 0000BB27 7406 je _.L101 0 0000BB29 3B06[0400] cmp ax, word ptr [_nlsInfo+4] 0 0000BB2D 7514 jne _.L103 695 _.L101: 0 0000BB2F B8FFFF mov ax, -1 0 0000BB32 50 push ax 0 0000BB33 FF7604 push word ptr [bp+4] 0 0000BB36 B80100 mov ax, 1 0 0000BB39 50 push ax 0 0000BB3A E8A9FB call _muxLoadPkg 702 _.L100: 0 0000BB3D 89EC mov sp, bp 0 0000BB3F 5D pop bp 0 0000BB40 C20400 ret 4 706 _.L103: 0 0000BB43 B8F3FF mov ax, -13 0 0000BB46 EBF5 jmp _.L100 709 .size _DosSetCodepage, .-_DosSetCodepage 710 .global _DosGetDBCS 711 .type _DosGetDBCS, @function 712 _DosGetDBCS: 0 0000BB48 56 push si 0 0000BB49 BE[0000] mov si, offset _nlsInfo 0 0000BB4C C45C08 les bx, dword ptr [si+8] 0 0000BB4F 268B4725 mov ax, word ptr es:[bx+37] 0 0000BB53 268B5727 mov dx, word ptr es:[bx+39] 0 0000BB57 5E pop si 0 0000BB58 C3 ret 720 .size _DosGetDBCS, .-_DosGetDBCS 721 .global _syscall_MUX14 722 .type _syscall_MUX14, @function 723 _syscall_MUX14: 0 0000BB59 56 push si 0 0000BB5A 57 push di 0 0000BB5B 55 push bp 0 0000BB5C 89E5 mov bp, sp 0 0000BB5E 1E push ds 0 0000BB5F C45E08 les bx, dword ptr [bp+8] 0 0000BB62 8CC6 mov si, es 0 0000BB64 26FF7706 push word ptr es:[bx+6] 0 0000BB68 26FF7702 push word ptr es:[bx+2] 0 0000BB6C 895EFE mov word ptr [bp-2], bx 0 0000BB6F E824FB call _searchPackage 0 0000BB72 89C7 mov di, ax 0 0000BB74 09D0 or ax, dx 0 0000BB76 7428 je _.L126 0 0000BB78 8EC6 mov es, si 0 0000BB7A 8B5EFE mov bx, word ptr [bp-2] 0 0000BB7D 268A07 mov al, byte ptr es:[bx] 0 0000BB80 3C04 cmp al, 4 0 0000BB82 7503E98600 je _.L113 0 0000BB87 771D ja _.L114 0 0000BB89 3C01 cmp al, 1 0 0000BB8B 7503E9BB00 je _.L115 0 0000BB90 726F jc _.L116 0 0000BB92 3C02 cmp al, 2 0 0000BB94 7503E98900 je _.L117 0 0000BB99 3C03 cmp al, 3 0 0000BB9B 7503E9A000 je _.L118 751 _.L126: 0 0000BBA0 B8FFFF mov ax, -1 0 0000BBA3 E99400 jmp _.L110 754 _.L114: 0 0000BBA6 3C23 cmp al, 35 0 0000BBA8 7503E9C800 je _.L119 0 0000BBAD 7730 ja _.L120 0 0000BBAF 3C22 cmp al, 34 0 0000BBB1 75ED jne _.L126 0 0000BBB3 8EC6 mov es, si 0 0000BBB5 268B4F04 mov cx, word ptr es:[bx+4] 0 0000BBB9 89C8 mov ax, cx 0 0000BBBB 85C9 test cx, cx 0 0000BBBD 747B je _.L110 0 0000BBBF 51 push cx 0 0000BBC0 268B470A mov ax, word ptr es:[bx+10] 0 0000BBC4 26FF7710 push word ptr es:[bx+16] 0 0000BBC8 50 push ax 0 0000BBC9 8EC2 mov es, dx 0 0000BBCB 268B4511 mov ax, word ptr es:[di+17] 0 0000BBCF 8946FE mov word ptr [bp-2], ax 0 0000BBD2 83C082 add ax, -126 0 0000BBD5 26FF7513 push word ptr es:[di+19] 774 _.L133: 0 0000BBD9 50 push ax 0 0000BBDA E8D6FB call _upMMem.part.0 0 0000BBDD EB2A jmp _.L130 778 _.L120: 0 0000BBDF 3CA2 cmp al, -94 0 0000BBE1 7503E99C00 je _.L122 0 0000BBE6 3CFE cmp al, -2 0 0000BBE8 75B6 jne _.L126 0 0000BBEA B80002 mov ax, 512 0 0000BBED 50 push ax 0 0000BBEE 8EC6 mov es, si 0 0000BBF0 268B470A mov ax, word ptr es:[bx+10] 0 0000BBF4 26FF7710 push word ptr es:[bx+16] 0 0000BBF8 50 push ax 0 0000BBF9 268A4704 mov al, byte ptr es:[bx+4] 0 0000BBFD 30E4 xor ah, ah 0 0000BBFF EB1E jmp _.L132 792 _.L116: 0 0000BC01 8EC6 mov es, si 0 0000BC03 26C747024B53 mov word ptr es:[bx+2], 21323 795 _.L130: 0 0000BC09 31C0 xor ax, ax 0 0000BC0B EB2D jmp _.L110 798 _.L113: 0 0000BC0D B82200 mov ax, 34 0 0000BC10 50 push ax 0 0000BC11 8EC6 mov es, si 0 0000BC13 268B470A mov ax, word ptr es:[bx+10] 0 0000BC17 26FF7710 push word ptr es:[bx+16] 0 0000BC1B 50 push ax 0 0000BC1C B80101 mov ax, 257 806 _.L132: 0 0000BC1F 50 push ax 0 0000BC20 EB13 jmp _.L131 809 _.L117: 0 0000BC22 8EC6 mov es, si 0 0000BC24 26FF7704 push word ptr es:[bx+4] 0 0000BC28 268B470A mov ax, word ptr es:[bx+10] 0 0000BC2C 26FF7710 push word ptr es:[bx+16] 0 0000BC30 50 push ax 0 0000BC31 26FF770C push word ptr es:[bx+12] 816 _.L131: 0 0000BC35 52 push dx 0 0000BC36 57 push di 0 0000BC37 E8EEFA call _nlsGetData 820 _.L110: 0 0000BC3A 89EC mov sp, bp 0 0000BC3C 5D pop bp 0 0000BC3D 5F pop di 0 0000BC3E 5E pop si 0 0000BC3F C3 ret 826 _.L118: 0 0000BC40 BB[0000] mov bx, offset _nlsInfo 0 0000BC43 897F08 mov word ptr [bx+8], di 0 0000BC46 89570A mov word ptr [bx+10], dx 0 0000BC49 EBBE jmp _.L130 831 _.L115: 0 0000BC4B BE[0000] mov si, offset _nlsInfo 0 0000BC4E 8B5C08 mov bx, word ptr [si+8] 0 0000BC51 8EC2 mov es, dx 0 0000BC53 268B4506 mov ax, word ptr es:[di+6] 0 0000BC57 8E440A mov es, word ptr [si+10] 0 0000BC5A 263B4706 cmp ax, word ptr es:[bx+6] 0 0000BC5E 740D je _.L124 0 0000BC60 8956FE mov word ptr [bp-2], dx 0 0000BC63 B8[0000] mov ax, offset _.LC0 0 0000BC66 50 push ax 0 0000BC67 E8[FEFF] call _put_string 0 0000BC6A 8B56FE mov dx, word ptr [bp-2] 844 _.L124: 0 0000BC6D 897C08 mov word ptr [si+8], di 0 0000BC70 89540A mov word ptr [si+10], dx 0 0000BC73 EB94 jmp _.L130 848 _.L119: 0 0000BC75 8EC6 mov es, si 0 0000BC77 26FF7704 push word ptr es:[bx+4] 0 0000BC7B 52 push dx 0 0000BC7C 57 push di 0 0000BC7D E8CEFB call _nlsYesNo 0 0000BC80 EBB8 jmp _.L110 855 _.L122: 0 0000BC82 8EC6 mov es, si 0 0000BC84 268B4F04 mov cx, word ptr es:[bx+4] 0 0000BC88 89C8 mov ax, cx 0 0000BC8A 85C9 test cx, cx 0 0000BC8C 74AC je _.L110 0 0000BC8E 51 push cx 0 0000BC8F 268B470A mov ax, word ptr es:[bx+10] 0 0000BC93 26FF7710 push word ptr es:[bx+16] 0 0000BC97 50 push ax 0 0000BC98 8EC2 mov es, dx 0 0000BC9A 268B4516 mov ax, word ptr es:[di+22] 0 0000BC9E 8946FE mov word ptr [bp-2], ax 0 0000BCA1 83C082 add ax, -126 0 0000BCA4 26FF7518 push word ptr es:[di+24] 0 0000BCA8 E92EFF jmp _.L133 871 .size _syscall_MUX14, .-_syscall_MUX14 872 .global _nlsInfo === Switch to base=000790h -> ".DATA" 873 .data 874 .type _nlsInfo, @object 875 .size _nlsInfo, 16 876 _nlsInfo: 0 000011E2 0000 .hword 0 0 000011E4 0000 .hword 0 0 000011E6 B501 .hword 437 0 000011E8 0200 .hword 2 0 000011EA [0000] .hword _nlsPackageHardcoded 0 000011EC [0000] .hword _DosDataSeg 0 000011EE [0000] .hword _nlsPackageHardcoded 0 000011F0 [0000] .hword _DosDataSeg 885 .ident "GCC: (GNU) 6.3.0" === Trace listing source: nlssupt.lst 1 ; File: 2 ; nls.asm 3 ; Description: 4 ; Assembly support routines for nls functions. 5 ; 6 ; Copyright (c) 1995, 1998 7 ; Pasquale J. Villani 8 ; All Rights Reserved 9 ; 10 ; This file is part of DOS-C. 11 ; 12 ; DOS-C is free software; you can redistribute it and/or 13 ; modify it under the terms of the GNU General Public License 14 ; as published by the Free Software Foundation; either version 15 ; 2, or (at your option) any later version. 16 ; 17 ; DOS-C is distributed in the hope that it will be useful, but 18 ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 ; the GNU General Public License for more details. 21 ; 22 ; You should have received a copy of the GNU General Public 23 ; License along with DOS-C; see the file COPYING. If not, 24 ; write to the Free Software Foundation, 675 Mass Ave, 25 ; Cambridge, MA 02139, USA. 26 ; 27 ; $Id: nlssupt.asm 971 2004-05-30 19:31:07Z bartoldeman $ 28 ; 29 30 31 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 32 %include "stacks.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; stacks.inc 4 <1> ; Description: 5 <1> ; Macro support for register stack frame 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Id: stacks.inc 1591 2011-05-06 01:46:55Z bartoldeman $ 29 <1> ; 30 <1> 31 <1> ; 32 <1> ; Standard stack frame used throughout DOS-C 33 <1> ; 34 <1> ; MS-DOS specific 35 <1> ; 36 <1> ; +---------------+ 37 <1> ; | irp hi | 26 38 <1> ; +---------------+ 39 <1> ; | irp low | 24 40 <1> ; +---------------+ 41 <1> ; | flags | 22 42 <1> ; +---------------+ 43 <1> ; | cs | 20 44 <1> ; +---------------+ 45 <1> ; | ip | 18 46 <1> ; +---------------+ 47 <1> ; | es | 16 48 <1> ; +---------------+ 49 <1> ; | ds | 14 50 <1> ; +---------------+ 51 <1> ; | bp | 12 52 <1> ; +---------------+ 53 <1> ; | di | 10 54 <1> ; +---------------+ 55 <1> ; | si | 8 56 <1> ; +---------------+ 57 <1> ; | dx | 6 58 <1> ; +---------------+ 59 <1> ; | cx | 4 60 <1> ; +---------------+ 61 <1> ; | bx | 2 62 <1> ; +---------------+ 63 <1> ; | ax | 0 64 <1> ; +---------------+ 65 <1> ; 66 <1> 67 <1> ;; Note: The order of the pushed registers _must_ match with the definition 68 <1> ;; of the "iregs" structure within PCB.H, because a pointer to the last 69 <1> ;; pushed register is used as a pointer to a "iregs" structure within the 70 <1> ;; called C sources! -- 2000/03/22 ska 71 <1> 72 <1> ; Don't use `struc RegFrame' etc. here because it interferes with segment 73 <1> ; definitions. 74 <1> reg_ax equ 0 75 <1> reg_bx equ 2 76 <1> reg_cx equ 4 77 <1> reg_dx equ 6 78 <1> reg_si equ 8 79 <1> reg_di equ 10 80 <1> reg_bp equ 12 81 <1> reg_ds equ 14 82 <1> reg_es equ 16 83 <1> reg_ip equ 18 84 <1> reg_cs equ 20 85 <1> reg_flags equ 22 86 <1> irp_low equ 24 87 <1> irp_hi equ 26 88 <1> 89 <1> %macro PUSH$ALL 0 90 <1> push es 91 <1> push ds 92 <1> push bp 93 <1> push di 94 <1> push si 95 <1> push dx 96 <1> push cx 97 <1> push bx 98 <1> push ax 99 <1> %endmacro 100 <1> 101 <1> %macro POP$ALL 0 102 <1> pop ax 103 <1> pop bx 104 <1> pop cx 105 <1> pop dx 106 <1> pop si 107 <1> pop di 108 <1> pop bp 109 <1> pop ds 110 <1> pop es 111 <1> %endmacro 112 <1> 113 <1> ; I386.inc - 10/25/01 by tom ehlert 114 <1> ; 115 <1> ; compiling the kernel for 386 will (sometimes) change the 116 <1> ; high part of (some) registers, which will be (sometimes) be used 117 <1> ; later 118 <1> ; 119 <1> ; assumption: 120 <1> ; we have never seen MSVC to use anything but eax, ecx, edx, 121 <1> ; nor have we seen Borland C to use anything but eax, ebx, edx, 122 <1> ; so we only protect eax, ebx or ecx, edx to conserve stack space 123 <1> ; 124 <1> ; to save even more stack space, we save only HIGH part of regs 125 <1> ; at some expense of slower execution. it's easier anyway :-) 126 <1> ; 127 <1> ; WATCOM only uses FS: and GS: (using -zff and -zgf) and never 128 <1> ; any high part of the 386 registers 129 <1> ; 130 <1> 131 <1> 132 <1> %IF XCPU < 386 133 <1> ; no need to save/restore anything 134 <1> 135 <1> ; error 1 2 3 136 <1> %macro Protect386Registers 0 137 <1> %endmacro 138 <1> 139 <1> %assign Size386Registers 0 140 <1> 141 <1> %macro RestoreSP 0 142 <1> mov sp, bp 143 <1> %endmacro 144 <1> 145 <1> %macro Restore386Registers 0 146 <1> %endmacro 147 <1> 148 <1> %ELSE 149 <1> %ifdef WATCOM 150 <1> 151 <1> %macro Protect386Registers 0 152 <1> push fs 153 <1> push gs 154 <1> %endmacro 155 <1> 156 <1> %assign Size386Registers 4 157 <1> 158 <1> %macro RestoreSP 0 159 <1> lea sp, [bp - Size386Registers] 160 <1> %endmacro 161 <1> 162 <1> %macro Restore386Registers 0 163 <1> pop gs 164 <1> pop fs 165 <1> %endmacro 166 <1> 167 <1> %else 168 <1> 169 <1> %macro Protect386Registers 0 170 <1> push eax 171 <1> pop ax 172 <1> %ifdef MSCL8 173 <1> push ecx 174 <1> pop cx 175 <1> %else ;BC5 176 <1> push ebx 177 <1> pop bx 178 <1> %endif 179 <1> push edx 180 <1> pop dx 181 <1> %endmacro 182 <1> 183 <1> %assign Size386Registers 6 184 <1> 185 <1> %macro RestoreSP 0 186 <1> lea sp, [bp - Size386Registers] 187 <1> %endmacro 188 <1> 189 <1> %macro Restore386Registers 0 190 <1> push dx 191 <1> pop edx 192 <1> %ifdef MSCL8 193 <1> push cx 194 <1> pop ecx 195 <1> %else ;BC5 196 <1> push bx 197 <1> pop ebx 198 <1> %endif 199 <1> push ax 200 <1> pop eax 201 <1> %endmacro 202 <1> 203 <1> %endif 204 <1> %ENDIF 205 <1> 206 <1> ; macros to define stack arguments 207 <1> ; arg a, {b,4}, c 208 <1> ; defines a and c as "word" arguments and b as a "dword" argument 209 <1> ; for STDCALL defines .a as [bp+4], .b as [bp+6] and .c as [bp+10] 210 <1> ; for PASCAL defines .a as [bp+10], .b as [bp+6] and .c as [bp+4] 211 <1> ; 212 <1> ; popargs bx, {dx,ax}, cx pops these arguments of the stack (for PASCAL 213 <1> ; in reverse order). Here dx,ax is a dword argument dx:ax where dx is 214 <1> ; the high word. The caller is responsible for dealing with instruction 215 <1> ; pointer (ip) on the stack. 216 <1> 217 <1> %ifdef gcc 218 <1> %define STDCALL 219 <1> %else 220 <1> %define PASCAL 221 <1> %endif 222 <1> 223 <1> %macro definearg 1-2 2 224 <1> %xdefine .%1 bp+.argloc 225 <1> %assign .argloc .argloc+%2 226 <1> %endmacro 227 <1> 228 <1> %macro arg 1-* 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 239 <1> %endmacro 240 <1> 241 <1> %macro multipop 1-* 242 <1> %rep %0 243 <1> %rotate -1 244 <1> pop %1 245 <1> %endrep 246 <1> %endmacro 247 <1> 248 <1> %macro popargs 1-* 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 258 <1> %endmacro 33 === Switch to base=002270h -> "HMA_TEXT" 34 segment HMA_TEXT 35 global _reloc_call_CharMapSrvc 36 extern _DosUpChar 37 extern _DGROUP_ 38 ; 39 ; CharMapSrvc: 40 ; User callable character mapping service. 41 ; Part of Function 38h 42 ; 43 _reloc_call_CharMapSrvc: 44 45 Protect386Registers 0 00000505 1E push ds 0 00000506 06 push es 48 ; push bp 49 ; push si 50 ; push di 0 00000507 52 push dx 0 00000508 51 push cx 0 00000509 53 push bx 54 0 0000050A 50 push ax ; arg of _upChar 0 0000050B 2E8E1E[0000] mov ds,[cs:_DGROUP_] 57 0 00000510 E8[0000] call _DosUpChar 59 ;add sp, byte 2 // next POP retrieves orig AX 60 0 00000513 5B pop bx 0 00000514 88FC mov ah, bh ; keep hibyte untouched 63 0 00000516 5B pop bx 0 00000517 59 pop cx 0 00000518 5A pop dx 67 ; pop di 68 ; pop si 69 ; pop bp 0 00000519 07 pop es 0 0000051A 1F pop ds 72 Restore386Registers 0 0000051B CB retf ; Return far === Trace listing source: prf.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=prf.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccHMT4Je.s output file : prf.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .global _put_console 7 .type _put_console, @function 8 _put_console: 0 0000BD19 55 push bp 0 0000BD1A 89E5 mov bp, sp 0 0000BD1C 837E040A cmp word ptr [bp+4], 10 0 0000BD20 7507 jne _.L2 0 0000BD22 B80D00 mov ax, 13 0 0000BD25 50 push ax 0 0000BD26 E8[FEFF] call _put_console 16 _.L2: 0 0000BD29 8B4604 mov ax, word ptr [bp+4] 18 #APP 19 ;# 129 "prf.c" 1 1 /****************************************************************/ 2 /* */ 3 /* prf.c */ 4 /* */ 5 /* Abbreviated printf Function */ 6 /* */ 7 /* Copyright (c) 1995 */ 8 /* Pasquale J. Villani */ 9 /* All Rights Reserved */ 10 /* */ 11 /* This file is part of DOS-C. */ 12 /* */ 13 /* DOS-C is free software; you can redistribute it and/or */ 14 /* modify it under the terms of the GNU General Public License */ 15 /* as published by the Free Software Foundation; either version */ 16 /* 2, or (at your option) any later version. */ 17 /* */ 18 /* DOS-C is distributed in the hope that it will be useful, but */ 19 /* WITHOUT ANY WARRANTY; without even the implied warranty of */ 20 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See */ 21 /* the GNU General Public License for more details. */ 22 /* */ 23 /* You should have received a copy of the GNU General Public */ 24 /* License along with DOS-C; see the file COPYING. If not, */ 25 /* write to the Free Software Foundation, 675 Mass Ave, */ 26 /* Cambridge, MA 02139, USA. */ 27 /****************************************************************/ 28 29 #include "portab.h" 30 31 #ifdef FORSYS 32 #ifdef __GNUC__ 33 #include 34 #else 35 #include 36 #endif 37 #include 38 #endif 39 40 #ifdef _INIT 41 #define handle_char init_handle_char 42 #define put_console init_put_console 43 #define ltob init_ltob 44 #define do_printf init_do_printf 45 #define printf init_printf 46 #define sprintf init_sprintf 47 #define charp init_charp 48 #endif 49 50 #include "debug.h" /* must be below xx to init_xx */ 51 52 /* special console output routine */ 53 /*#define DOSEMU */ 54 #ifdef DOSEMU 55 56 #define MAX_BUFSIZE 80 /* adjust if necessary */ 57 static int buff_offset = 0; 58 static char buff[MAX_BUFSIZE]; 59 60 void put_console(int c) 61 { 62 if (buff_offset >= MAX_BUFSIZE) 63 { 64 buff_offset = 0; 65 DebugPrintf(("Printf buffer overflow!\n")); 66 } 67 if (c == '\n') 68 { 69 buff[buff_offset] = 0; 70 buff_offset = 0; 71 #ifdef __TURBOC__ 72 _ES = FP_SEG(buff); 73 _DX = FP_OFF(buff); 74 _AX = 0x13; 75 __int__(0xe6); 76 #elif defined(__GNUC__) 77 asm volatile( 78 "{ int $0xe6 | int 0xe6 }" 79 : /* outputs */ 80 : /* inputs */ "a"(0x13), "e"(FP_SEG(buff)), "d"(FP_OFF(buff)) 81 ); 82 #elif defined(I86) 83 asm 84 { 85 push ds; 86 pop es; 87 mov dx, offset buff; 88 mov ax, 0x13; 89 int 0xe6; 90 } 91 #endif 92 } 93 else 94 { 95 buff[buff_offset] = c; 96 buff_offset++; 97 } 98 } 99 #else 100 #ifdef __WATCOMC__ 101 void int29(char c); 102 #pragma aux int29 = "int 0x29" __parm [__al] __modify __exact [__bx]; 103 104 #ifdef DEBUG_PRINT_COMPORT 105 void fastComPrint(char c); 106 #pragma aux fastComPrint = \ 107 "mov bx, 0xFD05" \ 108 "int 0x29" __parm [__al] __modify __exact [__bx]; 109 #endif 110 #endif 111 112 void put_console(int c) 113 { 114 if (c == '\n') 115 put_console('\r'); 116 117 #ifdef FORSYS 118 write(1, &c, 1); /* write character to stdout */ 119 #else 120 #if defined(__TURBOC__) 121 _AL = c; 122 __int__(0x29); 123 #elif defined(__WATCOMC__) 124 int29(c); 125 #if defined DEBUG_PRINT_COMPORT 126 fastComPrint(c); 127 #endif 128 #elif defined(__GNUC__) 0 0000BD2C CD29 asm volatile("{ int $0x29 | int 0x29 }" : : "a"(c) : "bx"); 130 #elif defined(I86) 20 int 0x29 21 ;# 0 "" 2 22 #NO_APP 0 0000BD2E 89EC mov sp, bp 0 0000BD30 5D pop bp 0 0000BD31 C20200 ret 2 26 .size _put_console, .-_put_console === Switch to base=012B40h -> ".RODATA.STR1.1" 27 .section .rodata.str1.1,"aMS",@progbits,1 28 _.LC0: 0 00001AC2 3031323334353637 .string "0123456789abcdef" 0 00001ACA 3839616263646566 0 00001AD2 00 === Switch to base=002270h -> ".TEXT" 30 .text 31 .global _put_unsigned 32 .type _put_unsigned, @function 33 _put_unsigned: 0 0000BD34 56 push si 0 0000BD35 57 push di 0 0000BD36 55 push bp 0 0000BD37 89E5 mov bp, sp 0 0000BD39 83EC06 sub sp, 6 0 0000BD3C 8B4608 mov ax, word ptr [bp+8] 0 0000BD3F 8B760C mov si, word ptr [bp+12] 0 0000BD42 31C9 xor cx, cx 0 0000BD44 BA[0000] mov dx, offset _.LC0 0 0000BD47 8EC2 mov es, dx 44 _.L5: 0 0000BD49 39F1 cmp cx, si 0 0000BD4B 7C12 jl _.L6 0 0000BD4D 85F6 test si, si 0 0000BD4F 7D02 jge _.L8 0 0000BD51 31F6 xor si, si 50 _.L8: 0 0000BD53 85F6 test si, si 0 0000BD55 751D jne _.L9 0 0000BD57 89EC mov sp, bp 0 0000BD59 5D pop bp 0 0000BD5A 5F pop di 0 0000BD5B 5E pop si 0 0000BD5C C20600 ret 6 58 _.L6: 0 0000BD5F 31D2 xor dx, dx 0 0000BD61 F7760A div word ptr [bp+10] 0 0000BD64 89D3 mov bx, dx 0 0000BD66 8CC7 mov di, es 0 0000BD68 8A11 mov dl, byte ptr [bx+di] 0 0000BD6A 89EF mov di, bp 0 0000BD6C 89CB mov bx, cx 0 0000BD6E 8851FA mov byte ptr [bx+di-6], dl 0 0000BD71 41 inc cx 0 0000BD72 EBD5 jmp _.L5 69 _.L9: 0 0000BD74 4E dec si 0 0000BD75 89EF mov di, bp 0 0000BD77 89F3 mov bx, si 0 0000BD79 8A41FA mov al, byte ptr [bx+di-6] 0 0000BD7C 98 cbw 0 0000BD7D 50 push ax 0 0000BD7E E8[FEFF] call _put_console 0 0000BD81 EBD0 jmp _.L8 78 .size _put_unsigned, .-_put_unsigned 79 .global _put_string 80 .type _put_string, @function 81 _put_string: 0 0000BD83 56 push si 0 0000BD84 55 push bp 0 0000BD85 89E5 mov bp, sp 0 0000BD87 8B7606 mov si, word ptr [bp+6] 86 _.L12: 0 0000BD8A 8A04 mov al, byte ptr [si] 0 0000BD8C 84C0 test al, al 0 0000BD8E 7507 jne _.L13 0 0000BD90 89EC mov sp, bp 0 0000BD92 5D pop bp 0 0000BD93 5E pop si 0 0000BD94 C20200 ret 2 94 _.L13: 0 0000BD97 46 inc si 0 0000BD98 98 cbw 0 0000BD99 50 push ax 0 0000BD9A E8[FEFF] call _put_console 0 0000BD9D EBEB jmp _.L12 100 .size _put_string, .-_put_string 101 .global _hexd 102 .type _hexd, @function 103 _hexd: 0 0000BD9F 56 push si 0 0000BDA0 57 push di 0 0000BDA1 55 push bp 0 0000BDA2 89E5 mov bp, sp 0 0000BDA4 83EC08 sub sp, 8 0 0000BDA7 C4460A les ax, dword ptr [bp+10] 0 0000BDAA 8946FE mov word ptr [bp-2], ax 0 0000BDAD 8C46FC mov word ptr [bp-4], es 0 0000BDB0 FF7608 push word ptr [bp+8] 0 0000BDB3 E8[FEFF] call _put_string 0 0000BDB6 837E0E10 cmp word ptr [bp+14], 16 0 0000BDBA 7E07 jle _.L16 0 0000BDBC B80A00 mov ax, 10 0 0000BDBF 50 push ax 0 0000BDC0 E8[FEFF] call _put_console 119 _.L16: 0 0000BDC3 31FF xor di, di 121 _.L17: 0 0000BDC5 3B7E0E cmp di, word ptr [bp+14] 0 0000BDC8 7C08 jl _.L25 0 0000BDCA 89EC mov sp, bp 0 0000BDCC 5D pop bp 0 0000BDCD 5F pop di 0 0000BDCE 5E pop si 0 0000BDCF C20800 ret 8 129 _.L25: 0 0000BDD2 BA0400 mov dx, 4 0 0000BDD5 52 push dx 0 0000BDD6 8956FA mov word ptr [bp-6], dx 0 0000BDD9 BE1000 mov si, 16 0 0000BDDC 56 push si 0 0000BDDD FF76FC push word ptr [bp-4] 0 0000BDE0 E8[FEFF] call _put_unsigned 0 0000BDE3 B83A00 mov ax, 58 138 #APP 139 ;# 129 "prf.c" 1 140 int 0x29 141 ;# 0 "" 2 142 #NO_APP 0 0000BDE8 8B46FE mov ax, word ptr [bp-2] 0 0000BDEB 01F8 add ax, di 0 0000BDED 8B56FA mov dx, word ptr [bp-6] 0 0000BDF0 52 push dx 0 0000BDF1 56 push si 0 0000BDF2 50 push ax 0 0000BDF3 E8[FEFF] call _put_unsigned 0 0000BDF6 B87C00 mov ax, 124 151 #APP 152 ;# 129 "prf.c" 1 153 int 0x29 154 ;# 0 "" 2 155 #NO_APP 0 0000BDFB 89FA mov dx, di 0 0000BDFD 8976FA mov word ptr [bp-6], si 158 _.L18: 0 0000BE00 8D750F lea si, [15+di] 0 0000BE03 39D6 cmp si, dx 0 0000BE05 7C29 jl _.L19 0 0000BE07 B80200 mov ax, 2 0 0000BE0A 50 push ax 0 0000BE0B FF76FA push word ptr [bp-6] 0 0000BE0E 8B5EFE mov bx, word ptr [bp-2] 0 0000BE11 01D3 add bx, dx 0 0000BE13 8956F8 mov word ptr [bp-8], dx 0 0000BE16 8E46FC mov es, word ptr [bp-4] 0 0000BE19 268A07 mov al, byte ptr es:[bx] 0 0000BE1C 30E4 xor ah, ah 0 0000BE1E 50 push ax 0 0000BE1F E8[FEFF] call _put_unsigned 0 0000BE22 B82000 mov ax, 32 174 #APP 175 ;# 129 "prf.c" 1 176 int 0x29 177 ;# 0 "" 2 178 #NO_APP 0 0000BE27 8B56F8 mov dx, word ptr [bp-8] 0 0000BE2A 42 inc dx 0 0000BE2B 39560E cmp word ptr [bp+14], dx 0 0000BE2E 7FD0 jg _.L18 183 _.L19: 0 0000BE30 89FA mov dx, di 185 _.L22: 0 0000BE32 39D6 cmp si, dx 0 0000BE34 7C23 jl _.L24 0 0000BE36 8B5EFE mov bx, word ptr [bp-2] 0 0000BE39 01D3 add bx, dx 0 0000BE3B 8E46FC mov es, word ptr [bp-4] 0 0000BE3E 268A07 mov al, byte ptr es:[bx] 0 0000BE41 3C1F cmp al, 31 0 0000BE43 7702 ja _.L21 0 0000BE45 B02E mov al, 46 195 _.L21: 0 0000BE47 8956FA mov word ptr [bp-6], dx 0 0000BE4A 30E4 xor ah, ah 0 0000BE4C 50 push ax 0 0000BE4D E8[FEFF] call _put_console 0 0000BE50 8B56FA mov dx, word ptr [bp-6] 0 0000BE53 42 inc dx 0 0000BE54 39560E cmp word ptr [bp+14], dx 0 0000BE57 7FD9 jg _.L22 204 _.L24: 0 0000BE59 B80A00 mov ax, 10 0 0000BE5C 50 push ax 0 0000BE5D E8[FEFF] call _put_console 0 0000BE60 83C710 add di, 16 0 0000BE63 E95FFF jmp _.L17 210 .size _hexd, .-_hexd 211 .ident "GCC: (GNU) 6.3.0" === Trace listing source: printer.lst 1 ; 2 ; File: 3 ; printer.asm 4 ; Description: 5 ; Printer device driver 6 ; 7 ; Copyright (c) 1998 8 ; Pasquale J. Villani 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; You should have received a copy of the GNU General Public 24 ; License along with DOS-C; see the file COPYING. If not, 25 ; write to the Free Software Foundation, 675 Mass Ave, 26 ; Cambridge, MA 02139, USA. 27 ; 28 ; $Header$ 29 ; 30 31 %include "io.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; io.inc 4 <1> ; Description: 5 <1> ; Segments and external common routines used by various device drivers 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Header$ 29 <1> ; 30 <1> 31 <1> %include "segs.inc" 1 <2> ; File: 2 <2> ; segs.inc 3 <2> ; Description: 4 <2> ; Segment definitions for the kernel 5 <2> ; 6 <2> ; Copyright (c) 1998 7 <2> ; Pasquale J. Villani 8 <2> ; All Rights Reserved 9 <2> ; 10 <2> ; This file is part of DOS-C. 11 <2> ; 12 <2> ; DOS-C is free software; you can redistribute it and/or 13 <2> ; modify it under the terms of the GNU General Public License 14 <2> ; as published by the Free Software Foundation; either version 15 <2> ; 2, or (at your option) any later version. 16 <2> ; 17 <2> ; DOS-C is distributed in the hope that it will be useful, but 18 <2> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <2> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <2> ; the GNU General Public License for more details. 21 <2> ; 22 <2> ; You should have received a copy of the GNU General Public 23 <2> ; License along with DOS-C; see the file COPYING. If not, 24 <2> ; write to the Free Software Foundation, 675 Mass Ave, 25 <2> ; Cambridge, MA 02139, USA. 26 <2> ; 27 <2> ; $Header$ 28 <2> ; 29 <2> 30 <2> ; CPU specification -- putting it here because all .asm files include this 31 <2> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <2> ; understand it 33 <2> %ifdef __NASM_VER__ 34 <2> %if XCPU == 86 35 <2> CPU 8086 36 <2> %else 37 <2> CPU XCPU 38 <2> %endif 39 <2> %endif 40 <2> 41 <2> ; for OW on Linux: 42 <2> %ifdef owlinux 43 <2> %define WATCOM 44 <2> %endif 45 <2> 46 <2> %ifidn __OUTPUT_FORMAT__, obj 47 <2> group PGROUP PSP 48 <2> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <2> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <2> %ifdef WATCOM 51 <2> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <2> %define IGROUP TGROUP 53 <2> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <2> %else 55 <2> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <2> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <2> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <2> %endif 59 <2> %define class(x) class=x 60 <2> %define nobits 61 <2> %define exec 62 <2> %define INITSIZE init_end wrt INIT_TEXT 63 <2> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <2> 65 <2> %else ; using ELF 66 <2> 67 <2> BITS 16 68 <2> ; groups are defined in the linker script kernel.ld 69 <2> extern PGROUP 70 <2> extern DGROUP 71 <2> extern LGROUP 72 <2> extern TGROUP 73 <2> extern IGROUP 74 <2> extern I_GROUP 75 <2> %define class(x) 76 <2> %define stack 77 <2> extern INITSIZE 78 <2> %define INITTEXTSIZE __InitTextEnd 79 <2> 80 <2> %endif 81 <2> === Switch to base=000000h -> "PSP" 82 <2> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <2> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <2> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <2> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <2> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <2> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <2> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <2> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <2> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <2> segment _DATAEND class(DATA) align=1 92 <2> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <2> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <2> segment CONST2 class(DATA) align=2 95 <2> ;for MSC === Switch to base=000000h -> "DCONST" 96 <2> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <2> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <2> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <2> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <2> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <2> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <2> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <2> segment INIT_TEXT_END class(CODE) align=16 104 <2> 105 <2> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <2> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <2> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <2> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <2> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <2> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <2> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <2> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <2> segment IB_E class(FAR_DATA) align=2 114 <2> %else === Switch to base=012B40h -> "ID_B" 115 <2> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <2> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <2> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <2> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <2> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <2> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <2> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <2> segment IB_E class(IB) align=2 nobits 123 <2> %endif 32 <1> 33 <1> ; 34 <1> ; Error Return Codes 35 <1> ; 36 <1> 37 <1> %define E_WRPRT 0 ; Write Protect 38 <1> %define E_UNIT 1 ; Unknown Unit 39 <1> %define E_NOTRDY 2 ; Device Not Ready 40 <1> %define E_CMD 3 ; Unknown Command 41 <1> %define E_CRC 4 ; Crc Error 42 <1> %define E_LENGTH 5 ; Bad Length 43 <1> %define E_SEEK 6 ; Seek Error 44 <1> %define E_MEDIA 7 ; Unknown MEDIA 45 <1> %define E_NOTFND 8 ; Sector Not Found 46 <1> %define E_PAPER 9 ; No Paper 47 <1> %define E_WRITE 10 ; Write Fault 48 <1> %define E_READ 11 ; Read Fault 49 <1> %define E_FAILURE 12 ; General Failure 50 <1> 51 <1> 52 <1> extern _IOExit 53 <1> extern _IOSuccess 54 <1> extern _IOErrorExit 55 <1> extern _IOErrCnt 56 <1> extern _IODone 57 <1> extern _IOCommandError 58 <1> extern GetUnitNum 59 <1> extern _ReqPktPtr 60 <1> 32 33 %define PRT_TIMEOUT 01h 34 %define PRT_IOERROR 08h 35 %define PRT_SELECTED 10h 36 %define PRT_OUTOFPAPER 20h 37 %define PRT_ACK 40h 38 %define PRT_NOTBUSY 80h 39 40 %define PRT_WRITECHAR 00h 41 %define PRT_INITPORT 01h 42 %define PRT_GETSTATUS 02h 43 === Switch to base=000100h -> "_IO_FIXED_DATA" 44 segment _IO_FIXED_DATA 45 46 global LptTable 0 00000654 18 LptTable db 18h 0 00000655 [0000] dw _IOExit 0 00000657 [0000] dw _IOExit 0 00000659 [0000] dw _IOExit 0 0000065B [0000] dw _IOCommandError 0 0000065D [0000] dw _IOSuccess 0 0000065F [0000] dw _IODone 0 00000661 [0000] dw _IOExit 0 00000663 [0000] dw _IOExit 0 00000665 [0900] dw PrtWrite 0 00000667 [0900] dw PrtWrite 0 00000669 [2B00] dw PrtOutStat 0 0000066B [0000] dw _IOExit 0 0000066D [0000] dw _IOExit 0 0000066F [0000] dw _IOExit 0 00000671 [0000] dw _IOExit 0 00000673 [0000] dw _IOExit 0 00000675 [6300] dw PrtOutBsy 0 00000677 [0000] dw _IOExit 0 00000679 [0000] dw _IOExit 0 0000067B [A900] dw PrtGenIoctl 0 0000067D [0000] dw _IOExit 0 0000067F [0000] dw _IOExit 0 00000681 [0000] dw _IOExit 0 00000683 [0000] dw _IOCommandError 0 00000685 [0000] dw _IOCommandError 73 74 === Switch to base=000100h -> "_IO_TEXT" 75 segment _IO_TEXT 76 global uPrtNo 0 00000412 00 uPrtNo db 0 0 00000413 5000 uPrtQuantum dw 50h 0 00000415 50005000 dw 50h, 50h 0 00000419 5000 db 50h, 00h 81 82 PrtWrite: 0 0000041B E317 jcxz PrtWr3 ; Exit if nothing to write 84 85 PrtCharLoop: ; next character loop 86 0 0000041D BB0200 mov bx, 2 ; number of retries 88 PrtRetryTwice: 0 00000420 B402 mov ah, PRT_GETSTATUS ; get status, ah=2 0 00000422 E82E00 call PrtIOCall ; 0 00000425 7510 jnz PrtWr4 92 0 00000427 268A05 mov al,[es:di] 94 0 0000042A B400 mov ah, PRT_WRITECHAR ; print character, ah=0 0 0000042C E82400 call PrtIOCall ; (0800) 97 0 0000042F 7506 jnz PrtWr4 ; NZ = error, retry 99 0 00000431 47 inc di 0 00000432 E2E9 loop PrtCharLoop ; next character 102 PrtWr3: 0 00000434 E9[0000] jmp _IOExit 104 PrtWr4: ; repeat 0 00000437 4B dec bx 0 00000438 75E6 jnz PrtRetryTwice 107 PrtWr5: 0 0000043A E9[0000] jmp _IOErrCnt 109 110 111 112 PrtOutStat: 0 0000043D E81100 call GetPrtStat 0 00000440 75F8 jnz PrtWr5 0 00000442 B009 mov al, E_PAPER 0 00000444 F6C420 test ah, PRT_OUTOFPAPER 0 00000447 75F1 jnz PrtWr5 0 00000449 F6C480 test ah, PRT_NOTBUSY 0 0000044C 75E6 jnz PrtWr3 0 0000044E E9[0000] jmp _IODone 121 122 123 124 GetPrtStat: 0 00000451 B402 mov ah,PRT_GETSTATUS 126 127 PrtIOCall: 0 00000453 E8[0000] call GetUnitNum 0 00000456 CD17 int 17h ; print char al, get status ah 130 0 00000458 88E0 mov al, ah ; if (stat & 0x30) == 0x30 return 10; 0 0000045A 2430 and al, PRT_SELECTED|PRT_OUTOFPAPER 0 0000045C 3C30 cmp al, PRT_SELECTED|PRT_OUTOFPAPER 0 0000045E B00A mov al, E_WRITE 0 00000460 7410 je ret_error_code 136 0 00000462 F6C429 test ah, PRT_OUTOFPAPER|PRT_IOERROR|PRT_TIMEOUT ; 29h 0 00000465 B002 mov al, E_NOTRDY 0 00000467 7409 jz ret_error_code 140 0 00000469 F6C420 test ah, PRT_OUTOFPAPER ; 20h 0 0000046C B00A mov al, E_WRITE 0 0000046E 7402 jz ret_error_code ; not out of paper -> E_WRITE 144 145 ret_error_code_9: 0 00000470 B009 mov al, E_PAPER 147 148 ret_error_code: 0 00000472 3C02 cmp al, E_NOTRDY ; 2 = no error 0 00000474 C3 retn 151 152 153 154 PrtOutBsy: 0 00000475 1E push ds 0 00000476 06 push es 0 00000477 1F pop ds 0 00000478 89FE mov si,di 159 PrtOtBsy1: 0 0000047A 51 push cx 0 0000047B 53 push bx 0 0000047C 31DB xor bx,bx 0 0000047E 2E8A1E[0000] mov bl,[cs:uPrtNo] 0 00000483 D1E3 shl bx,1 0 00000485 2E8B8F[0100] mov cx,[cs:uPrtQuantum+bx] 0 0000048A 5B pop bx 167 PrtOtBsy2: 0 0000048B E8C3FF call GetPrtStat 0 0000048E 751E jnz PrtOtBsy3 0 00000490 F6C480 test ah, PRT_NOTBUSY 0 00000493 E1F6 loopz PrtOtBsy2 0 00000495 59 pop cx 0 00000496 7417 jz PrtOtBsy4 0 00000498 AC lodsb 0 00000499 30E4 xor ah,ah 0 0000049B E8B5FF call PrtIOCall 0 0000049E 750F jnz PrtOtBsy4 0 000004A0 E2D8 loop PrtOtBsy1 0 000004A2 1F pop ds 0 000004A3 2EC51E[0000] lds bx,[cs:_ReqPktPtr] 0 000004A8 294F12 sub [bx+12h],cx 0 000004AB E9[0000] jmp _IOExit 183 PrtOtBsy3: 0 000004AE 59 pop cx 185 PrtOtBsy4: 0 000004AF 1F pop ds 0 000004B0 2EC51E[0000] lds bx,[cs:_ReqPktPtr] 0 000004B5 294F12 sub [bx+12h],cx 0 000004B8 E9[0000] jmp _IOErrorExit 190 191 192 193 PrtGenIoctl: 0 000004BB 2EC43E[0000] les di,[cs:_ReqPktPtr] 0 000004C0 26807D0D05 cmp byte [es:di+0Dh],5 0 000004C5 7403 je PrtGnIoctl2 197 PrtGnIoctl1: 0 000004C7 E9[0000] jmp _IOCommandError 199 PrtGnIoctl2: 0 000004CA 268A450E mov al,[es:di+0Eh] 0 000004CE 26C47D13 les di,[es:di+13h] 0 000004D2 31DB xor bx,bx 0 000004D4 2E8A1E[0000] mov bl,[cs:uPrtNo] 0 000004D9 D1E3 shl bx,1 0 000004DB 2E8B8F[0100] mov cx,[cs:uPrtQuantum+bx] 0 000004E0 3C65 cmp al,65h 0 000004E2 7407 je PrtGnIoctl3 0 000004E4 3C45 cmp al,45h 0 000004E6 75DF jne PrtGnIoctl1 0 000004E8 268B0D mov cx,[es:di] 211 PrtGnIoctl3: 0 000004EB 2E898F[0100] mov [cs:uPrtQuantum+bx],cx 0 000004F0 26890D mov [es:di],cx 0 000004F3 E9[0000] jmp _IOExit 215 216 217 218 ; 219 ; some comments to last changes (TE, 23/09/01) 220 ; 221 ; original implementation didn't print at all - on my machine,LPT2 222 ; 223 ; maybe this one is not much better either, 224 ; but should print a little bit 225 ; 226 ; the status bits = AH 227 ; 228 ; 1 0 229 ; 80 - BUSY not busy busy 230 ; 40 - ACK transfer finished not yet finished 231 ; 20 - PAP no paper available paper OK 232 ; 10 - ONOF printer online not online 233 ; 08 - ERR some error no error 234 ; 01 - TIM some error when transfer OK 235 ; 236 ; some states 237 ; 30 - there is no printer at all 238 ; c8 - there is a printer without power 239 ; 10 - printer with power, but not initialized 240 ; 90 - this one is fine 241 ; 242 ; you must not simply print without asking for status 243 ; as the BIOS has a LARGE timeout before aborting 244 ; === Trace listing source: procsupt.lst 1 ; 2 ; File: 3 ; procsupt.asm 4 ; Description: 5 ; Assembly support routines for process handling, etc. 6 ; 7 ; Copyright (c) 1995,1998 8 ; Pasquale J. Villani 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; You should have received a copy of the GNU General Public 24 ; License along with DOS-C; see the file COPYING. If not, 25 ; write to the Free Software Foundation, 675 Mass Ave, 26 ; Cambridge, MA 02139, USA. 27 ; 28 ; $Id: procsupt.asm 1591 2011-05-06 01:46:55Z bartoldeman $ 29 ; 30 31 32 %include "segs.inc" 1 <1> ; File: 2 <1> ; segs.inc 3 <1> ; Description: 4 <1> ; Segment definitions for the kernel 5 <1> ; 6 <1> ; Copyright (c) 1998 7 <1> ; Pasquale J. Villani 8 <1> ; All Rights Reserved 9 <1> ; 10 <1> ; This file is part of DOS-C. 11 <1> ; 12 <1> ; DOS-C is free software; you can redistribute it and/or 13 <1> ; modify it under the terms of the GNU General Public License 14 <1> ; as published by the Free Software Foundation; either version 15 <1> ; 2, or (at your option) any later version. 16 <1> ; 17 <1> ; DOS-C is distributed in the hope that it will be useful, but 18 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <1> ; the GNU General Public License for more details. 21 <1> ; 22 <1> ; You should have received a copy of the GNU General Public 23 <1> ; License along with DOS-C; see the file COPYING. If not, 24 <1> ; write to the Free Software Foundation, 675 Mass Ave, 25 <1> ; Cambridge, MA 02139, USA. 26 <1> ; 27 <1> ; $Header$ 28 <1> ; 29 <1> 30 <1> ; CPU specification -- putting it here because all .asm files include this 31 <1> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <1> ; understand it 33 <1> %ifdef __NASM_VER__ 34 <1> %if XCPU == 86 35 <1> CPU 8086 36 <1> %else 37 <1> CPU XCPU 38 <1> %endif 39 <1> %endif 40 <1> 41 <1> ; for OW on Linux: 42 <1> %ifdef owlinux 43 <1> %define WATCOM 44 <1> %endif 45 <1> 46 <1> %ifidn __OUTPUT_FORMAT__, obj 47 <1> group PGROUP PSP 48 <1> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <1> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <1> %ifdef WATCOM 51 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <1> %define IGROUP TGROUP 53 <1> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <1> %else 55 <1> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <1> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <1> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <1> %endif 59 <1> %define class(x) class=x 60 <1> %define nobits 61 <1> %define exec 62 <1> %define INITSIZE init_end wrt INIT_TEXT 63 <1> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <1> 65 <1> %else ; using ELF 66 <1> 67 <1> BITS 16 68 <1> ; groups are defined in the linker script kernel.ld 69 <1> extern PGROUP 70 <1> extern DGROUP 71 <1> extern LGROUP 72 <1> extern TGROUP 73 <1> extern IGROUP 74 <1> extern I_GROUP 75 <1> %define class(x) 76 <1> %define stack 77 <1> extern INITSIZE 78 <1> %define INITTEXTSIZE __InitTextEnd 79 <1> 80 <1> %endif 81 <1> === Switch to base=000000h -> "PSP" 82 <1> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <1> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <1> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <1> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <1> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <1> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <1> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <1> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <1> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <1> segment _DATAEND class(DATA) align=1 92 <1> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <1> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <1> segment CONST2 class(DATA) align=2 95 <1> ;for MSC === Switch to base=000000h -> "DCONST" 96 <1> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <1> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <1> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <1> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <1> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <1> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <1> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <1> segment INIT_TEXT_END class(CODE) align=16 104 <1> 105 <1> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <1> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <1> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <1> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <1> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <1> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <1> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <1> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <1> segment IB_E class(FAR_DATA) align=2 114 <1> %else === Switch to base=012B40h -> "ID_B" 115 <1> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <1> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <1> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <1> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <1> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <1> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <1> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <1> segment IB_E class(IB) align=2 nobits 123 <1> %endif 33 34 extern _user_r 35 36 extern _break_flg ; break detected flag 37 extern _term_type 38 extern _int21_handler ; far call system services 39 40 %include "stacks.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; stacks.inc 4 <1> ; Description: 5 <1> ; Macro support for register stack frame 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Id: stacks.inc 1591 2011-05-06 01:46:55Z bartoldeman $ 29 <1> ; 30 <1> 31 <1> ; 32 <1> ; Standard stack frame used throughout DOS-C 33 <1> ; 34 <1> ; MS-DOS specific 35 <1> ; 36 <1> ; +---------------+ 37 <1> ; | irp hi | 26 38 <1> ; +---------------+ 39 <1> ; | irp low | 24 40 <1> ; +---------------+ 41 <1> ; | flags | 22 42 <1> ; +---------------+ 43 <1> ; | cs | 20 44 <1> ; +---------------+ 45 <1> ; | ip | 18 46 <1> ; +---------------+ 47 <1> ; | es | 16 48 <1> ; +---------------+ 49 <1> ; | ds | 14 50 <1> ; +---------------+ 51 <1> ; | bp | 12 52 <1> ; +---------------+ 53 <1> ; | di | 10 54 <1> ; +---------------+ 55 <1> ; | si | 8 56 <1> ; +---------------+ 57 <1> ; | dx | 6 58 <1> ; +---------------+ 59 <1> ; | cx | 4 60 <1> ; +---------------+ 61 <1> ; | bx | 2 62 <1> ; +---------------+ 63 <1> ; | ax | 0 64 <1> ; +---------------+ 65 <1> ; 66 <1> 67 <1> ;; Note: The order of the pushed registers _must_ match with the definition 68 <1> ;; of the "iregs" structure within PCB.H, because a pointer to the last 69 <1> ;; pushed register is used as a pointer to a "iregs" structure within the 70 <1> ;; called C sources! -- 2000/03/22 ska 71 <1> 72 <1> ; Don't use `struc RegFrame' etc. here because it interferes with segment 73 <1> ; definitions. 74 <1> reg_ax equ 0 75 <1> reg_bx equ 2 76 <1> reg_cx equ 4 77 <1> reg_dx equ 6 78 <1> reg_si equ 8 79 <1> reg_di equ 10 80 <1> reg_bp equ 12 81 <1> reg_ds equ 14 82 <1> reg_es equ 16 83 <1> reg_ip equ 18 84 <1> reg_cs equ 20 85 <1> reg_flags equ 22 86 <1> irp_low equ 24 87 <1> irp_hi equ 26 88 <1> 89 <1> %macro PUSH$ALL 0 90 <1> push es 91 <1> push ds 92 <1> push bp 93 <1> push di 94 <1> push si 95 <1> push dx 96 <1> push cx 97 <1> push bx 98 <1> push ax 99 <1> %endmacro 100 <1> 101 <1> %macro POP$ALL 0 102 <1> pop ax 103 <1> pop bx 104 <1> pop cx 105 <1> pop dx 106 <1> pop si 107 <1> pop di 108 <1> pop bp 109 <1> pop ds 110 <1> pop es 111 <1> %endmacro 112 <1> 113 <1> ; I386.inc - 10/25/01 by tom ehlert 114 <1> ; 115 <1> ; compiling the kernel for 386 will (sometimes) change the 116 <1> ; high part of (some) registers, which will be (sometimes) be used 117 <1> ; later 118 <1> ; 119 <1> ; assumption: 120 <1> ; we have never seen MSVC to use anything but eax, ecx, edx, 121 <1> ; nor have we seen Borland C to use anything but eax, ebx, edx, 122 <1> ; so we only protect eax, ebx or ecx, edx to conserve stack space 123 <1> ; 124 <1> ; to save even more stack space, we save only HIGH part of regs 125 <1> ; at some expense of slower execution. it's easier anyway :-) 126 <1> ; 127 <1> ; WATCOM only uses FS: and GS: (using -zff and -zgf) and never 128 <1> ; any high part of the 386 registers 129 <1> ; 130 <1> 131 <1> 132 <1> %IF XCPU < 386 133 <1> ; no need to save/restore anything 134 <1> 135 <1> ; error 1 2 3 136 <1> %macro Protect386Registers 0 137 <1> %endmacro 138 <1> 139 <1> %assign Size386Registers 0 140 <1> 141 <1> %macro RestoreSP 0 142 <1> mov sp, bp 143 <1> %endmacro 144 <1> 145 <1> %macro Restore386Registers 0 146 <1> %endmacro 147 <1> 148 <1> %ELSE 149 <1> %ifdef WATCOM 150 <1> 151 <1> %macro Protect386Registers 0 152 <1> push fs 153 <1> push gs 154 <1> %endmacro 155 <1> 156 <1> %assign Size386Registers 4 157 <1> 158 <1> %macro RestoreSP 0 159 <1> lea sp, [bp - Size386Registers] 160 <1> %endmacro 161 <1> 162 <1> %macro Restore386Registers 0 163 <1> pop gs 164 <1> pop fs 165 <1> %endmacro 166 <1> 167 <1> %else 168 <1> 169 <1> %macro Protect386Registers 0 170 <1> push eax 171 <1> pop ax 172 <1> %ifdef MSCL8 173 <1> push ecx 174 <1> pop cx 175 <1> %else ;BC5 176 <1> push ebx 177 <1> pop bx 178 <1> %endif 179 <1> push edx 180 <1> pop dx 181 <1> %endmacro 182 <1> 183 <1> %assign Size386Registers 6 184 <1> 185 <1> %macro RestoreSP 0 186 <1> lea sp, [bp - Size386Registers] 187 <1> %endmacro 188 <1> 189 <1> %macro Restore386Registers 0 190 <1> push dx 191 <1> pop edx 192 <1> %ifdef MSCL8 193 <1> push cx 194 <1> pop ecx 195 <1> %else ;BC5 196 <1> push bx 197 <1> pop ebx 198 <1> %endif 199 <1> push ax 200 <1> pop eax 201 <1> %endmacro 202 <1> 203 <1> %endif 204 <1> %ENDIF 205 <1> 206 <1> ; macros to define stack arguments 207 <1> ; arg a, {b,4}, c 208 <1> ; defines a and c as "word" arguments and b as a "dword" argument 209 <1> ; for STDCALL defines .a as [bp+4], .b as [bp+6] and .c as [bp+10] 210 <1> ; for PASCAL defines .a as [bp+10], .b as [bp+6] and .c as [bp+4] 211 <1> ; 212 <1> ; popargs bx, {dx,ax}, cx pops these arguments of the stack (for PASCAL 213 <1> ; in reverse order). Here dx,ax is a dword argument dx:ax where dx is 214 <1> ; the high word. The caller is responsible for dealing with instruction 215 <1> ; pointer (ip) on the stack. 216 <1> 217 <1> %ifdef gcc 218 <1> %define STDCALL 219 <1> %else 220 <1> %define PASCAL 221 <1> %endif 222 <1> 223 <1> %macro definearg 1-2 2 224 <1> %xdefine .%1 bp+.argloc 225 <1> %assign .argloc .argloc+%2 226 <1> %endmacro 227 <1> 228 <1> %macro arg 1-* 229 <1> %assign .argloc 4 230 <1> %rep %0 231 <1> %ifdef PASCAL 232 <1> %rotate -1 233 <1> %endif 234 <1> definearg %1 235 <1> %ifdef STDCALL 236 <1> %rotate 1 237 <1> %endif 238 <1> %endrep 239 <1> %endmacro 240 <1> 241 <1> %macro multipop 1-* 242 <1> %rep %0 243 <1> %rotate -1 244 <1> pop %1 245 <1> %endrep 246 <1> %endmacro 247 <1> 248 <1> %macro popargs 1-* 249 <1> %rep %0 250 <1> %ifdef PASCAL 251 <1> %rotate -1 252 <1> %endif 253 <1> multipop %1 254 <1> %ifdef STDCALL 255 <1> %rotate 1 256 <1> %endif 257 <1> %endrep 258 <1> %endmacro 41 === Switch to base=002270h -> "HMA_TEXT" 42 segment HMA_TEXT 43 44 extern _DGROUP_ 45 46 ; 47 ; Special call for switching processes 48 ; 49 ; void exec_user(iregs far *irp, int disable_a20) 50 ; 51 global _exec_user 52 _exec_user: 53 54 ; PUSH$ALL 55 ; mov ds,[_DGROUP_] 56 ; cld 57 ; 58 ; 59 ; 0 0000051C 58 pop ax ; return address (unused) 61 0 0000051D 5D pop bp ; irp (user ss:sp) 0 0000051E 5E pop si 0 0000051F 59 pop cx ; disable A20? 0 00000520 09C9 or cx,cx 0 00000522 7414 jz do_iret 67 0 00000524 FA cli 0 00000525 8ED6 mov ss,si 0 00000527 89EC mov sp,bp ; set-up user stack 0 00000529 FB sti 72 ; 73 POP$ALL 0 0000052A 58 pop ax 0 0000052B 5B pop bx 0 0000052C 59 pop cx 0 0000052D 5A pop dx 0 0000052E 5E pop si 0 0000052F 5F pop di 0 00000530 5D pop bp 0 00000531 1F pop ds 0 00000532 07 pop es 74 extern _ExecUserDisableA20 0 00000533 EA[0000][0000] jmp DGROUP:_ExecUserDisableA20 76 do_iret: 77 extern _int21_iret 0 00000538 E9[0000] jmp _int21_iret 79 === Switch to base=000100h -> "_LOWTEXT" 80 segment _LOWTEXT 81 82 83 ;; Called whenever the BIOS detects a ^Break state 84 global _got_cbreak 85 _got_cbreak: 0 00000203 1E push ds 0 00000204 50 push ax 0 00000205 B84000 mov ax, 40h 0 00000208 8ED8 mov ds, ax 0 0000020A 800E710080 or byte [71h], 80h ;; set the ^Break flag 0 0000020F 58 pop ax 0 00000210 1F pop ds 0 00000211 CF iret 94 === Switch to base=002270h -> "HMA_TEXT" 95 segment HMA_TEXT 96 97 ; 98 ; Special call for switching processes during break handling 99 ; 100 ; void interrupt far spawn_int23() 101 ; 102 ; 103 ; +---------------+ 104 ; | flags | 22 105 ; +---------------+ 106 ; | cs | 20 107 ; +---------------+ 108 ; | ip | 18 109 ; +---------------+ 110 ; | es | 16 111 ; +---------------+ 112 ; | ds | 14 113 ; +---------------+ 114 ; | bp | 12 115 ; +---------------+ 116 ; | di | 10 117 ; +---------------+ 118 ; | si | 8 119 ; +---------------+ 120 ; | dx | 6 121 ; +---------------+ 122 ; | cx | 4 123 ; +---------------+ 124 ; | bx | 2 125 ; +---------------+ 126 ; | ax | 0 <--- bp & sp after mov bp,sp 127 ; +---------------+ 128 ; 129 global _spawn_int23 130 _spawn_int23: 131 132 ;; 1999/03/27 ska - comments: see cmt1.txt 0 0000053B 2E8E1E[0000] mov ds, [cs:_DGROUP_] ;; Make sure DS is OK 0 00000540 8B2E[0000] mov bp, [_user_r] 135 136 ; restore to user stack 0 00000544 FA cli ;; Pre-8086 don't disable INT autom. 138 ;*TE PATCH 139 ; CtrlC at DosInput (like C:>DATE does) 140 ; Nukes the Kernel. 141 ; 142 ; it looks like ENTRY.ASM+PROCSUPT.ASM 143 ; got out of sync. 144 ; 145 ; spawn_int() assumes a stack layout at 146 ; usr_ss:usr:sp. but usr:ss currently contains 0 147 ; 148 ; this patch helps FreeDos to survive CtrlC, 149 ; but should clearly be done somehow else. 0 00000545 8E16[0200] mov ss, [_user_r+2] 151 RestoreSP 0 00000549 89EC mov sp, bp 152 0 0000054B FB sti 154 155 ; get all the user registers back 156 Restore386Registers 157 POP$ALL 0 0000054C 58 pop ax 0 0000054D 5B pop bx 0 0000054E 59 pop cx 0 0000054F 5A pop dx 0 00000550 5E pop si 0 00000551 5F pop di 0 00000552 5D pop bp 0 00000553 1F pop ds 0 00000554 07 pop es 158 159 ;; Construct the piece of code into the stack 160 161 ;; stack frame: during generation of code piece 162 ;; 163 ;; BP | SP | Meaning 164 ;; 7 | 11 | offset CALL FAR will push onto stack 165 ;; 5 | 9 | CALL FAR segment 166 ;; 3 | 7 | CALL FAR offset 167 ;; 2 | 6 | CALL FAR ??regain_control_int23 | instruction byte 168 ;; 0 | 4 | INT 23 <> 169 ;; -2 | 2 | segment of address of INT-23 \ To jump to INT 23 170 ;; -4 | 0 | offset of address of INT-23 / via RETF 171 ;; Upon return from INT-23 the CALL FAR pushes the address of 172 ;; the byte immediately following the CALL FAR onto the stack. 173 ;; This value POPed and decremented by 7 is the value SP must 174 ;; contain, if the INT-23 was returned with RETF2/IRET. 175 0 00000555 83EC08 sub sp, byte 8 ;; code piece needs 7 bytes --> 4 words 0 00000558 16 push ss ;; prepare jump to INT-23 via RETF 0 00000559 55 push bp ;; will be offset / temp: saved BP 0 0000055A 89E5 mov bp, sp 0 0000055C 83C504 add bp, byte 4 ;; position BP onto INT-23 0 0000055F C74600CD23 mov word [bp], 23cdh ;; INT 23h 0 00000564 C646029A mov byte [bp+2], 9ah ;; CALL FAR immediate 0 00000568 C74603[5900] mov word [bp+3], ??regain_control_int23 0 0000056D 8C4E05 mov word [bp+5], cs 185 186 ;; complete the jump to INT-23 via RETF and restore BP 0 00000570 876EFC xchg word [bp-4], bp 188 0 00000573 F8 clc ;; set default action --> resume 190 ; invoke the int 23 handler its address has been constructed 191 ;; on the stack 0 00000574 CB retf 193 194 ??regain_control_int23: 195 196 ;; stack frame: constructed on entry to INT-23 197 ;; 198 ; BP | SP | Meaning 199 ;; 7 | 11 | offset CALL FAR will push onto stack 200 ;; 5 | 9 | CALL FAR segment 201 ;; 3 | 7 | CALL FAR offset 202 ;; 2 | 6 | CALL FAR ??regain_control_int23 | instruction byte 203 ;; 0 | 4 | INT 23 <> 204 ;; -2 | 2 | segment of address of INT-23 \ To jump to INT 23 205 ;; -4 | 0 | offset of address of INT-23 / via RETF 206 ;; Upon return from INT-23 the CALL FAR pushes the address of 207 ;; the byte immediately following the CALL FAR onto the stack. 208 ;; This value POPed and decremented by 7 is the value SP must 209 ;; contain, if the INT-23 was returned with RETF2/IRET. 210 211 ;; stack frame: used during recovering from INT-23 212 ;; 213 ;; BP | Meaning 214 ;; 1 | <> 215 ;; 0 | <> 216 ;; -1 | saved BP 217 ;; -3 | saved AX 218 ;; -7 | INT 23 <> 219 220 ;; Somewhere on stack: 221 ;; SP | Meaning 222 ;; 4 | segment of return address of CALL FAR 223 ;; 2 | offset of return address of CALL FAR 224 ;; 0 | saved BP 225 0 00000575 55 push bp 0 00000576 89E5 mov bp, sp 0 00000578 8B6E02 mov bp, [bp+2] ;; get should-be address + 7 0 0000057B 8946FD mov word [bp-3], ax ;; save AX 0 0000057E 58 pop ax ;; old BP 0 0000057F 8946FF mov word [bp-1], ax ;; preserve saved BP 0 00000582 89E8 mov ax, bp 0 00000584 48 dec ax ;; last used word of stack 0 00000585 48 dec ax ;; Don't use SUB to keep Carry flag 0 00000586 48 dec ax 0 00000587 94 xchg ax, sp ;; AX := current stack; SP corrected 237 ;; Currently: BP - 7 == address of INT-23 238 ;; should be AX + 4 --> IRET or RETF 2 239 ;; ==> Test if BP - 7 == AX + 4 240 ;; ==> Test if AX + 4 - BP + 7 == 0 0 00000588 9C pushf ;; preserve Carry flag 0 00000589 83C00B add ax, byte 4 + 7 0 0000058C 29E8 sub ax, bp ;; AX := SP + 4 0 0000058E 58 pop ax ;; saved Carry flag 0 0000058F 7402 jz ??int23_ign_carry ;; equal -> IRET --> ignore Carry 246 ;; Carry is already cleared 0 00000591 50 push ax 0 00000592 9D popf ;; restore Carry flag 249 250 ??int23_ign_carry: 0 00000593 58 pop ax ;; Restore the original register 0 00000594 7312 jnc ??int23_respawn 253 ;; The user returned via RETF 0, Carry is set 254 ;; --> terminate program 255 ;; This is done by set the _break_flg and modify the 256 ;; AH value, which is passed to the _respawn_ call 257 ;; into 0, which is "Terminate program". 0 00000596 1E push ds ;; we need DGROUP 0 00000597 2E8E1E[0000] mov ds, [cs:_DGROUP_] 0 0000059C FE06[0000] inc byte [_break_flg] 0 000005A0 C606[0000]01 mov byte [_term_type], 1 262 ; ecm: This is overwritten in the int 21h handler, 263 ; but is passed from the int 23h caller to the 264 ; terminate code in MS-DOS by writing this. 265 ; For us, break_flg is used in function 4Ch to 266 ; re-set term_type to 1 later. 0 000005A5 1F pop ds 268 0 000005A6 30E4 xor ah, ah ;; clear ah --> perform DOS-00 --> terminate 270 271 ??int23_respawn: 0 000005A8 5D pop bp ;; Restore the original register 0 000005A9 EA[0000][0000] jmp DGROUP:_int21_handler 274 275 ; 276 ; interrupt enable and disable routines 277 ; 278 ; public _enable 279 ;_enable proc near 280 ; sti 281 ; ret 282 ;_enable endp 283 ; 284 ; public _disable 285 ;_disable proc near 286 ; cli 287 ; ret 288 ;_disable endp 289 290 extern _p_0_tos,_P_0 291 292 ; prepare to call process 0 (the shell) from P_0() in C 293 294 global reloc_call_p_0 295 reloc_call_p_0: 0 000005AE 58 pop ax ; return address (32-bit, unused) 0 000005AF 58 pop ax 0 000005B0 58 pop ax ; fetch parameter 0 (32-bit) from the old stack 0 000005B1 5A pop dx 0 000005B2 2E8E1E[0000] mov ds,[cs:_DGROUP_] 0 000005B7 FA cli 0 000005B8 2E8E16[0000] mov ss,[cs:_DGROUP_] 0 000005BD BC[0000] mov sp,_p_0_tos ; load the dedicated process 0 stack 0 000005C0 FB sti 0 000005C1 52 push dx ; pass parameter 0 onto the new stack 0 000005C2 50 push ax 0 000005C3 E8[0000] call _P_0 ; no return, allow parameter fetch from C === Trace listing source: serial.lst 1 ; 2 ; File: 3 ; serial.asm 4 ; Description: 5 ; Serial device driver 6 ; 7 ; Copyright (c) 1998 8 ; Pasquale J. Villani 9 ; All Rights Reserved 10 ; 11 ; This file is part of DOS-C. 12 ; 13 ; DOS-C is free software; you can redistribute it and/or 14 ; modify it under the terms of the GNU General Public License 15 ; as published by the Free Software Foundation; either version 16 ; 2, or (at your option) any later version. 17 ; 18 ; DOS-C is distributed in the hope that it will be useful, but 19 ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 ; the GNU General Public License for more details. 22 ; 23 ; You should have received a copy of the GNU General Public 24 ; License along with DOS-C; see the file COPYING. If not, 25 ; write to the Free Software Foundation, 675 Mass Ave, 26 ; Cambridge, MA 02139, USA. 27 ; 28 ; $Header$ 29 ; 30 31 %include "io.inc" 1 <1> ; 2 <1> ; File: 3 <1> ; io.inc 4 <1> ; Description: 5 <1> ; Segments and external common routines used by various device drivers 6 <1> ; 7 <1> ; Copyright (c) 1998 8 <1> ; Pasquale J. Villani 9 <1> ; All Rights Reserved 10 <1> ; 11 <1> ; This file is part of DOS-C. 12 <1> ; 13 <1> ; DOS-C is free software; you can redistribute it and/or 14 <1> ; modify it under the terms of the GNU General Public License 15 <1> ; as published by the Free Software Foundation; either version 16 <1> ; 2, or (at your option) any later version. 17 <1> ; 18 <1> ; DOS-C is distributed in the hope that it will be useful, but 19 <1> ; WITHOUT ANY WARRANTY; without even the implied warranty of 20 <1> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 21 <1> ; the GNU General Public License for more details. 22 <1> ; 23 <1> ; You should have received a copy of the GNU General Public 24 <1> ; License along with DOS-C; see the file COPYING. If not, 25 <1> ; write to the Free Software Foundation, 675 Mass Ave, 26 <1> ; Cambridge, MA 02139, USA. 27 <1> ; 28 <1> ; $Header$ 29 <1> ; 30 <1> 31 <1> %include "segs.inc" 1 <2> ; File: 2 <2> ; segs.inc 3 <2> ; Description: 4 <2> ; Segment definitions for the kernel 5 <2> ; 6 <2> ; Copyright (c) 1998 7 <2> ; Pasquale J. Villani 8 <2> ; All Rights Reserved 9 <2> ; 10 <2> ; This file is part of DOS-C. 11 <2> ; 12 <2> ; DOS-C is free software; you can redistribute it and/or 13 <2> ; modify it under the terms of the GNU General Public License 14 <2> ; as published by the Free Software Foundation; either version 15 <2> ; 2, or (at your option) any later version. 16 <2> ; 17 <2> ; DOS-C is distributed in the hope that it will be useful, but 18 <2> ; WITHOUT ANY WARRANTY; without even the implied warranty of 19 <2> ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 20 <2> ; the GNU General Public License for more details. 21 <2> ; 22 <2> ; You should have received a copy of the GNU General Public 23 <2> ; License along with DOS-C; see the file COPYING. If not, 24 <2> ; write to the Free Software Foundation, 675 Mass Ave, 25 <2> ; Cambridge, MA 02139, USA. 26 <2> ; 27 <2> ; $Header$ 28 <2> ; 29 <2> 30 <2> ; CPU specification -- putting it here because all .asm files include this 31 <2> ; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't 32 <2> ; understand it 33 <2> %ifdef __NASM_VER__ 34 <2> %if XCPU == 86 35 <2> CPU 8086 36 <2> %else 37 <2> CPU XCPU 38 <2> %endif 39 <2> %endif 40 <2> 41 <2> ; for OW on Linux: 42 <2> %ifdef owlinux 43 <2> %define WATCOM 44 <2> %endif 45 <2> 46 <2> %ifidn __OUTPUT_FORMAT__, obj 47 <2> group PGROUP PSP 48 <2> group LGROUP _IRQTEXT _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT 49 <2> group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA 50 <2> %ifdef WATCOM 51 <2> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END INIT_TEXT_START INIT_TEXT INIT_TEXT_END 52 <2> %define IGROUP TGROUP 53 <2> group I_GROUP ID_B I_DATA ICONST ICONST2 ID_E IB_B I_BSS IB_E 54 <2> %else 55 <2> group TGROUP HMA_TEXT_START HMA_TEXT HMA_TEXT_END 56 <2> group IGROUP INIT_TEXT_START INIT_TEXT INIT_TEXT_END 57 <2> group I_GROUP ID_B ID ID_E IC IDATA IB_B IB IB_E 58 <2> %endif 59 <2> %define class(x) class=x 60 <2> %define nobits 61 <2> %define exec 62 <2> %define INITSIZE init_end wrt INIT_TEXT 63 <2> %define INITTEXTSIZE __INIT_DATA_START wrt INIT_TEXT 64 <2> 65 <2> %else ; using ELF 66 <2> 67 <2> BITS 16 68 <2> ; groups are defined in the linker script kernel.ld 69 <2> extern PGROUP 70 <2> extern DGROUP 71 <2> extern LGROUP 72 <2> extern TGROUP 73 <2> extern IGROUP 74 <2> extern I_GROUP 75 <2> %define class(x) 76 <2> %define stack 77 <2> extern INITSIZE 78 <2> %define INITTEXTSIZE __InitTextEnd 79 <2> 80 <2> %endif 81 <2> === Switch to base=000000h -> "PSP" 82 <2> segment PSP class(PSP) === Switch to base=000100h -> "_IRQTEXT" 83 <2> segment _IRQTEXT class(LCODE) exec === Switch to base=000100h -> "_LOWTEXT" 84 <2> segment _LOWTEXT class(LCODE) exec === Switch to base=000100h -> "_IO_TEXT" 85 <2> segment _IO_TEXT class(LCODE) exec === Switch to base=000100h -> "_IO_FIXED_DATA" 86 <2> segment _IO_FIXED_DATA class(LCODE) align=2 === Switch to base=002270h -> "_TEXT" 87 <2> segment _TEXT class(LCODE) exec === Switch to base=000790h -> "_FIXED_DATA" 88 <2> segment _FIXED_DATA class(FDATA) align=16 === Switch to base=000790h -> "_BSS" 89 <2> segment _BSS class(BSS) align=2 === Switch to base=000790h -> "_DATA" 90 <2> segment _DATA class(DATA) align=2 === Switch to base=000790h -> "_DATAEND" 91 <2> segment _DATAEND class(DATA) align=1 92 <2> ;for WATCOM === Switch to base=000790h -> "CONST" 93 <2> segment CONST class(DATA) align=2 === Switch to base=000790h -> "CONST2" 94 <2> segment CONST2 class(DATA) align=2 95 <2> ;for MSC === Switch to base=000000h -> "DCONST" 96 <2> segment DCONST class(DCONST) align=2 === Switch to base=000790h -> "DYN_DATA" 97 <2> segment DYN_DATA class(DYN_DATA) === Switch to base=002270h -> "HMA_TEXT_START" 98 <2> segment HMA_TEXT_START class(CODE) align=16 === Switch to base=002270h -> "HMA_TEXT" 99 <2> segment HMA_TEXT class(CODE) exec === Switch to base=002270h -> "HMA_TEXT_END" 100 <2> segment HMA_TEXT_END class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT_START" 101 <2> segment INIT_TEXT_START class(CODE) align=16 === Switch to base=00E0E0h -> "INIT_TEXT" 102 <2> segment INIT_TEXT class(CODE) exec === Switch to base=00E0E0h -> "INIT_TEXT_END" 103 <2> segment INIT_TEXT_END class(CODE) align=16 104 <2> 105 <2> %ifdef WATCOM === Switch to base=012B40h -> "ID_B" 106 <2> segment ID_B class(FAR_DATA) align=16 === Switch to base unknown -> "I_DATA" 107 <2> segment I_DATA class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST" 108 <2> segment ICONST class(FAR_DATA) align=2 === Switch to base unknown -> "ICONST2" 109 <2> segment ICONST2 class(FAR_DATA) align=2 === Switch to base=012B40h -> "ID_E" 110 <2> segment ID_E class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_B" 111 <2> segment IB_B class(FAR_DATA) align=2 === Switch to base unknown -> "I_BSS" 112 <2> segment I_BSS class(FAR_DATA) align=2 === Switch to base=012B40h -> "IB_E" 113 <2> segment IB_E class(FAR_DATA) align=2 114 <2> %else === Switch to base=012B40h -> "ID_B" 115 <2> segment ID_B class(ID) align=16 === Switch to base=000000h -> "ID" 116 <2> segment ID class(ID) align=2 === Switch to base=000000h -> "IDATA" 117 <2> segment IDATA class(ID) align=2 === Switch to base=012B40h -> "ID_E" 118 <2> segment ID_E class(ID) align=2 === Switch to base=000000h -> "IC" 119 <2> segment IC class(IC) align=2 === Switch to base=012B40h -> "IB_B" 120 <2> segment IB_B class(IB) align=2 nobits === Switch to base=000000h -> "IB" 121 <2> segment IB class(IB) align=2 nobits === Switch to base=012B40h -> "IB_E" 122 <2> segment IB_E class(IB) align=2 nobits 123 <2> %endif 32 <1> 33 <1> ; 34 <1> ; Error Return Codes 35 <1> ; 36 <1> 37 <1> %define E_WRPRT 0 ; Write Protect 38 <1> %define E_UNIT 1 ; Unknown Unit 39 <1> %define E_NOTRDY 2 ; Device Not Ready 40 <1> %define E_CMD 3 ; Unknown Command 41 <1> %define E_CRC 4 ; Crc Error 42 <1> %define E_LENGTH 5 ; Bad Length 43 <1> %define E_SEEK 6 ; Seek Error 44 <1> %define E_MEDIA 7 ; Unknown MEDIA 45 <1> %define E_NOTFND 8 ; Sector Not Found 46 <1> %define E_PAPER 9 ; No Paper 47 <1> %define E_WRITE 10 ; Write Fault 48 <1> %define E_READ 11 ; Read Fault 49 <1> %define E_FAILURE 12 ; General Failure 50 <1> 51 <1> 52 <1> extern _IOExit 53 <1> extern _IOSuccess 54 <1> extern _IOErrorExit 55 <1> extern _IOErrCnt 56 <1> extern _IODone 57 <1> extern _IOCommandError 58 <1> extern GetUnitNum 59 <1> extern _ReqPktPtr 60 <1> 32 === Switch to base=000100h -> "_IO_FIXED_DATA" 33 segment _IO_FIXED_DATA 34 35 global ComTable 0 0000063C 0A ComTable db 0Ah 0 0000063D [0000] dw _IOExit 0 0000063F [0000] dw _IOExit 0 00000641 [0000] dw _IOExit 0 00000643 [0000] dw _IOCommandError 0 00000645 [0000] dw ComRead 0 00000647 [4300] dw ComNdRead 0 00000649 [2F00] dw ComInStat 0 0000064B [7D00] dw ComInpFlush 0 0000064D [8600] dw ComWrite 0 0000064F [8600] dw ComWrite 0 00000651 [6200] dw ComOutStat 48 49 50 === Switch to base=000100h -> "_IO_TEXT" 51 segment _IO_TEXT 52 53 extern CommonNdRdExit 54 55 ComRead: 0 00000368 E315 jcxz ComRd3 0 0000036A E89B00 call GetComStat 0 0000036D 31C0 xor ax,ax 0 0000036F 8607 xchg [bx],al 0 00000371 08C0 or al,al 0 00000373 7507 jnz ComRd2 62 ComRd1: 0 00000375 E80A00 call BiosRdCom 0 00000378 08E4 or ah,ah ; timeout? 0 0000037A 78F9 js ComRd1 ; yes, try again 66 ComRd2: 0 0000037C AA stosb 0 0000037D E2F6 loop ComRd1 69 70 ComRd3: 0 0000037F E9[0000] jmp _IOExit 72 73 74 BiosRdCom: 0 00000382 B402 mov ah,2 0 00000384 E85800 call ComIOCall 0 00000387 F6C40E test ah,0Eh 0 0000038A 740A jz BiosRdRetn 0 0000038C 83C402 add sp,byte 2 0 0000038F 30C0 xor al,al 0 00000391 0CB0 or al,0B0h 0 00000393 E9[0000] jmp _IOErrCnt 83 BiosRdRetn: 0 00000396 C3 retn 85 86 87 ComInStat: ; similar to ComNdRead but returns no char, only flags 0 00000397 E86E00 call GetComStat 0 0000039A 8A07 mov al,[bx] 0 0000039C 08C0 or al,al 0 0000039E 7508 jnz ComInAvail 0 000003A0 E83600 call ComRdStatus 0 000003A3 F6C401 test ah,1 ; char waiting 0 000003A6 741F jz ComNdRtn 95 ; test al,20h ; DSR (why do we test this?) 96 ; jz ComNdRtn 0 000003A8 E9[0000] ComInAvail: jmp _IOExit ; return "ready" 98 99 100 ComNdRead: 0 000003AB E85A00 call GetComStat 0 000003AE 8A07 mov al,[bx] 0 000003B0 08C0 or al,al 0 000003B2 7510 jnz ComNdRd1 0 000003B4 E82200 call ComRdStatus 0 000003B7 F6C401 test ah,1 ; char waiting 0 000003BA 740B jz ComNdRtn 108 ; test al,20h ; DSR (why do we test this?) 109 ; jz ComNdRtn 0 000003BC E8C3FF call BiosRdCom 0 000003BF E84600 call GetComStat 0 000003C2 8807 mov [bx],al 113 ComNdRd1: 0 000003C4 E9[0000] jmp CommonNdRdExit ; return that char 115 ComNdRtn: 0 000003C7 E9[0000] jmp _IODone ; return "busy" 117 118 119 ComOutStat: 0 000003CA E80C00 call ComRdStatus 0 000003CD A820 test al,20h 0 000003CF 74F6 jz ComNdRtn 0 000003D1 F6C420 test ah,20h 0 000003D4 74F1 jz ComNdRtn 0 000003D6 E9[0000] jmp _IOExit ; return "ready" 126 127 128 ComRdStatus: 0 000003D9 B403 mov ah,3 0 000003DB E80100 call ComIOCall 0 000003DE C3 retn 132 133 134 ComIOCall: 0 000003DF E8[0000] call GetUnitNum 0 000003E2 CD14 int 14h ; RS-232 get char al, ah=return status 0 000003E4 C3 retn 138 139 140 ComInpFlush: 0 000003E5 E82000 call GetComStat 0 000003E8 C60700 mov byte [bx],0 0 000003EB E9[0000] jmp _IOExit 144 145 146 ComWrite: 0 000003EE E38F jcxz ComRd3 148 ComWr1: 0 000003F0 268A05 mov al,[es:di] 0 000003F3 47 inc di 0 000003F4 B401 mov ah,1 0 000003F6 E8E6FF call ComIOCall 0 000003F9 F6C480 test ah,80h 0 000003FC 7405 jz ComWr2 0 000003FE B00A mov al,0Ah 0 00000400 E9[0000] jmp _IOErrCnt 157 ComWr2: 0 00000403 E2EB loop ComWr1 0 00000405 E9[0000] jmp _IOExit 160 161 162 GetComStat: 0 00000408 E8[0000] call GetUnitNum 0 0000040B 89D3 mov bx,dx 0 0000040D 81C3[0000] add bx,ComStatArray 0 00000411 C3 retn 167 === Switch to base=000790h -> "_DATA" 168 segment _DATA 169 0 000011AE 00000000 ComStatArray db 0, 0, 0, 0 171 172 ; Revision 1.2 1999/08/10 17:57:13 jprice 173 ; ror4 2011-02 patch 174 ; 175 ; Revision 1.1.1.1 1999/03/29 15:41:31 jprice 176 ; New version without IPL.SYS 177 ; 178 ; Revision 1.1 1999/02/08 05:55:57 jprice 179 ; Added Pat's 1937 kernel patches 180 ; 181 ; EndLog 182 ; === Trace listing source: strings.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=strings.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccwJ8Iv0.s output file : strings.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP 5 .ident "GCC: (GNU) 6.3.0" NO DEFINED SYMBOLS NO UNDEFINED SYMBOLS === Trace listing source: sysclk.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=sysclk.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccF4QRDx.s output file : sysclk.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:21.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .global _clk_driver 7 .type _clk_driver, @function 8 _clk_driver: 0 00001978 56 push si 0 00001979 57 push di 0 0000197A 55 push bp 0 0000197B 89E5 mov bp, sp 0 0000197D 83EC16 sub sp, 22 0 00001980 8B460A mov ax, word ptr [bp+10] 0 00001983 8946F4 mov word ptr [bp-12], ax 0 00001986 8B460C mov ax, word ptr [bp+12] 0 00001989 8946F2 mov word ptr [bp-14], ax 0 0000198C 8EC0 mov es, ax 0 0000198E 8B5EF4 mov bx, word ptr [bp-12] 0 00001991 26807F020B cmp byte ptr es:[bx+2], 11 0 00001996 770D ja _.L2 0 00001998 268A4702 mov al, byte ptr es:[bx+2] 0 0000199C 30E4 xor ah, ah 0 0000199E D1E0 shl ax, 1 0 000019A0 93 xchg bx, ax 0 000019A1 FFA7[0000] jmp word ptr [bx+_.L4] === Switch to base=012B40h -> ".RODATA" 27 .section .rodata 28 .p2align 1 29 .p2align 2 30 _.L4: 0 00001634 [3600] .hword _.L3 0 00001636 [2D00] .hword _.L2 0 00001638 [2D00] .hword _.L2 0 0000163A [2D00] .hword _.L2 0 0000163C [4600] .hword _.L5 0 0000163E [2D00] .hword _.L2 0 00001640 [2D00] .hword _.L2 0 00001642 [4100] .hword _.L15 0 00001644 [FF00] .hword _.L7 0 00001646 [2D00] .hword _.L2 0 00001648 [2D00] .hword _.L2 0 0000164A [4100] .hword _.L15 === Switch to base=002270h -> ".TEXT" 43 .text 44 _.L2: 0 000019A5 B80C81 mov ax, -32500 46 _.L1: 0 000019A8 89EC mov sp, bp 0 000019AA 5D pop bp 0 000019AB 5F pop di 0 000019AC 5E pop si 0 000019AD CB retf 52 _.L3: 0 000019AE 8E46F2 mov es, word ptr [bp-14] 0 000019B1 8B5EF4 mov bx, word ptr [bp-12] 0 000019B4 26C6470D00 mov byte ptr es:[bx+13], 0 56 _.L15: 0 000019B9 B80001 mov ax, 256 0 000019BC EBEA jmp _.L1 59 _.L5: 0 000019BE 8E46F2 mov es, word ptr [bp-14] 0 000019C1 8B5EF4 mov bx, word ptr [bp-12] 0 000019C4 26837F1206 cmp word ptr es:[bx+18], 6 0 000019C9 7405 je _.L8 64 _.L18: 0 000019CB B80581 mov ax, -32507 0 000019CE EBD8 jmp _.L1 67 _.L8: 0 000019D0 E8[FEFF] call _ReadPCClock 0 000019D3 96 xchg si, ax 0 000019D4 89D3 mov bx, dx 0 000019D6 B80500 mov ax, 5 0 000019D9 F7E3 mul bx 0 000019DB 93 xchg bx, ax 0 000019DC 31C9 xor cx, cx 0 000019DE BF0500 mov di, 5 0 000019E1 96 xchg si, ax 0 000019E2 F7E7 mul di 0 000019E4 8946EE mov word ptr [bp-18], ax 0 000019E7 8956F0 mov word ptr [bp-16], dx 0 000019EA 01D3 add bx, dx 0 000019EC 51 push cx 0 000019ED 894EEA mov word ptr [bp-22], cx 0 000019F0 B80BE9 mov ax, -5877 0 000019F3 50 push ax 0 000019F4 53 push bx 0 000019F5 895EEC mov word ptr [bp-20], bx 0 000019F8 FF76EE push word ptr [bp-18] 0 000019FB E8[FEFF] call ___udivsi3 0 000019FE 97 xchg di, ax 0 000019FF 8B4EEA mov cx, word ptr [bp-22] 0 00001A02 89CE mov si, cx 0 00001A04 51 push cx 0 00001A05 B80BE9 mov ax, -5877 0 00001A08 50 push ax 0 00001A09 8B5EEC mov bx, word ptr [bp-20] 0 00001A0C 53 push bx 0 00001A0D FF76EE push word ptr [bp-18] 0 00001A10 E8[FEFF] call ___umodsi3 0 00001A13 56 push si 0 00001A14 BA0BE9 mov dx, -5877 0 00001A17 52 push dx 0 00001A18 50 push ax 0 00001A19 56 push si 0 00001A1A E8[FEFF] call ___udivsi3 0 00001A1D 93 xchg bx, ax 0 00001A1E 01F3 add bx, si 0 00001A20 11D7 adc di, dx 0 00001A22 56 push si 0 00001A23 B87017 mov ax, 6000 0 00001A26 50 push ax 0 00001A27 57 push di 0 00001A28 53 push bx 0 00001A29 895EEE mov word ptr [bp-18], bx 0 00001A2C E8[FEFF] call ___udivsi3 0 00001A2F B93C00 mov cx, 60 0 00001A32 99 cwd 0 00001A33 F7F9 idiv cx 0 00001A35 8846FD mov byte ptr [bp-3], al 0 00001A38 8856FC mov byte ptr [bp-4], dl 0 00001A3B 56 push si 0 00001A3C B87017 mov ax, 6000 0 00001A3F 50 push ax 0 00001A40 57 push di 0 00001A41 8B5EEE mov bx, word ptr [bp-18] 0 00001A44 53 push bx 0 00001A45 E8[FEFF] call ___umodsi3 0 00001A48 B96400 mov cx, 100 0 00001A4B 99 cwd 0 00001A4C F7F9 idiv cx 0 00001A4E 8846FF mov byte ptr [bp-1], al 0 00001A51 8856FE mov byte ptr [bp-2], dl 0 00001A54 A1[0000] mov ax, word ptr [_DaysSinceEpoch] 0 00001A57 8946FA mov word ptr [bp-6], ax 0 00001A5A B80600 mov ax, 6 0 00001A5D 50 push ax 0 00001A5E 8D46FA lea ax, [-6+bp] 0 00001A61 16 push ss 0 00001A62 50 push ax 0 00001A63 8E46F2 mov es, word ptr [bp-14] 0 00001A66 8B5EF4 mov bx, word ptr [bp-12] 0 00001A69 26FF7710 push word ptr es:[bx+16] 0 00001A6D 26FF770E push word ptr es:[bx+14] 0 00001A71 E8[FEFF] call _fmemcpy 0 00001A74 E942FF jmp _.L15 145 _.L7: 0 00001A77 8E46F2 mov es, word ptr [bp-14] 0 00001A7A 8B5EF4 mov bx, word ptr [bp-12] 0 00001A7D 26837F1206 cmp word ptr es:[bx+18], 6 0 00001A82 7403E944FF jne _.L18 0 00001A87 B80600 mov ax, 6 0 00001A8A 50 push ax 0 00001A8B 8E46F2 mov es, word ptr [bp-14] 0 00001A8E 8B5EF4 mov bx, word ptr [bp-12] 0 00001A91 26FF7710 push word ptr es:[bx+16] 0 00001A95 26FF770E push word ptr es:[bx+14] 0 00001A99 8D46FA lea ax, [-6+bp] 0 00001A9C 16 push ss 0 00001A9D 50 push ax 0 00001A9E E8[FEFF] call _fmemcpy 0 00001AA1 8B46FA mov ax, word ptr [bp-6] 0 00001AA4 A3[0000] mov word ptr [_DaysSinceEpoch], ax 0 00001AA7 B03C mov al, 60 0 00001AA9 F666FD mul byte ptr [bp-3] 0 00001AAC 8A56FC mov dl, byte ptr [bp-4] 0 00001AAF 30F6 xor dh, dh 0 00001AB1 01D0 add ax, dx 0 00001AB3 93 xchg bx, ax 0 00001AB4 B87017 mov ax, 6000 0 00001AB7 F7EB imul bx 0 00001AB9 93 xchg bx, ax 0 00001ABA 89D6 mov si, dx 0 00001ABC B064 mov al, 100 0 00001ABE F666FF mul byte ptr [bp-1] 0 00001AC1 8A56FE mov dl, byte ptr [bp-2] 0 00001AC4 30F6 xor dh, dh 0 00001AC6 01D0 add ax, dx 0 00001AC8 89C1 mov cx, ax 0 00001ACA 99 cwd 0 00001ACB 01D9 add cx, bx 0 00001ACD 96 xchg si, ax 0 00001ACE 11D0 adc ax, dx 0 00001AD0 8946F4 mov word ptr [bp-12], ax 0 00001AD3 31FF xor di, di 0 00001AD5 BE0BE9 mov si, -5877 0 00001AD8 91 xchg cx, ax 0 00001AD9 F7E6 mul si 0 00001ADB 89D1 mov cx, dx 0 00001ADD 8B46F4 mov ax, word ptr [bp-12] 0 00001AE0 F7E6 mul si 0 00001AE2 01C1 add cx, ax 0 00001AE4 92 xchg dx, ax 0 00001AE5 11F8 adc ax, di 0 00001AE7 57 push di 0 00001AE8 BA0500 mov dx, 5 0 00001AEB 52 push dx 0 00001AEC 50 push ax 0 00001AED 51 push cx 0 00001AEE E8[FEFF] call ___udivsi3 0 00001AF1 52 push dx 0 00001AF2 50 push ax 0 00001AF3 E8[FEFF] call _WritePCClock 0 00001AF6 8B76FA mov si, word ptr [bp-6] 0 00001AF9 C746F4BC07 mov word ptr [bp-12], 1980 204 _.L11: 0 00001AFE FF76F4 push word ptr [bp-12] 0 00001B01 E8[FEFF] call _is_leap_year_monthdays 0 00001B04 97 xchg di, ax 0 00001B05 8B4518 mov ax, word ptr [di+24] 0 00001B08 39C6 cmp si, ax 0 00001B0A 7207 jc _.L10 0 00001B0C FF46F4 inc word ptr [bp-12] 0 00001B0F 29C6 sub si, ax 0 00001B11 EBEB jmp _.L11 214 _.L10: 0 00001B13 B80100 mov ax, 1 216 _.L14: 0 00001B16 89C3 mov bx, ax 0 00001B18 D1E3 shl bx, 1 0 00001B1A 3B31 cmp si, word ptr [bx+di] 0 00001B1C 7203E99800 jnc _.L12 0 00001B21 8D5401 lea dx, [1+si] 0 00001B24 89C3 mov bx, ax 0 00001B26 81C3FF7F add bx, 32767 0 00001B2A D1E3 shl bx, 1 0 00001B2C 2B11 sub dx, word ptr [bx+di] 0 00001B2E 89D6 mov si, dx 227 _.L13: 0 00001B30 BB0A00 mov bx, 10 0 00001B33 99 cwd 0 00001B34 F7FB idiv bx 0 00001B36 B104 mov cl, 4 0 00001B38 D3E0 shl ax, cl 0 00001B3A 09D0 or ax, dx 0 00001B3C 8846F7 mov byte ptr [bp-9], al 0 00001B3F 96 xchg si, ax 0 00001B40 99 cwd 0 00001B41 F7FB idiv bx 0 00001B43 89D6 mov si, dx 0 00001B45 D3E0 shl ax, cl 0 00001B47 92 xchg dx, ax 0 00001B48 09F2 or dx, si 0 00001B4A 8856F6 mov byte ptr [bp-10], dl 0 00001B4D BF6400 mov di, 100 0 00001B50 8B46F4 mov ax, word ptr [bp-12] 0 00001B53 31D2 xor dx, dx 0 00001B55 F7F7 div di 0 00001B57 89D6 mov si, dx 0 00001B59 99 cwd 0 00001B5A F7FB idiv bx 0 00001B5C D3E0 shl ax, cl 0 00001B5E 09D0 or ax, dx 0 00001B60 8846F9 mov byte ptr [bp-7], al 0 00001B63 96 xchg si, ax 0 00001B64 99 cwd 0 00001B65 F7FB idiv bx 0 00001B67 89D6 mov si, dx 0 00001B69 D3E0 shl ax, cl 0 00001B6B 89C2 mov dx, ax 0 00001B6D 09F2 or dx, si 0 00001B6F 8856F8 mov byte ptr [bp-8], dl 0 00001B72 8A46FC mov al, byte ptr [bp-4] 0 00001B75 8846F4 mov byte ptr [bp-12], al 0 00001B78 C646F500 mov byte ptr [bp-11], 0 0 00001B7C 8A46FD mov al, byte ptr [bp-3] 0 00001B7F 8846F2 mov byte ptr [bp-14], al 0 00001B82 C646F300 mov byte ptr [bp-13], 0 0 00001B86 8A46FF mov al, byte ptr [bp-1] 0 00001B89 30E4 xor ah, ah 0 00001B8B 99 cwd 0 00001B8C F7FB idiv bx 0 00001B8E D3E0 shl ax, cl 0 00001B90 09D0 or ax, dx 0 00001B92 50 push ax 0 00001B93 8B46F4 mov ax, word ptr [bp-12] 0 00001B96 99 cwd 0 00001B97 F7FB idiv bx 0 00001B99 89D6 mov si, dx 0 00001B9B D3E0 shl ax, cl 0 00001B9D 92 xchg dx, ax 0 00001B9E 09F2 or dx, si 0 00001BA0 52 push dx 0 00001BA1 8B46F2 mov ax, word ptr [bp-14] 0 00001BA4 99 cwd 0 00001BA5 F7FB idiv bx 0 00001BA7 89D6 mov si, dx 0 00001BA9 D3E0 shl ax, cl 0 00001BAB 92 xchg dx, ax 0 00001BAC 09F2 or dx, si 0 00001BAE 52 push dx 0 00001BAF 8D46F6 lea ax, [-10+bp] 0 00001BB2 50 push ax 0 00001BB3 E8[FEFF] call _WriteATClock 0 00001BB6 E900FE jmp _.L15 294 _.L12: 0 00001BB9 40 inc ax 0 00001BBA 83F80D cmp ax, 13 0 00001BBD 7403E954FF jne _.L14 0 00001BC2 E96BFF jmp _.L13 299 .size _clk_driver, .-_clk_driver 300 .global _DaysSinceEpoch === Switch to base=012B40h -> ".BSS" 301 .bss 302 .p2align 1 303 .type _DaysSinceEpoch, @object 304 .size _DaysSinceEpoch, 2 305 _DaysSinceEpoch: 0 00000D00 0000 .skip 2,0 307 .ident "GCC: (GNU) 6.3.0" === Trace listing source: syspack.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=syspack.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccEgFJRk.s output file : syspack.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP 5 .ident "GCC: (GNU) 6.3.0" NO DEFINED SYMBOLS NO UNDEFINED SYMBOLS === Trace listing source: systime.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=systime.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/ccJxtgis.s output file : systime.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:21.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .global _is_leap_year_monthdays 7 .type _is_leap_year_monthdays, @function 8 _is_leap_year_monthdays: 0 00002BCD 55 push bp 0 00002BCE 89E5 mov bp, sp 0 00002BD0 F6460403 test byte ptr [bp+4], 3 0 00002BD4 750E jne _.L3 0 00002BD6 817E043408 cmp word ptr [bp+4], 2100 0 00002BDB 7407 je _.L3 0 00002BDD B8[1A00] mov ax, offset _days+26 16 _.L1: 0 00002BE0 5D pop bp 0 00002BE1 C20200 ret 2 19 _.L3: 0 00002BE4 B8[0000] mov ax, offset _days 0 00002BE7 EBF7 jmp _.L1 22 .size _is_leap_year_monthdays, .-_is_leap_year_monthdays 23 .global _DaysFromYearMonthDay 24 .type _DaysFromYearMonthDay, @function 25 _DaysFromYearMonthDay: 0 00002BE9 56 push si 0 00002BEA 57 push di 0 00002BEB 55 push bp 0 00002BEC 89E5 mov bp, sp 0 00002BEE 8B7608 mov si, word ptr [bp+8] 0 00002BF1 81FEBB07 cmp si, 1979 0 00002BF5 7632 jbe _.L7 0 00002BF7 56 push si 0 00002BF8 E8[FEFF] call _is_leap_year_monthdays 0 00002BFB 8EC0 mov es, ax 0 00002BFD B86D01 mov ax, 365 0 00002C00 F7E6 mul si 0 00002C02 8B5E0C mov bx, word ptr [bp+12] 0 00002C05 97 xchg di, ax 0 00002C06 8D99F3F8 lea bx, [-1805+bx+di] 0 00002C0A 8D8447F8 lea ax, [-1977+si] 0 00002C0E B102 mov cl, 2 0 00002C10 D3E8 shr ax, cl 0 00002C12 01D8 add ax, bx 0 00002C14 8B5E0A mov bx, word ptr [bp+10] 0 00002C17 81C3FF7F add bx, 32767 0 00002C1B D1E3 shl bx, 1 0 00002C1D 8CC7 mov di, es 0 00002C1F 0301 add ax, word ptr [bx+di] 50 _.L5: 0 00002C21 89EC mov sp, bp 0 00002C23 5D pop bp 0 00002C24 5F pop di 0 00002C25 5E pop si 0 00002C26 C20600 ret 6 56 _.L7: 0 00002C29 31C0 xor ax, ax 0 00002C2B EBF4 jmp _.L5 59 .size _DaysFromYearMonthDay, .-_DaysFromYearMonthDay 60 .global _ExecuteClockDriverRequest 61 .type _ExecuteClockDriverRequest, @function 62 _ExecuteClockDriverRequest: 0 00002C2D 55 push bp 0 00002C2E 89E5 mov bp, sp 0 00002C30 8A4604 mov al, byte ptr [bp+4] 0 00002C33 98 cbw 0 00002C34 50 push ax 0 00002C35 16 push ss 0 00002C36 B8[0000] mov ax, offset _ClkRecord 0 00002C39 50 push ax 0 00002C3A B80600 mov ax, 6 0 00002C3D 50 push ax 0 00002C3E B8[0000] mov ax, offset _clock 0 00002C41 50 push ax 0 00002C42 E8[FEFF] call _BinaryCharIO 0 00002C45 89EC mov sp, bp 0 00002C47 5D pop bp 0 00002C48 C20200 ret 2 79 .size _ExecuteClockDriverRequest, .-_ExecuteClockDriverRequest 80 .global _DosGetTime 81 .type _DosGetTime, @function 82 _DosGetTime: 0 00002C4B 56 push si 0 00002C4C 55 push bp 0 00002C4D 89E5 mov bp, sp 0 00002C4F 8B7606 mov si, word ptr [bp+6] 0 00002C52 B004 mov al, 4 0 00002C54 50 push ax 0 00002C55 E8[FEFF] call _ExecuteClockDriverRequest 0 00002C58 833E[0300]00 cmp word ptr [_ClkReqHdr+3], 0 0 00002C5D 781A js _.L11 0 00002C5F BB[0000] mov bx, offset _ClkRecord 0 00002C62 8A4703 mov al, byte ptr [bx+3] 0 00002C65 884401 mov byte ptr [si+1], al 0 00002C68 8A4702 mov al, byte ptr [bx+2] 0 00002C6B 8804 mov byte ptr [si], al 0 00002C6D 8A4705 mov al, byte ptr [bx+5] 0 00002C70 884403 mov byte ptr [si+3], al 0 00002C73 8A4704 mov al, byte ptr [bx+4] 0 00002C76 884402 mov byte ptr [si+2], al 101 _.L11: 0 00002C79 89EC mov sp, bp 0 00002C7B 5D pop bp 0 00002C7C 5E pop si 0 00002C7D C20200 ret 2 106 .size _DosGetTime, .-_DosGetTime 107 .global _DosSetTime 108 .type _DosSetTime, @function 109 _DosSetTime: 0 00002C80 56 push si 0 00002C81 55 push bp 0 00002C82 89E5 mov bp, sp 0 00002C84 8B7606 mov si, word ptr [bp+6] 0 00002C87 807C0117 cmp byte ptr [si+1], 23 0 00002C8B 7753 ja _.L19 0 00002C8D 803C3B cmp byte ptr [si], 59 0 00002C90 774E ja _.L19 0 00002C92 807C033B cmp byte ptr [si+3], 59 0 00002C96 7748 ja _.L19 0 00002C98 807C0263 cmp byte ptr [si+2], 99 0 00002C9C 7742 ja _.L19 0 00002C9E B004 mov al, 4 0 00002CA0 50 push ax 0 00002CA1 E8[FEFF] call _ExecuteClockDriverRequest 0 00002CA4 8A4401 mov al, byte ptr [si+1] 0 00002CA7 BB[0000] mov bx, offset _ClkRecord 0 00002CAA 884703 mov byte ptr [bx+3], al 0 00002CAD 8A04 mov al, byte ptr [si] 0 00002CAF 884702 mov byte ptr [bx+2], al 0 00002CB2 8A4403 mov al, byte ptr [si+3] 0 00002CB5 884705 mov byte ptr [bx+5], al 0 00002CB8 8A4402 mov al, byte ptr [si+2] 0 00002CBB 884704 mov byte ptr [bx+4], al 0 00002CBE B008 mov al, 8 0 00002CC0 50 push ax 0 00002CC1 E8[FEFF] call _ExecuteClockDriverRequest 0 00002CC4 BB[0000] mov bx, offset _ClkReqHdr 0 00002CC7 837F0300 cmp word ptr [bx+3], 0 0 00002CCB 7D18 jge _.L20 0 00002CCD FF36[0200] push word ptr [_clock+2] 0 00002CD1 FF36[0000] push word ptr [_clock] 0 00002CD5 53 push bx 0 00002CD6 E8[FEFF] call _char_error 144 _.L14: 0 00002CD9 89EC mov sp, bp 0 00002CDB 5D pop bp 0 00002CDC 5E pop si 0 00002CDD C20200 ret 2 149 _.L19: 0 00002CE0 B8F3FF mov ax, -13 0 00002CE3 EBF4 jmp _.L14 152 _.L20: 0 00002CE5 31C0 xor ax, ax 0 00002CE7 EBF0 jmp _.L14 155 .size _DosSetTime, .-_DosSetTime 156 .global _DosGetDate 157 .type _DosGetDate, @function 158 _DosGetDate: 0 00002CE9 56 push si 0 00002CEA 57 push di 0 00002CEB 55 push bp 0 00002CEC 89E5 mov bp, sp 0 00002CEE 1E push ds 0 00002CEF 1E push ds 0 00002CF0 B004 mov al, 4 0 00002CF2 50 push ax 0 00002CF3 E8[FEFF] call _ExecuteClockDriverRequest 0 00002CF6 30C0 xor al, al 0 00002CF8 833E[0300]00 cmp word ptr [_ClkReqHdr+3], 0 0 00002CFD 7851 js _.L22 0 00002CFF BE[0000] mov si, offset _ClkRecord 0 00002D02 8B14 mov dx, word ptr [si] 0 00002D04 BFBC07 mov di, 1980 0 00002D07 8976FE mov word ptr [bp-2], si 175 _.L26: 0 00002D0A 8956FC mov word ptr [bp-4], dx 0 00002D0D 57 push di 0 00002D0E E8[FEFF] call _is_leap_year_monthdays 0 00002D11 96 xchg si, ax 0 00002D12 8B4418 mov ax, word ptr [si+24] 0 00002D15 8B56FC mov dx, word ptr [bp-4] 0 00002D18 39C2 cmp dx, ax 0 00002D1A 733C jnc _.L24 0 00002D1C B80100 mov ax, 1 185 _.L25: 0 00002D1F 89C3 mov bx, ax 0 00002D21 D1E3 shl bx, 1 0 00002D23 3B10 cmp dx, word ptr [bx+si] 0 00002D25 7336 jnc _.L27 0 00002D27 8B5E08 mov bx, word ptr [bp+8] 0 00002D2A 893F mov word ptr [bx], di 0 00002D2C 884703 mov byte ptr [bx+3], al 0 00002D2F FEC2 inc dl 0 00002D31 05FF7F add ax, 32767 0 00002D34 93 xchg bx, ax 0 00002D35 D1E3 shl bx, 1 0 00002D37 2A10 sub dl, byte ptr [bx+si] 0 00002D39 8B5E08 mov bx, word ptr [bp+8] 0 00002D3C 885702 mov byte ptr [bx+2], dl 0 00002D3F 8B5EFE mov bx, word ptr [bp-2] 0 00002D42 8B07 mov ax, word ptr [bx] 0 00002D44 83C002 add ax, 2 0 00002D47 B90700 mov cx, 7 0 00002D4A 31D2 xor dx, dx 0 00002D4C F7F1 div cx 0 00002D4E 88D0 mov al, dl 207 _.L22: 0 00002D50 89EC mov sp, bp 0 00002D52 5D pop bp 0 00002D53 5F pop di 0 00002D54 5E pop si 0 00002D55 C20200 ret 2 213 _.L24: 0 00002D58 47 inc di 0 00002D59 29C2 sub dx, ax 0 00002D5B EBAD jmp _.L26 217 _.L27: 0 00002D5D 40 inc ax 0 00002D5E EBBF jmp _.L25 220 .size _DosGetDate, .-_DosGetDate 221 .global _DosSetDate 222 .type _DosSetDate, @function 223 _DosSetDate: 0 00002D60 56 push si 0 00002D61 57 push di 0 00002D62 55 push bp 0 00002D63 89E5 mov bp, sp 0 00002D65 83EC06 sub sp, 6 0 00002D68 8B5E08 mov bx, word ptr [bp+8] 0 00002D6B 8B37 mov si, word ptr [bx] 0 00002D6D 8A4F03 mov cl, byte ptr [bx+3] 0 00002D70 884EFE mov byte ptr [bp-2], cl 0 00002D73 884EFB mov byte ptr [bp-5], cl 0 00002D76 C646FF00 mov byte ptr [bp-1], 0 0 00002D7A 8A5702 mov dl, byte ptr [bx+2] 0 00002D7D 30F6 xor dh, dh 0 00002D7F 8956FC mov word ptr [bp-4], dx 0 00002D82 56 push si 0 00002D83 E8[FEFF] call _is_leap_year_monthdays 0 00002D86 97 xchg di, ax 0 00002D87 8D8444F8 lea ax, [-1980+si] 0 00002D8B 83F877 cmp ax, 119 0 00002D8E 775A ja _.L35 0 00002D90 8B46FE mov ax, word ptr [bp-2] 0 00002D93 48 dec ax 0 00002D94 83F80C cmp ax, 11+1 0 00002D97 7351 jnc _.L35 0 00002D99 8B56FC mov dx, word ptr [bp-4] 0 00002D9C 85D2 test dx, dx 0 00002D9E 744A je _.L35 0 00002DA0 8A4EFB mov cl, byte ptr [bp-5] 0 00002DA3 88C8 mov al, cl 0 00002DA5 30E4 xor ah, ah 0 00002DA7 D1E0 shl ax, 1 0 00002DA9 93 xchg bx, ax 0 00002DAA 8B01 mov ax, word ptr [bx+di] 0 00002DAC 2B41FE sub ax, word ptr [bx+di-2] 0 00002DAF 39C2 cmp dx, ax 0 00002DB1 7737 ja _.L35 0 00002DB3 B004 mov al, 4 0 00002DB5 50 push ax 0 00002DB6 E8[FEFF] call _ExecuteClockDriverRequest 0 00002DB9 8B56FC mov dx, word ptr [bp-4] 0 00002DBC 52 push dx 0 00002DBD FF76FE push word ptr [bp-2] 0 00002DC0 56 push si 0 00002DC1 E8[FEFF] call _DaysFromYearMonthDay 0 00002DC4 A3[0000] mov word ptr [_ClkRecord], ax 0 00002DC7 B008 mov al, 8 0 00002DC9 50 push ax 0 00002DCA E8[FEFF] call _ExecuteClockDriverRequest 0 00002DCD BB[0000] mov bx, offset _ClkReqHdr 0 00002DD0 837F0300 cmp word ptr [bx+3], 0 0 00002DD4 7D19 jge _.L36 0 00002DD6 FF36[0200] push word ptr [_clock+2] 0 00002DDA FF36[0000] push word ptr [_clock] 0 00002DDE 53 push bx 0 00002DDF E8[FEFF] call _char_error 279 _.L31: 0 00002DE2 89EC mov sp, bp 0 00002DE4 5D pop bp 0 00002DE5 5F pop di 0 00002DE6 5E pop si 0 00002DE7 C20200 ret 2 285 _.L35: 0 00002DEA B8F3FF mov ax, -13 0 00002DED EBF3 jmp _.L31 288 _.L36: 0 00002DEF 31C0 xor ax, ax 0 00002DF1 EBEF jmp _.L31 291 .size _DosSetDate, .-_DosSetDate 292 .global _days === Switch to base=012B40h -> ".RODATA" 293 .section .rodata 294 .p2align 1 295 .type _days, @object 296 .size _days, 52 297 _days: 0 0000164C 0000 .hword 0 0 0000164E 1F00 .hword 31 0 00001650 3B00 .hword 59 0 00001652 5A00 .hword 90 0 00001654 7800 .hword 120 0 00001656 9700 .hword 151 0 00001658 B500 .hword 181 0 0000165A D400 .hword 212 0 0000165C F300 .hword 243 0 0000165E 1101 .hword 273 0 00001660 3001 .hword 304 0 00001662 4E01 .hword 334 0 00001664 6D01 .hword 365 0 00001666 0000 .hword 0 0 00001668 1F00 .hword 31 0 0000166A 3C00 .hword 60 0 0000166C 5B00 .hword 91 0 0000166E 7900 .hword 121 0 00001670 9800 .hword 152 0 00001672 B600 .hword 182 0 00001674 D500 .hword 213 0 00001676 F400 .hword 244 0 00001678 1201 .hword 274 0 0000167A 3101 .hword 305 0 0000167C 4F01 .hword 335 0 0000167E 6E01 .hword 366 324 .ident "GCC: (GNU) 6.3.0" === Trace listing source: task.lst GNU assembler version 2.39 (ia16-elf) using BFD version (GNU Binutils) 2.39. options passed : -a=task.lst --listing-cont-lines=9999 --listing-rhs-width=9999 --listing-lhs-width=2 -ag input file : /tmp/cc43lZ4H.s output file : task.obj target : ia16-unknown-elf time stamp : 2026-04-23T00:58:22.000+0200 1 .arch i8086,jumps 2 .code16 3 .intel_syntax noprefix 4 #NO_APP === Switch to base=002270h -> ".TEXT" 5 .text 6 .type _ExecMemAlloc, @function 7 _ExecMemAlloc: 0 00009F7A 56 push si 0 00009F7B 57 push di 0 00009F7C 55 push bp 0 00009F7D 89E5 mov bp, sp 0 00009F7F 1E push ds 0 00009F80 1E push ds 0 00009F81 8B7E0A mov di, word ptr [bp+10] 0 00009F84 8B760C mov si, word ptr [bp+12] 0 00009F87 56 push si 0 00009F88 57 push di 0 00009F89 A0[0000] mov al, byte ptr [_mem_access_mode] 0 00009F8C 30E4 xor ah, ah 0 00009F8E 50 push ax 0 00009F8F FF7608 push word ptr [bp+8] 0 00009F92 E8[FEFF] call _DosMemAlloc 0 00009F95 85C0 test ax, ax 0 00009F97 7448 je _.L2 0 00009F99 83F8F8 cmp ax, -8 0 00009F9C 753B jne _.L1 0 00009F9E 56 push si 0 00009F9F 57 push di 0 00009FA0 B9FFFF mov cx, -1 0 00009FA3 51 push cx 0 00009FA4 894EFC mov word ptr [bp-4], cx 0 00009FA7 31D2 xor dx, dx 0 00009FA9 52 push dx 0 00009FAA 8956FE mov word ptr [bp-2], dx 0 00009FAD E8[FEFF] call _DosMemAlloc 0 00009FB0 8A1E[0000] mov bl, byte ptr [_mem_access_mode] 0 00009FB4 84DB test bl, bl 0 00009FB6 8B56FE mov dx, word ptr [bp-2] 0 00009FB9 8B4EFC mov cx, word ptr [bp-4] 0 00009FBC 7D17 jge _.L4 0 00009FBE 85C0 test ax, ax 0 00009FC0 7424 je _.L6 0 00009FC2 80E37F and bl, 127 0 00009FC5 881E[0000] mov byte ptr [_mem_access_mode], bl 0 00009FC9 56 push si 0 00009FCA 57 push di 0 00009FCB 51 push cx 0 00009FCC 52 push dx 0 00009FCD E8[FEFF] call _DosMemAlloc 0 00009FD0 800E[0000]80 or byte ptr [_mem_access_mode], -128 51 _.L4: 0 00009FD5 85C0 test ax, ax 0 00009FD7 740D je _.L6 54 _.L1: 0 00009FD9 89EC mov sp, bp 0 00009FDB 5D pop bp 0 00009FDC 5F pop di 0 00009FDD 5E pop si 0 00009FDE C20600 ret 6 60 _.L2: 0 00009FE1 8B4608 mov ax, word ptr [bp+8] 0 00009FE4 8904 mov word ptr [si], ax 63 _.L6: 0 00009FE6 31C0 xor ax, ax 0 00009FE8 8B5608 mov dx, word ptr [bp+8] 0 00009FEB 3B14 cmp dx, word ptr [si] 0 00009FED 76EA jbe _.L1 0 00009FEF FF35 push word ptr [di] 0 00009FF1 E8[FEFF] call _DosMemFree 0 00009FF4 B8F8FF mov ax, -8 0 00009FF7 EBE0 jmp _.L1 72 .size _ExecMemAlloc, .-_ExecMemAlloc 73 .type _ChildEnv, @function 74 _ChildEnv: 0 00009FF9 56 push si 0 00009FFA 57 push di 0 00009FFB 55 push bp 0 00009FFC 89E5 mov bp, sp 0 00009FFE 83EC08 sub sp, 8 0 0000A001 8B760A mov si, word ptr [bp+10] 0 0000A004 C4460C les ax, dword ptr [bp+12] 0 0000A007 8946FE mov word ptr [bp-2], ax 0 0000A00A 8C46FC mov word ptr [bp-4], es 0 0000A00D A1[0000] mov ax, word ptr [_cu_psp] 0 0000A010 C7040000 mov word ptr [si], 0 0 0000A014 8B5E08 mov bx, word ptr [bp+8] 0 0000A017 8B1F mov bx, word ptr [bx] 0 0000A019 85DB test bx, bx 0 0000A01B B90000 mov cx, 0 0 0000A01E 7507 jne _.L15 0 0000A020 8EC0 mov es, ax 0 0000A022 268B1E2C00 mov bx, word ptr es:[44] 93 _.L15: 0 0000A027 89C8 mov ax, cx 0 0000A029 09D8 or ax, bx 0 0000A02B 85C0 test ax, ax 0 0000A02D 7503E98A00 je _.L24 0 0000A032 B87D7F mov ax, 32637 0 0000A035 31FF xor di, di 100 _.L20: 0 0000A037 8EC3 mov es, bx 0 0000A039 26833D00 cmp word ptr es:[di], 0 0 0000A03D 7409 je _.L18 0 0000A03F 47 inc di 0 0000A040 48 dec ax 0 0000A041 75F4 jne _.L20 0 0000A043 B8F6FF mov ax, -10 0 0000A046 EB6C jmp _.L13 109 _.L18: 0 0000A048 83C702 add di, 2 111 _.L16: 0 0000A04B 895EF8 mov word ptr [bp-8], bx 0 0000A04E 51 push cx 0 0000A04F 894EFA mov word ptr [bp-6], cx 0 0000A052 56 push si 0 0000A053 A0[0000] mov al, byte ptr [_mem_access_mode] 0 0000A056 30E4 xor ah, ah 0 0000A058 50 push ax 0 0000A059 8D859200 lea ax, [146+di] 0 0000A05D B104 mov cl, 4 0 0000A05F D3E8 shr ax, cl 0 0000A061 50 push ax 0 0000A062 E8[FEFF] call _DosMemAlloc 0 0000A065 85C0 test ax, ax 0 0000A067 7C4B jl _.L13 0 0000A069 8B34 mov si, word ptr [si] 0 0000A06B 46 inc si 0 0000A06C 8B4EFA mov cx, word ptr [bp-6] 0 0000A06F 89C8 mov ax, cx 0 0000A071 8B5EF8 mov bx, word ptr [bp-8] 0 0000A074 09D8 or ax, bx 0 0000A076 BA0100 mov dx, 1 0 0000A079 7446 je _.L21 0 0000A07B 8956FA mov word ptr [bp-6], dx 0 0000A07E 57 push di 0 0000A07F 53 push bx 0 0000A080 51 push cx 0 0000A081 56 push si 0 0000A082 51 push cx 0 0000A083 E8[FEFF] call _fmemcpy 0 0000A086 8B56FA mov dx, word ptr [bp-6] 142 _.L23: 0 0000A089 8EC6 mov es, si 0 0000A08B 26C7050100 mov word ptr es:[di], 1 0 0000A090 52 push dx 0 0000A091 BA[0000] mov dx, offset __PriPathBuffer 0 0000A094 52 push dx 0 0000A095 8956FA mov word ptr [bp-6], dx 0 0000A098 FF76FC push word ptr [bp-4] 0 0000A09B FF76FE push word ptr [bp-2] 0 0000A09E E8[FEFF] call _truename 0 0000A0A1 85C0 test ax, ax 0 0000A0A3 7C0F jl _.L13 0 0000A0A5 16 push ss 0 0000A0A6 8B56FA mov dx, word ptr [bp-6] 0 0000A0A9 52 push dx 0 0000A0AA 8D4502 lea ax, [2+di] 0 0000A0AD 56 push si 0 0000A0AE 50 push ax 0 0000A0AF E8[FEFF] call _fstrcpy 0 0000A0B2 31C0 xor ax, ax 162 _.L13: 0 0000A0B4 89EC mov sp, bp 0 0000A0B6 5D pop bp 0 0000A0B7 5F pop di 0 0000A0B8 5E pop si 0 0000A0B9 C20800 ret 8 168 _.L24: 0 0000A0BC BF0100 mov di, 1 0 0000A0BF EB8A jmp _.L16 171 _.L21: 0 0000A0C1 89D7 mov di, dx 0 0000A0C3 8EC6 mov es, si 0 0000A0C5 26A20000 mov byte ptr es:[0], al 0 0000A0C9 EBBE jmp _.L23 176 .size _ChildEnv, .-_ChildEnv 177 .type _ExecMemLargest, @function 178 _ExecMemLargest: 0 0000A0CB 56 push si 0 0000A0CC 57 push di 0 0000A0CD 55 push bp 0 0000A0CE 89E5 mov bp, sp 0 0000A0D0 8B7608 mov si, word ptr [bp+8] 0 0000A0D3 8B7E0A mov di, word ptr [bp+10] 0 0000A0D6 A0[0000] mov al, byte ptr [_mem_access_mode] 0 0000A0D9 84C0 test al, al 0 0000A0DB 7D30 jge _.L28 0 0000A0DD 247F and al, 127 0 0000A0DF 0C40 or al, 64 0 0000A0E1 A2[0000] mov byte ptr [_mem_access_mode], al 0 0000A0E4 56 push si 0 0000A0E5 E8[FEFF] call _DosMemLargest 0 0000A0E8 8026[0000]BF and byte ptr [_mem_access_mode], -65 0 0000A0ED 85C0 test ax, ax 0 0000A0EF 7504 jne _.L29 0 0000A0F1 393C cmp word ptr [si], di 0 0000A0F3 7304 jnc _.L30 198 _.L29: 0 0000A0F5 56 push si 0 0000A0F6 E8[FEFF] call _DosMemLargest 201 _.L30: 0 0000A0F9 800E[0000]80 or byte ptr [_mem_access_mode], -128 203 _.L31: 0 0000A0FE 3B3C cmp di, word ptr [si] 0 0000A100 7603 jbe _.L27 0 0000A102 B8F8FF mov ax, -8 207 _.L27: 0 0000A105 89EC mov sp, bp 0 0000A107 5D pop bp 0 0000A108 5F pop di 0 0000A109 5E pop si 0 0000A10A C20400 ret 4 213 _.L28: 0 0000A10D 56 push si 0 0000A10E E8[FEFF] call _DosMemLargest 0 0000A111 EBEB jmp _.L31 217 .size _ExecMemLargest, .-_ExecMemLargest 218 .type _patchPSP, @function 219 _patchPSP: 0 0000A113 56 push si 0 0000A114 57 push di 0 0000A115 55 push bp 0 0000A116 89E5 mov bp, sp 0 0000A118 83EC0E sub sp, 14 0 0000A11B 8B760C mov si, word ptr [bp+12] 0 0000A11E 8B460E mov ax, word ptr [bp+14] 0 0000A121 8946FC mov word ptr [bp-4], ax 0 0000A124 8B7E10 mov di, word ptr [bp+16] 0 0000A127 8B4612 mov ax, word ptr [bp+18] 0 0000A12A 8946FA mov word ptr [bp-6], ax 0 0000A12D 8B4608 mov ax, word ptr [bp+8] 0 0000A130 40 inc ax 0 0000A131 8946FE mov word ptr [bp-2], ax 0 0000A134 B88000 mov ax, 128 0 0000A137 50 push ax 0 0000A138 8E46FC mov es, word ptr [bp-4] 0 0000A13B 26FF7404 push word ptr es:[si+4] 0 0000A13F 26FF7402 push word ptr es:[si+2] 0 0000A143 FF76FE push word ptr [bp-2] 0 0000A146 50 push ax 0 0000A147 E8[FEFF] call _fmemcpy 0 0000A14A 8E46FC mov es, word ptr [bp-4] 0 0000A14D 268B5406 mov dx, word ptr es:[si+6] 0 0000A151 268B4C08 mov cx, word ptr es:[si+8] 0 0000A155 83FAFF cmp dx, -1 0 0000A158 742C je _.L35 0 0000A15A B81000 mov ax, 16 0 0000A15D 50 push ax 0 0000A15E 8946F8 mov word ptr [bp-8], ax 0 0000A161 51 push cx 0 0000A162 52 push dx 0 0000A163 FF76FE push word ptr [bp-2] 0 0000A166 BA5C00 mov dx, 92 0 0000A169 52 push dx 0 0000A16A E8[FEFF] call _fmemcpy 0 0000A16D 8B46F8 mov ax, word ptr [bp-8] 0 0000A170 50 push ax 0 0000A171 8E46FC mov es, word ptr [bp-4] 0 0000A174 26FF740C push word ptr es:[si+12] 0 0000A178 26FF740A push word ptr es:[si+10] 0 0000A17C FF76FE push word ptr [bp-2] 0 0000A17F B86C00 mov ax, 108 0 0000A182 50 push ax 0 0000A183 E8[FEFF] call _fmemcpy 265 _.L35: 0 0000A186 8E4608 mov es, word ptr [bp+8] 0 0000A189 8B46FE mov ax, word ptr [bp-2] 0 0000A18C 26A30100 mov word ptr es:[1], ax 0 0000A190 837E0A00 cmp word ptr [bp+10], 0 0 0000A194 740D je _.L36 0 0000A196 8E460A mov es, word ptr [bp+10] 0 0000A199 8B46FE mov ax, word ptr [bp-2] 0 0000A19C 26A30100 mov word ptr es:[1], ax 0 0000A1A0 FF460A inc word ptr [bp+10] 275 _.L36: 0 0000A1A3 8E46FE mov es, word ptr [bp-2] 0 0000A1A6 8B460A mov ax, word ptr [bp+10] 0 0000A1A9 26A32C00 mov word ptr es:[44], ax 0 0000A1AD 89FE mov si, di 280 _.L37: 0 0000A1AF 8D5501 lea dx, [1+di] 0 0000A1B2 8E46FA mov es, word ptr [bp-6] 0 0000A1B5 268A05 mov al, byte ptr es:[di] 0 0000A1B8 3C2F cmp al, 47 0 0000A1BA 7415 je _.L39 0 0000A1BC 7F0B jg _.L40 0 0000A1BE 84C0 test al, al 0 0000A1C0 7503E9F400 je _.L41 289 _.L38: 0 0000A1C5 89D7 mov di, dx 0 0000A1C7 EBE6 jmp _.L37 292 _.L40: 0 0000A1C9 3C3A cmp al, 58 0 0000A1CB 7404 je _.L39 0 0000A1CD 3C5C cmp al, 92 0 0000A1CF 75F4 jne _.L38 297 _.L39: 0 0000A1D1 89D6 mov si, dx 0 0000A1D3 EBF0 jmp _.L38 300 _.L45: 0 0000A1D5 88C4 mov ah, al 0 0000A1D7 80C49F add ah, -97 0 0000A1DA 80FC19 cmp ah, 25 0 0000A1DD 7702 ja _.L42 0 0000A1DF 04E0 add al, -32 306 _.L42: 0 0000A1E1 8E4608 mov es, word ptr [bp+8] 0 0000A1E4 26884708 mov byte ptr es:[bx+8], al 0 0000A1E8 43 inc bx 0 0000A1E9 4A dec dx 0 0000A1EA 7403E9CF00 jne _.L43 312 _.L44: 0 0000A1EF 8B3E[0000] mov di, word ptr [_setverPtr] 0 0000A1F3 A1[0200] mov ax, word ptr [_setverPtr+2] 0 0000A1F6 8946FC mov word ptr [bp-4], ax 0 0000A1F9 09F8 or ax, di 0 0000A1FB 7503E98500 je _.L50 0 0000A200 8B46FA mov ax, word ptr [bp-6] 0 0000A203 09F0 or ax, si 0 0000A205 747E je _.L50 0 0000A207 FF76FA push word ptr [bp-6] 0 0000A20A 56 push si 0 0000A20B E8[FEFF] call _fstrlen 0 0000A20E 8ED8 mov ds, ax 0 0000A210 89FB mov bx, di 326 _.L51: 0 0000A212 8E46FC mov es, word ptr [bp-4] 0 0000A215 268A17 mov dl, byte ptr es:[bx] 0 0000A218 84D2 test dl, dl 0 0000A21A 7469 je _.L50 0 0000A21C 88D0 mov al, dl 0 0000A21E 98 cbw 0 0000A21F 8CD9 mov cx, ds 0 0000A221 39C1 cmp cx, ax 0 0000A223 7403E9C000 jne _.L52 0 0000A228 89D8 mov ax, bx 0 0000A22A 40 inc ax 0 0000A22B 8946F4 mov word ptr [bp-12], ax 0 0000A22E 8CD8 mov ax, ds 0 0000A230 8976F8 mov word ptr [bp-8], si 341 _.L53: 0 0000A233 89C1 mov cx, ax 0 0000A235 49 dec cx 0 0000A236 894EF2 mov word ptr [bp-14], cx 0 0000A239 85C0 test ax, ax 0 0000A23B 7437 je _.L62 0 0000A23D C47EF8 les di, dword ptr [bp-8] 0 0000A240 268A0D mov cl, byte ptr es:[di] 0 0000A243 88C8 mov al, cl 0 0000A245 049F add al, -97 0 0000A247 3C19 cmp al, 25 0 0000A249 88C8 mov al, cl 0 0000A24B 98 cbw 0 0000A24C 7703 ja _.L54 0 0000A24E 83C0E0 add ax, -32 356 _.L54: 0 0000A251 8946F6 mov word ptr [bp-10], ax 0 0000A254 8E46FC mov es, word ptr [bp-4] 0 0000A257 8B7EF4 mov di, word ptr [bp-12] 0 0000A25A 268A35 mov dh, byte ptr es:[di] 0 0000A25D 88F0 mov al, dh 0 0000A25F 049F add al, -97 0 0000A261 3C19 cmp al, 25 0 0000A263 88F0 mov al, dh 0 0000A265 98 cbw 0 0000A266 7703 ja _.L57 0 0000A268 83C0E0 add ax, -32 368 _.L57: 0 0000A26B 3946F6 cmp word ptr [bp-10], ax 0 0000A26E 746C je _.L58 0 0000A270 38F1 cmp cl, dh 0 0000A272 7574 jne _.L52 373 _.L62: 0 0000A274 88D0 mov al, dl 0 0000A276 98 cbw 0 0000A277 97 xchg di, ax 0 0000A278 8D5901 lea bx, [1+bx+di] 0 0000A27B 8E46FC mov es, word ptr [bp-4] 0 0000A27E 268B07 mov ax, word ptr es:[bx] 0 0000A281 85C0 test ax, ax 0 0000A283 756E jne _.L59 382 _.L50: 0 0000A285 8E46FE mov es, word ptr [bp-2] 0 0000A288 26A05C00 mov al, byte ptr es:[92] 0 0000A28C 30E4 xor ah, ah 0 0000A28E 50 push ax 0 0000A28F 16 push ss 0 0000A290 1F pop ds 0 0000A291 E8[FEFF] call _get_cds1 0 0000A294 09D0 or ax, dx 0 0000A296 7564 jne _.L67 0 0000A298 BEFF00 mov si, 255 393 _.L64: 0 0000A29B 8E46FE mov es, word ptr [bp-2] 0 0000A29E 26A06C00 mov al, byte ptr es:[108] 0 0000A2A2 30E4 xor ah, ah 0 0000A2A4 50 push ax 0 0000A2A5 E8[FEFF] call _get_cds1 0 0000A2A8 09D0 or ax, dx 0 0000A2AA 7554 jne _.L68 0 0000A2AC B800FF mov ax, -256 402 _.L65: 0 0000A2AF 09F0 or ax, si 0 0000A2B1 89EC mov sp, bp 0 0000A2B3 5D pop bp 0 0000A2B4 5F pop di 0 0000A2B5 5E pop si 0 0000A2B6 C20C00 ret 12 409 _.L41: 0 0000A2B9 BA0800 mov dx, 8 0 0000A2BC 31DB xor bx, bx 412 _.L43: 0 0000A2BE 8D38 lea di, [bx+si] 0 0000A2C0 8E46FA mov es, word ptr [bp-6] 0 0000A2C3 268A05 mov al, byte ptr es:[di] 0 0000A2C6 84C0 test al, al 0 0000A2C8 7407 je _.L47 0 0000A2CA 3C2E cmp al, 46 0 0000A2CC 7403E904FF jne _.L45 420 _.L47: 0 0000A2D1 8E4608 mov es, word ptr [bp+8] 0 0000A2D4 26C6470800 mov byte ptr es:[bx+8], 0 0 0000A2D9 E913FF jmp _.L44 424 _.L58: 0 0000A2DC FF46F8 inc word ptr [bp-8] 0 0000A2DF FF46F4 inc word ptr [bp-12] 0 0000A2E2 8B46F2 mov ax, word ptr [bp-14] 0 0000A2E5 E94BFF jmp _.L53 429 _.L52: 0 0000A2E8 88D0 mov al, dl 0 0000A2EA 98 cbw 0 0000A2EB 89C7 mov di, ax 0 0000A2ED 8D5903 lea bx, [3+bx+di] 0 0000A2F0 E91FFF jmp _.L51 435 _.L59: 0 0000A2F3 8E46FE mov es, word ptr [bp-2] 0 0000A2F6 26A34000 mov word ptr es:[64], ax 0 0000A2FA EB89 jmp _.L50 439 _.L67: 0 0000A2FC 31F6 xor si, si 0 0000A2FE EB9B jmp _.L64 442 _.L68: 0 0000A300 31C0 xor ax, ax 0 0000A302 EBAB jmp _.L65 445 .size _patchPSP, .-_patchPSP 446 .type _load_transfer, @function 447 _load_transfer: 0 0000A304 56 push si 0 0000A305 57 push di 0 0000A306 55 push bp 0 0000A307 89E5 mov bp, sp 0 0000A309 8B4608 mov ax, word ptr [bp+8] 0 0000A30C 8B760A mov si, word ptr [bp+10] 0 0000A30F 8B7E0C mov di, word ptr [bp+12] 0 0000A312 8B16[0000] mov dx, word ptr [_cu_psp] 0 0000A316 8EC0 mov es, ax 0 0000A318 2689161600 mov word ptr es:[22], dx 0 0000A31D 26C70638000000 mov word ptr es:[56], 0 0 0000A324 2689163A00 mov word ptr es:[58], dx 0 0000A329 8B1E[0000] mov bx, word ptr [_user_r] 0 0000A32D 8B0E[0200] mov cx, word ptr [_user_r+2] 0 0000A331 8EC2 mov es, dx 0 0000A333 26891E2E00 mov word ptr es:[46], bx 0 0000A338 26890E3000 mov word ptr es:[48], cx 0 0000A33D 8EC1 mov es, cx 0 0000A33F 26806716FE and byte ptr es:[bx+22], -2 0 0000A344 A3[0000] mov word ptr [_cu_psp], ax 0 0000A347 C706[0000]8000 mov word ptr [_dta], 128 0 0000A34D A3[0200] mov word ptr [_dta+2], ax 0 0000A350 837E0E01 cmp word ptr [bp+14], 1 0 0000A354 7362 jnc _.L94 0 0000A356 8B5C0E mov bx, word ptr [si+14] 0 0000A359 8B4C10 mov cx, word ptr [si+16] 0 0000A35C 8D57E8 lea dx, [-24+bx] 0 0000A35F 8EC1 mov es, cx 0 0000A361 268947F6 mov word ptr es:[bx-10], ax 0 0000A365 268947F8 mov word ptr es:[bx-8], ax 0 0000A369 268947EE mov word ptr es:[bx-18], ax 0 0000A36D 8B4414 mov ax, word ptr [si+20] 0 0000A370 268947FC mov word ptr es:[bx-4], ax 0 0000A374 8B4412 mov ax, word ptr [si+18] 0 0000A377 268947FA mov word ptr es:[bx-6], ax 0 0000A37B 268947F0 mov word ptr es:[bx-16], ax 0 0000A37F 8B440E mov ax, word ptr [si+14] 0 0000A382 268947F2 mov word ptr es:[bx-14], ax 0 0000A386 26C747F41E09 mov word ptr es:[bx-12], 2334 0 0000A38C 26897FEA mov word ptr es:[bx-22], di 0 0000A390 26897FE8 mov word ptr es:[bx-24], di 0 0000A394 26C747ECFF00 mov word ptr es:[bx-20], 255 0 0000A39A 26C747FE0002 mov word ptr es:[bx-2], 512 0 0000A3A0 A0[0000] mov al, byte ptr [_InDOS] 0 0000A3A3 84C0 test al, al 0 0000A3A5 7405 je _.L95 0 0000A3A7 FEC8 dec al 0 0000A3A9 A2[0000] mov byte ptr [_InDOS], al 496 _.L95: 0 0000A3AC B80100 mov ax, 1 0 0000A3AF 50 push ax 0 0000A3B0 51 push cx 0 0000A3B1 52 push dx 0 0000A3B2 E8[FEFF] call _exec_user 0 0000A3B5 83C406 add sp, 6 503 _.L94: 0 0000A3B8 8B5C0E mov bx, word ptr [si+14] 0 0000A3BB 8B4410 mov ax, word ptr [si+16] 0 0000A3BE 8D57FE lea dx, [-2+bx] 0 0000A3C1 89540E mov word ptr [si+14], dx 0 0000A3C4 8EC0 mov es, ax 0 0000A3C6 26897FFE mov word ptr es:[bx-2], di 0 0000A3CA 31C0 xor ax, ax 0 0000A3CC 89EC mov sp, bp 0 0000A3CE 5D pop bp 0 0000A3CF 5F pop di 0 0000A3D0 5E pop si 0 0000A3D1 C20800 ret 8 516 .size _load_transfer, .-_load_transfer 517 .global _getvec 518 .type _getvec, @function 519 _getvec: 0 0000A3D4 89E3 mov bx, sp 521 #APP 522 ;# 150 "../hdr/portab.h" 1 1 /****************************************************************/ 2 /* */ 3 /* portab.h */ 4 /* */ 5 /* DOS-C portability typedefs, etc. */ 6 /* */ 7 /* May 1, 1995 */ 8 /* */ 9 /* Copyright (c) 1995 */ 10 /* Pasquale J. Villani */ 11 /* All Rights Reserved */ 12 /* */ 13 /* This file is part of DOS-C. */ 14 /* */ 15 /* DOS-C is free software; you can redistribute it and/or */ 16 /* modify it under the terms of the GNU General Public License */ 17 /* as published by the Free Software Foundation; either version */ 18 /* 2, or (at your option) any later version. */ 19 /* */ 20 /* DOS-C is distributed in the hope that it will be useful, but */ 21 /* WITHOUT ANY WARRANTY; without even the implied warranty of */ 22 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See */ 23 /* the GNU General Public License for more details. */ 24 /* */ 25 /* You should have received a copy of the GNU General Public */ 26 /* License along with DOS-C; see the file COPYING. If not, */ 27 /* write to the Free Software Foundation, 675 Mass Ave, */ 28 /* Cambridge, MA 02139, USA. */ 29 /****************************************************************/ 30 31 #ifdef MAIN 32 #ifdef VERSION_STRINGS 33 static char *portab_hRcsId = 34 "$Id: portab.h 1121 2005-03-15 15:25:08Z perditionc $"; 35 #endif 36 #endif 37 38 /****************************************************************/ 39 /* */ 40 /* Machine dependant portable types. Note that this section is */ 41 /* used primarily for segmented architectures. Common types and */ 42 /* types used relating to segmented operations are found here. */ 43 /* */ 44 /* Be aware that segmented architectures impose on linear */ 45 /* architectures because they require special types to be used */ 46 /* throught the code that must be reduced to empty preprocessor */ 47 /* replacements in the linear machine. */ 48 /* */ 49 /* #ifdef */ 50 /* # define FAR far */ 51 /* # define NEAR near */ 52 /* #endif */ 53 /* */ 54 /* #ifdef */ 55 /* # define FAR */ 56 /* # define NEAR */ 57 /* #endif */ 58 /* */ 59 /****************************************************************/ 60 61 /* commandline overflow - removing -DI86 TE */ 62 #if defined(__TURBOC__) 63 64 #define I86 65 #define CDECL cdecl 66 #if __TURBOC__ > 0x202 67 /* printf callers do the right thing for tc++ 1.01 but not tc 2.01 */ 68 #define VA_CDECL 69 #else 70 #define VA_CDECL cdecl 71 #endif 72 #define PASCAL pascal 73 void __int__(int); 74 #ifndef FORSYS 75 void __emit__(char, ...); 76 #define disable() __emit__(0xfa) 77 #define enable() __emit__(0xfb) 78 #endif 79 80 #elif defined(_MSC_VER) 81 82 #define I86 83 #define asm __asm 84 #pragma warning(disable: 4761) /* "integral size mismatch in argument; 85 conversion supplied" */ 86 #define CDECL _cdecl 87 #define VA_CDECL 88 #define PASCAL pascal 89 #define __int__(intno) asm int intno; 90 #define disable() asm cli 91 #define enable() asm sti 92 #define _CS getCS() 93 static unsigned short __inline getCS(void) 94 { 95 asm mov ax, cs; 96 } 97 #define _SS getSS() 98 static unsigned short __inline getSS(void) 99 { 100 asm mov ax, ss; 101 } 102 103 #elif defined(__WATCOMC__) /* don't know a better way */ 104 105 #if defined(_M_I86) 106 107 #define I86 108 #define __int__(intno) asm int intno; 109 void disable(void); 110 #pragma aux disable = "cli" __modify __exact []; 111 void enable(void); 112 #pragma aux enable = "sti" __modify __exact []; 113 #define asm __asm 114 #define far __far 115 #define CDECL __cdecl 116 #define VA_CDECL 117 #define PASCAL pascal 118 #define _CS getCS() 119 unsigned short getCS(void); 120 #pragma aux getCS = "mov dx,cs" __value [__dx] __modify __exact[__dx]; 121 #define _SS getSS() 122 unsigned short getSS(void); 123 #pragma aux getSS = "mov dx,ss" __value [__dx] __modify __exact[__dx]; 124 #if !defined(FORSYS) && !defined(EXEFLAT) && _M_IX86 >= 300 125 #pragma aux __default __parm [__ax __dx __cx] __modify [__ax __dx __es __fs] /* min.unpacked size */ 126 #endif 127 128 /* enable Possible loss of precision warning for compatibility with Borland */ 129 #pragma enable_message(130) 130 131 #else 132 133 /* workaround for building some utils with OpenWatcom (flat model) */ 134 #define MC68K 135 136 #endif 137 138 #elif defined (_MYMC68K_COMILER_) 139 140 #define MC68K 141 142 #elif defined(__GNUC__) 143 144 #ifdef __FAR 145 #define I86 146 #define STRINGIFY(x) #x 147 #define __int__(intno) asm volatile(STRINGIFY(int $##intno)) 148 static inline void disable(void) 149 { 0 0000A3D6 FA asm volatile("cli"); 151 } 523 cli 524 ;# 0 "" 2 525 ;# 154 "../hdr/portab.h" 1 152 static inline void enable(void) 153 { 0 0000A3D7 FB asm volatile("sti"); 155 } 526 sti 527 ;# 0 "" 2 528 #NO_APP 0 0000A3D8 8A4702 mov al, byte ptr [bx+2] 0 0000A3DB 30E4 xor ah, ah 0 0000A3DD B102 mov cl, 2 0 0000A3DF D3E0 shl ax, cl 0 0000A3E1 89C3 mov bx, ax 0 0000A3E3 99 cwd 0 0000A3E4 8EC2 mov es, dx 0 0000A3E6 268B07 mov ax, word ptr es:[bx] 0 0000A3E9 268B5702 mov dx, word ptr es:[bx+2] 0 0000A3ED C20200 ret 2 539 .size _getvec, .-_getvec 540 .global _setvec_resident 541 .type _setvec_resident, @function 542 _setvec_resident: 0 0000A3F0 57 push di 0 0000A3F1 89E3 mov bx, sp 0 0000A3F3 8E5F08 mov ds, word ptr [bx+8] 546 #APP 547 ;# 150 "../hdr/portab.h" 1 548 cli 549 ;# 0 "" 2 550 #NO_APP 0 0000A3F7 368A4704 mov al, byte ptr ss:[bx+4] 0 0000A3FB 30E4 xor ah, ah 0 0000A3FD B102 mov cl, 2 0 0000A3FF D3E0 shl ax, cl 0 0000A401 99 cwd 0 0000A402 368B5F06 mov bx, word ptr ss:[bx+6] 0 0000A406 8EC2 mov es, dx 0 0000A408 89C7 mov di, ax 0 0000A40A 26891D mov word ptr es:[di], bx 0 0000A40D 93 xchg bx, ax 0 0000A40E 268C5F02 mov word ptr es:[bx+2], ds 562 #APP 563 ;# 154 "../hdr/portab.h" 1 564 sti 565 ;# 0 "" 2 566 #NO_APP 0 0000A413 5F pop di 0 0000A414 16 push ss 0 0000A415 1F pop ds 0 0000A416 C20600 ret 6 571 .size _setvec_resident, .-_setvec_resident 572 .global _SftGetFsize 573 .type _SftGetFsize, @function 574 _SftGetFsize: 0 0000A419 55 push bp 0 0000A41A 89E5 mov bp, sp 0 0000A41C FF7604 push word ptr [bp+4] 0 0000A41F E8[FEFF] call _idx_to_sft 0 0000A422 89C3 mov bx, ax 0 0000A424 83F8FF cmp ax, -1 0 0000A427 7410 je _.L106 0 0000A429 8EC2 mov es, dx 0 0000A42B 268B4711 mov ax, word ptr es:[bx+17] 0 0000A42F 268B5713 mov dx, word ptr es:[bx+19] 585 _.L104: 0 0000A433 89EC mov sp, bp 0 0000A435 5D pop bp 0 0000A436 C20200 ret 2 589 _.L106: 0 0000A439 B8FAFF mov ax, -6 0 0000A43C 89DA mov dx, bx 0 0000A43E EBF3 jmp _.L104 593 .size _SftGetFsize, .-_SftGetFsize 594 .global _new_psp 595 .type _new_psp, @function 596 _new_psp: 0 0000A440 56 push si 0 0000A441 55 push bp 0 0000A442 89E5 mov bp, sp 0 0000A444 1E push ds 0 0000A445 31DB xor bx, bx 0 0000A447 B80001 mov ax, 256 0 0000A44A 50 push ax 0 0000A44B FF7608 push word ptr [bp+8] 0 0000A44E 53 push bx 0 0000A44F FF7606 push word ptr [bp+6] 0 0000A452 53 push bx 0 0000A453 895EFE mov word ptr [bp-2], bx 0 0000A456 E8[FEFF] call _fmemcpy 610 #APP 611 ;# 150 "../hdr/portab.h" 1 612 cli 613 ;# 0 "" 2 614 #NO_APP 0 0000A45A BE8800 mov si, 136 0 0000A45D 8B5EFE mov bx, word ptr [bp-2] 0 0000A460 8EC3 mov es, bx 0 0000A462 268B14 mov dx, word ptr es:[si] 0 0000A465 268B4402 mov ax, word ptr es:[si+2] 620 #APP 621 ;# 154 "../hdr/portab.h" 1 622 sti 623 ;# 0 "" 2 624 #NO_APP 0 0000A46A 8E4606 mov es, word ptr [bp+6] 0 0000A46D 2689570A mov word ptr es:[bx+10], dx 0 0000A471 8E4606 mov es, word ptr [bp+6] 0 0000A474 2689470C mov word ptr es:[bx+12], ax 629 #APP 630 ;# 150 "../hdr/portab.h" 1 631 cli 632 ;# 0 "" 2 633 #NO_APP 0 0000A479 BE8C00 mov si, 140 0 0000A47C 8EC3 mov es, bx 0 0000A47E 268B14 mov dx, word ptr es:[si] 0 0000A481 268B4402 mov ax, word ptr es:[si+2] 638 #APP 639 ;# 154 "../hdr/portab.h" 1 640 sti 641 ;# 0 "" 2 642 #NO_APP 0 0000A486 8E4606 mov es, word ptr [bp+6] 0 0000A489 2689570E mov word ptr es:[bx+14], dx 0 0000A48D 8E4606 mov es, word ptr [bp+6] 0 0000A490 26894710 mov word ptr es:[bx+16], ax 647 #APP 648 ;# 150 "../hdr/portab.h" 1 649 cli 650 ;# 0 "" 2 651 #NO_APP 0 0000A495 BE9000 mov si, 144 0 0000A498 8EC3 mov es, bx 0 0000A49A 268B14 mov dx, word ptr es:[si] 0 0000A49D 268B4402 mov ax, word ptr es:[si+2] 656 #APP 657 ;# 154 "../hdr/portab.h" 1 658 sti 659 ;# 0 "" 2 660 #NO_APP 0 0000A4A2 8E4606 mov es, word ptr [bp+6] 0 0000A4A5 26895712 mov word ptr es:[bx+18], dx 0 0000A4A9 8E4606 mov es, word ptr [bp+6] 0 0000A4AC 26894714 mov word ptr es:[bx+20], ax 0 0000A4B0 8B16[0000] mov dx, word ptr [_os_setver_minor] 0 0000A4B4 B108 mov cl, 8 0 0000A4B6 D3E2 shl dx, cl 0 0000A4B8 A0[0000] mov al, byte ptr [_os_setver_major] 0 0000A4BB 98 cbw 0 0000A4BC 01C2 add dx, ax 0 0000A4BE 8E4606 mov es, word ptr [bp+6] 0 0000A4C1 26895740 mov word ptr es:[bx+64], dx 0 0000A4C5 89EC mov sp, bp 0 0000A4C7 5D pop bp 0 0000A4C8 5E pop si 0 0000A4C9 C20400 ret 4 677 .size _new_psp, .-_new_psp 678 .global _child_psp 679 .type _child_psp, @function 680 _child_psp: 0 0000A4CC 56 push si 0 0000A4CD 57 push di 0 0000A4CE 55 push bp 0 0000A4CF 89E5 mov bp, sp 0 0000A4D1 1E push ds 0 0000A4D2 1E push ds 0 0000A4D3 8B7608 mov si, word ptr [bp+8] 0 0000A4D6 31FF xor di, di 0 0000A4D8 FF760A push word ptr [bp+10] 0 0000A4DB 56 push si 0 0000A4DC E8[FEFF] call _new_psp 0 0000A4DF A1[0000] mov ax, word ptr [_cu_psp] 0 0000A4E2 8EC6 mov es, si 0 0000A4E4 26A31600 mov word ptr es:[22], ax 0 0000A4E8 26897D38 mov word ptr es:[di+56], di 0 0000A4EC 8B460A mov ax, word ptr [bp+10] 0 0000A4EF 26A33A00 mov word ptr es:[58], ax 0 0000A4F3 8B460C mov ax, word ptr [bp+12] 0 0000A4F6 26A30200 mov word ptr es:[2], ax 0 0000A4FA 26C70632001400 mov word ptr es:[50], 20 0 0000A501 B91800 mov cx, 24 0 0000A504 BA1400 mov dx, 20 0 0000A507 52 push dx 0 0000A508 8956FC mov word ptr [bp-4], dx 0 0000A50B B8FF00 mov ax, 255 0 0000A50E 50 push ax 0 0000A50F 56 push si 0 0000A510 51 push cx 0 0000A511 894EFE mov word ptr [bp-2], cx 0 0000A514 E8[FEFF] call _fmemset 0 0000A517 8EC6 mov es, si 0 0000A519 8B4EFE mov cx, word ptr [bp-2] 0 0000A51C 26890E3400 mov word ptr es:[52], cx 0 0000A521 2689363600 mov word ptr es:[54], si 0 0000A526 8B56FC mov dx, word ptr [bp-4] 0 0000A529 8956FE mov word ptr [bp-2], dx 717 _.L112: 0 0000A52C 57 push di 0 0000A52D E8[FEFF] call _CloneHandle 0 0000A530 85C0 test ax, ax 0 0000A532 7C1C jl _.L111 0 0000A534 8E460A mov es, word ptr [bp+10] 0 0000A537 26A13600 mov ax, word ptr es:[54] 0 0000A53B 8946FC mov word ptr [bp-4], ax 0 0000A53E 89FB mov bx, di 0 0000A540 26031E3400 add bx, word ptr es:[52] 0 0000A545 8EC0 mov es, ax 0 0000A547 268A07 mov al, byte ptr es:[bx] 0 0000A54A 8EC6 mov es, si 0 0000A54C 26884518 mov byte ptr es:[di+24], al 731 _.L111: 0 0000A550 47 inc di 0 0000A551 FF4EFE dec word ptr [bp-2] 0 0000A554 75D6 jne _.L112 0 0000A556 8EC6 mov es, si 0 0000A558 8A46FE mov al, byte ptr [bp-2] 0 0000A55B 26A25C00 mov byte ptr es:[92], al 0 0000A55F BA0B00 mov dx, 11 0 0000A562 52 push dx 0 0000A563 8956FC mov word ptr [bp-4], dx 0 0000A566 BF2000 mov di, 32 0 0000A569 57 push di 0 0000A56A 56 push si 0 0000A56B B85D00 mov ax, 93 0 0000A56E 50 push ax 0 0000A56F E8[FEFF] call _fmemset 0 0000A572 8EC6 mov es, si 0 0000A574 8A46FE mov al, byte ptr [bp-2] 0 0000A577 26A26C00 mov byte ptr es:[108], al 0 0000A57B 8B56FC mov dx, word ptr [bp-4] 0 0000A57E 52 push dx 0 0000A57F 57 push di 0 0000A580 56 push si 0 0000A581 B86D00 mov ax, 109 0 0000A584 50 push ax 0 0000A585 E8[FEFF] call _fmemset 0 0000A588 8EC6 mov es, si 0 0000A58A 8A46FE mov al, byte ptr [bp-2] 0 0000A58D 26A28000 mov byte ptr es:[128], al 0 0000A591 26C60681000D mov byte ptr es:[129], 13 0 0000A597 89EC mov sp, bp 0 0000A599 5D pop bp 0 0000A59A 5F pop di 0 0000A59B 5E pop si 0 0000A59C C20600 ret 6 766 .size _child_psp, .-_child_psp 767 .global _DosComLoader 768 .type _DosComLoader, @function 769 _DosComLoader: 0 0000A59F 56 push si 0 0000A5A0 57 push di 0 0000A5A1 55 push bp 0 0000A5A2 89E5 mov bp, sp 0 0000A5A4 83EC12 sub sp, 18 0 0000A5A7 C44608 les ax, dword ptr [bp+8] 0 0000A5AA 8946F4 mov word ptr [bp-12], ax 0 0000A5AD 8C46F2 mov word ptr [bp-14], es 0 0000A5B0 C746FE0000 mov word ptr [bp-2], 0 0 0000A5B5 FF7610 push word ptr [bp+16] 0 0000A5B8 E8[FEFF] call _SftGetFsize 0 0000A5BB 85D2 test dx, dx 0 0000A5BD 7403E9A401 jne _.L130 0 0000A5C2 3DFFFD cmp ax, -513 0 0000A5C5 7603E99C01 ja _.L130 0 0000A5CA B104 mov cl, 4 0 0000A5CC D3E8 shr ax, cl 0 0000A5CE 83C010 add ax, 16 0 0000A5D1 96 xchg si, ax 789 _.L116: 0 0000A5D2 8B7E0E mov di, word ptr [bp+14] 0 0000A5D5 83E77F and di, 127 0 0000A5D8 83FF03 cmp di, 3 0 0000A5DB 7503E98C01 je _.L118 0 0000A5E0 A0[0000] mov al, byte ptr [_uppermem_link] 0 0000A5E3 8846F1 mov byte ptr [bp-15], al 0 0000A5E6 A0[0000] mov al, byte ptr [_mem_access_mode] 0 0000A5E9 8846F8 mov byte ptr [bp-8], al 0 0000A5EC 8B460E mov ax, word ptr [bp+14] 0 0000A5EF 258000 and ax, 128 0 0000A5F2 8946F6 mov word ptr [bp-10], ax 0 0000A5F5 740F je _.L119 0 0000A5F7 8A46F8 mov al, byte ptr [bp-8] 0 0000A5FA 0C80 or al, -128 0 0000A5FC A2[0000] mov byte ptr [_mem_access_mode], al 0 0000A5FF B80100 mov ax, 1 0 0000A602 50 push ax 0 0000A603 E8[FEFF] call _DosUmbLink 808 _.L119: 0 0000A606 FF76F2 push word ptr [bp-14] 0 0000A609 FF76F4 push word ptr [bp-12] 0 0000A60C 8D46FC lea ax, [-4+bp] 0 0000A60F 50 push ax 0 0000A610 FF760C push word ptr [bp+12] 0 0000A613 E8E3F9 call _ChildEnv 0 0000A616 89C2 mov dx, ax 0 0000A618 85C0 test ax, ax 0 0000A61A 7522 jne _.L120 0 0000A61C 56 push si 0 0000A61D 8D76FE lea si, [-2+bp] 0 0000A620 56 push si 0 0000A621 E8A7FA call _ExecMemLargest 0 0000A624 89C2 mov dx, ax 0 0000A626 85C0 test ax, ax 0 0000A628 7514 jne _.L120 0 0000A62A 56 push si 0 0000A62B 8D46FA lea ax, [-6+bp] 0 0000A62E 50 push ax 0 0000A62F FF76FE push word ptr [bp-2] 0 0000A632 E845F9 call _ExecMemAlloc 0 0000A635 89C2 mov dx, ax 0 0000A637 85C0 test ax, ax 0 0000A639 7503E94A01 je _.L121 833 _.L120: 0 0000A63E 8956EE mov word ptr [bp-18], dx 0 0000A641 FF76FC push word ptr [bp-4] 0 0000A644 E8[FEFF] call _DosMemFree 0 0000A647 837EF600 cmp word ptr [bp-10], 0 0 0000A64B 8B56EE mov dx, word ptr [bp-18] 0 0000A64E 7503E90A01 je _.L115 840 _.L128: 0 0000A653 8956F6 mov word ptr [bp-10], dx 0 0000A656 8A46F1 mov al, byte ptr [bp-15] 0 0000A659 30E4 xor ah, ah 0 0000A65B 50 push ax 0 0000A65C E8[FEFF] call _DosUmbLink 0 0000A65F 8A46F8 mov al, byte ptr [bp-8] 0 0000A662 A2[0000] mov byte ptr [_mem_access_mode], al 0 0000A665 8B56F6 mov dx, word ptr [bp-10] 0 0000A668 85D2 test dx, dx 0 0000A66A 7403E9EE00 jne _.L115 851 _.L129: 0 0000A66F FF46FA inc word ptr [bp-6] 0 0000A672 897E0E mov word ptr [bp+14], di 854 _.L123: 0 0000A675 837E0E03 cmp word ptr [bp+14], 3 0 0000A679 8B7EFA mov di, word ptr [bp-6] 0 0000A67C BE0000 mov si, 0 0 0000A67F 7403E9F300 jne _.L124 0 0000A684 89F2 mov dx, si 860 _.L125: 0 0000A686 8956F8 mov word ptr [bp-8], dx 0 0000A689 56 push si 0 0000A68A 56 push si 0 0000A68B 56 push si 0 0000A68C FF7610 push word ptr [bp+16] 0 0000A68F E8[FEFF] call _SftSeek 0 0000A692 837E0E03 cmp word ptr [bp+14], 3 0 0000A696 8B56F8 mov dx, word ptr [bp-8] 0 0000A699 7503E9DF00 je _.L131 0 0000A69E B800FF mov ax, -256 871 _.L126: 0 0000A6A1 B90100 mov cx, 1 0 0000A6A4 51 push cx 0 0000A6A5 57 push di 0 0000A6A6 52 push dx 0 0000A6A7 50 push ax 0 0000A6A8 FF7610 push word ptr [bp+16] 0 0000A6AB E8[FEFF] call _DosRWSft 0 0000A6AE 56 push si 0 0000A6AF FF7610 push word ptr [bp+16] 0 0000A6B2 E8[FEFF] call _DosCloseSft 0 0000A6B5 837E0E03 cmp word ptr [bp+14], 3 0 0000A6B9 7503E99D00 je _.L132 884 #APP 885 ;# 150 "../hdr/portab.h" 1 886 cli 887 ;# 0 "" 2 888 #NO_APP 0 0000A6BF C41E[0000] les bx, dword ptr [_user_r] 0 0000A6C3 8CC2 mov dx, es 0 0000A6C5 268B4712 mov ax, word ptr es:[bx+18] 0 0000A6C9 8EC6 mov es, si 0 0000A6CB 26A38800 mov word ptr es:[136], ax 0 0000A6CF 8EC2 mov es, dx 0 0000A6D1 268B4714 mov ax, word ptr es:[bx+20] 0 0000A6D5 8EC6 mov es, si 0 0000A6D7 26A38A00 mov word ptr es:[138], ax 898 #APP 899 ;# 154 "../hdr/portab.h" 1 900 sti 901 ;# 0 "" 2 902 #NO_APP 0 0000A6DC 8B46FA mov ax, word ptr [bp-6] 0 0000A6DF 89C2 mov dx, ax 0 0000A6E1 0356FE add dx, word ptr [bp-2] 0 0000A6E4 52 push dx 0 0000A6E5 FF36[0000] push word ptr [_cu_psp] 0 0000A6E9 50 push ax 0 0000A6EA E8[FEFF] call _child_psp 0 0000A6ED FF76F2 push word ptr [bp-14] 0 0000A6F0 FF76F4 push word ptr [bp-12] 0 0000A6F3 16 push ss 0 0000A6F4 FF760C push word ptr [bp+12] 0 0000A6F7 FF76FC push word ptr [bp-4] 0 0000A6FA 8B46FA mov ax, word ptr [bp-6] 0 0000A6FD 48 dec ax 0 0000A6FE 50 push ax 0 0000A6FF E811FA call _patchPSP 0 0000A702 817EFE0010 cmp word ptr [bp-2], 4096 0 0000A707 7605 jbe _.L127 0 0000A709 C746FE0010 mov word ptr [bp-2], 4096 922 _.L127: 0 0000A70E 8B5EFE mov bx, word ptr [bp-2] 0 0000A711 83FB10 cmp bx, 16 0 0000A714 766D jbe _.L133 0 0000A716 83C3EF add bx, -17 0 0000A719 8E46FA mov es, word ptr [bp-6] 0 0000A71C 89DA mov dx, bx 0 0000A71E B104 mov cl, 4 0 0000A720 D3E2 shl dx, cl 0 0000A722 BF0C00 mov di, 12 0 0000A725 29DF sub di, bx 0 0000A727 2689160600 mov word ptr es:[6], dx 0 0000A72C 26893E0800 mov word ptr es:[8], di 0 0000A731 81C20E01 add dx, 270 0 0000A735 89D3 mov bx, dx 0 0000A737 8956FE mov word ptr [bp-2], dx 0 0000A73A 8B7E0C mov di, word ptr [bp+12] 0 0000A73D 89550E mov word ptr [di+14], dx 0 0000A740 8C4510 mov word ptr [di+16], es 0 0000A743 C745120001 mov word ptr [di+18], 256 0 0000A748 8C4514 mov word ptr [di+20], es 0 0000A74B 268937 mov word ptr es:[bx], si 0 0000A74E FF760E push word ptr [bp+14] 0 0000A751 50 push ax 0 0000A752 FF760C push word ptr [bp+12] 0 0000A755 FF76FA push word ptr [bp-6] 0 0000A758 E8A9FB call _load_transfer 949 _.L132: 0 0000A75B 31D2 xor dx, dx 951 _.L115: 0 0000A75D 92 xchg dx, ax 0 0000A75E 89EC mov sp, bp 0 0000A760 5D pop bp 0 0000A761 5F pop di 0 0000A762 5E pop si 0 0000A763 C20A00 ret 10 958 _.L130: 0 0000A766 BEF00F mov si, 4080 0 0000A769 E966FE jmp _.L116 961 _.L118: 0 0000A76C 8B5E0C mov bx, word ptr [bp+12] 0 0000A76F 8B07 mov ax, word ptr [bx] 0 0000A771 8946FA mov word ptr [bp-6], ax 0 0000A774 E9FEFE jmp _.L123 966 _.L124: 0 0000A777 BA0001 mov dx, 256 0 0000A77A E909FF jmp _.L125 969 _.L131: 0 0000A77D B8FEFF mov ax, -2 0 0000A780 E91EFF jmp _.L126 972 _.L133: 0 0000A783 BAF8FF mov dx, -8 0 0000A786 EBD5 jmp _.L115 975 _.L121: 0 0000A788 837EF600 cmp word ptr [bp-10], 0 0 0000A78C 7403E9C2FE jne _.L128 0 0000A791 8B7E0E mov di, word ptr [bp+14] 0 0000A794 E9D8FE jmp _.L129 980 .size _DosComLoader, .-_DosComLoader 981 .global _return_user 982 .type _return_user, @function 983 _return_user: 0 0000A797 56 push si 0 0000A798 57 push di 0 0000A799 55 push bp 0 0000A79A 89E5 mov bp, sp 0 0000A79C 1E push ds 0 0000A79D A1[0000] mov ax, word ptr [_cu_psp] 0 0000A7A0 8946FE mov word ptr [bp-2], ax 0 0000A7A3 31F6 xor si, si 0 0000A7A5 8EC0 mov es, ax 0 0000A7A7 268B160A00 mov dx, word ptr es:[10] 0 0000A7AC 26A10C00 mov ax, word ptr es:[12] 995 #APP 996 ;# 150 "../hdr/portab.h" 1 997 cli 998 ;# 0 "" 2 999 #NO_APP 0 0000A7B1 8EC6 mov es, si 0 0000A7B3 2689168800 mov word ptr es:[136], dx 0 0000A7B8 26A38A00 mov word ptr es:[138], ax 1003 #APP 1004 ;# 154 "../hdr/portab.h" 1 1005 sti 1006 ;# 0 "" 2 1007 #NO_APP 0 0000A7BD 8E46FE mov es, word ptr [bp-2] 0 0000A7C0 268B160E00 mov dx, word ptr es:[14] 0 0000A7C5 26A11000 mov ax, word ptr es:[16] 1011 #APP 1012 ;# 150 "../hdr/portab.h" 1 1013 cli 1014 ;# 0 "" 2 1015 #NO_APP 0 0000A7CA 8EC6 mov es, si 0 0000A7CC 2689168C00 mov word ptr es:[140], dx 0 0000A7D1 26A38E00 mov word ptr es:[142], ax 1019 #APP 1020 ;# 154 "../hdr/portab.h" 1 1021 sti 1022 ;# 0 "" 2 1023 #NO_APP 0 0000A7D6 8E46FE mov es, word ptr [bp-2] 0 0000A7D9 268B161200 mov dx, word ptr es:[18] 0 0000A7DE 26A11400 mov ax, word ptr es:[20] 1027 #APP 1028 ;# 150 "../hdr/portab.h" 1 1029 cli 1030 ;# 0 "" 2 1031 #NO_APP 0 0000A7E3 8EC6 mov es, si 0 0000A7E5 2689169000 mov word ptr es:[144], dx 0 0000A7EA 26A39200 mov word ptr es:[146], ax 1035 #APP 1036 ;# 154 "../hdr/portab.h" 1 1037 sti 1038 ;# 0 "" 2 1039 #NO_APP 0 0000A7EF C606[0000]FF mov byte ptr [_abort_progress], -1 0 0000A7F4 B82211 mov ax, 4386 0 0000A7F7 50 push ax 0 0000A7F8 E8[FEFF] call _network_redirector 0 0000A7FB 803E[0000]03 cmp byte ptr [_term_type], 3 0 0000A800 742A je _.L143 0 0000A802 8E46FE mov es, word ptr [bp-2] 0 0000A805 26A11600 mov ax, word ptr es:[22] 0 0000A809 3B06[0000] cmp ax, word ptr [_cu_psp] 0 0000A80D 741D je _.L143 0 0000A80F B81D11 mov ax, 4381 0 0000A812 50 push ax 0 0000A813 E8[FEFF] call _network_redirector 0 0000A816 89F7 mov di, si 1054 _.L144: 0 0000A818 8E46FE mov es, word ptr [bp-2] 0 0000A81B 26393E3200 cmp word ptr es:[50], di 0 0000A820 776B ja _.L145 0 0000A822 E8[FEFF] call _FcbCloseAll 0 0000A825 FF36[0000] push word ptr [_cu_psp] 0 0000A829 E8[FEFF] call _FreeProcessMem 1061 _.L143: 0 0000A82C 8E46FE mov es, word ptr [bp-2] 0 0000A82F 26A11600 mov ax, word ptr es:[22] 0 0000A833 A3[0000] mov word ptr [_cu_psp], ax 0 0000A836 C606[0000]00 mov byte ptr [_abort_progress], 0 0 0000A83B 8EC0 mov es, ax 0 0000A83D 268B1E2E00 mov bx, word ptr es:[46] 0 0000A842 268B0E3000 mov cx, word ptr es:[48] 0 0000A847 8E46FE mov es, word ptr [bp-2] 0 0000A84A 268B160C00 mov dx, word ptr es:[12] 0 0000A84F 8EC1 mov es, cx 0 0000A851 26895714 mov word ptr es:[bx+20], dx 0 0000A855 8E46FE mov es, word ptr [bp-2] 0 0000A858 268B160A00 mov dx, word ptr es:[10] 0 0000A85D 8EC1 mov es, cx 0 0000A85F 26895712 mov word ptr es:[bx+18], dx 0 0000A863 26C747160002 mov word ptr es:[bx+22], 512 0 0000A869 8A16[0000] mov dl, byte ptr [_InDOS] 0 0000A86D 84D2 test dl, dl 0 0000A86F 7406 je _.L146 0 0000A871 FECA dec dl 0 0000A873 8816[0000] mov byte ptr [_InDOS], dl 1083 _.L146: 0 0000A877 56 push si 0 0000A878 8EC0 mov es, ax 0 0000A87A 26FF363000 push word ptr es:[48] 0 0000A87F 26FF362E00 push word ptr es:[46] 0 0000A884 E8[FEFF] call _exec_user 0 0000A887 89EC mov sp, bp 0 0000A889 5D pop bp 0 0000A88A 5F pop di 0 0000A88B 5E pop si 0 0000A88C C3 ret 1094 _.L145: 0 0000A88D 57 push di 0 0000A88E E8[FEFF] call _DosClose 0 0000A891 47 inc di 0 0000A892 EB84 jmp _.L144 1099 .size _return_user, .-_return_user 1100 .global _DosExeLoader 1101 .type _DosExeLoader, @function 1102 _DosExeLoader: 0 0000A894 56 push si 0 0000A895 57 push di 0 0000A896 55 push bp 0 0000A897 89E5 mov bp, sp 0 0000A899 83EC1C sub sp, 28 0 0000A89C C44608 les ax, dword ptr [bp+8] 0 0000A89F 8946EA mov word ptr [bp-22], ax 0 0000A8A2 8C46E8 mov word ptr [bp-24], es 0 0000A8A5 8B760E mov si, word ptr [bp+14] 0 0000A8A8 C746FA0000 mov word ptr [bp-6], 0 0 0000A8AD BB[0000] mov bx, offset __SecPathBuffer 0 0000A8B0 8B4704 mov ax, word ptr [bx+4] 0 0000A8B3 B105 mov cl, 5 0 0000A8B5 D3E0 shl ax, cl 0 0000A8B7 2B4708 sub ax, word ptr [bx+8] 0 0000A8BA 8946EE mov word ptr [bp-18], ax 0 0000A8BD 89F0 mov ax, si 0 0000A8BF 83E07F and ax, 127 0 0000A8C2 8946F2 mov word ptr [bp-14], ax 0 0000A8C5 83F803 cmp ax, 3 0 0000A8C8 89DF mov di, bx 0 0000A8CA 7503E9FB00 je _.L152 0 0000A8CF A0[0000] mov al, byte ptr [_uppermem_link] 0 0000A8D2 8846F0 mov byte ptr [bp-16], al 0 0000A8D5 A0[0000] mov al, byte ptr [_mem_access_mode] 0 0000A8D8 8846EC mov byte ptr [bp-20], al 0 0000A8DB 8346EE10 add word ptr [bp-18], 16 0 0000A8DF 8B46EE mov ax, word ptr [bp-18] 0 0000A8E2 03470A add ax, word ptr [bx+10] 0 0000A8E5 8946E6 mov word ptr [bp-26], ax 0 0000A8E8 7303E96202 jc _.L179 0 0000A8ED 81E68000 and si, 128 0 0000A8F1 740C je _.L154 0 0000A8F3 B80100 mov ax, 1 0 0000A8F6 50 push ax 0 0000A8F7 E8[FEFF] call _DosUmbLink 0 0000A8FA 800E[0000]80 or byte ptr [_mem_access_mode], -128 1140 _.L154: 0 0000A8FF FF76E8 push word ptr [bp-24] 0 0000A902 FF76EA push word ptr [bp-22] 0 0000A905 8D46F8 lea ax, [-8+bp] 0 0000A908 50 push ax 0 0000A909 FF760C push word ptr [bp+12] 0 0000A90C E8EAF6 call _ChildEnv 0 0000A90F 8946F4 mov word ptr [bp-12], ax 0 0000A912 85C0 test ax, ax 0 0000A914 750D jne _.L155 0 0000A916 FF76E6 push word ptr [bp-26] 0 0000A919 8D46FA lea ax, [-6+bp] 0 0000A91C 50 push ax 0 0000A91D E8ABF7 call _ExecMemLargest 0 0000A920 8946F4 mov word ptr [bp-12], ax 1155 _.L155: 0 0000A923 8B4D0C mov cx, word ptr [di+12] 0 0000A926 8B46EE mov ax, word ptr [bp-18] 0 0000A929 01C8 add ax, cx 0 0000A92B 8B56FA mov dx, word ptr [bp-6] 0 0000A92E 39D0 cmp ax, dx 0 0000A930 7705 ja _.L182 0 0000A932 3946EE cmp word ptr [bp-18], ax 0 0000A935 7602 jbe _.L156 1164 _.L182: 0 0000A937 89D0 mov ax, dx 1166 _.L156: 0 0000A939 0B4D0A or cx, word ptr [di+10] 0 0000A93C 7501 jne _.L160 0 0000A93E 92 xchg dx, ax 1170 _.L160: 0 0000A93F 837EF400 cmp word ptr [bp-12], 0 0 0000A943 7516 jne _.L161 0 0000A945 8D56FA lea dx, [-6+bp] 0 0000A948 52 push dx 0 0000A949 8D56F6 lea dx, [-10+bp] 0 0000A94C 52 push dx 0 0000A94D 50 push ax 0 0000A94E E829F6 call _ExecMemAlloc 0 0000A951 8946F4 mov word ptr [bp-12], ax 0 0000A954 85C0 test ax, ax 0 0000A956 7503E9FB01 je _.L162 1182 _.L161: 0 0000A95B FF76F8 push word ptr [bp-8] 0 0000A95E E8[FEFF] call _DosMemFree 0 0000A961 85F6 test si, si 0 0000A963 7503E98C01 je _.L151 1187 _.L177: 0 0000A968 8A46EC mov al, byte ptr [bp-20] 0 0000A96B A2[0000] mov byte ptr [_mem_access_mode], al 0 0000A96E 8A46F0 mov al, byte ptr [bp-16] 0 0000A971 30E4 xor ah, ah 0 0000A973 50 push ax 0 0000A974 E8[FEFF] call _DosUmbLink 0 0000A977 837EF400 cmp word ptr [bp-12], 0 0 0000A97B 7403E97401 jne _.L151 1196 _.L178: 0 0000A980 FF46F6 inc word ptr [bp-10] 1198 _.L163: 0 0000A983 31F6 xor si, si 0 0000A985 56 push si 0 0000A986 8B4508 mov ax, word ptr [di+8] 0 0000A989 89C2 mov dx, ax 0 0000A98B B10C mov cl, 12 0 0000A98D D3EA shr dx, cl 0 0000A98F B104 mov cl, 4 0 0000A991 D3E0 shl ax, cl 0 0000A993 884EF0 mov byte ptr [bp-16], cl 0 0000A996 52 push dx 0 0000A997 50 push ax 0 0000A998 FF7610 push word ptr [bp+16] 0 0000A99B E8[FEFF] call _SftSeek 0 0000A99E 8946F4 mov word ptr [bp-12], ax 0 0000A9A1 39F0 cmp ax, si 0 0000A9A3 8976EC mov word ptr [bp-20], si 0 0000A9A6 8A4EF0 mov cl, byte ptr [bp-16] 0 0000A9A9 742C je _.L164 1217 _.L183: 0 0000A9AB 837EF203 cmp word ptr [bp-14], 3 0 0000A9AF 7411 je _.L180 0 0000A9B1 8B46F6 mov ax, word ptr [bp-10] 0 0000A9B4 48 dec ax 0 0000A9B5 8946F6 mov word ptr [bp-10], ax 0 0000A9B8 50 push ax 0 0000A9B9 E8[FEFF] call _DosMemFree 0 0000A9BC FF76F8 push word ptr [bp-8] 0 0000A9BF E8[FEFF] call _DosMemFree 1227 _.L180: 0 0000A9C2 C746F4F3FF mov word ptr [bp-12], -13 0 0000A9C7 E92A01 jmp _.L151 1230 _.L152: 0 0000A9CA 8B5E0C mov bx, word ptr [bp+12] 0 0000A9CD 8B17 mov dx, word ptr [bx] 0 0000A9CF 8956F6 mov word ptr [bp-10], dx 0 0000A9D2 8976F2 mov word ptr [bp-14], si 0 0000A9D5 EBAC jmp _.L163 1236 _.L164: 0 0000A9D7 8B56F6 mov dx, word ptr [bp-10] 0 0000A9DA 8B76EE mov si, word ptr [bp-18] 0 0000A9DD 8956F0 mov word ptr [bp-16], dx 0 0000A9E0 837EF203 cmp word ptr [bp-14], 3 0 0000A9E4 7426 je _.L165 0 0000A9E6 89D0 mov ax, dx 0 0000A9E8 83C010 add ax, 16 0 0000A9EB 8946F0 mov word ptr [bp-16], ax 0 0000A9EE 83C6F0 add si, -16 0 0000A9F1 7419 je _.L165 0 0000A9F3 8B450C mov ax, word ptr [di+12] 0 0000A9F6 0B450A or ax, word ptr [di+10] 0 0000A9F9 7511 jne _.L165 0 0000A9FB 4A dec dx 0 0000A9FC 8EC2 mov es, dx 0 0000A9FE 8B46F0 mov ax, word ptr [bp-16] 0 0000AA01 2603060300 add ax, word ptr es:[3] 0 0000AA06 2B46EE sub ax, word ptr [bp-18] 0 0000AA09 8946F0 mov word ptr [bp-16], ax 1256 _.L165: 0 0000AA0C 89F0 mov ax, si 0 0000AA0E D3E0 shl ax, cl 0 0000AA10 8946EE mov word ptr [bp-18], ax 0 0000AA13 8B5EF0 mov bx, word ptr [bp-16] 0 0000AA16 B9007E mov cx, 32256 1262 _.L169: 0 0000AA19 81FEDF07 cmp si, 2015 0 0000AA1D 7703 ja _.L166 0 0000AA1F 8B4EEE mov cx, word ptr [bp-18] 1266 _.L166: 0 0000AA22 B80100 mov ax, 1 0 0000AA25 50 push ax 0 0000AA26 53 push bx 0 0000AA27 895EE4 mov word ptr [bp-28], bx 0 0000AA2A FF76EC push word ptr [bp-20] 0 0000AA2D 51 push cx 0 0000AA2E 894EE6 mov word ptr [bp-26], cx 0 0000AA31 FF7610 push word ptr [bp+16] 0 0000AA34 E8[FEFF] call _DosRWSft 0 0000AA37 8046EF82 add byte ptr [bp-17], -126 0 0000AA3B 8B4EE6 mov cx, word ptr [bp-26] 0 0000AA3E 39C1 cmp cx, ax 0 0000AA40 C746E60100 mov word ptr [bp-26], 1 0 0000AA45 7F13 jg _.L167 0 0000AA47 81FEE107 cmp si, 2016+1 0 0000AA4B 720D jc _.L167 0 0000AA4D 8B5EE4 mov bx, word ptr [bp-28] 0 0000AA50 81C3E007 add bx, 2016 0 0000AA54 81C620F8 add si, -2016 0 0000AA58 EBBF jmp _.L169 1287 _.L167: 0 0000AA5A FF76EC push word ptr [bp-20] 0 0000AA5D FF76EC push word ptr [bp-20] 0 0000AA60 FF7518 push word ptr [di+24] 0 0000AA63 FF7610 push word ptr [bp+16] 0 0000AA66 E8[FEFF] call _SftSeek 0 0000AA69 31F6 xor si, si 1294 _.L170: 0 0000AA6B 397506 cmp word ptr [di+6], si 0 0000AA6E 7603E98C00 ja _.L176 0 0000AA73 FF76EC push word ptr [bp-20] 0 0000AA76 FF7610 push word ptr [bp+16] 0 0000AA79 E8[FEFF] call _DosCloseSft 0 0000AA7C 837EF203 cmp word ptr [bp-14], 3 0 0000AA80 7472 je _.L151 1302 #APP 1303 ;# 150 "../hdr/portab.h" 1 1304 cli 1305 ;# 0 "" 2 1306 #NO_APP 0 0000AA83 C41E[0000] les bx, dword ptr [_user_r] 0 0000AA87 8CC2 mov dx, es 0 0000AA89 268B4712 mov ax, word ptr es:[bx+18] 0 0000AA8D 8E46EC mov es, word ptr [bp-20] 0 0000AA90 26A38800 mov word ptr es:[136], ax 0 0000AA94 8EC2 mov es, dx 0 0000AA96 268B4714 mov ax, word ptr es:[bx+20] 0 0000AA9A 8E46EC mov es, word ptr [bp-20] 0 0000AA9D 26A38A00 mov word ptr es:[138], ax 1316 #APP 1317 ;# 154 "../hdr/portab.h" 1 1318 sti 1319 ;# 0 "" 2 1320 #NO_APP 0 0000AAA2 8B46F6 mov ax, word ptr [bp-10] 0 0000AAA5 89C2 mov dx, ax 0 0000AAA7 0356FA add dx, word ptr [bp-6] 0 0000AAAA 52 push dx 0 0000AAAB FF36[0000] push word ptr [_cu_psp] 0 0000AAAF 50 push ax 0 0000AAB0 E8[FEFF] call _child_psp 0 0000AAB3 FF76E8 push word ptr [bp-24] 0 0000AAB6 FF76EA push word ptr [bp-22] 0 0000AAB9 16 push ss 0 0000AABA FF760C push word ptr [bp+12] 0 0000AABD FF76F8 push word ptr [bp-8] 0 0000AAC0 8B46F6 mov ax, word ptr [bp-10] 0 0000AAC3 48 dec ax 0 0000AAC4 50 push ax 0 0000AAC5 E84BF6 call _patchPSP 0 0000AAC8 8B4EF0 mov cx, word ptr [bp-16] 0 0000AACB 034D0E add cx, word ptr [di+14] 0 0000AACE 8B5510 mov dx, word ptr [di+16] 0 0000AAD1 8B5E0C mov bx, word ptr [bp+12] 0 0000AAD4 89570E mov word ptr [bx+14], dx 0 0000AAD7 894F10 mov word ptr [bx+16], cx 0 0000AADA 8B56F0 mov dx, word ptr [bp-16] 0 0000AADD 035516 add dx, word ptr [di+22] 0 0000AAE0 8B4D14 mov cx, word ptr [di+20] 0 0000AAE3 894F12 mov word ptr [bx+18], cx 0 0000AAE6 895714 mov word ptr [bx+20], dx 0 0000AAE9 FF76F2 push word ptr [bp-14] 0 0000AAEC 50 push ax 0 0000AAED 53 push bx 0 0000AAEE FF76F6 push word ptr [bp-10] 0 0000AAF1 E810F8 call _load_transfer 1353 _.L151: 0 0000AAF4 8B46F4 mov ax, word ptr [bp-12] 0 0000AAF7 89EC mov sp, bp 0 0000AAF9 5D pop bp 0 0000AAFA 5F pop di 0 0000AAFB 5E pop si 0 0000AAFC C20A00 ret 10 1360 _.L176: 0 0000AAFF FF76E6 push word ptr [bp-26] 0 0000AB02 8D46FC lea ax, [-4+bp] 0 0000AB05 16 push ss 0 0000AB06 50 push ax 0 0000AB07 B80400 mov ax, 4 0 0000AB0A 50 push ax 0 0000AB0B FF7610 push word ptr [bp+16] 0 0000AB0E E8[FEFF] call _DosRWSft 0 0000AB11 83F804 cmp ax, 4 0 0000AB14 7403E992FE jne _.L183 0 0000AB19 85D2 test dx, dx 0 0000AB1B 7403E98BFE jne _.L183 0 0000AB20 837EF203 cmp word ptr [bp-14], 3 0 0000AB24 8B46FE mov ax, word ptr [bp-2] 0 0000AB27 8B4EFC mov cx, word ptr [bp-4] 0 0000AB2A 7514 jne _.L174 0 0000AB2C 0346F6 add ax, word ptr [bp-10] 0 0000AB2F 8B5E0C mov bx, word ptr [bp+12] 0 0000AB32 8B5702 mov dx, word ptr [bx+2] 0 0000AB35 8EC0 mov es, ax 0 0000AB37 89CB mov bx, cx 0 0000AB39 260117 add word ptr es:[bx], dx 1383 _.L175: 0 0000AB3C 46 inc si 0 0000AB3D E92BFF jmp _.L170 1386 _.L174: 0 0000AB40 0346F0 add ax, word ptr [bp-16] 0 0000AB43 8EC0 mov es, ax 0 0000AB45 8B46F0 mov ax, word ptr [bp-16] 0 0000AB48 89CB mov bx, cx 0 0000AB4A 260107 add word ptr es:[bx], ax 0 0000AB4D EBED jmp _.L175 1393 _.L179: 0 0000AB4F C746F4F8FF mov word ptr [bp-12], -8 0 0000AB54 EB9E jmp _.L151 1396 _.L162: 0 0000AB56 85F6 test si, si 0 0000AB58 7503E923FE je _.L178 0 0000AB5D E908FE jmp _.L177 1400 .size _DosExeLoader, .-_DosExeLoader 1401 .global _DosExec 1402 .type _DosExec, @function 1403 _DosExec: 0 0000AB60 56 push si 0 0000AB61 57 push di 0 0000AB62 55 push bp 0 0000AB63 89E5 mov bp, sp 0 0000AB65 83EC0C sub sp, 12 0 0000AB68 C4460A les ax, dword ptr [bp+10] 0 0000AB6B 8946FA mov word ptr [bp-6], ax 0 0000AB6E 8C46F8 mov word ptr [bp-8], es 0 0000AB71 8B460E mov ax, word ptr [bp+14] 0 0000AB74 8946FE mov word ptr [bp-2], ax 0 0000AB77 8B7E10 mov di, word ptr [bp+16] 0 0000AB7A 8A4608 mov al, byte ptr [bp+8] 0 0000AB7D 83E07F and ax, 127 0 0000AB80 83F803 cmp ax, 3 0 0000AB83 7E03E9C900 jg _.L217 0 0000AB88 83F802 cmp ax, 2 0 0000AB8B 7503E9C100 je _.L217 0 0000AB90 8C56FC mov word ptr [bp-4], ss 0 0000AB93 BE1600 mov si, 22 0 0000AB96 56 push si 0 0000AB97 FF76F8 push word ptr [bp-8] 0 0000AB9A FF76FA push word ptr [bp-6] 0 0000AB9D 16 push ss 0 0000AB9E B8[1C00] mov ax, offset __SecPathBuffer+28 0 0000ABA1 50 push ax 0 0000ABA2 E8[FEFF] call _fmemcpy 0 0000ABA5 57 push di 0 0000ABA6 FF76FE push word ptr [bp-2] 0 0000ABA9 E8[FEFF] call _IsDevice 0 0000ABAC 09D0 or ax, dx 0 0000ABAE 8976F6 mov word ptr [bp-10], si 0 0000ABB1 740C je _.L210 1436 _.L212: 0 0000ABB3 BAFEFF mov dx, -2 1438 _.L207: 0 0000ABB6 92 xchg dx, ax 0 0000ABB7 89EC mov sp, bp 0 0000ABB9 5D pop bp 0 0000ABBA 5F pop di 0 0000ABBB 5E pop si 0 0000ABBC C20A00 ret 10 1445 _.L210: 0 0000ABBF 50 push ax 0 0000ABC0 B80009 mov ax, 2304 0 0000ABC3 50 push ax 0 0000ABC4 57 push di 0 0000ABC5 FF76FE push word ptr [bp-2] 0 0000ABC8 E8[FEFF] call _DosOpenSft 0 0000ABCB 89C6 mov si, ax 0 0000ABCD 85C0 test ax, ax 0 0000ABCF 7CE2 jl _.L212 0 0000ABD1 B80100 mov ax, 1 0 0000ABD4 50 push ax 0 0000ABD5 BB[0000] mov bx, offset __SecPathBuffer 0 0000ABD8 16 push ss 0 0000ABD9 53 push bx 0 0000ABDA 895EF4 mov word ptr [bp-12], bx 0 0000ABDD B81C00 mov ax, 28 0 0000ABE0 50 push ax 0 0000ABE1 56 push si 0 0000ABE2 E8[FEFF] call _DosRWSft 0 0000ABE5 83F81C cmp ax, 28 0 0000ABE8 8B5EF4 mov bx, word ptr [bp-12] 0 0000ABEB 754C jne _.L213 0 0000ABED 8B07 mov ax, word ptr [bx] 0 0000ABEF 3D4D5A cmp ax, 23117 0 0000ABF2 7405 je _.L219 0 0000ABF4 3D5A4D cmp ax, 19802 0 0000ABF7 7547 jne _.L214 1473 _.L219: 0 0000ABF9 56 push si 0 0000ABFA FF7608 push word ptr [bp+8] 0 0000ABFD B8[1C00] mov ax, offset __SecPathBuffer+28 0 0000AC00 50 push ax 0 0000AC01 57 push di 0 0000AC02 FF76FE push word ptr [bp-2] 0 0000AC05 E8[FEFF] call _DosExeLoader 1481 _.L232: 0 0000AC08 92 xchg dx, ax 1483 _.L216: 0 0000AC09 8956FE mov word ptr [bp-2], dx 0 0000AC0C 31C0 xor ax, ax 0 0000AC0E 50 push ax 0 0000AC0F 56 push si 0 0000AC10 E8[FEFF] call _DosCloseSft 0 0000AC13 837E0801 cmp word ptr [bp+8], 1 0 0000AC17 8B56FE mov dx, word ptr [bp-2] 0 0000AC1A 759A jne _.L207 0 0000AC1C 85D2 test dx, dx 0 0000AC1E 7596 jne _.L207 0 0000AC20 FF76F6 push word ptr [bp-10] 0 0000AC23 FF76FC push word ptr [bp-4] 0 0000AC26 B8[1C00] mov ax, offset __SecPathBuffer+28 0 0000AC29 50 push ax 0 0000AC2A FF76F8 push word ptr [bp-8] 0 0000AC2D FF76FA push word ptr [bp-6] 0 0000AC30 E8[FEFF] call _fmemcpy 0 0000AC33 8B56FE mov dx, word ptr [bp-2] 0 0000AC36 E97DFF jmp _.L207 1503 _.L213: 0 0000AC39 BAF5FF mov dx, -11 0 0000AC3C 85C0 test ax, ax 0 0000AC3E 74C9 je _.L216 1507 _.L214: 0 0000AC40 56 push si 0 0000AC41 FF7608 push word ptr [bp+8] 0 0000AC44 B8[1C00] mov ax, offset __SecPathBuffer+28 0 0000AC47 50 push ax 0 0000AC48 57 push di 0 0000AC49 FF76FE push word ptr [bp-2] 0 0000AC4C E8[FEFF] call _DosComLoader 0 0000AC4F EBB7 jmp _.L232 1516 _.L217: 0 0000AC51 BAF5FF mov dx, -11 0 0000AC54 E95FFF jmp _.L207 1519 .size _DosExec, .-_DosExec === Switch to base=012B40h -> ".RODATA.STR1.1" 1520 .section .rodata.str1.1,"aMS",@progbits,1 1521 _.LC0: 0 00001A4A 426164206F72206D .string "Bad or missing Command Interpreter: " 0 00001A52 697373696E672043 0 00001A5A 6F6D6D616E642049 0 00001A62 6E74657270726574 0 00001A6A 65723A2000 1523 _.LC1: 0 00001A6F 20456E7465722074 .string " Enter the full shell command line: " 0 00001A77 68652066756C6C20 0 00001A7F 7368656C6C20636F 0 00001A87 6D6D616E64206C69 0 00001A8F 6E653A2000 === Switch to base=002270h -> ".TEXT" 1525 .text 1526 .global _P_0 1527 .type _P_0, @function 1528 _P_0: 0 0000AC57 56 push si 0 0000AC58 57 push di 0 0000AC59 55 push bp 0 0000AC5A 89E5 mov bp, sp 0 0000AC5C 83EC1A sub sp, 26 0 0000AC5F C45E08 les bx, dword ptr [bp+8] 0 0000AC62 8CC6 mov si, es 0 0000AC64 268A4710 mov al, byte ptr es:[bx+16] 0 0000AC68 8846E9 mov byte ptr [bp-23], al 0 0000AC6B C746F4FFFF mov word ptr [bp-12], -1 0 0000AC70 C746F6FFFF mov word ptr [bp-10], -1 0 0000AC75 C746F0FFFF mov word ptr [bp-16], -1 0 0000AC7A C746F2FFFF mov word ptr [bp-14], -1 0 0000AC7F C746EA6800 mov word ptr [bp-22], 104 0 0000AC84 268B4706 mov ax, word ptr es:[bx+6] 0 0000AC88 895EE6 mov word ptr [bp-26], bx 0 0000AC8B 06 push es 0 0000AC8C 50 push ax 0 0000AC8D BF[3200] mov di, offset __SecPathBuffer+50 0 0000AC90 16 push ss 0 0000AC91 57 push di 0 0000AC92 E8[FEFF] call _fstrcpy 0 0000AC95 8EC6 mov es, si 0 0000AC97 8B5EE6 mov bx, word ptr [bp-26] 0 0000AC9A 268B4708 mov ax, word ptr es:[bx+8] 0 0000AC9E 8946E6 mov word ptr [bp-26], ax 0 0000ACA1 57 push di 0 0000ACA2 E8[FEFF] call _strlen 0 0000ACA5 56 push si 0 0000ACA6 FF76E6 push word ptr [bp-26] 0 0000ACA9 01F8 add ax, di 0 0000ACAB 16 push ss 0 0000ACAC 50 push ax 0 0000ACAD E8[FEFF] call _fstrcpy 0 0000ACB0 57 push di 0 0000ACB1 E8[FEFF] call _strlen 0 0000ACB4 01F8 add ax, di 0 0000ACB6 96 xchg si, ax 1567 _.L237: 0 0000ACB7 B80900 mov ax, 9 0 0000ACBA 50 push ax 0 0000ACBB 57 push di 0 0000ACBC E8[FEFF] call _strchr 0 0000ACBF 89C2 mov dx, ax 0 0000ACC1 85C0 test ax, ax 0 0000ACC3 7511 jne _.L234 0 0000ACC5 B82000 mov ax, 32 0 0000ACC8 50 push ax 0 0000ACC9 57 push di 0 0000ACCA E8[FEFF] call _strchr 0 0000ACCD 89C2 mov dx, ax 0 0000ACCF 85C0 test ax, ax 0 0000ACD1 7503 jne _.L234 0 0000ACD3 8D54FE lea dx, [-2+si] 1583 _.L234: 0 0000ACD6 89F3 mov bx, si 1585 _.L235: 0 0000ACD8 4B dec bx 0 0000ACD9 39DA cmp dx, bx 0 0000ACDB 765F jbe _.L236 0 0000ACDD C6440200 mov byte ptr [si+2], 0 0 0000ACE1 89D3 mov bx, dx 0 0000ACE3 C60700 mov byte ptr [bx], 0 0 0000ACE6 43 inc bx 0 0000ACE7 895EEC mov word ptr [bp-20], bx 0 0000ACEA 8C56EE mov word ptr [bp-18], ss 0 0000ACED 96 xchg si, ax 0 0000ACEE 29D0 sub ax, dx 0 0000ACF0 8956E6 mov word ptr [bp-26], dx 0 0000ACF3 04FE add al, -2 0 0000ACF5 368807 mov byte ptr ss:[bx], al 0 0000ACF8 57 push di 0 0000ACF9 8D46EA lea ax, [-22+bp] 0 0000ACFC 50 push ax 0 0000ACFD 8A46E9 mov al, byte ptr [bp-23] 0 0000AD00 30E4 xor ah, ah 0 0000AD02 50 push ax 0 0000AD03 E8[FEFF] call _res_DosExec 0 0000AD06 B8[0000] mov ax, offset _.LC0 0 0000AD09 50 push ax 0 0000AD0A E8[FEFF] call _put_string 0 0000AD0D 57 push di 0 0000AD0E E8[FEFF] call _put_string 0 0000AD11 8B56E6 mov dx, word ptr [bp-26] 0 0000AD14 83C202 add dx, 2 0 0000AD17 52 push dx 0 0000AD18 E8[FEFF] call _put_string 0 0000AD1B B8[2500] mov ax, offset _.LC1 0 0000AD1E 50 push ax 0 0000AD1F E8[FEFF] call _put_string 0 0000AD22 B84300 mov ax, 67 0 0000AD25 50 push ax 0 0000AD26 57 push di 0 0000AD27 31D2 xor dx, dx 0 0000AD29 52 push dx 0 0000AD2A 8956E6 mov word ptr [bp-26], dx 0 0000AD2D E8[FEFF] call _res_read 0 0000AD30 05[3200] add ax, offset __SecPathBuffer+50 0 0000AD33 96 xchg si, ax 0 0000AD34 8B56E6 mov dx, word ptr [bp-26] 0 0000AD37 8814 mov byte ptr [si], dl 0 0000AD39 E97BFF jmp _.L237 1631 _.L236: 0 0000AD3C 8A07 mov al, byte ptr [bx] 0 0000AD3E 884702 mov byte ptr [bx+2], al 0 0000AD41 EB95 jmp _.L235 1635 .size _P_0, .-_P_0 1636 .ident "GCC: (GNU) 6.3.0"