Using emacs with z80asm
First off, I want to state I am not a lisp podgammer1)
OK, now that that is out of the way, this is what I added to my .emacs when I started using z80asm
to work with z80 assembly code. It adds ASM to the list of extensions that will put you into asm-mode for editing assembly code and defines the compile command the way I wanted it. If there is a better way to do these tasks please let me know.
;; ;; mods for z80asm GEP-D 2008-02 ;; ;; ;; add ".ASM" to asm-mode, does ".asm" already ;; 0;setq auto-mode-alist 0;cons ' 0;"\\.ASM$" . asm-mode) auto-mode-alist)) ;; ;; z80 compile ;; ;; if either a "Makefile" or "makefile" exists use it, otherwise ;; build a compile command where you get a listing and output such ;; that running it on FILENAME.asm gets you FILENAME.lst and FILENAME.rom ;; ;; Then bind it to f5 'cus I'm use to it being there. ;; 0;add-hook 'asm-mode-hook 0;function 0;lambda 0;) 0;unless 0;or 0;file-exists-p "makefile") 0;file-exists-p "Makefile")) 0;make-local-variable 'compile-command) 0;setq compile-command 0;concat "z80asm --input=" 0;buffer-file-name) " --output=" 0;file-name-sans-extens\ ion buffer-file-name) ".rom --list=" 0;file-name-sans-extension buffer-file-nam\ e) ".lst" )) 0;local-set-key [f5] 'compile) )))) ;; ;; end of z80asm mods ;;
— Greg Priest-Dorman 2008/02/20 13:47
1)
yeah, I know ain039;t spelled that way.