home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / source / lh113src.zoo / execute.c next >
Text File  |  1988-08-05  |  2KB  |  75 lines

  1. /***************************************************************/
  2. /*                                                             */
  3. /* Name    : execute     (For Turbo C V1.5)                    */
  4. /*                                                             */
  5. /* Function:                                                   */
  6. /*                                                             */
  7. /*  ÅφÆôébénélélé`émécüDébénélé╠î─é╤Åoé╡é╔éµéΘÄqâvâìâZâXé╠Ä└ìs */
  8. /*                      (int 2eh é╔éµéΘî─é╤Åoé╡)               */
  9. /* return  : None                                              */
  10. /* Author  : S.Takanami                                        */
  11. /* Date    : 88/07/24                                          */
  12. /* Update  : 88/08/05   MS-DOS Ver2.11 é┼ê°Éöé¬é╚éóÅΩìçé┼éα    */
  13. /*                      É│Åφé╔ô«ì∞é╖éΘéµéñé╔ÅCÉ│               */
  14. /*                                                             */
  15. /***************************************************************/
  16.  
  17. #include  <string.h>
  18.  
  19. void execute(char *parameter)
  20. {
  21.     char    buf[100];
  22.     int    stk[100];
  23.  
  24.     if ((buf[0] = strlen(parameter)) != 0) {
  25.         strcpy(&buf[1], parameter);
  26.         strcat(buf, "\r");
  27.  
  28.         asm    jmp    short exe1
  29.         asm    rss    dw    ?
  30.         asm    rsp    dw    ?
  31.         asm    res    dw    ?
  32.         asm    rds    dw    ?
  33.         asm    rdi    dw    ?
  34.         asm    rsi    dw    ?
  35.         asm    rbp    dw    ?
  36.         asm    rdx    dw    ?
  37.         asm    rcx    dw    ?
  38.         asm    rbx    dw    ?
  39.         asm    rax    dw    ?
  40.  
  41. exe1:
  42.         asm    mov    rss,ss
  43.         asm    mov    rsp,sp
  44.         asm    mov    res,es
  45.         asm    mov    rds,ds
  46.         asm    mov    rdi,di
  47.         asm    mov    rsi,si
  48.         asm    mov    rbp,bp
  49.         asm    mov    rdx,dx
  50.         asm    mov    rcx,cx
  51.         asm    mov    rbx,bx
  52.         asm    mov    rax,ax
  53.  
  54.         asm    lea    si,buf
  55.         asm    mov    ax,ss
  56.         asm    mov    ds,ax
  57.         asm    lea    sp,stk
  58.         asm    add    sp,99*2
  59.  
  60.         asm    int    2eh
  61.  
  62.         asm    mov    ax,rax
  63.         asm    mov    bx,rbx
  64.         asm    mov    cx,rcx
  65.         asm    mov    dx,rdx
  66.         asm    mov    bp,rbp
  67.         asm    mov    si,rsi
  68.         asm    mov    di,rdi
  69.         asm    mov    ds,rds
  70.         asm    mov    es,res
  71.         asm    mov    sp,rsp
  72.         asm    mov    ss,rss
  73.     }
  74. }
  75.