preserves the historical INTEL notation for writing x86 assembler
MASM Version 5.1
In MASM version 5.1 the assembler is MASM.EXE.
the file name for the assembler was changed to ML.EXE in 1991 with the release of MASM version 6.0
the last seperate release of MASM 6.11d as a commercial product
Microsoft released version 6.11d in 1993 including 32 bit Windows operating system capacity. It is the original win 32 assembler and was supported in that release with 32 bit assembler code examples that would run on the early 32 bit versions of Windows NT.
MASM 6.14 patch for ML.EXE 6.11
to upgrade ML.EXE from an MS-DOS MZ executable file into a console mode 32 bit Portable Executable binary file
The Visual C++ 6.0 Processor Pack
ML.EXE Version 6.15
Versions 7.0 and upwards are components of the Microsoft Visual C++ development environment and have also been made available in a number of device development kits for successive versions of Microsoft Windows.
Version 8.0 and later have been available as free downloads from Microsoft under a EULA that limits the use of the free versions to developing code for Microsoft Operating Systems.
ProcessorPack을 추가하면 ML버전이 6.15가 포함되어 있기 때문에, 패치 단계가 필요없다. 하지만, 패키지가 SP4 ,SP5 전용이기 때문에, SP6 을 설치했다면, /C 옵션을 사용해서 압축을 해제
/*
or
마이크로소프트의 홈페이지에서 다운로드 한다.
마이크로소프트의 DDK (Driver Development Kit) 라는 패키지 안에 포함되어있다.
DDK 에 들어있는 MASM은 버젼이 낮고 MMX명령어를 인식하지 못한다.
「패치」를 해주어야 한다. 패치 또한 마이크로소프트의 홈페이지에서 구할 수가 있고, 다운로드한 후 압축을 해제하고 , 파일들을 모두 MASM이 있는 디렉토리안에 복사 한 후「패치」실행 파일을 실행한다.
*/
VC++에서 실행파일 경로를 설정해주어야 한다. 「Tools」-> 「Options」을 선택
「Directories」탭으로 이동후에 반드시 「Executable Files」를 선택하기 바란다. 추가 버튼을 눌러서 압축해제한 폴더를 지정해준다.
ml /c /coff /Cx /nologo /Fo$(OutDir)\ /Fl$(InputName) $(InputPath)
Outputs: $(OutDir)\$(InputName).obj
TITLE Program Template (template.asm)
; Program Description:
; Author:
; Date Created:
; Last Modification Date:
INCLUDE Irvine32.inc
; (insert symbol definitions here)
.data
; (insert variables here)
.code
main PROC
; (insert executable instructions here)
exit ; exit to operating system
main ENDP
; (insert additional procedures here)
END main
;**********************************************************************
; 최초 MASM 프로그래밍
; 주석은 세미콜론으로
;**********************************************************************
.586
.model flat, stdcall
NULL EQU 0
MessageBoxA proto :dword, :dword, :dword, :dword
ExitProcess proto :dword
.data
TITLE1 DB '어셈블리 테스트', 0
MESSAGE DB '~Hello World!!~', 0
.code
WinMainCRTStartup proc
invoke MessageBoxA, NULL, offset MESSAGE, offset TITLE1, 0
invoke ExitProcess, 0
ret
WinMainCRTStartup endp
end
TITLE Add and Subtract (AddSubAlt.asm)
; This program adds and subtracts 32-bit integers.
; 32-bit Protected mode version
; Last update: 2/1/02
.code
;---------------------------------------------
DoubleIt PROC,
inval:DWORD ; receives an integer
; Returns: double the value of inval, in EAX.
;----------------------------------------------
mov eax,inval ; get parameter
add eax,eax ; return its double
ret
DoubleIt ENDP
END