Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : PUREVIRT.ASM
title purevirt - Pure virtual function stubs
;***
;purevirt.asm - Stubs for pure virtual functions
;
; Copyright (c) 1992, Microsoft Corporation. All rights reserved.
;
;Purpose:
; Defines _purecall, _npurecall and _fpurecall. These are stubs used
; by the compiler to catch pure virtual function calls and map them
; to a fatal runtime error (_RT_PUREVIRT).
;
;*******************************************************************************
?DF = 1
include version.inc
.xlist
include cmacros.inc
include defsegs.inc
include rterr.inc
.list
CrtDefSegs
CrtDefSegs
sBegin nmsg
_RTERR _RT_PUREVIRT, _RT_PUREVIRT_TXT, _RT_STANDARD ; "attempted pure virtual
; function call"
sEnd
sBegin npad
dw -1
; no padding for now, though 20 would be about right.
; db 20 dup(0)
sEnd
sBegin code
assumes cs, code
extrn __amsg_exit:near
page
;***
;void _purecall (void)
;void __near _npurecall(void)
;void __far _fpurecall(void)
;
;Purpose:
; Call _amsg_exit with _RT_PUREVIRT. Used by the compiler to trap calls
; to pure virtual functions.
;
;Entry:
; None.
;
;Exit:
; Does not return. Terminates app via _amsg_exit().
;
;Uses:
;
;Exceptions:
;
;*******************************************************************************
public C _purecall, _npurecall, _fpurecall
if sizeC
_purecall label far
else
_purecall label near
endif
_npurecall label near
_fpurecall label far
mov ax,_RT_PUREVIRT
jmp __amsg_exit
sEnd
end
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/