Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
ecm

Homepage E-mail

Düsseldorf, Germany,
01.04.2023, 09:09
 

A question about the new /J switch for TSRs (Developers)

I have written about how I want to extend the /J switch of my TSRs. Prior to this, /J was just a switch to disable allocation of a DOS UMB. The change is that if /J is immediately followed by +, -, or a letter, then the following letters will affect different options about the application's behaviour.

For now we have all switches mentioned in the blog post, except for the /N and /O switches which for simplicity were not yet added to /J. But all the switches we have are of the form "disable XYZ", and the underlying variables default to "true" (0FFh) and are set to "false" (00h) if specified as in eg /JU.

For now I can still change around the sense of the switches. As yet, /JU is the same as /J+U, and the plus sign indicates setting the associated variable to "false" (eg "disable DOS UMB use"). With a minus sign as in /J-U, the variable is reset to "true" ("enable DOS UMB use") instead. I don't want to change the /JU semantics, but I could swap plus and minus and thus make /JU the same as /J-U ("disable DOS UMB use" then).

Any thoughts?

---
l

bretjohn

Homepage E-mail

Rio Rancho, NM,
02.04.2023, 06:13

@ ecm
 

A question about the new /J switch for TSRs

I'm confused about exactly what you're trying to accomplish. It kind of looks like you're trying to have all your TSRs use the same switches, and want to use the /J as sort of an "entry point" into memory related functions instead of having several different switches?

ecm

Homepage E-mail

Düsseldorf, Germany,
02.04.2023, 08:50

@ bretjohn
 

A question about the new /J switch for TSRs

> I'm confused about exactly what you're trying to accomplish. It kind of
> looks like you're trying to have all your TSRs use the same switches,

That's correct, the TSRs share a lot of code especially for the transient, and once I'm satisfied with the changes I will pick them for all the TSRs based on the same codebase.

> and
> want to use the /J as sort of an "entry point" into memory related
> functions instead of having several different switches?

Don't know what you mean by "entry point" but I certainly don't want to assign half a dozen switches just for the various options now provided for /J. (And they aren't all memory-related.)

/J was originally chosen because RxANSI already used both /U (Uninstall) and /L+/- (set LESS state), so for "disable DOS UMB use" an unused switch had to be selected. The new /J switch could be called "jettison" because it "jettisons features" of the TSR's transient application.

---
l

bretjohn

Homepage E-mail

Rio Rancho, NM,
03.04.2023, 06:27

@ ecm
 

A question about the new /J switch for TSRs

> Don't know what you mean by "entry point" but I certainly don't want to
> assign half a dozen switches just for the various options now provided for
> /J. (And they aren't all memory-related.)

What exactly is the commonality between the options associated with /J? They aren't all memory-related, but AFAICT the only relationship is that you don't have any other place to put them -- it seems to be a sort of "miscellaneous" category.

It also seems like you're trying to organize it sort of in a menu-oriented scheme like you might do in a non-TSR program with an "Other" or "Miscellaneous" or "Tools" option as the top level. That's what I meant by an "entry point".

As an example, in some of my TSR's I have options for the different types of "special" memory that can be used (Upper, EMS, or DPMS). I have options for each of those possibilities with a "Yes" or "No" switch. For example, I have /EMS:Yes, but I don't have a /Memory:EMS:Yes since I think that is unnecessarily redundant.

It also seems like your wanting to try and make all options be a single character and that's useful (mnemonics) but I've found it to be impractical. Even a relatively simple TSR can have too many options to come up with unique characters that make sense. I've found that I can't always have single-character options and need to use whole words.

I've also found that the TSRs are all so different from each other that trying to make a common set of switches really isn't practical, either. I think the only two options that are common to most of mine are /U (usually aliased as /Uninstall, /Remove, and /Out) and /? (usually aliased as /H, /Hlp, and /Help).

ecm

Homepage E-mail

Düsseldorf, Germany,
04.04.2023, 14:12

@ bretjohn
 

A question about the new /J switch for TSRs

> > Don't know what you mean by "entry point" but I certainly don't want to
> > assign half a dozen switches just for the various options now provided
> for
> > /J. (And they aren't all memory-related.)
>
> What exactly is the commonality between the options associated with /J?
> They aren't all memory-related, but AFAICT the only relationship is that
> you don't have any other place to put them -- it seems to be a sort of
> "miscellaneous" category.

Yes, that's correct. They aren't important enough to warrant their own main switch each, but they are options I want to provide the user in case they need or want it. (For instance, PSP relocation already was possible to disable, but only by changing a build option.)

> It also seems like you're trying to organize it sort of in a menu-oriented
> scheme like you might do in a non-TSR program with an "Other" or
> "Miscellaneous" or "Tools" option as the top level. That's what I meant by
> an "entry point".

I suppose so, yes.

> As an example, in some of my TSR's I have options for the different types
> of "special" memory that can be used (Upper, EMS, or DPMS). I have options
> for each of those possibilities with a "Yes" or "No" switch. For example,
> I have /EMS:Yes, but I don't have a /Memory:EMS:Yes since I think that is
> unnecessarily redundant.

Sure.

> It also seems like your wanting to try and make all options be a single
> character and that's useful (mnemonics) but I've found it to be
> impractical. Even a relatively simple TSR can have too many options to
> come up with unique characters that make sense. I've found that I can't
> always have single-character options and need to use whole words.

That's why I'm using the /J switch to hide away all these options, which gives us another 26 (or 36) flags with just one main switch.

> I've also found that the TSRs are all so different from each other that
> trying to make a common set of switches really isn't practical, either. I
> think the only two options that are common to most of mine are /U (usually
> aliased as /Uninstall, /Remove, and /Out) and /? (usually aliased as /H,
> /Hlp, and /Help).

/? or /H is help for all my TSRs (hypothetically, they just show help for unsupported switches), while /U and /R (Uninstall/Remove), /N (install New), /O (only apply Options / show state, do not install), and /X= (set preferred multipleX number) are also shared among all of them. Switches like /S+/-, /L+/-, /A+/- are specific to some of the TSRs.

---
l

Back to index page
Thread view  Board view
22049 Postings in 2034 Threads, 396 registered users, 83 users online (0 registered, 83 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum