>>>>>>>>>> CSplit: Version 2.2 >>>>>>>>>>
>>>>>>>>>> CSplit: Begin part 2/6 >>>>>>>>>>
; show tracing message
mov ah,9
mov dx,offset tracing
int 21h
mov dx,offset execpath
call @@puts
; open logfile for writing
mov ah,3Ch
xor cx,cx
mov dx,offset logfile
int 21h
jnc @@logopenok
; show error message
mov ah,9
mov dx,offset openlogerr
int 21h
; terminate
mov ax,4C01h
int 21h
@@logopenok:
mov [loghandle],ax
; store our PSP address
mov ah,62h
int 21h
mov [ourpsp],bx
; store original int 21h handler
mov ax,3521h
int 21h
mov [oldint21ofs],bx
mov [oldint21seg],es
mov ax,cs
mov es,ax
; install our int 21h handler
mov ax,2521h
mov dx,offset @@int21handler
int 21h
; fill in parameter block
mov [commandlineseg],ds
mov [commandlineofs],80h
mov ax,ds:[2Ch]
mov [envseg],ax
; save stack pointer
mov [saveSP],sp
; execute program
mov ax,4B00h
mov bx,offset parablock
mov dx,offset execpath
int 21h
; restore segment registers & stack pointer
mov ax,cs
mov ds,ax
mov es,ax
mov ss,ax
mov sp,[saveSP]
jnc @@noerror
; show error message
mov ah,9
mov dx,offset execerror
int 21h
@@noerror:
; restore old int 21h handler
mov ax,2521h
mov dx,[oldint21ofs]
mov ds,[oldint21seg]
int 21h
mov ax,cs
mov ds,ax
; close logfile
mov ah,3Eh
mov bx,[loghandle]
int 21h
; terminate
mov ax,4C00h
int 21h
>>>>>>>>>> CSplit: End part 2/6 crc: ceda >>>>>>>>>>
---
---------------
* Origin: CPost v1.0 (2:292/516)
|