Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Creating a low mem TSR in Watcom C/C++ 11.0

Posted on 1998-01-15
1
506 Views
Last Modified: 2008-02-01
I'm trying to create a TSR i Watcom C/C++ 11.0, but no matter what I do, I the TSR i create uses AT LEAST 15 Kb of conventional memory. The problem is that I have to include everything from the _PSP to the end of the stack (Including the C functions I use, like sound() ), to avoid crashing. The ideal would be to include a single function in the resident part of the program, but then I'll loose the stack (And thereby my variables).
How do I create a TSR which uses 2-6 KB of conventional instead of 16 Kb ? I've created several 2-6 KB TSR's using Pascal (A very long time ago) so I figure the same thing is possible in Watcom C.
0
Comment
Question by:Morten from Eliten
1 Comment
 
LVL 10

Accepted Solution

by:
rbr earned 30 total points
ID: 1257004
If your problem is the stack avoid variables using the satck. Declare all variables as static and no stack will be used for them.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question