restart this course with more detail

This commit is contained in:
Emanuel Rodriguez 2022-11-21 22:09:55 -08:00
parent ad9f04fcc4
commit 2c7be9b288
4 changed files with 27 additions and 6 deletions

13
src/1_3.asm Normal file
View File

@ -0,0 +1,13 @@
.CODE
option casemap:none ; make all symbols case sensitive (like C)
public asm_func ; make this visible outside of this source
asm_func PROC ; start procedure
ret
asm_func ENDP ; end procedure
END

BIN
src/1_3.exe Normal file

Binary file not shown.

View File

@ -1,4 +1,9 @@
@echo off
echo ~~~~ starting build ~~~~
REM /nolog is dont show MS info at run
REM /c is compile dont link
REM /Zi is debug info
REM /Cp is preserve cases
ml64 /nologo /c /Zi /Cp %1.asm
cl /nologo /O2 /Zi /utf-8 /EHa /Fe%1.exe c.cpp %1.obj
cl /nologo /O2 /Zi /utf-8 /EHa /Fe%1.exe main.cpp %1.obj

View File

@ -2,12 +2,15 @@
extern "C"
{
void asm_func(void);
};
// Function written in ASM
void asm_func(void);
}
int main(void)
int main()
{
printf("calling asm main\n");
printf("calling asm function\n");
asm_func();
printf("return from asm main\n");
printf("returned from asm function\n");
return(0);
}