Author Topic: Hydrograph... in assembly?  (Read 2459 times)

HSE

  • Member
  • *****
  • Posts: 2463
  • AMD 7-32 / i3 10-64
Hydrograph... in assembly?
« on: March 07, 2020, 10:35:36 AM »
Hi all!

Here is a little piece. The original ,15 years old, is in QBasic.  And now ... well... look like that  :biggrin:

The program implement methods from Part 630 Hidrology of National Engineering Handbook, Natural Resources Conservation Service, USDA. The result is in a text file.

There is abundance of macros:
  • BASIC instructions
  • write??? --> to file
  • p???  ---> print to console
  • array of variables
  • array of structures
  • procedures that work like functions under SmplMath

Source is assembled with "AsmC -Znk"
Equations in Assembly: SmplMath

Biterider

  • Member
  • *****
  • Posts: 1081
  • ObjAsm Developer
    • ObjAsm
Re: Hydrograph... in assembly?
« Reply #1 on: March 07, 2020, 07:30:51 PM »
Hi HSE
Nice simulation :thumbsup:
You use SmplMath intensively, which is perfect for this project :thup:  It is a pity that it is not used more often.
Biterider

HSE

  • Member
  • *****
  • Posts: 2463
  • AMD 7-32 / i3 10-64
Re: Hydrograph... in assembly?
« Reply #2 on: March 08, 2020, 01:48:05 AM »
Nice simulation :thumbsup:
Some kind of nostalgy  :biggrin:

You use SmplMath intensively, which is perfect for this project :thup:  It is a pity that it is not used more often.
In 32 bit nothing can beat MASM32-SmplMath-ObjAsm32  :eusa_clap:.

To simplify building, here I removed ObjAsm32 debugging system which is my default:
Code: [Select]
start:
    SysInit                                         ;Runtime initialization of the OOP model
    DbgClear
    call main
    inkey
    SysDone                                         ;Runtime finalization of the OOP model
    exit
    I used DbgFPU a lot here  :thumbsup:

Later:
         Just to add, in 32bit SmplMath is 100% optimal. That mean that you can write math source code very easy to read and to improve with cero penalties. In 64bit there is at least a posible penalty, and then perhaps is 99% optimal. 
« Last Edit: March 10, 2020, 12:01:22 AM by HSE »
Equations in Assembly: SmplMath

daydreamer

  • Member
  • *****
  • Posts: 2357
  • my kind of REAL10 Blonde
Re: Hydrograph... in assembly?
« Reply #3 on: March 10, 2020, 10:14:18 PM »
Nice simulation :thumbsup:
my none asm creations
http://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding