diff --git a/libs/BorlandC/fprintf.asm b/libs/BorlandC/fprintf.asm new file mode 100644 index 00000000..e295ec22 --- /dev/null +++ b/libs/BorlandC/fprintf.asm @@ -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 diff --git a/th01_fuuin.asm b/th01_fuuin.asm index 6497b595..2bf861a1 100644 --- a/th01_fuuin.asm +++ b/th01_fuuin.asm @@ -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 diff --git a/th01_op.asm b/th01_op.asm index c7d3858f..d39981dd 100644 --- a/th01_op.asm +++ b/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 diff --git a/th01_reiiden.asm b/th01_reiiden.asm index 88ff41a5..54a3e414 100644 --- a/th01_reiiden.asm +++ b/th01_reiiden.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