Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : VDHNF.ASM

 
Output of file : VDHNF.ASM contained in archive : VCCRT1.ZIP
; /***
; *vecdtor.cxx - C++ destructor helper
; *
; * Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved.
; *
; *Purpose:
; *
; * NOTE: The helper routines produced by this source must have
; * special names (i.e., not the "normal" C++ naming scheme). Thus,
; * the build process involves producing .asm files, sed scripts, etc.
; *
; *******************************************************************************/
;
; #include
;
; // tm this model ::= __near | __far | __huge
; // dm dtor call model ::= __near | __far
; // dtm dtor this model ::= __near | __far
; // vdm __vec_dtor call model ::= __near | __far
; // nelems_t #elements type ::= ptrdiff_t | long
;
; void pascal vdm vec_dtor(void tm* this_, size_t size, nelems_t eltCount,
; void (pascal dm* dtor)(void dtm* this_))
; {
; this_ = (char tm*)this_ + size*eltCount;
; while (--eltCount >= 0) {
; this_ = (char tm*)this_ - size;
; (*dtor)(this_);
; }
; }
;

TITLE vecdtor.cxx
.8087
_TEXT SEGMENT WORD PUBLIC 'CODE'
_TEXT ENDS
_DATA SEGMENT WORD PUBLIC 'DATA'
_DATA ENDS
CONST SEGMENT WORD PUBLIC 'CONST'
CONST ENDS
_BSS SEGMENT WORD PUBLIC 'BSS'
_BSS ENDS
DGROUP GROUP CONST, _BSS, _DATA
ASSUME DS: DGROUP, SS: DGROUP
EXTRN __aFlmul:FAR
EXTRN __AHSHIFT:FAR
_TEXT SEGMENT
ASSUME CS: _TEXT
PUBLIC ??_I@ZCXPIXIJP6CXPEX@Z@Z
??_I@ZCXPIXIJP6CXPEX@Z@Z PROC FAR
push bp
mov bp,sp
push di
push si
mov di,WORD PTR [bp+12]
sub ax,ax
push ax
push di
push WORD PTR [bp+10]
push WORD PTR [bp+8]
call FAR PTR __aFlmul
sub bx,bx
mov cx,ax
add WORD PTR [bp+14],cx
adc bx,dx
mov cx,OFFSET __AHSHIFT
shl bx,cl
add WORD PTR [bp+16],bx
mov si,WORD PTR [bp+6]
$FC335:
sub WORD PTR [bp+8],1
sbb WORD PTR [bp+10],0
cmp WORD PTR [bp+10],0
jl $EX332
mov ax,di
sub dx,dx
neg ax
adc dx,dx
neg dx
sub bx,bx
mov cx,ax
add WORD PTR [bp+14],cx
adc bx,dx
mov cx,OFFSET __AHSHIFT
shl bx,cl
add WORD PTR [bp+16],bx
push WORD PTR [bp+16]
push WORD PTR [bp+14]
call si
jmp SHORT $FC335
$EX332:
pop si
pop di
mov sp,bp
pop bp
ret 12

??_I@ZCXPIXIJP6CXPEX@Z@Z ENDP
_TEXT ENDS
END



  3 Responses to “Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : VDHNF.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/