-(define-derived-mode x86-asm-mode asm-mode "x86 assembler"
- "Assembler mode variant which uses `#' as the comment character."
- (set (make-variable-buffer-local 'asm-comment-char) ?#))
-
-(define-derived-mode arm-asm-mode asm-mode "ARM assembler"
- "Assembler mode variant which uses `@' as the comment character."
- (set (make-variable-buffer-local 'asm-comment-char) ?@))
+(defun mdw-asm-set-comment ()
+ (modify-syntax-entry ?; "."
+ )
+ (modify-syntax-entry asm-comment-char "<b")
+ (setq comment-start (string asm-comment-char ? )))
+(add-hook 'asm-mode-local-variables-hook 'mdw-asm-set-comment)
+(put 'asm-comment-char 'safe-local-variable 'characterp)