home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 254b.lha / AMXLISP_v2.0 / lsp / rom.lsp < prev    next >
Lisp/Scheme  |  1989-05-09  |  832b  |  21 lines

  1. ; This VERY simple file shows you all Resident Structures known
  2. ; by the system. We get the ResModules array pointer in ExecBase
  3. ; and we look at every NON_NULL pointer in this table.
  4. ; For each Resident Structure, we show all fields, and translate
  5. ; the two identification strings into XLISP strings
  6.  
  7. (load-c-struct "exec/execbase")
  8. (load-c-struct "exec/resident")
  9. (setq eb (send execbase :new (cassoc 'base exec)))
  10. (setq resmods (send (send eb :-> 'resmodules) :ptr))
  11. (defun resmods ()
  12.    (do ((i 0 (setq i (+ i 4))))
  13.     ((equal (memory-long (+ resmods i)) 0))
  14.     (setq rt (send resident :new (memory-long (+ resmods i))))
  15.     (send rt :fshow)
  16. ;   (when (> (send rt :-> 'rt_flags)   128)
  17.     (print (c-to-string (send (send rt :-> 'rt_name) :ptr)))
  18.     (print (c-to-string (send (send rt :-> 'rt_idstring) :ptr)))
  19. ;    )
  20.     ))
  21.