home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 24 DOS / 24-DOS.zip / title011.zip / title.asm < prev    next >
Assembly Source File  |  2000-03-09  |  830b  |  37 lines

  1. ; TITLE.COM version 0.11 for DOS batch file in OS/2 WARP MVDM session
  2. ; Copyright (c) 1994, 1999, 2000, NBG01720@nifty.ne.jp
  3.  
  4.     .model    tiny
  5.     .code
  6.     org    100h
  7. main:    mov    ax,4010h    ;OS/2 WARP installation check
  8.     int    2Fh        ;
  9.     or    ax,ax        ;
  10.     jnz    NotWarp        ;Branch if not in OS/2 WARP
  11.  
  12.     cld
  13.     mov    di,81h
  14.     xor    bx,bx
  15.     xchg    bl,[di-1]
  16.     mov    [di+bx],bh    ;Store zero as a string terminater
  17.     mov    cx,bx
  18.     mov    al,' '        ;Ignore leading space of argument
  19.    repe scasb            ;
  20.  
  21.     mov    ah,64h        ;Set session title
  22.     mov    dx,1        ;
  23.     mov    cx,636Ch    ;
  24.     xor    bx,bx        ;
  25.     dec    di        ; ES:DI -> new ASCIIZ title
  26. bye:    int    21h        ; or empty string to restore default title
  27.  
  28.     int    20h        ;Terminate program
  29.  
  30. NotWarp:mov    ah,9            ;Write string to standard output
  31.     mov    dx,offset message    ;
  32.     jmp    bye            ;
  33.  
  34. message db    "This program can be run only on DOS session of OS/2 WARP"
  35.     db    13,10,"$"
  36.     end    main
  37.