home *** CD-ROM | disk | FTP | other *** search
/ Total Destruction / Total_Destruction.iso / addons / Lccwin32.exe / Lccwin32 / lccpub / lib / src / defsig.asm < prev    next >
Encoding:
Assembly Source File  |  1997-09-01  |  1.7 KB  |  85 lines

  1.     .text
  2. ; This is the default routine for the signal handler, when a trap occurs
  3. ; It just uses the global variable _CurrentException and _CurrentContext
  4. ; set up by the startup for putting a message box and then exits
  5.     .file "defsig.c"
  6.     .type    __signalHandler,function
  7. __signalHandler:
  8.     subl    $512,%esp
  9.     movl    %esp,%edi
  10.     movl    %esp,%ebx
  11.     movb    $0,(%esp)
  12.     movl    __CurrentException,%ecx
  13.     or    %ecx,%ecx
  14.     je    _$76
  15.     pushl    12(%ecx)
  16.     pushl    (%ecx)
  17.     pushl    $_$75
  18.     pushl    %edi
  19.     call    _sprintf
  20.     movl    __CurrentContext,%esi
  21.     orl    %esi,%esi
  22.     je    _$76
  23.     xor    %eax,%eax
  24.     stc
  25.     sbb    %ecx,%ecx
  26.     repne
  27.     scasb
  28.     decl    %edi
  29.     pushl    168(%esi)
  30.     pushl    172(%esi)
  31.     pushl    164(%esi)
  32.     pushl    176(%esi)
  33.     pushl    $_$78
  34.     pushl    %edi
  35.     call    _sprintf
  36.     xor    %eax,%eax
  37.     stc
  38.     sbb    %ecx,%ecx
  39.     repne
  40.     scasb
  41.     decl    %edi
  42.     pushl    184(%esi)
  43.     pushl    180(%esi)
  44.     pushl    156(%esi)
  45.     pushl    160(%esi)
  46.     pushl    $_$79
  47.     pushl    %edi
  48.     call    _sprintf
  49. _$76:
  50.     pushl    $0x10010
  51.     pushl    $_$80
  52.     pushl    %ebx
  53.     pushl    $0
  54.     call    _MessageBoxA@16
  55.     pushl    $-1
  56.     call    __exit
  57. _$86:
  58.     .size    __signalHandler,_$86-__signalHandler
  59.     .globl    __signalHandler
  60.     .extern    __exit
  61.     .text
  62.     .extern    _sprintf
  63.     .text
  64.     .extern    __CurrentContext
  65.     .text
  66.     .extern    __CurrentException
  67.     .text
  68.     .extern    _MessageBoxA@16
  69.     .text
  70.     .align    2
  71. _$80:
  72.     .byte    108,99,99,32,114,117,110,116,105,109,101,32,101,114,114,111
  73.     .byte    114,0
  74. _$79:
  75.     .byte    69,83,73,32,37,48,56,120,32,69,68,73,32,37,48,56
  76.     .byte    120,32,69,66,80,32,37,48,56,120,32,69,73,80,32
  77.     .byte    37,48,56,120,13,10,0
  78. _$78:
  79.     .byte    69,65,88,32,37,48,56,120,32,69,66,88,32,37,48,56
  80.     .byte    120,32,69,67,88,32,37,48,56,120,32,69,68,88,32
  81.     .byte    37,48,56,120,13,10,0
  82. _$75:
  83.     .byte    69,120,99,101,112,116,105,111,110,32,37,120,44,32,97,116
  84.     .byte    32,97,100,100,114,101,115,115,32,37,120,10,0
  85.