home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / proglc / tnylib.lzh / ABORT.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-11-21  |  503 b   |  29 lines

  1. include compiler.inc
  2.  
  3.     ttl    ABORT, 1.07, 11-21-86 cr
  4.  
  5.     dseg
  6.     extrn _ftb:byte
  7.  
  8. m1    db    10, 'ERROR: ',0
  9. m2    db    10, 'Run Aborted', 10, 0
  10.     cseg
  11.  
  12.     xtfs    <fputs, exit>
  13.  
  14.     procdef    abort, <<msg, ptr>, <ercd, word>>
  15.     
  16.     lea    si,_ftb[10]        ;stderr stream ptr
  17.     lea    ax,m1            ;leadin
  18.     callit    fputs <<si, preg, ds>, <ax, preg, ds>>
  19.     callit    fputs <<si, preg, ds>, <msg, ptr>>
  20.     lea    ax,m2            ;trailer
  21.     callit    fputs <<si, preg, ds>, <ax, preg, ds>>
  22.     callit    exit <<ercd,word>>
  23.  
  24.     pend    abort
  25.  
  26.     finish
  27.  
  28.     end
  29.