The MASM Forum

Miscellaneous => 16 bit DOS Programming => Topic started by: Gunther on July 27, 2023, 03:27:07 AM

Title: Blast furnace calculations
Post by: Gunther on July 27, 2023, 03:27:07 AM
The attached ZIP archive contains the sources, the executable program and a detailed
documentation for a small mathematical exercise. It's about some calculations on a
blast furnace. For more details, see the file BFU.PDF You should definitely read that,
otherwise it's not clear what it's about.

The software is written with PB 3.5 for DOS. However, the dirty calculation work is
done -- as usual -- by some subroutines and functions in assembly language. The
application should run under quite a few configurations, but that must be tested. As
an example, here is the output under DOSBox 0.74-3:
***************************************************
* Here are the results for the searched values    *
* given in formula (1). The calculations are made *
* with the equations (2), (3) and (4) from page 2 *
* of the PDF file.                                *
*                                                 *
* All units of measurement in meters:             *
***************************************************

Radius r  = 3.429
Height h1 = 19
Height h2 = 3.926

The last decimal digits are rounded, as they haven't
much practical significance.


Please, press any key to end the application ...
However, the program also runs under plain DOS, as DOS emulation or as a virtual
machine. The only restrictions are, as a minimum requirement, the presence of the
80386/87 team. That's checked by the software.

All mentioned equations are explained in detail in the BFU.PDF documentation. Only
the formula (4) requires some more considerations. The calculation necessary for
this isn't difficult, but a bit lengthy; therefore I only give the result. But if some forum
members are interested, I can show the derivation in a separate document.

I chose PB 3.5 for a special reason. The old hands will already guess it: For Steve
aka Hutch PowerBASIC always had a special meaning. You can see that just by looking
at the corresponding subforum, to which he always attached large importance and which
he maintained with great love.

Test results from other members would be very nice. I would also welcome some feedback
on the readability of the document BFU.PDF. Thank you in advance.
Title: Re: Blast furnace calculations
Post by: Greenhorn on July 27, 2023, 05:09:27 AM
The document is clear to me.  :thumbsup:

Test result (executed in DOSBox 0.74-3):

***************************************************
* Here are the results for the searched values    *
* given in formula (1). The calculations are made *
* with the equations (2), (3) and (4) from page 2 *
* of the PDF file.                                *
*                                                 *
* All units of measurement in meters:             *
***************************************************

Radius r  = 3.429
Height h1 = 19
Height h2 = 3.926

The last decimal digits are rounded, as they haven't
much practical significance.


Please, press any key to end the application ...
Title: Re: Blast furnace calculations
Post by: Gunther on July 27, 2023, 05:19:18 AM
Greenhorn,

Quote from: Greenhorn on July 27, 2023, 05:09:27 AMThe document is clear to me.  :thumbsup:

thank you for your fast reply.  :thumbsup:
Title: Re: Blast furnace calculations
Post by: FORTRANS on July 30, 2023, 11:06:54 PM
Hi,

   The program ran on my Windows 2000 system.

   The PDF is well written.  My comments are really nitpicks.
The blast furnace diagram is a bit rough for my tastes.  A
diagram to accompany equations 2 and 3 would be nice.  From
"By the way:" and down should be a new section and not part
of "Solution and Software".  In all nicely done.

Regards,

Steve N.
Title: Re: Blast furnace calculations
Post by: HSE on July 31, 2023, 08:46:07 AM
Hi Gunther!

This text sound different from those of previous exercises.

I have some suggestions:

1) A short dedicatory (Hutch, compuserve, good times, ...) To show from the beginning that this is different.

2) A footnote, perhaps referenced in the title, to say that an early draft was directed to forum members, and still is that way even if intended audience is broader.(perhaps reasons, etc)

3) I think "preliminary notes" don't help so much. Perhaps must be something more specific like "purposes of this serie of exercises" or so.

A couple of little things (:biggrin: sorry my English)

"R1 respectively r2" is correct? Not "R1 and r2 respectively"?

In Fortran's paragraph: "About ... about" sounds good?

Regards, HSE.
Title: Re: Blast furnace calculations
Post by: Gunther on July 31, 2023, 06:54:09 PM
FORTRANS,

thank you for your answer: critical, objective, leading to the goal.

Quote from: FORTRANS on July 30, 2023, 11:06:54 PMThe blast furnace diagram is a bit rough for my tastes.
It's a figure from old operating documents and is only intended to show the principle. Or do you mean
the quality of the scan?

