mirror of https://github.com/nmlgc/ReC98.git
[Reduction] #542: fprintf
This commit is contained in:
parent
54968ed7a3
commit
489ecc8a96
|
@ -0,0 +1,28 @@
|
|||
; int fprintf(FILE *F, const char *fmt, ...)
|
||||
_fprintf proc DIST
|
||||
@@F = DPTR_ (cPtrSize + 2)
|
||||
@@fmt = DPTR_ (cPtrSize + 2 + dPtrSize)
|
||||
@@va = byte ptr (cPtrSize + 2 + dPtrSize + dPtrSize)
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
push di
|
||||
mov ax, offset __FPUTN
|
||||
push ax
|
||||
if LDATA
|
||||
push word ptr [bp+@@F+2]
|
||||
endif
|
||||
push word ptr [bp+@@F]
|
||||
if LDATA
|
||||
push word ptr [bp+@@fmt+2]
|
||||
endif
|
||||
push word ptr [bp+@@fmt]
|
||||
lea ax, [bp+@@va]
|
||||
push ax
|
||||
call __vprinter
|
||||
pop di
|
||||
pop si
|
||||
pop bp
|
||||
ret
|
||||
_fprintf endp
|
|
@ -4182,39 +4182,7 @@ include libs/BorlandC/fflush.asm
|
|||
include libs/BorlandC/flength.asm
|
||||
include libs/BorlandC/flushall.asm
|
||||
include libs/BorlandC/fopen.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: library function bp-based frame
|
||||
|
||||
; int fprintf(FILE *stream, const char *format, ...)
|
||||
_fprintf proc far
|
||||
|
||||
stream = word ptr 6
|
||||
arg_2 = word ptr 8
|
||||
_format = word ptr 0Ah
|
||||
arg_6 = word ptr 0Ch
|
||||
arg_8 = byte ptr 0Eh
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
push di
|
||||
mov ax, 4E04h
|
||||
push ax
|
||||
push [bp+arg_2]
|
||||
push [bp+stream]
|
||||
push [bp+arg_6]
|
||||
push [bp+_format]
|
||||
lea ax, [bp+arg_8]
|
||||
push ax
|
||||
call __VPRINTER
|
||||
pop di
|
||||
pop si
|
||||
pop bp
|
||||
retf
|
||||
_fprintf endp
|
||||
|
||||
include libs/BorlandC/fprintf.asm
|
||||
include libs/BorlandC/fseek.asm
|
||||
include libs/BorlandC/fullpath.asm
|
||||
|
||||
|
|
34
th01_op.asm
34
th01_op.asm
|
@ -3859,39 +3859,7 @@ include libs/BorlandC/fflush.asm
|
|||
include libs/BorlandC/flength.asm
|
||||
include libs/BorlandC/flushall.asm
|
||||
include libs/BorlandC/fopen.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: library function bp-based frame
|
||||
|
||||
; int fprintf(FILE *stream, const char *format, ...)
|
||||
_fprintf proc far
|
||||
|
||||
stream = word ptr 6
|
||||
arg_2 = word ptr 8
|
||||
_format = word ptr 0Ah
|
||||
arg_6 = word ptr 0Ch
|
||||
arg_8 = byte ptr 0Eh
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
push di
|
||||
mov ax, 50E6h
|
||||
push ax
|
||||
push [bp+arg_2]
|
||||
push [bp+stream]
|
||||
push [bp+arg_6]
|
||||
push [bp+_format]
|
||||
lea ax, [bp+arg_8]
|
||||
push ax
|
||||
call __VPRINTER
|
||||
pop di
|
||||
pop si
|
||||
pop bp
|
||||
retf
|
||||
_fprintf endp
|
||||
|
||||
include libs/BorlandC/fprintf.asm
|
||||
include libs/BorlandC/fputs.asm
|
||||
include libs/BorlandC/fread.asm
|
||||
include libs/BorlandC/fseek.asm
|
||||
|
|
|
@ -7220,39 +7220,7 @@ include libs/BorlandC/fflush.asm
|
|||
include libs/BorlandC/flength.asm
|
||||
include libs/BorlandC/flushall.asm
|
||||
include libs/BorlandC/fopen.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: library function bp-based frame
|
||||
|
||||
; int fprintf(FILE *stream, const char *format, ...)
|
||||
_fprintf proc far
|
||||
|
||||
stream = word ptr 6
|
||||
arg_2 = word ptr 8
|
||||
_format = word ptr 0Ah
|
||||
arg_6 = word ptr 0Ch
|
||||
arg_8 = byte ptr 0Eh
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push si
|
||||
push di
|
||||
mov ax, 645Ch
|
||||
push ax
|
||||
push [bp+arg_2]
|
||||
push [bp+stream]
|
||||
push [bp+arg_6]
|
||||
push [bp+_format]
|
||||
lea ax, [bp+arg_8]
|
||||
push ax
|
||||
call __VPRINTER
|
||||
pop di
|
||||
pop si
|
||||
pop bp
|
||||
retf
|
||||
_fprintf endp
|
||||
|
||||
include libs/BorlandC/fprintf.asm
|
||||
include libs/BorlandC/fseek.asm
|
||||
include libs/BorlandC/fullpath.asm
|
||||
|
||||
|
|
Loading…
Reference in New Issue