Hi Erik First, the fundamentals are documented in the picolisp dir @doc64/ Look there for a start, if you haven already.
Do you have Vi or Vim installed? If so, there is a great lookup function which does what you described. Start pil repl with debug mode: $ pil + Use the vi function to look up code, e.g. a lisp defined function like vi itself: : (vi 'vi) -> Vim will open, and it opens the file /usr/lib/picolisp/lib/debug.l on line 220 where the function vi is defined (de vi ("X" C) ... Close Vim (enter : q ) to go back to the picolisp repl. You can also use the (vi) function to look at built-in functions, like (+): : (vi '+) -> Vim will open the file /usr/lib/picolisp/src64/big.l on line 2167 where the pil asm source code for the (+)-function is (for the pil64 edition) Be aware that pil asm is a picolisp specific asm, which is compiled to the specific architecture asm when building pil64 ( I think it is this way, maybe Abu might correct/confirm) I think you can't show the pil asm for a lisp defined function, but I doubt that this would be really helpful, actually in the end it would just be the asm code for all the builtin-functions the specific lisp-defined function is made of. Is this somewhat like what you are looking for? Kind regards, beneroth ----- Original Message ----- From: Erik Gustafson [mailto:erik.d.gustaf...@gmail.com] To: firstname.lastname@example.org Sent: Tue, 25 Aug 2015 11:47:35 -0500 Subject: Hi List, I'd like to develop a better intuition for how things work in the lower levels of 64bit PicoLisp, how cells are passed between registers, and all that. I need to spend more time with the code in /src64 and going over the docs, obviously. Any other ways you all have found to be effective in developing that sense? 'trace' and 'debug' have been very helpful, but they seem to operate on a higher level. I imagine something like CL's 'disassemble' that, given an arbitrary lisp expression, returns the sequence of VM instructions the expression maps to. Would something like this be possible to implement? If so, where might be a good place to start exploring? Or is this another existing feature that I've managed to miss this whole time? :) Thanks, Erik