最近在看汇编,发现好多知识都还给老师了,得恶补回来。写了几行代码,发现SourceInsight感觉好不爽,还是用回最喜欢的
Editplus。不过突然发现ep不支持汇编语言的语法高亮显示,很是郁闷,心想,如此强大的ep怎能如此弱,找了找ep的各个设置,发
现在:工具-〉参数设置-〉文件-〉设置和语法 中有个可以设置语法高亮显示的选项,里头已经有了:cpp css html java js jsp
...。马上在网搜索了一个ASM的语法高亮设置,贴出来,分享一下,同时也感谢原作者的工作。
所需要做的是,打开ep,至对应的设置面板,选择添加,在描述中输入:ASM,在文件扩展名中输入:asm,然后在语法文件一栏选择
对应的stx文件就好了。(asm的stx文件,就是把下面的东东保存为you_decide_the_name.stx)
#TITLE=ASM
; ASM syntax file written by kylin.
; This file is required for EditPlus to run correctly.
#DELIMITER=,(){}[]-+*/=~!&|<>?:.
#QUOTATION1='
#QUOTATION2="
#CONTINUE_QUOTE=n
#LINECOMMENT=;
#ESCAPE=\
#CASE=y
#PREFIX3=$
#PREFIX4=@
#PREFIX5=%
#NUMBER_PATTERN=asm
#SPECIAL_STX=asm
#KEYWORD=Reserved words
db
dw
dd
dq
mov
movsx
movzx
xchg
push
pusha
pushad
pop
popa
popad
in
out
xlat
lea
lds
les
lfs
lgs
lss
lahf
sahf
pushf
pushfd
popf
popfd
add
sub
adc
sbb
inc
dec
mul
div
imul
idiv
cbw
cwd
cwde
cdq
cmp
neg
daa
das
aaa
aas
aam
aad
and
or
xor
not
test
shl
sal
rol
ror
rcl
rcr
shld
shrd
movs
movsb
movsw
movsd
cmps
cmpsb
cmpsw
cmpsd
scas
scasb
scasw
scasd
lods
lodsb
lodsw
lodsd
stos
stosb
stosw
stosd
ins
insb
insw
insd
outs
outsb
outsw
outsd
jmp
jc
jnc
jz
je
jnz
jne
js
jns
jo
jno
jp
jpe
jnp
jpo
ja
jneb
jae
jnb
jb
jnae
jbe
jna
jg
jnle
jge
jnl
jl
jnge
jle
jng
jcxz
jecxz
loop
loopz
loope
loopnz
loopne
ret
retn
retf
int
into
iret
iretd
set
clc
stc
cmc
cld
std
cli
sti
hlt
wait
esc
lock
nop
bt
btc
btr
bts
bsf
bsr
bound
enter
leave
lar
lsl
lgdt
lidt
sgdt
sidt
ltr
str
lmsw
smsw
lldt
sldt
arpl
clts
verr
verw
DW
DD
DQ
MOV
MOVSX
MOVZX
XCHG
PUSH
PUSHA
PUSHAD
POP
POPA
POPAD
IN
OUT
XLAT
LEA
LDS
LES
LFS
LGS
LSS
LAHF
SAHF
PUSHF
PUSHFD
POPF
POPFD
ADD
SUB
ADC
SBB
INC
DEC
MUL
DIV
IMUL
IDIV
CBW
CWD
CWDE
CDQ
CMP
NEG
DAA
DAS
AAA
AAS
AAM
AAD
AND
OR
XOR
NOT
TEST
SHL
SAL
ROL
ROR
RCL
RCR
SHLD
SHRD
MOVS
MOVSB
MOVSW
MOVSD
CMPS
CMPSB
CMPSW
CMPSD
SCAS
SCASB
SCASW
SCASD
LODS
LODSB
LODSW
LODSD
STOS
STOSB
STOSW
STOSD
INS
INSB
INSW
INSD
OUTS
OUTSB
OUTSW
OUTSD
JMP
JC
JNC
JZ
JE
JNZ
JNE
JS
JNS
JO
JNO
JP
JPE
JNP
JPO
JA
JNEB
JAE
JNB
JB
JNAE
JBE
JNA
JG
JNLE
JGE
JNL
JL
JNGE
JLE
JNG
JCXZ
JECXZ
LOOP
LOOPZ
LOOPE
LOOPNZ
LOOPNE
RET
RETN
RETF
INT
INTO
IRET
IRETD
SET
CLC
STC
CMC
CLD
STD
CLI
STI
HLT
WAIT
ESC
LOCK
NOP
BT
BTC
BTR
BTS
BSF
BSR
BOUND
ENTER
LEAVE
LAR
LSL
LGDT
LIDT
SGDT
SIDT
LTR
STR
LMSW
SMSW
LLDT
SLDT
ARPL
CLTS
VERR
VERW
#KEYWORD=Register
flat
stdcall
casemap
none
dup
proto
call
local
invoke
eax
ax
ah
al
ebx
bh
bl
bx
ecx
cx
ch
cl
edx
dx
dh
dl
esi
si
edi
di
ebp
bp
esp
sp
carry
overflow
parity
sign
zero
true
false
FLAT
STDCALL
CASEMAP
NONE
DUP
PROTO
CALL
LOCAL
INVOKE
EAX
AX
AH
AL
EBX
BH
BL
BX
ECX
CX
CH
CL
EDX
DX
DH
DL
ESI
SI
EDI
DI
EBP
BP
ESP
SP
CARRY
OVERFLOW
PARITY
SIGN
ZERO
TRUE
FALSE
#KEYWORD=Statements
386
model
option
data
const
stack
code
proc
endp
struc
ends
end
include
includelib
if
else
elseif
endif
while
endw
repeat
break
continue
until
null
386
MODEL
OPTION
DATA
CONST
STACK
CODE
PROC
ENDP
STRUC
ENDS
END
INCLUDE
INCLUDELIB
IF
ELSE
ELSEIF
ENDIF
WHILE
ENDW
REPEAT
BREAK
CONTINUE
UNTIL
NULL
#KEYWORD=Description
ds
cs
es
ss
fs
gs
addr
offset
byte
word
dword
ptr
DS
CS
ES
SS
FS
GS
ADDR
OFFSET
BYTE
WORD
DWORD
PTR
#KEYWORD=Symbols
=
:
@
(
)
,
.
;
/
+
-
*
%
#