Recent

Author Topic: Mimic a TSR in WinExec call???  (Read 5000 times)

ozznixon

  • Jr. Member
  • **
  • Posts: 81
    • http://www.modernpascal.com/
Mimic a TSR in WinExec call???
« on: May 12, 2018, 11:59:44 pm »
All,

   I do not know who to ask – however, as low-level as your knowledge is, maybe you know how to do this and could help me.

   IN the 80’s and 90’s – (BBS era) … when running a BBS and Fidonet mailer, it was common place to use a FOSSIL instead of writing your own UART code.

   In the 2000’s … Microsoft dropped the NTVDM, so running a 16bit TSR is impossible (or is it?)…

   I have read, where a C++ guy has came up with a way to spawn an EXE, does a little PIPE control to make sure everything is running without error … however, he is mimic’ing a FOSSIL: https://en.wikipedia.org/wiki/FOSSIL

Original dev notes: http://www.dcllabs.net/docs/x00ref.txt (page 6 starts the things to trap – it is all sent to 1 Interrupt)

   The C++ programming in the background runs QuickBBS or RA for example – he is trapping all of the INT 14 calls for the FOSSIL and returns the mimic’d information. I want to do this in Delphi, however, no idea how to do this part. I was hoping you could send me sample in Delphi (please, begging haha – I have tried and tried but, no success).

   What I want to build as a free-open source piece of code in Delphi and C, and show people how to run the old BBS program in a background shell – and in the foreground interact with Winsock. Thus, I could telnet to 127.0.0.1 port 1234 – the FOSSIL will send to the BBS program “Ring Indicator”, and when the BBS reads the comport buffer, it will get “RING”. It will send “ATA”, which the program will use as "Accept(socket_handle)” and return “CONNECT 19200”. Etc etc.

   I am just trying to find someone who can show me how to mimic INT 14 (and I receive all function queries) from the spawned EXE(s).

   Can anyone help???

Thank you kindly!!
Ozz



---
Want to kick the tires to a Free Pascal like script engine? http://www.ModernPascal.com/

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6628
Re: Mimic a TSR in WinExec call???
« Reply #1 on: May 13, 2018, 05:23:31 am »
   The C++ programming in the background runs QuickBBS or RA for example – he is trapping all of the INT 14 calls for the FOSSIL and returns the mimic’d information. I want to do this in Delphi, however, no idea how to do this part. I was hoping you could send me sample in Delphi (please, begging haha – I have tried and tried but, no success).

This is the Lazarus forum, not the Delphi forum.
 
In Lazarus one would use TProcess.

dbannon

  • Sr. Member
  • ****
  • Posts: 338
Re: Mimic a TSR in WinExec call???
« Reply #2 on: May 13, 2018, 06:20:45 am »
I wonder if the original post was more about advertising a commercial product (see signature line at the bottom) than seeking an answer to a question that became irrelevant a long time ago. TSR was great technology on single threaded systems. Why would you bother today ?
Davo
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

Thaddy

  • Hero Member
  • *****
  • Posts: 7213
Re: Mimic a TSR in WinExec call???
« Reply #3 on: May 13, 2018, 09:43:41 am »
I wonder if the original post was more about advertising a commercial product (see signature line at the bottom) than seeking an answer to a question that became irrelevant a long time ago. TSR was great technology on single threaded systems. Why would you bother today ?
Davo
If it is Ozz Nixon himself he merely mixed up naming FPC/Delphi. What he means is Object Pascal.
I also still play with TSR's (In TP and PowerBasic 3) in a virtual machine and/or DOSBOX (although I have a second series IBM - still working, I hope - but gathering dust.). It is just fun to see your old code run.....
My answer would be to use DOSBOX and dosboxwrapper (included with FPC) to run and interface with such old software.
He should be capable enough by now (  8-) ) to know how to do that.
inline variables like in D10.3 are a bit like Brexit: if you are given the wrong information it sounds like a good idea. Every kid loves candy, but it makes you fat and your teeth will disappear.

