Question

Someone can explain me how to develop in assembly on OpenVMS, I already develop in C on OpenVMS and I've just start with assembly in Windows and Linux. How can I compile, link and run an .asm program?

Was it helpful?

Solution

Just use the HELP and RTFM (Read The Fine Manuals)

Suggested Google string = site:hp.com openvms macro

Below is a trivial example i just typed in, in one go. Create; Compile; link; run.

This was On Itanium. Alpha and Vax would be exactly the same for such trivial program

The hardest part was to paste the code example here... the { } code block was eating my new-lines, if the line did not start with 4+ spaces. Odd! 'Trying to help' POS!

First, create a file:

$CREATE test.mar

Then we put this text into that file:

     .psect  data    wrt,noexe
hello:
     .ascid  "Hello World"

     .psect  code    nowrt,exe

     .entry  start, 0
     movl    #5, R8
10$:
     pushaq  hello
     calls   #1, G^lib$put_output
     sobgtr  R8, 10$
     ret
     .end start

With that completed, hit control-z to return to DCL and compile and run:

$ MACRO test
$ LINK test
$ RUN test 
Hello World
Hello World
Hello World
Hello World
Hello World
$

OTHER TIPS

I love MACRO-32 and I adore even more its less well-known - but extremely elegant cousin - BLISS-32 but in my 45 years as a programmer I have only ever coded ONE commercial application in MACRO and I did that because I needed superfast speed AND I had no other high-level language alternative.

So MACRO is like a girlfriend who gives you a fast time (!!) but is not one you would want to settle down and be married to. For this, you need to code in either C or C++ or BASIC or even .. COBOL because these are languages which 'do the job' sufficiently well to go into production AND are maintainable long after the original coder has moved on.

DBL is the current incarnation of the origin DiBOL, Digital Business Oriented Language, an alternative to COBOL. I recommend DBL over either COBOL or BASIC for applications. I have coded in MACRO through DiBOL/DBL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top