| 1 |
; Copyright (c) 1991 by Michael J. Roberts. All Rights Reserved. |
| 2 |
; |
| 3 |
; This is the TADS User Exit wrapper. Use this to generate a user |
| 4 |
; exit function. Calls your user exit's main function main(), |
| 5 |
; which receives one argument, a uxdef (see TADSEXIT.H). |
| 6 |
; |
| 7 |
|
| 8 |
_TEXT segment para public 'CODE' |
| 9 |
assume cs:_TEXT |
| 10 |
extrn _main:near |
| 11 |
|
| 12 |
org 0 |
| 13 |
$entry: |
| 14 |
push bp ; save BP |
| 15 |
mov bp, sp ; establish stack frame |
| 16 |
push ds ; save other needed registers |
| 17 |
push es |
| 18 |
|
| 19 |
push [bp+8] ; push the uxdef pointer (high part) |
| 20 |
push [bp+6] ; (low part) |
| 21 |
call _main ; call user's function |
| 22 |
add sp, 4 ; remove arguments from stack |
| 23 |
|
| 24 |
pop es ; restore all registers |
| 25 |
pop ds |
| 26 |
pop bp |
| 27 |
retf |
| 28 |
_TEXT ends |
| 29 |
|
| 30 |
; dummy out this symbol for MSC - it insists on its presence |
| 31 |
public __acrtused |
| 32 |
__acrtused = 0 |
| 33 |
|
| 34 |
;public __aNlshl |
| 35 |
; __aNlshl = 0 |
| 36 |
end $entry |