# Assembly routines interface with Fortran77

**URL:** <https://fortran-lang.discourse.group/t/assembly-routines-interface-with-fortran77/555>\
**Category:** Uncategorized\
**Created:** [January 8, 2021, 8:26am UTC](https://fortran-lang.discourse.group/t/assembly-routines-interface-with-fortran77/555 "2021-01-08T08:26:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mstercomputersrvices](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@mstercomputersrvices](https://fortran-lang.discourse.group/u/mstercomputersrvices)\
**Post date:** [January 8, 2021, 8:26am UTC](https://fortran-lang.discourse.group/t/assembly-routines-interface-with-fortran77/555/1 "2021-01-08T08:26:22Z")

</div>

- OS: Windows 7, 32 Bit, Intel Centrino Core\*2 Duo, Toshiba A 205 Satellite, 386 Pentium Laptop.
- binUtils: GNU Assembler Version 2.9.4 using BFD version 2.9.4.

```auto
Please let me know how to write the following Assembly routines interface with Fortran77 language.

1.Service 0 - Set Screen Mode
2.Service C - Write Dot
3.Service D - Read Dot

I am trying to develop a software related to Astronomy with Graphics representation with the above mentioned Laptop configuration. 
If these assembly routines available I want to develop other Assembly routines independently.
33 years ago developed assembly routines in DOS. Now I want to develop in Windows.  

If any body knows please try to guide me.

```

---

<div class="post-metadata">

**Author:** ![sblionel](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/sblionel/32/853_2.png) [@sblionel](https://fortran-lang.discourse.group/u/sblionel)\
**Post date:** [January 9, 2021, 10:40pm UTC](https://fortran-lang.discourse.group/t/assembly-routines-interface-with-fortran77/555/2 "2021-01-09T22:40:50Z")

</div>

You simply can’t do this - while it is possible to call assembler from Fortran, your DOS code will not work in Windows. Windows has numerous, easily callable APIs (routines) to do graphics. Some Fortran compilers also come with graphics libraries.

---

<div class="post-metadata">

**Author:** ![mstercomputersrvices](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@mstercomputersrvices](https://fortran-lang.discourse.group/u/mstercomputersrvices)\
**Post date:** [January 10, 2021, 2:03am UTC](https://fortran-lang.discourse.group/t/assembly-routines-interface-with-fortran77/555/3 "2021-01-10T02:03:18Z")

</div>

As per your reply, I understand it is possible to solve my problem. A hope just started.  
Which API’s is better and easy to use, and how to connect? If possible please try to guide me for one example. Then I will try further routines. I understand that from your end I want to delete my DOS routines and trying to start a new one as soon as possible.  
If you don’t mind please let me know the API’s stored libraries at the earliest.

Thanks in advance

for your help

Regards

---

<div class="post-metadata">

**Author:** ![sblionel](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/sblionel/32/853_2.png) [@sblionel](https://fortran-lang.discourse.group/u/sblionel)\
**Post date:** [January 10, 2021, 5:47pm UTC](https://fortran-lang.discourse.group/t/assembly-routines-interface-with-fortran77/555/4 "2021-01-10T17:47:26Z")

</div>

Which Fortran are you using? I would recommend Intel Fortran, [which is now free](https://software.intel.com/content/www/us/en/develop/tools/oneapi/hpc-toolkit.html). I’d suggest that the easiest path is to use the Intel Fortran QuickWin library, which includes many graphics routines. You can read more about it [here](https://software.intel.com/content/www/us/en/develop/documentation/using-visual-fortran-windows-applications/top.html). There are several QuickWin examples in the [Intel Parallel Studio XE Samples Bundle](https://software.intel.com/content/www/us/en/develop/download/776976.html) under folder compiler\_f\QuickWin I would suggest SciGraph as the one most relevant to you.

Using the Windows API is also possible but is more complicated to program. There are samples of that too.

---

<div class="post-metadata">

**Author:** ![mstercomputersrvices](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@mstercomputersrvices](https://fortran-lang.discourse.group/u/mstercomputersrvices)\
**Post date:** [January 11, 2021, 7:47am UTC](https://fortran-lang.discourse.group/t/assembly-routines-interface-with-fortran77/555/5 "2021-01-11T07:47:42Z")

</div>

I am using Fortran77/90/95. A lot of thanks for your advice. I will try,because you suggested and also free.

Once again tahnks for your advice.

Regards,

---

<div class="post-metadata">

**Author:** ![eugene\_epshteyn](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@eugene\_epshteyn](https://fortran-lang.discourse.group/u/eugene_epshteyn)\
**Post date:** [January 12, 2021, 4:46am UTC](https://fortran-lang.discourse.group/t/assembly-routines-interface-with-fortran77/555/6 "2021-01-12T04:46:33Z")

</div>

Depending on what functionality you want to have, another possibility could be to have your application to output a text file that is HTML5 + canvas + JavaScript, like here: [HTML Canvas](https://www.w3schools.com/html/html5_canvas.asp) In fact, I bet a lot of functionality of pgplot could be translated into HTML5/canvas/JavaScript output. Then your web browser can display your output.

Of course, to make this interactive (send UI events from the web browser to the app and have app change its output based on these events), one would need to integrate HTTP server with WebSockets support into the app. Such libraries do exist in C/C++, but doing end-to-end integration would be a lot of work. (Looks like a fun project, though, if only I had time…)

---

<div class="post-metadata">

**Author:** ![eugene\_epshteyn](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@eugene\_epshteyn](https://fortran-lang.discourse.group/u/eugene_epshteyn)\
**Post date:** [January 12, 2021, 2:42pm UTC](https://fortran-lang.discourse.group/t/assembly-routines-interface-with-fortran77/555/7 "2021-01-12T14:42:31Z")

</div>

Yet another possibility, perhaps as a short term stop-gap measure: change your existing routines to draw to a memory buffer, then save that memory buffer to a file, perhaps in some easy image format, like PNG.
