home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / ASM / ALIB30B / MSG3.ASM < prev    next >
Assembly Source File  |  1994-11-15  |  3KB  |  109 lines

  1.     page    66,132
  2. ;******************************** MSG3.ASM   *********************************
  3.  
  4. LIBSEG           segment byte public "LIB"
  5.         assume cs:LIBSEG , ds:nothing
  6.  
  7. ;----------------------------------------------------------------------------
  8. .xlist
  9.     include  mac.inc
  10.     include  common.inc
  11. .list
  12. ;----------------------------------------------------------------------------
  13.     extrn    message:far
  14.     extrn    msg_text_color:byte
  15.     extrn    err_asciiz:byte
  16.     extrn    bar_hotkey_color:byte
  17.     extrn    save_window:far
  18.     extrn    restore_window:far
  19.     extrn    draw_box:far
  20.     extrn    key_read:far
  21.     extrn    window_string:far
  22.     extrn    box_shrink:far
  23. comment 
  24. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( MESSAGE )
  25. QMESSAGE - Quick message display in box & wait for keypress (msg in file)
  26. ;
  27. ; inputs:     cx = record # to display.
  28. ; output:  carry set if error reading file on disk. File must be in current
  29. ;          default directory.
  30. ;          
  31. ; note:    The display location, colors, and box size is calculated.
  32. ;          The message is obtained from the standard error file, See
  33. ;          ERROR_PRIME for selecting file to use.  The message is placed
  34. ;          in a box 10 rows long and 40 columns wide.  It waits for any
  35. ;          key before preceeding.
  36. ;* * * * * * * * * * * * * *
  37. 
  38.     public    qmessage
  39. QMESSAGE    PROC    FAR
  40.     apush    ax,bx,cx,dx,si,di,bp,ds,es
  41.     mov    ax,cs
  42.     mov    ds,ax
  43.     mov    ah,msg_text_color
  44.     mov    al,0            ;separator of zero
  45.     mov    bx,0a28h            ;box is 10 lines long, 40 columns wide
  46.     mov    dx,0814h        ;box at row 8 column 20
  47.     mov    si,offset err_asciiz    ;get filename ptr
  48.     mov    bp,msg_save_win+msg_restore_win+msg_anykey+msg_open+msg_close+msg_disp
  49.     call    message
  50.     apop    es,ds,bp,di,si,dx,cx,bx,ax
  51.     retf    
  52. QMESSAGE    ENDP
  53. comment 
  54. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( MESSAGE )
  55. QWARN - Quick message display in box & wait for keypress (msg in mem)
  56. ;
  57. ; inputs:  ds:si = pointer to message text, zero at end.
  58. ; output:  none
  59. ; note:    The display location, colors, and box size is calculated.
  60. ;* * * * * * * * * * * * * *
  61. 
  62. qsav_si    dw    0
  63. qsav_ds    dw    0
  64.  
  65.     public    qwarn
  66. QWARN    PROC    FAR
  67.     apush    bx,cx,dx,si,di,ds,es
  68.     mov    cs:qsav_ds,ds
  69.     mov    bx,cs
  70.     mov    ds,bx
  71.     mov    es,bx
  72.  
  73.     mov    qsav_si,si
  74. ;
  75.     mov    ah,byte ptr bar_hotkey_color
  76.     mov    dx,0101h
  77.     mov    bx,0630h
  78. ;
  79.     call    save_window
  80.     call    draw_box
  81.     call    box_shrink
  82.     push    es
  83.     pop    ds
  84.     mov    ah,byte ptr bar_hotkey_color
  85. ;
  86. ; display the error text inside the box
  87. ;
  88.     push    ds
  89.     mov    si,cs:qsav_si
  90.     mov    ds,cs:qsav_ds
  91.     call    window_string
  92.     pop    ds
  93. ;
  94. ; check type of exit processing, and wait for key if necessary, then exit
  95. ;
  96. error_key:
  97.     call    KEY_READ            ;get key press
  98.     call    restore_window
  99.     apop    es,ds,di,si,dx,cx,bx
  100.     retf
  101. QWARN    ENDP
  102. ;-----------------------------------------------------------------------------
  103.  
  104. LIBSEG    ENDS
  105.     end
  106.