27 lines
863 B
Batchfile
27 lines
863 B
Batchfile
@echo off
|
|
echo Building Fibonacci assembler program...
|
|
|
|
; Check if MASM is available
|
|
if exist "C:\Program Files (x86)\Windows Kits\10\bin\x64\ml64.exe" (
|
|
echo Assembling with ML64...
|
|
"C:\Program Files (x86)\Windows Kits\10\bin\x64\ml64.exe" /c fibonacci.asm
|
|
if %errorlevel% equ 0 (
|
|
echo Linking...
|
|
link /SUBSYSTEM:CONSOLE fibonacci.obj kernel32.lib user32.lib
|
|
if %errorlevel% equ 0 (
|
|
echo Build successful!
|
|
echo Run with: fibonacci.exe
|
|
) else (
|
|
echo Linking failed!
|
|
)
|
|
) else (
|
|
echo Assembly failed!
|
|
)
|
|
) else (
|
|
echo ML64 assembler not found. Please ensure Windows SDK is installed.
|
|
echo You can try using nasm instead:
|
|
echo nasm -f win64 fibonacci.asm -o fibonacci.obj
|
|
echo link /SUBSYSTEM:CONSOLE fibonacci.obj kernel32.lib user32.lib
|
|
)
|
|
|
|
pause |