Author Topic: I think I've found the magic number  (Read 5847 times)

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
I think I've found the magic number
« on: October 22, 2022, 09:44:17 pm »
The edm2 web site :
#define ORD_DOS32PERFSYSCALL            976

This number is 31.25 pwr 2 = 976.5625 (I do not know, but maybe in an era with two processors, it could be valid, But they did not include the decimal part.)
I have tried many numbers and there is one that is especially good.

         31.25 pwr 6 = 931322574.615478067200

If defined in the config.sys (only one line)
SET ORD_DOS32PERFSYSCALL=931322574.615478067200
SET ORD_DOS32PERFSYSCALL=931322.574615478067200
SET ORD_DOS32PERFSYSCALL=931.322574615478067200
SET ORD_DOS32PERFSYSCALL=0.93132257461547806720

The position in the config.sys will be after the line:
SET IPF_KEYS=SBCS

I understand that they all work, but in some computers will work better one number or another.
Maybe it that the number that shows more available memory after booting is the best option for that computer,
 but this I have little tested

I have been able to be with the Dooble, playing a music video for more than an hour, without it closing.
Without touching it, when I touch it first cease the image and then the sound ceases.
But it didn't shut down. I can change the flap, but not on operational.
The dbexpert also works better.

Saludos

Roderick Klein

  • Hero Member
  • *****
  • Posts: 655
  • Karma: +14/-0
    • View Profile
Re: I think I've found the magic number
« Reply #1 on: October 22, 2022, 11:23:54 pm »
I mean how does this set statement influence the complete system stability ?
You previously made some sort of basic file that runs in a DOS VDM (where you not that person ).
How can the OS2KRNL and other ring 0 code be influenced by a VDM basic program ?
I am not saying your work does not work, I am just puzzled how it exactly works.

Thanks,

Roderick

Roderick Klein

  • Hero Member
  • *****
  • Posts: 655
  • Karma: +14/-0
    • View Profile
Re: I think I've found the magic number
« Reply #2 on: October 22, 2022, 11:33:38 pm »
The only thing the SET ORD_DOS32PERFSYSCALL=931322574.615478067200 is set the environment variable.
But OS/2 will never pick this up, best I can tell. Is there any code in OS/2 that uses this SET statement ?

Roderick

Tom

  • Full Member
  • ***
  • Posts: 194
  • Karma: +5/-0
    • View Profile
Re: I think I've found the magic number
« Reply #3 on: October 23, 2022, 03:05:39 pm »
A DLL contains functions that are available for use by other programs. These functions may be referenced by their name or by their "ordinal number", which must be an integer. What "#define ORD_DOS32PERFSYSCALL            976" does, is making clear that the ordinal number for the function DOS32PERFSYSCALL is 976.

Fractions cannot be used as an ordinal number for a function. If you would look inside a DLL for function number 931.322574615478067200 , you will not find it. You may find function number 931 or 932, but not 931.322574615478067200.



roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: I think I've found the magic number
« Reply #4 on: October 23, 2022, 03:28:19 pm »
A DLL contains functions that are available for use by other programs. These functions may be referenced by their name or by their "ordinal number", which must be an integer. What "#define ORD_DOS32PERFSYSCALL            976" does, is making clear that the ordinal number for the function DOS32PERFSYSCALL is 976.

Fractions cannot be used as an ordinal number for a function. If you would look inside a DLL for function number 931.322574615478067200 , you will not find it. You may find function number 931 or 932, but not 931.322574615478067200.

But aren't they different variables?
ORD_DOS32PERFSYSCALL <> DOS32PERFSYSCALL
saludos

roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: I think I've found the magic number
« Reply #5 on: October 23, 2022, 03:59:37 pm »
Roderick
Many of your questions, I don't have an explanation for it either. I only base myself on what works for me.
If someone else is served better, if I get confused it is desired and ready.
I often ask myself questions like
what would happen if I did...?
Since I don't program I don't try to do what I don't know.
Anyway I try to apply my common sense reasoning as much as possible.

I have long read in the book: Insideos2, isos2.txt in section 16.3 Timer Services , you can see 31.25 millisecons
What I didn't know was how I could apply it.
But as always Looking for one thing, I find another.
What I can tell you is that I have tried all the powers from 1 until the numbers stop being integers, maybe it is because 6 and a multiplier of 32, but this I do not know. It is the one that works best.

Saludos

Tom

  • Full Member
  • ***
  • Posts: 194
  • Karma: +5/-0
    • View Profile
Re: I think I've found the magic number
« Reply #6 on: October 23, 2022, 05:13:48 pm »
A DLL contains functions that are available for use by other programs. These functions may be referenced by their name or by their "ordinal number", which must be an integer. What "#define ORD_DOS32PERFSYSCALL            976" does, is making clear that the ordinal number for the function DOS32PERFSYSCALL is 976.

Fractions cannot be used as an ordinal number for a function. If you would look inside a DLL for function number 931.322574615478067200 , you will not find it. You may find function number 931 or 932, but not 931.322574615478067200.

But aren't they different variables?
ORD_DOS32PERFSYSCALL <> DOS32PERFSYSCALL
saludos

They are two different things.

Dos32PerfSysCall is a function, that is mentioned on www.edm2.com. On http://www.edm2.com/index.php/OS/2_DLL_Entry_Points_Cross_Reference it mentions

Code: [Select]
Dos32PerfSysCall DOSCALLS.976
That tells you that it is contained in DOSCALLS.dll and has ordinal 976.

ORD_DOS32PERFSYSCALL is (like the ORD in the name already suggests) the ordinal for function Dos32PerfSysCall.



roberto

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +3/-6
    • View Profile
Re: I think I've found the magic number
« Reply #7 on: October 23, 2022, 05:38:00 pm »
Roderick
 I attach a file mj.zip, which contains a program in basic, the lines from 1783 to 1786, make that when the Dooble program is closed, it does not stay open. It also works with the simple browser.
What I do not tell you is if you need the previous lines, that is, from 15 to 1782, but I think I remember that adding those lines was when the problem of the Dooble was solved by closing
I use this program to be able to use the Seamonkey as similar as possible to the Dooble.
Remember to start it at the beginning of the session.
This is done playing mahjongg, every time I got an error, I opened the theseus, and selected the memsh, from the dll that I thought could fail and already this.

Saludos

jailbird

  • Newbie
  • *
  • Posts: 46
  • Karma: +5/-0
    • View Profile
Re: I think I've found the magic number
« Reply #8 on: October 24, 2022, 11:32:58 pm »
#define ORD_DOS32PERFSYSCALL            976

Is just a compile-time directive that tells you the ordinal value for the DosPerfSysCall system call. Setting an environment variable called ORD_DOS32PERFSYSCALL in CONFIG.SYS does nothing at all. The system doesn't know about an environment variable called that. It has the same effect as setting ANSWER_TO_THE_ULTIMATE_QUESTION=42 in CONFIG.SYS