Quote from: FORTRANS on July 30, 2023, 11:06:54 PMA diagram to accompany equations 2 and 3 would be nice.
I'll think about that. Originally I wanted to do this if someone has an interest in deriving the
equation (4). But maybe I should revise the whole document? However, it would then become 
correspondingly longer. Although it's not particularly complicated and you only need elementary
math, the calculation is a bit longish. I didn't really care to bore anyone with it, so I wanted
to separate things.

Quote from: FORTRANS on July 30, 2023, 11:06:54 PMFrom "By the way:" and down should be a new section and not part
of "Solution and Software".
Steve, that's indeed an important and accurate comment.
Title: Re: Blast furnace calculations
Post by: Gunther on July 31, 2023, 07:51:10 PM
HSE,

Thank you for your well thought answer.

Quote from: HSE on July 31, 2023, 08:46:07 AMI have some suggestions:

1) A short dedicatory (Hutch, compuserve, good times, ...) To show from the beginning that this is different.
This needs to be clarified and belongs in a separate section. FORTRANS has also pointed out that.
Quote from: HSE on July 31, 2023, 08:46:07 AM2) A footnote, perhaps referenced in the title, to say that an early draft was directed to forum
members, and still is that way even if intended audience is broader.(perhaps reasons, etc)
I think I need to clear up a misunderstanding here. The collection, which I have been working on for
a few months now, contains tasks for pupils and students who want or need to deal with mathematics.
The vast majority of exercises should have a real-world connection to practical questions.

I realize this in 2 volumes. Volume 1 contains the individual exercises and a section with solution
hints at the end of each chapter. There, only the solutions are given - more or less the same as
in the PB program - so that everyone can check his calculation for correctness. Volume 2 then
contains the detailed solution to each task. I'm working on the German and English editions at the
same time. I write one page per day. You can easily calculate how many pages I can write per year.

What I have presented in this thread is one small exercise of so many. For this I wrote the small
program in PowerBASIC. This is not the exercise collection; that already looks a bit different. There
are no PB applications in it, but there is, for example, a detailed index and references to further
leading questions.

Quote from: HSE on July 31, 2023, 08:46:07 AM3) I think "preliminary notes" don't help so much. Perhaps must be something more specific like "purposes of this serie of exercises" or so.

No, I wrote that just for the thread here. I have described only one small aspect of the educational
malaise in Germany. Probably I should leave that out. Who cares about that? The exercise collection
will, of course, have a reasonable preface. I won't go into such problems there. In my opinion, a
preface must take readers by the hand and show them how to work with the book. Such specific questions
don't belong there.
Title: Re: Blast furnace calculations
Post by: HSE on July 31, 2023, 09:07:00 PM
Quote from: Gunther on July 31, 2023, 07:51:10 PMThis is not the exercise collection; that already looks a bit different.

:thumbsup:
Title: Re: Blast furnace calculations
Post by: daydreamer on July 31, 2023, 10:17:15 PM
Quote from: Gunther on July 31, 2023, 06:54:09 PMI'll think about that. Originally I wanted to do this if someone has an interest in deriving the
equation (4). But maybe I should revise the whole document? However, it would then become 
I was crappy about deriving/integral rules in the first place and spoiled by solved how big surface covered by computer program loop was so much simpler than knowing those deriving/integral rules,and now I have forgot all about those rules in school 100years ago(feels like it was 100 years ago)
,maybe exercise for your students?
Title: Re: Blast furnace calculations
Post by: FORTRANS on July 31, 2023, 10:38:53 PM
Hi Gunther,

Quote from: Gunther on July 31, 2023, 06:54:09 PMFORTRANS,

thank you for your answer: critical, objective, leading to the goal.

  Glad to have helped.

Quote
Quote from: FORTRANS on July 30, 2023, 11:06:54 PMThe blast furnace diagram is a bit rough for my tastes.
It's a figure from old operating documents and is only intended to show the principle. Or do you mean
the quality of the scan?

  The figure serves its purpose.  I had difficulty reading the labels
at first, hence my comment.  Knowing it's an historic document explains
things.  Changing screen magnification helped resolve the labels better.
Not a big deal?

Quote
Quote from: FORTRANS on July 30, 2023, 11:06:54 PMA diagram to accompany equations 2 and 3 would be nice.
I'll think about that. Originally I wanted to do this if someone has an interest in deriving the
equation (4). But maybe I should revise the whole document? However, it would then become 
correspondingly longer. Although it's not particularly complicated and you only need elementary
math, the calculation is a bit longish. I didn't really care to bore anyone with it, so I wanted
to separate things.

  I accept your reasoning about equation 4.  The calculations would
