mirror of https://github.com/nmlgc/ReC98.git
[Reduction] #511: segread
This commit is contained in:
parent
bbf47ec102
commit
86b99b9265
|
@ -0,0 +1,33 @@
|
|||
BYTEREGS struc ; (sizeof=0x8, standard type)
|
||||
_al db ?
|
||||
_ah db ?
|
||||
_bl db ?
|
||||
_bh db ?
|
||||
_cl db ?
|
||||
_ch db ?
|
||||
_dl db ?
|
||||
_dh db ?
|
||||
BYTEREGS ends
|
||||
|
||||
WORDREGS struc ; (sizeof=0x10, standard type)
|
||||
_ax dw ?
|
||||
_bx dw ?
|
||||
_cx dw ?
|
||||
_dx dw ?
|
||||
_si dw ?
|
||||
_di dw ?
|
||||
_cflags dw ?
|
||||
_flags dw ?
|
||||
WORDREGS ends
|
||||
|
||||
REGS union ; (sizeof=0x10, standard type)
|
||||
x WORDREGS ?
|
||||
h BYTEREGS ?
|
||||
REGS ends
|
||||
|
||||
SREGS struc ; (sizeof=0x8, standard type)
|
||||
_es dw ?
|
||||
_cs dw ?
|
||||
_ss dw ?
|
||||
_ds dw ?
|
||||
SREGS ends
|
|
@ -0,0 +1,38 @@
|
|||
; void __cdecl segread(struct SREGS *segp)
|
||||
_segread proc DIST
|
||||
@@segp = DPTR_ 2 + dPtrSize
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
push di
|
||||
if LDATA
|
||||
mov bx, es
|
||||
endif
|
||||
LES_ si, [bp+@@segp]
|
||||
if LDATA
|
||||
mov es:[si], bx
|
||||
else
|
||||
mov [si]._es, es
|
||||
endif
|
||||
if LPROG
|
||||
mov ax, [bp+4]
|
||||
mov ES_[si]._cs, ax
|
||||
else
|
||||
mov ES_[si]._cs, cs
|
||||
endif
|
||||
mov word ptr ES_[si]._ss, ss
|
||||
ifdef __HUGE__
|
||||
mov ax, [bp+4]
|
||||
mov ES_[si]._ds, ax
|
||||
else
|
||||
mov word ptr ES_[si]._ds, ds
|
||||
endif
|
||||
if LDATA
|
||||
mov es, bx
|
||||
endif
|
||||
pop di
|
||||
pop si
|
||||
pop bp
|
||||
ret
|
||||
_segread endp
|
|
@ -1,46 +1,3 @@
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
BYTEREGS struc ; (sizeof=0x8, standard type)
|
||||
_al db ?
|
||||
_ah db ?
|
||||
_bl db ?
|
||||
_bh db ?
|
||||
_cl db ?
|
||||
_ch db ?
|
||||
_dl db ?
|
||||
_dh db ?
|
||||
BYTEREGS ends
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
WORDREGS struc ; (sizeof=0x10, standard type)
|
||||
_ax dw ?
|
||||
_bx dw ?
|
||||
_cx dw ?
|
||||
_dx dw ?
|
||||
_si dw ?
|
||||
_di dw ?
|
||||
_cflag dw ?
|
||||
_flags dw ?
|
||||
WORDREGS ends
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
REGS union ; (sizeof=0x10, standard type)
|
||||
x WORDREGS ?
|
||||
h BYTEREGS ?
|
||||
REGS ends
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
SREGS struc ; (sizeof=0x8, standard type)
|
||||
_es dw ?
|
||||
_cs dw ?
|
||||
_ss dw ?
|
||||
_ds dw ?
|
||||
SREGS ends
|
||||
|
||||
|
||||
;
|
||||
; +-------------------------------------------------------------------------+
|
||||
; | This file has been generated by The Interactive Disassembler (IDA) |
|
||||
|
@ -77,6 +34,7 @@ SREGS ends
|
|||
.model large
|
||||
|
||||
include ReC98.inc
|
||||
include libs/BorlandC/regs.inc
|
||||
|
||||
; ===========================================================================
|
||||
|
||||
|
@ -3359,34 +3317,7 @@ include libs/BorlandC/newarray.asm
|
|||
include libs/BorlandC/N_LXMUL.ASM
|
||||
include libs/BorlandC/N_PCMP.ASM
|
||||
include libs/BorlandC/reada.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: library function bp-based frame
|
||||
|
||||
; void __cdecl segread(struct SREGS *segp)
|
||||
_segread proc far
|
||||
|
||||
segp = dword ptr 6
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
push di
|
||||
mov bx, es
|
||||
les si, [bp+segp]
|
||||
mov es:[si], bx
|
||||
mov ax, [bp+4]
|
||||
mov es:[si+2], ax
|
||||
mov word ptr es:[si+4], ss
|
||||
mov word ptr es:[si+6], ds
|
||||
mov es, bx
|
||||
pop di
|
||||
pop si
|
||||
pop bp
|
||||
retf
|
||||
_segread endp
|
||||
|
||||
include libs/BorlandC/segread.asm
|
||||
include libs/BorlandC/setupio.asm
|
||||
include libs/BorlandC/cconv.asm
|
||||
include libs/BorlandC/toupper.asm
|
||||
|
@ -4272,9 +4203,7 @@ outregs = dword ptr 0Ch
|
|||
push ss
|
||||
lea ax, [bp+segp]
|
||||
push ax ; segp
|
||||
nop
|
||||
push cs
|
||||
call near ptr _segread
|
||||
nopcall _segread
|
||||
pop cx
|
||||
pop cx
|
||||
push ss
|
||||
|
@ -4406,9 +4335,7 @@ outregs = dword ptr 0Ah
|
|||
push ss
|
||||
lea ax, [bp+segp]
|
||||
push ax ; segp
|
||||
nop
|
||||
push cs
|
||||
call near ptr _segread
|
||||
nopcall _segread
|
||||
pop cx
|
||||
pop cx
|
||||
push ss
|
||||
|
|
81
th01_op.asm
81
th01_op.asm
|
@ -1,46 +1,3 @@
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
BYTEREGS struc ; (sizeof=0x8, standard type)
|
||||
_al db ?
|
||||
_ah db ?
|
||||
_bl db ?
|
||||
_bh db ?
|
||||
_cl db ?
|
||||
_ch db ?
|
||||
_dl db ?
|
||||
_dh db ?
|
||||
BYTEREGS ends
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
WORDREGS struc ; (sizeof=0x10, standard type)
|
||||
_ax dw ?
|
||||
_bx dw ?
|
||||
_cx dw ?
|
||||
_dx dw ?
|
||||
_si dw ?
|
||||
_di dw ?
|
||||
_cflag dw ?
|
||||
_flags dw ?
|
||||
WORDREGS ends
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
REGS union ; (sizeof=0x10, standard type)
|
||||
x WORDREGS ?
|
||||
h BYTEREGS ?
|
||||
REGS ends
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
SREGS struc ; (sizeof=0x8, standard type)
|
||||
_es dw ?
|
||||
_cs dw ?
|
||||
_ss dw ?
|
||||
_ds dw ?
|
||||
SREGS ends
|
||||
|
||||
|
||||
;
|
||||
; +-------------------------------------------------------------------------+
|
||||
; | This file has been generated by The Interactive Disassembler (IDA) |
|
||||
|
@ -76,6 +33,7 @@ SREGS ends
|
|||
.model large
|
||||
|
||||
include ReC98.inc
|
||||
include libs/BorlandC/regs.inc
|
||||
|
||||
; ===========================================================================
|
||||
|
||||
|
@ -3061,34 +3019,7 @@ include libs/BorlandC/newarray.asm
|
|||
include libs/BorlandC/N_LXMUL.ASM
|
||||
include libs/BorlandC/N_PCMP.ASM
|
||||
include libs/BorlandC/reada.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: library function bp-based frame
|
||||
|
||||
; void __cdecl segread(struct SREGS *segp)
|
||||
_segread proc far
|
||||
|
||||
segp = dword ptr 6
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
push di
|
||||
mov bx, es
|
||||
les si, [bp+segp]
|
||||
mov es:[si], bx
|
||||
mov ax, [bp+4]
|
||||
mov es:[si+2], ax
|
||||
mov word ptr es:[si+4], ss
|
||||
mov word ptr es:[si+6], ds
|
||||
mov es, bx
|
||||
pop di
|
||||
pop si
|
||||
pop bp
|
||||
retf
|
||||
_segread endp
|
||||
|
||||
include libs/BorlandC/segread.asm
|
||||
include libs/BorlandC/setupio.asm
|
||||
include libs/BorlandC/cconv.asm
|
||||
include libs/BorlandC/toupper.asm
|
||||
|
@ -3974,9 +3905,7 @@ outregs = dword ptr 0Ch
|
|||
push ss
|
||||
lea ax, [bp+segp]
|
||||
push ax ; segp
|
||||
nop
|
||||
push cs
|
||||
call near ptr _segread
|
||||
nopcall _segread
|
||||
pop cx
|
||||
pop cx
|
||||
push ss
|
||||
|
@ -4108,9 +4037,7 @@ outregs = dword ptr 0Ah
|
|||
push ss
|
||||
lea ax, [bp+segp]
|
||||
push ax ; segp
|
||||
nop
|
||||
push cs
|
||||
call near ptr _segread
|
||||
nopcall _segread
|
||||
pop cx
|
||||
pop cx
|
||||
push ss
|
||||
|
|
|
@ -1,46 +1,3 @@
|
|||
; ---------------------------------------------------------------------------
|
||||
|
||||
BYTEREGS struc ; (sizeof=0x8, standard type)
|
||||
_al db ?
|
||||
_ah db ?
|
||||
_bl db ?
|
||||
_bh db ?
|
||||
_cl db ?
|
||||
_ch db ?
|
||||
_dl db ?
|
||||
_dh db ?
|
||||
BYTEREGS ends
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
WORDREGS struc ; (sizeof=0x10, standard type)
|
||||
_ax dw ?
|
||||
_bx dw ?
|
||||
_cx dw ?
|
||||
_dx dw ?
|
||||
_si dw ?
|
||||
_di dw ?
|
||||
_cflags dw ?
|
||||
_flags dw ?
|
||||
WORDREGS ends
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
REGS union ; (sizeof=0x10, standard type)
|
||||
x WORDREGS ?
|
||||
h BYTEREGS ?
|
||||
REGS ends
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
SREGS struc ; (sizeof=0x8, standard type)
|
||||
_es dw ?
|
||||
_cs dw ?
|
||||
_ss dw ?
|
||||
_ds dw ?
|
||||
SREGS ends
|
||||
|
||||
|
||||
;
|
||||
; +-------------------------------------------------------------------------+
|
||||
; | This file has been generated by The Interactive Disassembler (IDA) |
|
||||
|
@ -102,6 +59,7 @@ SREGS ends
|
|||
.model large
|
||||
|
||||
include ReC98.inc
|
||||
include libs/BorlandC/regs.inc
|
||||
|
||||
; ===========================================================================
|
||||
|
||||
|
@ -5884,34 +5842,7 @@ loc_3673:
|
|||
retn
|
||||
__scantol endp
|
||||
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: library function bp-based frame
|
||||
|
||||
; void __cdecl segread(struct SREGS *segp)
|
||||
_segread proc far
|
||||
|
||||
segp = dword ptr 6
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
push di
|
||||
mov bx, es
|
||||
les si, [bp+segp]
|
||||
mov es:[si], bx
|
||||
mov ax, [bp+4]
|
||||
mov es:[si+2], ax
|
||||
mov word ptr es:[si+4], ss
|
||||
mov word ptr es:[si+6], ds
|
||||
mov es, bx
|
||||
pop di
|
||||
pop si
|
||||
pop bp
|
||||
retf
|
||||
_segread endp
|
||||
|
||||
include libs/BorlandC/segread.asm
|
||||
include libs/BorlandC/setupio.asm
|
||||
include libs/BorlandC/cconv.asm
|
||||
include libs/BorlandC/toupper.asm
|
||||
|
@ -7349,9 +7280,7 @@ outregs = dword ptr 0Ch
|
|||
push ss
|
||||
lea ax, [bp+segp]
|
||||
push ax ; segp
|
||||
nop
|
||||
push cs
|
||||
call near ptr _segread
|
||||
nopcall _segread
|
||||
pop cx
|
||||
pop cx
|
||||
push ss
|
||||
|
@ -7485,9 +7414,7 @@ outregs = dword ptr 0Ah
|
|||
push ss
|
||||
lea ax, [bp+segp]
|
||||
push ax ; segp
|
||||
nop
|
||||
push cs
|
||||
call near ptr _segread
|
||||
nopcall _segread
|
||||
pop cx
|
||||
pop cx
|
||||
push ss
|
||||
|
|
Loading…
Reference in New Issue