🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #42704

Problems with TSR

#42704
From: Worm
Date: Tue, 20 Feb 1990 09:13
39 lines
1985 bytes
HELP required!

I am trying to write a Command Line Editor for my AT and it almost works!
I do this by intercepting the int 21h 0ah buffered keyboard input routine and
substituting my own routine. All is well with DOS internal commands which are
passed back to DOS ok and get executed correctly. However, external
commands seem to be another matter entirely. The machine just hangs and I
have to reset it using CTRL-ALT-DEL or the reset button.
What am I doing that is wrong or not doing that is right ?

I use the MSC 4.0 C compiler and MASM 4.0 Assembler. I have written the
routines to do the cursor handling, printing and tsr bit  in assembly
language and everything else is in C.
In order to find the end of the program I use :
        xor     ax,ax
        push    ax
        call    _sbrk
        ; Quick check for -1 goes here
        mov     dx,ax
        add     dx,1024 ; This is for stack
        add     dx,15
        shr     dx,1
        shr     dx,1
        shr     dx,1
        shr     dx,1
        mov     ax,3100h
        int     21h

As I mentioned this seems to be ok ?!? I use malloc to allocate storage for
the commands so I can have a history of the commands I've used. This works
fine for DOS internals. I can recall and edit any previously typed command.

If anyone can help then I would very much appreciate it. I will gladly give
any information I can concerning the program.

        Stu

estxrah@warwick.UUCP ** estxrah@uk.ac.warwick.cs ** estxrah@cs.warwick.ac.uk
      "She's not Ben Johnson, but then who is ?" - David Coleman
Technical Details
Message-ID: <386@poppy.warwick.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mephisto!bloom-beacon!eru!luth!sunic!mcsun!ukc!warwick!estxrah

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mephisto!bloom-beacon!eru!luth!sunic!mcsun!ukc!warwick!estxrah
From: estxrah@warwick.ac.uk (Worm)
Newsgroups: comp.sys.ibm.pc
Subject: Problems with TSR
Message-ID: <386@poppy.warwick.ac.uk>
Date: 20 Feb 90 09:13:26 GMT
Reply-To: estxrah@warwick.ac.uk (Worm)
Organization: Computing Services, Warwick University, UK
Lines: 39