[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::languages

Title:Languages
Notice:Speaking In Tongues
Moderator:TLE::TOKLAS::FELDMAN
Created:Sat Jan 25 1986
Last Modified:Wed May 21 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:394
Total number of notes:2683

117.0. "Macro? When??" by NEXUS::MORGAN (Walk in Balance...) Sun Nov 16 1986 17:45

    Being a complete and total novice and having read somewhere in this
    Notesfile that Macro needs to be used only on 5 (?) occasions would
    someone please tell me what those occasions are?
    
    In the future I will probably learn Modula 2 but need to know when
    Macro is needed and hopefully why it is needed.  Thanx bunchs.
    
      Mikie?
T.RTitleUserPersonal
Name
DateLines
117.1my 2 �UFP::MURPHYRick, Washington,District of ConfusionSun Nov 16 1986 20:196
    Two that I can think of:
    1. Writing a transfer vector for a sharable image.
    2. Writing a device driver (more precisely, the part that accesses
       the device registers, where you must be careful of the instructions
       used)
    	-Rick
117.2QUARK::LIONELReality is frequently inaccurateSun Nov 16 1986 21:5213
    Only 5 occasions?  This is silly.  Assembly language is often the
    only thing that makes sense - at least given the state of things
    on VMS today.  I wouldn't write high-performance math routines in
    anything else.  Also, code that juggles call frames (such as the
    code in the exception dispatching facility, Ada multitasking (on
    VMS), etc.
    
    But it is true that MACRO is used much more often than is necessary
    in VMS.  Modula2 is not a standard DEC development language, so
    why learn it over others?  If you want a good high-level applications
    implementation language, pick Pascal or Ada.  And it's foolish not
    to learn BLISS if you work for DEC.
					Steve
117.3My mother didn't raise me to be a register allocatorNOBUGS::AMARTINAlan H. MartinSun Nov 16 1986 22:1015
Re .1:

I thought that either Macro or Bliss could be used for device drivers
on VMS.  (Not that I've written any in either language).

Re .2:

I believe that DEBUG wades through stack frames using Bliss code, including
the use of symbols from STARLET instead of magic offsets.  On the other
hand, the condition handling facility might be one of those places where
the last bit of speed counts.

Also, I read about 4 defined levels of VAX diagnostic software someplace
recently, and two of them can only be done in Macro.
				/AHM/THX
117.4The only offerings presently...NEXUS::MORGANWalk in Balance...Sun Nov 16 1986 22:1810
    Since I work at the DDC I don't really have to do any programing
    whatsoever.  I just wanted to learn a language different from Basic.
    My home micro can run just about any 68000 based language.  Pascal,
    Fourth, Modula2, Fortran, Macro and Basic are the offerings presently.
    It seemed that since Pascal was so popular that Modula2 was the
    appropiate choice. But then again I am a complete novice, (so what
    do I know?) B^)
    
      Mikie?
    
117.5What's the Basic for these?PASTIS::MONAHANMon Nov 17 1986 05:017
    	My Bliss manual does not show a way of generating a SVPCTX
    instruction, and as far as I can remember device driver FDT routines
    normally terminate with a JMP to an address in VMS, so probably
    both of those things should be done in Macro.
    
    	Self modifying code is always fun, and I would hate to try that
    in anything other than Macro....    :-)
117.6QUARK::LIONELReality is frequently inaccurateMon Nov 17 1986 09:577
    VMS drivers can ONLY be written in MACRO, not BLISS.  (But this
    is a VMS property - on VAXELN, one can write drivers in Ada!)
    
    Of the languages you list, I'd pick Pascal as being the one most
    unlike BASIC that is similar to "real" languages of today.  I like
    FORTRAN too.
    					Steve
117.7driver = MACRO + BLISSCLOUD::SHIRRONStephen F. Shirron, 223-3198Mon Nov 17 1986 10:486
    Re .6:  But, drivers can call FDT routines written in BLISS.  So
    while much of the driver must be written in MACRO, lots of the hard
    work can be done in BLISS.
    
    stephen
    (the VS100 driver was written that way)
117.8these are a few of my favorite thingsTAHOE::HAYNESCharles HaynesMon Nov 17 1986 12:4638
    I *really* don't want to start any wars, but I work for DEC and I write
    all of my code in C and Modula-2, and I don't have much motivation to
    learn MACRO *or* Bliss. (Actually I once knew Macro-11, and I have a
    nodding acquaintance with Bliss.) 
    
    I work in UEG.
    
    Enough on that subject.
    
    If you want to learn a good, fairly "modern" language, that was
    designed to support modular design, information hiding, and other
    such "good" things, then Modula-2 is an obvious choice. Arguing
    about the merits of one language over another usually devolve into
    shouting matches, or religious arguments, or (rarely, when all
    participants are reasonable) an agreement to disagree on matters
    of taste.
    
    Pascal is a reasonable language, but it's lack of an integrated
    "separate compilation" feature makes it difficult to call a "modular"
    language. Granted, many if not most versions of pascal available
    today have some kind of modularity, but I claim (opinion here!)
    that they are not as well integrated as in Modula-2. Since both
    languages were designed by the same person, and Modula-2 was designed
    later, and for systems software, I'd learn it.
    
    [Actually, I'd rather write in Mesa, but that's another story...]
    
    Ada is a fine language, but it suffers from a scarcity of decent
    implementations. My impression is that it is a "large" language,
    unlike Pascal, or Modula-2. If you have Ada available to you, by
    all means learn it, and use it.
    
    After all that, I have to say, if I were out shopping for a language
    translator for my PC today, I'd buy Turbo Pascal. It's fast, it's
    mature, and it's available for a wide variety of machines.
    
    	Hope this helps,
    	-- Charles
117.9Pascal is improvingTLE::REAGANJohn R. ReaganMon Nov 17 1986 18:509
    The draft extended Pascal standard has a separate compilation feature
    that look alot like Modula-2 (IMPORT, EXPORT, IMPLEMENTATION, etc...).
    
    I'd rate it more than Modula-2, but less than Ada.
    
    Other features in the new standard may make standard Pascal a usable
    language if it can overcome its reputation.
    
    			-John
117.10When will Pascal look like Ada?TLE::MEIERBill MeierThu Nov 20 1986 10:097
< Note 117.9 by TLE::REAGAN "John R. Reagan" >
                            -< Pascal is improving >-

At that rate, sames like Pascal and Ada will almost converge, with the exception
of Ada having overloading and tasking? (what else did I forget ...)

And, of course, ACS. How can you live without a compilation system manager? :-)
117.11PSW::WINALSKIPaul S. WinalskiSun Nov 23 1986 19:3913
RE: 117.7

