You are on page 1of 4

NOTA: ->MODO asm-mode ( esta el modo GAS-MODE que no es oficial) -> EL PAQUETE CEDET NO LO HE UTILIZADO PERO CREO QUE

ESTA INSTALADO: ES UN IDE PARA EMACS

En /usr/share/emacs23/site-lisp/ estn los ficheros *-el definidos por el usuario /usr/share/emacs/23.1/lisp/progmodes/asm-mode.elc -> est compilado info elisp -> Font Lock Basics problema: al hacer indentation de una regin C-M-\ seleccionada con C-x h, el pri mer punto de indentation est en 8 y quiero que este en 0. Cambio la variable tabstop-list y sigue igual con la primera columna en 8. En cambio si hago indentati on no ha una regin marcada sino a una lnea, funciona bien. OJO->lo primero que hacemos es comprobar que la etiqueta de comentarios por defe cto es el punto y coma. lo cambiamos a almohadilla c-h v asm-comment-char RET y editamos el punto y coma por almohadilla. Salvo par a futuras sesiones. Abro otra vez el buffer para comprobar el efecto La almohadilla genera un comentario de fin de lnea La doble almohadilla genera un comentario a principio de lnea

variable -< tab-stop-list M-x edit-tab-stops C-h v indent-line-function -> read variable indent-line-function indent-line-function's value is asm-indent-line ( funcion de elisp que se llama con M-x asm-indent-line ) Local in buffer cap3_2.s (el buffer activo ); global value ( de la funcion asm-i ndent-line) is indent-relative C-h a indent-line-function Documentation: Function to indent the current line. This function will be called with no arguments. If it is called somewhere where auto-indentation cannot be done (e.g. inside a string), the function should simply return `noindent'. Setting this function is all you need to make TAB indent appropriately. Don't rebind TAB unless you really need to. C-h a indent-according-to-mode

indent-according-to-mode is an interactive compiled Lisp function. (indent-according-to-mode) Indent line in proper way for current major mode. The buffer-local variable `indent-line-function' determines how to do this, but the functions `indent-relative' and `indent-relative-maybe' are special; we don't actually use them here. C-h a indent-line asm-indent-line M-x ... RET Auto-indent the current line. c-indent-line-or-region M-x ... RET Indent active region, current line, or block starting on this line. lisp-indent-line M-x .->.. RET Indent current line as Lisp code. C-h a indent-region gas-indent-region M-x ... RET Indent all fields in region. indent-region C-M-\ Indent each nonblank line in the region. ********>indent-region is an interactive compiled Lisp function.********* It is bound to C-M-\. (indent-region start end &optional column) Indent each nonblank line in the region. A numeric prefix argument specifies a column: indent each line to that column. With no prefix argument, the command chooses one of these methods and indents all the lines with it: 1) If `fill-prefix' is non-nil, insert `fill-prefix' at the beginning of each line in the region that does not already begin with it.------------------------------------------------------------------> LO TENGO nil 2) If `indent-region-function' is non-nil, call that function to indent the region. ----------------------------------------------------> LO TENGO nil 3) Indent each line as specified by the variable `indent-line-function'. Called from a program, start and end specify the region to indent. If the third argument column is an integer, it specifies the column to indent to; if it is nil, use one of the three methods above.

******************************************** ******************************************** MINOR MODE -> font-lock-mode : activa el alumbrado de la sintaxis M-x blink-paren : activa el emparejamiento de ()

sigo el manual info elisp -> font lock basics ->font-lock-mode enable ->font-lock-defaults's value is (asm-font-lock-keywords) When Font Lock mode is enabled, text is fontified as you type it: - Comments are displayed in `font-lock-comment-face'; - Strings are displayed in `font-lock-string-face'; - Certain other expressions are displayed in other faces according to the value of the variable `font-lock-keywords'. To add your own highlighting for some major mode, and modify the highlighting selected automatically via the variable `font-lock-maximum-decoration', you can use `font-lock-add-keywords'. CONFIGURACION de la variable asm-font-lock-keyboards asm-font-lock-keywords's value is shown below. Documentation: Additional expressions to highlight in Assembler mode. Value: (("^\\(\\(\\sw\\ \\s_\\)+\\)\\>:?[ ]*\\(\\sw+\\(\\.\\sw+\\)*\\)?" (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t)) ("^\\(\\.\\(\\sw\\ \\s_\\)+\\)\\>:" 1 font-lock-function-name-face) ("^\\((\\sw+)\\)?\\s +\\(\\(\\.?\\sw\\ \\s_\\)+\\(\\.\\sw+\\)*\\)" 2 fo nt-lock-keyword-face) ("^\\(\\.\\(\\sw\\ \\s_\\)+\\)\\>[^:]?" 1 font-lock-keyword-face) ("%\\sw+" . font-lock-variable-name-face) ("^#[ ]*\\(?:error\\ warning\\)[ ]+\\(.+\\)" 1 font-lock-warningface prepend) ("^#[ ]*\\(?:import\\ include\\)[ ]*\\(<[^>\"\n]*>?\\)" 1 font-loc k-string-face prepend) ("^#[ ]*define[ ]+\\([[:alpha:]_][[:alnum:]_$]*\\)(" (1 font-lock-function-name-face prepend) ((lambda (limit) (re-search-forward "\\(?:\\([[:alpha:]_][[:alnum:]_]*\\)[,]?\\)" (or (save-excursion (re-search-forward ")" limit t)) limit) t)) nil nil (1 font-lock-variable-name-face prepend))) ("^#[ ]*\\(?:elif\\ if\\)\\>" ("\\<\\(defined\\)\\>[ ]*(?\\([[:alpha:]_][[:alnum:]_]*\\)?" ni l nil (1 font-lock-builtin-face prepend) (2 font-lock-variable-name-face prepend t))) ("^\\(#[ ]*\\(?:define\\ e\\(?:l\\(?:if\\ se\\)\\ ndif\\ rror\\)\ \ file\\ i\\(?:f\\(?:n?def\\)?\\ mport\\ nclude\\)\\ line\\ pragma\\ undef\\ war ning\\)\\)\\>[ !]*\\([[:alpha:]_][[:alnum:]_]*\\)?" (1 font-lock-preprocessor-face prepend) (2 font-lock-variable-name-face nil t)))

********************************************************** ******************************************************** ******************************************************* ********************** GAS-MODE ********************** http://www.hczim.de/software/gas-mode.html Caractersticas: C-x h ; M-C-\ reordena la regin marcada cuando un smbolo esta repetido . al posicionarlos sobre el alumbra todas las repe ticiones. Con C-M-f y C-M-b navega M-q reordena una lnea RET o C-j : despues de una sentencia sigue en le bloque sentencia. despues de un comentario va al bloque sentencia moviendo el cursor se colorean los smbolos etiqueta en azul para quedar bien faltara reordenar los comentarios que se ponen al final de una s entencia ya que solo reordena los comentarios que comienzan en una lnea. Que ocurre si mezclamos C y ensamblador? Comprobarlo cambiando de modo

You might also like