Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. struct service_str{
  2.                 char  name[16];
  3.                 struct service_str* fd;
  4.                 struct service_str* bk;
  5.                 uint32_t base; // base addreass service for kernel_free
  6.                 uint32_t entry; //unsigned drvEntry(int action, char *cmdline)
  7.                 uint32_t srv_proc; // static int __stdcall service_proc(ioctl_t *my_ctl)
  8.                 //void* srv_proc_kern;
  9.         };
  10.  
  11. int cmd_lsmod(char param[]) {
  12.     struct service_str* fd;
  13.         struct service_str* bk;
  14.         struct service_str srv_str;
  15.         asm_inline(
  16.         "int $0x40"
  17.         :"=b"(fd), "=c"(bk)
  18.         :"a"(68), "b"(31), "c"(1)
  19.     );
  20.         srv_str.fd = fd;
  21.         printf("%-*s Hendler      Service_proc\n\r", 16, "  Name");
  22.         while (1) {
  23.                 asm_inline(
  24.         "int $0x40"
  25.         ::"a"(68), "b"(31), "c"(2), "d"(fd), "D"(&srv_str)
  26.                 );
  27.                 printf("%-*s 0x%X   0x%X \n", 16, srv_str.name, fd, srv_str.srv_proc);
  28.                 if (fd == bk) break;
  29.                 fd = srv_str.fd;
  30.         };
  31.        
  32.     return TRUE;
  33. }
  34.