FASM 編譯用的小工具 build.bat

開源的, https://github.com/xiaolaba/FASM_win32_win64

紀錄一下 Win10 底下簡單的用法, 先寫好 asm 程序, 把 asm文件拖放到 build.bat, 就可以執行編譯產出 EXE.

@echo off
 
REM Readme first
REM 2017-MAR-25, xioalaba
REM Uses FASMW or FASM, goto C:\fasmw17160\TOOLS\WIN32
REM to build 3-EXE one time first, listing.exe, prepsrc.exe, symbols.exe
 

SET FASM=E:\FASM


SET TOOLS=%FASM%\TOOLS\WIN32
SET INCLUDE=%FASM%\INCLUDE
 
set path=%FASM%;%INCLUDE%;%TOOLS%;%path%
path

 
if exist %TOOLS%\listing.exe goto skip
@echo ---- Uses FASMW or FASM, goto %TOOLS%
@echo ---- To build 3 EXE first at one time deal, listing.exe, prepsrc.exe, symbols.exe
cd %TOOLS%
fasm.exe listing.asm listing.exe
fasm.exe prepsrc.asm prepsrc.exe
fasm.exe symbols.asm symbols.exe
:skip


REM change to current dir
cd /D "%~dp0"
@echo.
@echo working folder = %1

 
@echo FASM build.bat, by xiaolaba, MAR/26/2017
@echo.
@echo ---- Drag .asm file to this build.bat, produce .exe and .fas
fasm.exe %1 %1.exe -s %1.fas

goto end
 
@echo.
@echo ---- Uses .fas, produce .lst
listing -a %1.fas %1.lst
 
@echo.
@echo ---- Uses .fas, produce .src
prepsrc %1.fas %1.src
 
@echo.
@echo ---- Uses .fas, produce .fas
symbols %1.fas %1.sym

:end

del *.fas
 
@echo DONE !!
pause 

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值