[Reduction] #542: fprintf

This commit is contained in:
nmlgc 2014-10-17 18:26:56 +02:00
parent 54968ed7a3
commit 489ecc8a96
4 changed files with 31 additions and 99 deletions

28
libs/BorlandC/fprintf.asm Normal file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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