源文件注释
程序代码:
;#Mode=CON ;MASMPlus 单文件代码模板 - 控制台程序 ;-------------------------------------------------------------------- ;单个文件需要指定编译模式,否则默认是EXE方式,在系统设置中可以设置默认是DOS还是Windows. ;编译模式自带了DOS/COM/CON/EXE/DLL/LIB这几种,如果有必要,可以更改ide.ini添加新的编译模式 ;当然,更好的是创建为一个工程.更方便及易于管理,使用方法:按Ctrl多选->创建工程.必须有多个文件 .386 .model flat, stdcall option casemap :none include Irvine32.inc include windows.inc include user32.inc include kernel32.inc include masm32.inc includelib user32.lib includelib kernel32.lib includelib masm32.lib include macro.asm .data count DWORD ? outmsg BYTE "输入一个0~100之间的数:", 0 .code main proc mov edx, offset outmsg call WriteString call ReadDec mov count, eax .if eax>=90 && eax<=100 mov al, 'A' .elseif eax>=80 && eax<=89 mov al, 'B' .elseif eax>=70 && eax<=79 mov al, 'C' .elseif eax>=60 && eax<=69 mov al, 'D' .elseif eax>=0 && eax<=59 mov al, 'F' .endif call WriteChar call Crlf call WaitMsg invoke ExitProcess, 0 main endp end main去掉红色后:
不明白