nasm - Emacs weirdness when trying to comment in Assembly -
nasm - Emacs weirdness when trying to comment in Assembly -
suppose have block of code so:
;; outut mov eax, 4 mov ebx, 1 ; stdout mov ecx, [ans] ; move biggest element accumulator add together ecx, 30h ; convert ascii representation mov [buff], ecx ; move memory mov ecx, buff ; set pointer in ecx printing mov edx, 4 ; size, 4 bytes int 80h ; scheme call.
when seek set comment in front end comment out line:
;; outut ;mov eax, 4 mov ebx, 1 ; stdout mov ecx, [ans] ; move biggest element accumulator add together ecx, 30h ; convert ascii representation mov [buff], ecx ; move memory mov ecx, buff ; set pointer in ecx printing mov edx, 4 ; size, 4 bytes int 80h ; scheme call.
instead of appearing there want go, jumps here:
;; outut mov eax, 4 ; mov ebx, 1 ; stdout mov ecx, [ans] ; move biggest element accumulator add together ecx, 30h ; convert ascii representation mov [buff], ecx ; move memory mov ecx, buff ; set pointer in ecx printing mov edx, 4 ; size, 4 bytes int 80h ; scheme call.
and no matter do, physically cannot comment out anything.
how can prepare this? don't remember doing this, sense must have nail combination of keys , happens.
;
bound asm-comment
in assembly mode. can either quoted insert c-q ;
on case-by-case basis, or remove binding , utilize m-;
(comment-dwim
) fancier commenting. if want latter, set ";" locally self-insert command:
(defun my-hook () (local-set-key ";" 'self-insert-command)) (add-hook 'asm-mode-hook 'my-hook)
emacs nasm
Comments
Post a Comment