If the FDT routine does anything non-trivial, it cannot be written in BLISS.
Many of the system interfaces for drivers have ugly calling conventions
such as:  system JUMPs to your code, you RSB back, or vice versa.  BLISS does
not support such calling conventions.

Even if it is possible for particular FDT routines to be written in BLISS,
it is not a good idea because it is totally unsupported.  The only supported
driver interface macros are in MACRO.  If you write a driver in BLISS, you're
on your own.

--PSW
117.12Thanx for the comments...NEXUS::MORGANWalk in Balance...Sun Nov 23 1986 22:584
    Thanx for all the comments folks.  I'll probably wind up with Modula2
    or Pascal.
    
      Mikie?
117.13Driver in BLISS is possibleMARVIN::WARWICKOh No - it&#039;s the Pathetic Sharks !!!Thu Jan 15 1987 08:456
    
    	Just out of interest, it is possible to write a driver in BLISS
    (well, only using about a page of MACRO). Indeed, I know of drivers
    for three forthcoming devices, which are written in BLISS.
    
    Trev
117.14QUARK::LIONELThree rights make a leftThu Jan 15 1987 09:485
    Re: .13
    
    If you need MACRO at all, then clearly the whole thing isn't in
    BLISS.  That a lot of the driver can be in BLISS is good, though.
    					Steve
117.15NOGOV::HAXBYJohn Haxby -- Definitively WrongThu Jan 15 1987 10:126
    All the drivers in Ultrix/Unix are written in C.  The drivers for
    the Cambridge something-i-forget-the-name-of-it'll-come-to-me-in-a-minute
    are written in Algol 68 aprt from stubs to get some registers into
    veriables.
    
    								jch
117.16Well, mostly in BlissHOMBRE::CONLIFFEStore in a horizontal positionFri Jan 16 1987 16:1313
|    	Just out of interest, it is possible to write a driver in BLISS
|    (well, only using about a page of MACRO).     
    
A few years ago (VMS V2.n, V3.0 days), a couple of demented software people
and I hacked together a LPDRIVER which was "mostly" in BLISS. We used MACRO
to define the data structures (DPT_STORE, DDBTAB, FUNCTAB) to avoid a major
recoding effort, and I think that was all.  I've got the source somehere on
the 31 magtapes in my office and at home; if there's any interest, I'll see
if I can dig it out.


			Nigel

117.17DSSDEV::JACKMarty JackMon Jun 15 1987 00:0220
    To my mind, the four most important reasons why BLISS isn't very
    suitable for writing drivers are:
    
	You can't generate the driver prologue.
    
    	You can't have anything extra on the stack when you call a resource
    	allocating procedure (e.g., REQMPR).  The stack contains only the
    	second return PC.
    
    	You can't control the instructions that are used to access the
    	I/O page.
    
    	The interrupt service routine has to do odd stack manipulations at
    	the beginning and end with REI.
    
    In a driver for a complex device, there may be algorithms of
    significant complexity that need to be executed without interacting
    with the system-provided I/O framework, so it may make some sense
    to consider BLISS for these pieces, but I wouldn't go to the trouble
    unless they were big pieces.