mirror of https://github.com/nmlgc/ReC98.git
[Reduction] #516: xclose
This commit is contained in:
parent
bf364ebfae
commit
96c4a77d66
|
@ -0,0 +1,28 @@
|
|||
; void _xclose(void)
|
||||
__xclose proc DIST
|
||||
@@i = word ptr -2
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
sub sp, 2
|
||||
push si
|
||||
push di
|
||||
mov [bp+@@i], 2
|
||||
jmp short @@check
|
||||
|
||||
@@loop:
|
||||
push [bp+@@i]
|
||||
nopcall _close
|
||||
pop cx
|
||||
inc [bp+@@i]
|
||||
|
||||
@@check:
|
||||
mov ax, [bp+@@i]
|
||||
cmp ax, __nfile
|
||||
jb short @@loop
|
||||
pop di
|
||||
pop si
|
||||
mov sp, bp
|
||||
pop bp
|
||||
ret
|
||||
__xclose endp
|
|
@ -4141,42 +4141,7 @@ off_2C18 dw offset loc_2874
|
|||
dw offset loc_2884
|
||||
dw offset loc_288A
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: library function bp-based frame
|
||||
|
||||
__xclose proc far
|
||||
|
||||
handle = word ptr -2
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
sub sp, 2
|
||||
push si
|
||||
push di
|
||||
mov [bp+handle], 2
|
||||
jmp short loc_2C63
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_2C57:
|
||||
push [bp+handle] ; handle
|
||||
nop
|
||||
push cs
|
||||
call near ptr _close
|
||||
pop cx
|
||||
inc [bp+handle]
|
||||
|
||||
loc_2C63:
|
||||
mov ax, [bp+handle]
|
||||
cmp ax, __nfile
|
||||
jb short loc_2C57
|
||||
pop di
|
||||
pop si
|
||||
mov sp, bp
|
||||
pop bp
|
||||
retf
|
||||
__xclose endp
|
||||
|
||||
include libs/BorlandC/xclose.asm
|
||||
include libs/BorlandC/xxas.asm
|
||||
include libs/BorlandC/xxv.asm
|
||||
include libs/BorlandC/cputype.asm
|
||||
|
@ -5504,8 +5469,8 @@ loc_4B46:
|
|||
loc_4B6B:
|
||||
cmp word ptr [bp-8], 0
|
||||
jl short loc_4BAD
|
||||
mov word ptr _exitopen+2, seg seg000
|
||||
mov word ptr _exitopen, 2C48h
|
||||
mov word ptr _exitopen+2, seg __xclose
|
||||
mov word ptr _exitopen, offset __xclose
|
||||
test byte ptr [bp+0Bh], 3
|
||||
jz short loc_4B88
|
||||
mov ax, 1000h
|
||||
|
|
41
th01_op.asm
41
th01_op.asm
|
@ -3843,42 +3843,7 @@ off_2C80 dw offset loc_28DC
|
|||
dw offset loc_28EC
|
||||
dw offset loc_28F2
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: library function bp-based frame
|
||||
|
||||
__xclose proc far
|
||||
|
||||
handle = word ptr -2
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
sub sp, 2
|
||||
push si
|
||||
push di
|
||||
mov [bp+handle], 2
|
||||
jmp short loc_2CCB
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_2CBF:
|
||||
push [bp+handle] ; handle
|
||||
nop
|
||||
push cs
|
||||
call near ptr _close
|
||||
pop cx
|
||||
inc [bp+handle]
|
||||
|
||||
loc_2CCB:
|
||||
mov ax, [bp+handle]
|
||||
cmp ax, __nfile
|
||||
jb short loc_2CBF
|
||||
pop di
|
||||
pop si
|
||||
mov sp, bp
|
||||
pop bp
|
||||
retf
|
||||
__xclose endp
|
||||
|
||||
include libs/BorlandC/xclose.asm
|
||||
include libs/BorlandC/xxas.asm
|
||||
include libs/BorlandC/xxv.asm
|
||||
include libs/BorlandC/cputype.asm
|
||||
|
@ -5175,8 +5140,8 @@ loc_4E28:
|
|||
loc_4E4D:
|
||||
cmp [bp+handle], 0
|
||||
jl short loc_4E8F
|
||||
mov word ptr _exitopen+2, seg seg000
|
||||
mov word ptr _exitopen, 2CB0h
|
||||
mov word ptr _exitopen+2, seg __xclose
|
||||
mov word ptr _exitopen, offset __xclose
|
||||
test byte ptr [bp+access+1], 3
|
||||
jz short loc_4E6A
|
||||
mov ax, 1000h
|
||||
|
|
|
@ -7062,42 +7062,7 @@ off_3F03 dw offset loc_3B5F
|
|||
dw offset loc_3B6F
|
||||
dw offset loc_3B75
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: library function bp-based frame
|
||||
|
||||
__xclose proc far
|
||||
|
||||
handle = word ptr -2
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
sub sp, 2
|
||||
push si
|
||||
push di
|
||||
mov [bp+handle], 2
|
||||
jmp short loc_3F4E
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
loc_3F42:
|
||||
push [bp+handle] ; handle
|
||||
nop
|
||||
push cs
|
||||
call near ptr _close
|
||||
pop cx
|
||||
inc [bp+handle]
|
||||
|
||||
loc_3F4E:
|
||||
mov ax, [bp+handle]
|
||||
cmp ax, __nfile
|
||||
jb short loc_3F42
|
||||
pop di
|
||||
pop si
|
||||
mov sp, bp
|
||||
pop bp
|
||||
retf
|
||||
__xclose endp
|
||||
|
||||
include libs/BorlandC/xclose.asm
|
||||
include libs/BorlandC/xxas.asm
|
||||
include libs/BorlandC/xxv.asm
|
||||
|
||||
|
@ -8555,8 +8520,8 @@ loc_619E:
|
|||
loc_61C3:
|
||||
cmp [bp+handle], 0
|
||||
jl short loc_6205
|
||||
mov word ptr _exitopen+2, seg seg000
|
||||
mov word ptr _exitopen, 3F33h
|
||||
mov word ptr _exitopen+2, seg __xclose
|
||||
mov word ptr _exitopen, offset __xclose
|
||||
test byte ptr [bp+access+1], 3
|
||||
jz short loc_61E0
|
||||
mov ax, 1000h
|
||||
|
|
Loading…
Reference in New Issue