ASM Called By Cpp

; ** MUST SET PROJECT PROPERTY: Build Customizations
;                               to include MASM
;  must declare:   extern "C" void asm_main(int, int*);
;  must call:      asm_main();
; credit to kip irvine, stackoverflow, msdn and mskb

.model flat, C

system PROTO, pcommand:PTR BYTE

; DATA ******************
str1 BYTE "cls",0

; CODE *******************
asm_main PROC
   ; system call to clear screen and do a dir
   INVOKE system, ADDR str1
   INVOKE system, ADDR str2
asm_main ENDP