home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_200 / 223_02 / exit.mac < prev    next >
Text File  |  1989-02-23  |  640b  |  29 lines

  1. ; exit.mac    by    F. A. Scacchitti    9 - 18 - 84
  2. ;
  3. ;    abort(error code)
  4. ;
  5. ;
  6. EXTRN    ZZFINI
  7. ;
  8. EXIT::
  9. ;
  10. ABORT::
  11. ;
  12.     POP    B        ; throw away return address
  13.     POP    H        ; get abort code
  14.     ORA    A        ; code passed ?
  15.     JZ    ABORT2        ; no  - leave it as is
  16.     MOV    A,L
  17.     STA    ABCODE        ; yes - imbed it in the message
  18. ABORT2:    LXI    D,ABTMSG    ; Load abort message
  19.     MVI    C,9
  20.     CALL    5
  21.     JMP    ZZFINI
  22. ;
  23. ABTMSG:    DB    0DH, 'Aborted '
  24. ;
  25. ABCODE:    DB    07,0D,'$'
  26. ;
  27.     END
  28.  
  29.