all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* help reading assembly code
@ 2011-10-24 12:29 Andrea Crotti
  2011-10-26 22:10 ` Peter Münster
  0 siblings, 1 reply; 6+ messages in thread
From: Andrea Crotti @ 2011-10-24 12:29 UTC (permalink / raw)
  To: help-gnu-emacs

I would like to be able to read more easily assembly code (since I
really don't do it very often).

For example it would be nice to have some function which shows me a
reference documentation given the operator.

On emacswiki there appears to be not much, anyone has something
hand-made that would like to share?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: help reading assembly code
       [not found] <mailman.947.1319459367.15868.help-gnu-emacs@gnu.org>
@ 2011-10-24 20:38 ` Pascal J. Bourguignon
  2011-10-25  2:25   ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Pascal J. Bourguignon @ 2011-10-24 20:38 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> I would like to be able to read more easily assembly code (since I
> really don't do it very often).
>
> For example it would be nice to have some function which shows me a
> reference documentation given the operator.
>
> On emacswiki there appears to be not much, anyone has something
> hand-made that would like to share?

I did something similar for the asm-7090 "mode" I wrote:
https://gitorious.org/com-informatimago/emacs/blobs/master/pjb-asm7090.el

See asm7090-describe-codop.  You could even do that in a
post-command-hook, or on mouse or arrow events so that the instructions
are always explained.  It would also possible to attach tooltips to the
instructions so that you get the description on a mouse over. 

(Since I used that mode to transcribe asm-7090 code, I call
asm7090-describe-codop in the command bound to RET, as you can see in
asm7090).

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: help reading assembly code
  2011-10-24 20:38 ` Pascal J. Bourguignon
@ 2011-10-25  2:25   ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2011-10-25  2:25 UTC (permalink / raw)
  To: help-gnu-emacs

> See asm7090-describe-codop.  You could even do that in a
> post-command-hook, or on mouse or arrow events so that the instructions
> are always explained.  It would also possible to attach tooltips to the
> instructions so that you get the description on a mouse over.

The "canonical" way to do that in Emacs is to set
eldoc-documentation-function buffer-locally.  Then users can choose to
use this by enabling eldoc-mode.


        Stefan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: help reading assembly code
@ 2011-10-25 15:43 Buchs, Kevin
  2011-10-26 14:35 ` Andrea Crotti
  0 siblings, 1 reply; 6+ messages in thread
From: Buchs, Kevin @ 2011-10-25 15:43 UTC (permalink / raw)
  To: help-gnu-emacs

> I would like to be able to read more easily assembly code (since I really don't do it very often). For example it would be nice to have some function which shows me a reference documentation given the operator.

Given my current infatuation with org-mode, I would accomplish the function you describe above (only) using org-mode. I would make each command a radio link, such that you could hypertext jump to the documentation on the command wherever it occurs in your program. I would take a file of command documentation and insert it at the end of my program. Each command name should be enclosed in << >>. The turn on org-mode. 

Alternately, I would suggest writing a lisp function which parses out each command and replaces it with a link with the same text as the label and that link executes lisp code to bring up the definition, in the message area, a help buffer, new frame or whatever fits best for you. 

Have you checked out asm-mode? That might give you syntax coloring for assembly that could be useful. You might have to create an child mode with custom syntax table, depending on your assembly language.

Kevin Buchs   |  Senior Engineer  |  Department of Physiology and Biomedical Engineering - SPPDG
507-538-5459  |   buchs.kevin@mayo.edu  |  http://www.mayo.edu/sppdg
Mayo Clinic  |  200 1st St. SW  |  Rochester, MN 55905  



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: help reading assembly code
  2011-10-25 15:43 Buchs, Kevin
@ 2011-10-26 14:35 ` Andrea Crotti
  0 siblings, 0 replies; 6+ messages in thread
From: Andrea Crotti @ 2011-10-26 14:35 UTC (permalink / raw)
  To: Buchs, Kevin; +Cc: help-gnu-emacs

On 10/25/2011 04:43 PM, Buchs, Kevin wrote:
> Given my current infatuation with org-mode, I would accomplish the function you describe above (only) using org-mode. I would make each command a radio link, such that you could hypertext jump to the documentation on the command wherever it occurs in your program. I would take a file of command documentation and insert it at the end of my program. Each command name should be enclosed in<<  >>. The turn on org-mode.
>
> Alternately, I would suggest writing a lisp function which parses out each command and replaces it with a link with the same text as the label and that link executes lisp code to bring up the definition, in the message area, a help buffer, new frame or whatever fits best for you.
>
> Have you checked out asm-mode? That might give you syntax coloring for assembly that could be useful. You might have to create an child mode with custom syntax table, depending on your assembly language.
>
>

I also like a lot org-mode, but I don't think it would be so helpful in 
this case...
Also a simple function to bind to some key in asm-mode would be 
perfectly fine,
the only problem is that I can't find any reference web-site with all 
the informations I want.
(which can be indexed easily with each node reachable)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: help reading assembly code
  2011-10-24 12:29 help reading assembly code Andrea Crotti
@ 2011-10-26 22:10 ` Peter Münster
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Münster @ 2011-10-26 22:10 UTC (permalink / raw)
  To: help-gnu-emacs

On Mon, Oct 24 2011, Andrea Crotti wrote:

> For example it would be nice to have some function which shows me a
> reference documentation given the operator.

Hello,

If you know how to build the right url to the documentation of a given
operator, you can just replace the google url with the right one in the
following code:

--8<---------------cut here---------------start------------->8---
(defun pm/region-or-word (prompt)
  "Read a string from the minibuffer, prompting with PROMPT.
If `transient-mark-mode' is non-nil and the mark is active,
it defaults to the current region, else to the word at or before
point. This function returns a list (string) for use in `interactive'."
  (list (read-string prompt (or (and transient-mark-mode mark-active
                                     (buffer-substring-no-properties
                                      (region-beginning) (region-end)))
				(current-word)))))

(defun pm/google (string)
  "Ask a WWW browser to google string.
Prompts for a string, defaulting to the active region or the current word at
or before point."
  (interactive (pm/region-or-word "Google: "))
  (browse-url (concat "http://google.com/search?num=100&q=" string)))
--8<---------------cut here---------------end--------------->8---

-- 
           Peter




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-26 22:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24 12:29 help reading assembly code Andrea Crotti
2011-10-26 22:10 ` Peter Münster
     [not found] <mailman.947.1319459367.15868.help-gnu-emacs@gnu.org>
2011-10-24 20:38 ` Pascal J. Bourguignon
2011-10-25  2:25   ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2011-10-25 15:43 Buchs, Kevin
2011-10-26 14:35 ` Andrea Crotti

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.