dbannon

  • Sr. Member
  • ****
  • Posts: 338
Re: Mimic a TSR in WinExec call???
« Reply #4 on: May 13, 2018, 11:13:51 am »
Ah, dosbox ?  I use dosbox on my linux laptop to run Warcraft II - it far more stable than it ever was on DOS6 or Windows95. I don't save my position anymore.

Hmm, perhaps I'm getting a little off topic......

 ;)
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

ozznixon

  • Jr. Member
  • **
  • Posts: 81
    • http://www.modernpascal.com/
Re: Mimic a TSR in WinExec call???
« Reply #5 on: August 18, 2018, 03:06:56 pm »
Actually this is a genuine question - I have no problem in coding this in Lazarus/FPC or any other dialect of pascal... I however lack the knowledge of how to write a program that intercepts INT 14 calls. The socket stuff is a breeze, have my own components.

As @dbannon mentions - I have since then spawned DOSBox on my Windows machine, and Boxxer on my Mac - in the conf file - set it to mimic modem on serial 1, listening on port 23... and they talk to each other - as if there was a modem there... I still have to run X00 or BNU Fossil.

I have rejoined Fidonet, and most people are either running DOSBox or Mystic or Synchronet... However, I want to run different products that do not have a Linux or Mac ports. I would assume it should not be too hard to make code to handle INT 14 calls. Just not sure how to do this in Ring3????

O.
---
Want to kick the tires to a Free Pascal like script engine? http://www.ModernPascal.com/

ozznixon

  • Jr. Member
  • **
  • Posts: 81
    • http://www.modernpascal.com/
Re: Mimic a TSR in WinExec call???
« Reply #6 on: August 18, 2018, 03:25:14 pm »
I wonder if the original post was more about advertising a commercial product (see signature line at the bottom) than seeking an answer to a question that became irrelevant a long time ago. TSR was great technology on single threaded systems. Why would you bother today ?
Davo
If it is Ozz Nixon himself he merely mixed up naming FPC/Delphi. What he means is Object Pascal.
I also still play with TSR's (In TP and PowerBasic 3) in a virtual machine and/or DOSBOX (although I have a second series IBM - still working, I hope - but gathering dust.). It is just fun to see your old code run.....
My answer would be to use DOSBOX and dosboxwrapper (included with FPC) to run and interface with such old software.
He should be capable enough by now (  8-) ) to know how to do that.

Yes - OP... I still default to the "D" product name in conversation - after 15 years or so being a proponent of said product - it's just a old habit that hasn't died yet.

I am digging around - never noticed a wrapper - and I like to skim through the packages folder to keep up with what and how.

Thanks!
Ozz
---
Want to kick the tires to a Free Pascal like script engine? http://www.ModernPascal.com/

dbannon

  • Sr. Member
  • ****
  • Posts: 338
Re: Mimic a TSR in WinExec call???
« Reply #7 on: August 20, 2018, 02:48:47 pm »
I however lack the knowledge of how to write a program that intercepts INT 14 calls. The socket stuff is a breeze, have my own components.
....
O.

Wow, I used to write code doing that, way back then. From memory, I used a small asm module I would link to with C code. It was not particularly complicated, there was a table somewhere that you hooked into, checked to see if a key press was your hot key and, if so, turn interrupts off, save a bunch of data and then point to your own code. When you came back from your own code, you would restore that data and all was good. IFF you did it all in the right order. Wow, you would crash a lot of machines getting that code right. Doing it in a DOS box today would make life a whole lot easier.

its just possible there is a box of floppy disks around somewhere with my code on one of them, unlikely but possible (I was pretty proud of it back then). Check this thread from time to time, if I do find them, just possible.

ASM and C - now we are really off topic !

David
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6628
Re: Mimic a TSR in WinExec call???
« Reply #8 on: August 20, 2018, 03:14:17 pm »
If I reread the question, I think the problem you are going to hit is

16-bit vs 32-bit and dos vs windows.

IOW trapping 16-bit dos ints and doing windows socket communication in the same exe won't be easy.