- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- How to learn Macro
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2004 02:18 PM
03-31-2004 02:18 PM
I do need to get a handle on the Macro language some time soon. Anybody knows Web resources and/or books teaching macro?
The only thing I've found yet is the reference manual, which is certainly useful later on, but first I am looking for "Hello World" to get me started ;-)
Thanks, Martin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2004 04:13 PM
03-31-2004 04:13 PM
Re: How to learn Macro
You are of course right by looking at simple example, and a bunch of reading before serious writing.
VAX macro? Alpha? IPF?
Well, I have two VAX Macro, Alpha compatible, 'hello worlds' for you in my freeware submissions:
http://h71000.www7.hp.com/freeware/freeware50/rms_tools/bonus/fix_saveset.mar
[you'll appreciate the date in that file, but it was a serious program!]
And here is a tool I like a lot to poke at indexed files specifically, but in a pinch i use it to patch executables and stuff!
http://h71000.www7.hp.com/freeware/freeware50/rms_tools/src/zap.mar
Both tools are in Macro as that is the only language garantueed to be available on a VMS box. What is your excuse to write (maintain?) in Macro? (Pick C if you can escape still!)
Attached a couple more smallish standalone examples.
Enjoy,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2004 05:19 PM
03-31-2004 05:19 PM
Re: How to learn Macro
If I remember well, there are quite some examples on the freeware CD-s - better look for the OLD ones, or check the freeware archive for .MAR files.
If you master it: Welcome to the Ranks of Real Programmers (Sorry Hein)
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2004 05:20 PM
03-31-2004 05:20 PM
Re: How to learn Macro
I'll dig into my archives tonight and see if I can find some examples to share.
WG
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 01:55 PM
04-01-2004 01:55 PM
Re: How to learn Macro
Thanks for some examples, they will certainly be helpfull once I've got the basic concepts and syntax of the language. What I am really looking for is a K&R or Camel book like introduction. In a pinch also the handouts of a course would be fine. Any idea where to find something like this?
Greetings, Martin
P.S. This is <
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 02:11 PM
04-01-2004 02:11 PM
Re: How to learn Macro
That makes sense. You have be able to read the instructions and grasp what their intent is to fully appreciate a crashdump. [often the data structures help a lot/enough, but not always]
For that purpose you may want to consider using a regular Fortran or C program and compile/list=macro.
Next step, compil/debug/noopti, link/debu.
Run, and display source, AND instructions and use STEP /INST trying to understand the steps (step /over or step/ret to avoid going too deep in (rtl)procedutd.
Final step, compile/nodebug/opti and yet run/debug. Now see if you can still keep track of what the program is up to!
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 03:42 PM
04-01-2004 03:42 PM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 05:37 PM
04-01-2004 05:37 PM
Re: How to learn Macro
I wrote using assembler in past (no CPU AXP); remember macro is very different form any other language: before you can write using macro you must known very well CPU architecture and CPU instruction set. It's not enough known about architecture (sorry for my broken english).
Then you have to learn about OS use CPU register: for example any function return status code into register zero (R0).
Remember also macro has a preprocessor (as C language) to declare some "high-level" statement.
Martin, if you have to write some serious programm in macro you need study a lot (more than high-level language).
@Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 06:28 PM
04-01-2004 06:28 PM
Re: How to learn Macro
you could find something here:
German language: http://www.complang.tuwien.ac.at/ublu/
Commercial book:
http://all-computer-books.co.uk/RISC_microprocessors_Architecture.html
Compaq Alpha architecture
http://www.ee.lsu.edu/ee4720/alphav4.pdf
Some vax assembly handbook (same rules of macro, different assembly instruction set):
http://isbn.nu/0852744595
http://isbn.nu/0023992557http://isbn.nu/0139421521
http://isbn.nu/0805371222
http://isbn.nu/0697030601
Try using assembler or assembly insted of macro onto web search engine.
@Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 06:32 PM
04-01-2004 06:32 PM
Re: How to learn Macro
...if you have to write some serious programm in macro you need study a lot (more than high-level language).
If you're used to what I would consider "proper programming" - that is: VERY modular and thouroughly thought about before hitting any key - it's no more difficult than programming in a language as Fortran, Pascal or C.
Agreed, things get far more complicated since you have to do everything yourself - conversions, memroy mananegment, IO..., but where possible you can (and should) use system services, and create a kind of building blocks. Or better: 'steal' them.
It helps a lot if you have some idea of the processor and the rest of the architecture, but once you get familiar with is, it's more or less a piece of cake.
I would suggest to read the article in the latest issue of the VMS Technical Journal on this issue. It describes pretty well what I mean to say.
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 08:54 PM
04-01-2004 08:54 PM
Re: How to learn Macro
I don't agree :-(
programming using assembler/macro require knoledge of CPU architecture.
For example (but it's only an example) you need known R0 register is changed by system call (as returc code);
Again: reading assembler code is not simple; every statement is a CPU instruction; yes usually you can use macro to abstract but most code is based on CPU instruction.
Again: if you have to interface a external C library (or any other language) you must known as parameter are pushed into stack while using high-level language you can ignore theese information!
I confirm my prior post: if Martin have to write some little routine he can work quicky by example but if he have to write more complex software have heavly to study.
Obviously it only my idea!
@Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 10:26 PM
04-01-2004 10:26 PM
Re: How to learn Macro
I think you have the key references already.
On itanium VMS there is a IMACRO compiler (corresponding to AMACRO on alpha) which attempts to make sense of VAX assembly language. The VAX architecture is no more but the assembly language lives on!
Apart from fun and education why are you doing this?
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 01:00 AM
04-02-2004 01:00 AM
Re: How to learn Macro
What about:
* control of virtually everything
* no (or less) overhead
* speed of execution
Martin:
There is a remarkebly good book on the VAX processor architecture written in the '80s - I'll share the details tonight if no-one has done already - that will surely help to grasp the ideas of MACRO32.
But since you'll attend the crashdump course, it will be on AXP, I think you'll need the AXP assembly language (MACRO64) wouldn't you? (It's on some freeware CD). I don't know of some book like above on AXP....
Antonio:
Don't get me wrong: yes, you DO need a fair understanding of the architecture when writing programs in MACRO. But it's no luxury either to know about it writing programs in any other language - and certainly when debugging to system level....I found this true on PDP, VAX, AXP, Zilog and IA32; it will apply to IA64 as well.
The point is: I found the VAX architecture pretty straight forward, and easy to grasp. So understanding it wasn't a big problem.
Basically, MACRO32, even on AXP, uses the same principles. What takes time is getting the dicipline to keep in mind what you're working with - and to anticipate on consequences of your choices (AKA "side-effects"). But that applies to 'standard' languages as well - whether it's COBOL, PASCAL, FORTRAN or C.
I didn't say it's easy. On the contrarary. But in my early days as a programmer when I followed the System programming course, the instructor give a nice statement:
"Programming in Macro compares to programming in any high-level language, as driving a Formula-1 car compared to a standard car. The principles are the same, but any mistake stetches much further. You should be aware of that and act accordingly."
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 03:35 AM
04-02-2004 03:35 AM
Re: How to learn Macro
the example of F1 and standard car is very pretty; i like it and I agree!
@Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 05:43 AM
04-02-2004 05:43 AM
Re: How to learn Macro
The book is:
Computer Programming and architecture: The VAX
Written by Henry M. Levy and Richard H. Eckhouse, jr.
I own the second edition, published by Digital Press in 1989, ISBN 1-55558-105-7
And, of course, there is the Big Black Book (as we used to call it): VAX/VMS internals and data structures, by Rith Goldenberg. No doubt you know the book (others will...)
Collector's items?
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 08:03 AM
04-02-2004 08:03 AM
Re: How to learn Macro
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2004 03:51 PM
04-04-2004 03:51 PM
Re: How to learn Macro
For crash dump analysis, you really don't need to be able to write MACRO32. You really don't need to read it much either, as I doubt you'll be analysing many VAX crash dumps. About the most you'll need is to be able to read listings, which may be in MACRO32.
What's more important is an understanding of the concepts of assembly languages in general. Operators, registers, operands, base/offset addressing, all that kind of stuff.
If you really want to learn MACRO32, DON'T start with "hello world". You really don't want to be doing general I/O in assembly language. Instead, find yourself a small, simple, utility routine that you already use somewhere. Translate it from whatever language it's already written in into MACRO32. See if you can improve something (performance, compactness, whatever). Chances are you can't!
John Gillings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2004 06:10 AM
04-12-2004 06:10 AM
Re: How to learn Macro
I am a litte late in responding, but then again I was on vacation and purposely avoided using any computers. :-)
I wrote a program that queued up kernel mode AST's between processes (on VAX). It helped a lot when it came to just getting my feet wet on crash dumps (these crashes were very narrow is focus and the only ones I can comfortably analyze -- I'm told we will see much, much more at the upcoming class).
I wrote it in Macro-32 but I don't think the language matters as much as doing it. Macro-32, Macro-64, or C are good candidates as far I can tell. I think I'll try my hand at Macro-64 before going (we got it when we got out first Alpha).
What about jointly doing something like this offline? We have about 3-4 weeks. :-)
john
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2004 08:49 AM
04-13-2004 08:49 AM
Re: How to learn Macro
In the same general time window as this topic, an other thread on learning Macro was started in a whole other place:
http://www.encompasserve.org/DECUServe/DECnotes/VMS/3401.1/PREV_TOPIC.HTML
I point it out, not really because of the topic itself, but mostly because is yet an other place where VMS fans come together and exchange ideas.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2004 02:06 PM
04-13-2004 02:06 PM
Re: How to learn Macro
I've got to warn you, I am a real beginner in Macro (and assembly like languages in general). Craig was friendly enough to borrow me his book (Big thanks!) and I am just reading it right now. After that I will try to write some very, very simple programs, so I am really not sure I am the right partner for you. If you still want to give it a shot sent me mail at zinser@zinser.no-ip.info .
Hein, I did read the thread you quoted. There is one important difference. The guy there knows what he is doing! Don't insult him by the comparison ;-)
And yes, I do enjoy reading the Macro book :-))
All the best, Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2004 07:18 PM
04-13-2004 07:18 PM
Re: How to learn Macro
even I don't write using assembler since last 2-3 years, I started my working using this language and macro and I used them for plenty years.
If you will post any question, I 'll answer you as I can.
Regards
@Antoniov
P.S. If you prefer you can send me any e-mail to antoniov at shs-av.it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2007 01:09 PM
01-07-2007 01:09 PM
Re: How to learn Macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2007 06:39 PM
01-07-2007 06:39 PM
Re: How to learn Macro
As long as it is on ebay.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2007 06:58 AM
01-08-2007 06:58 AM
Re: How to learn Macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2007 10:20 PM
01-08-2007 10:20 PM
Re: How to learn Macro
>>>
Martin seems to have dropped off the Net and I haven't heard from him in quite a while. Has anyone else?
<<<
My last email exchange with him dates from late November. The last time he translated a story for de.openvms.org was around Christmas. Nothing since then here.
cu,
Martin