be bulky and not serve the document well.  Rather than try to visualize
the trigonometry in equations 2 and 3, or finding a suitable reference,
a figure there would ease things a bit.  Depends on how much you are
expecting from your students I guess.

Quote
Quote from: FORTRANS on July 30, 2023, 11:06:54 PMFrom "By the way:" and down should be a new section and not part
of "Solution and Software".
Steve, that's indeed an important and accurate comment.

Regards,

Steve
Title: Re: Blast furnace calculations
Post by: HSE on August 01, 2023, 01:32:33 AM
Very funny!!

Binary work perfectly in a port of DosBox 0.74 (IDosBox), running in an ARM phone.


:thumbsup:
Title: Re: Blast furnace calculations
Post by: Gunther on August 01, 2023, 02:44:38 AM
daydreamer,

Quote from: daydreamer on July 31, 2023, 10:17:15 PMmaybe exercise for your students?
My students at the university should be confident in using the rules. In many cases, they are not.
That's really a problem.
Title: Re: Blast furnace calculations
Post by: Gunther on August 01, 2023, 02:50:27 AM
Steve,

Quote from: FORTRANS on July 31, 2023, 10:38:53 PMThe figure serves its purpose.  I had difficulty reading the labels
at first, hence my comment.  Knowing it's an historic document explains
things.  Changing screen magnification helped resolve the labels better.
Not a big deal?
I'll see what I can do. It's an EPS file that I included in the Latex source.
Title: Re: Blast furnace calculations
Post by: Gunther on August 01, 2023, 02:54:06 AM
HSE,

Quote from: HSE on August 01, 2023, 01:32:33 AMVery funny!!

Binary work perfectly in a port of DosBox 0.74 (IDosBox), running in an ARM phone.


:thumbsup:
Is that really true? Does the complete FPU part work flawlessly?
Title: Re: Blast furnace calculations
Post by: HSE on August 01, 2023, 04:36:31 AM
Quote from: Gunther on August 01, 2023, 02:54:06 AMDoes the complete FPU part work flawlessly?

So far, perfectly.

In theory, DosBox emulate FPU in not x86 machines. But not so sure in this case because FPU is mostly the same (Later: for simple operations and low precision I see now, just like SIMD)

HSE
Title: Re: Blast furnace calculations
Post by: Gunther on August 01, 2023, 05:24:44 AM
HSE,

Quote from: HSE on August 01, 2023, 04:36:31 AMSo far, perfectly.
I wouldn't have thought that's possible. One is never too old to learn.
Title: Re: Blast furnace calculations
Post by: daydreamer on August 02, 2023, 02:52:33 PM
Quote from: HSE on August 01, 2023, 01:32:33 AMVery funny!!

Binary work perfectly in a port of DosBox 0.74 (IDosBox), running in an ARM phone.


:thumbsup:
Link to where to get that app ?
I am writing x86 code on my tablet,dos emulator might be possible to run older ml version than 6.14 ,linker and testrun
Curious if its possible to run ml on smart phone?
 
Title: Re: Blast furnace calculations
Post by: Gunther on August 02, 2023, 08:32:31 PM
daydreamer,

Quote from: daydreamer on August 02, 2023, 02:52:33 PMLink to where to get that app ?

I think Google Play will do the job. However, HSE probably knows more about it.

The linked article (https://gamingonphone.com/guides/dos-emulation-lets-you-play-some-amazing-classics/) might also be interesting for you.
Title: Re: Blast furnace calculations
Post by: HSE on August 02, 2023, 09:19:33 PM
Quote from: daydreamer on August 02, 2023, 02:52:33 PMI am writing x86 code on my tablet

Phone is same thing (just smaller  :biggrin: )


Quote from: daydreamer on August 02, 2023, 02:52:33 PM,dos emulator

What emulator?

Title: Re: Blast furnace calculations
Post by: HSE on August 03, 2023, 11:48:59 PM
Quote from: Gunther on August 02, 2023, 08:32:31 PMI think Google Play will do the job.

Exactly. IDosBox is free, and author is Luigi B.


Quote from: Gunther on August 02, 2023, 08:32:31 PMHowever, HSE probably knows more about it.

No so much indeed. I'm reading a little, and DosBox code (of this specific version) show that is emulating FPU. Beside is clear that x64 build also emulate FPU.