![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: I'm teaching assembly on the Alpha for the first time, after doing it successfully on the VAX several times. Am trying to demo FABs and RABs and file i/o. The code below is from an old VAX (working) program, but will not compile at all in Macro-64. I have commented nearly all lines; the one remaining one is causing 5 errors and 5 warnings, the first of which is that at $FAB the compiler sees an unexpected end of line. Here is the code: .title rmsstuff $routine rmsstuff, data_section_pointer=true, - kind=stack, saved_regs=<R2, R15> .psect A,quad,mix,noexe ; $data_section .show OutFile: $FAB FAC=put,FNM=<"MyFile.txt"> .noshow ;Records_to_go: $RAB64 FAB = OutFile, - ; RBF = TextBuffer, - ; RSZ = 5 ;$data_section ;TextBuffer: .ASCII /ABCde/ $code_section .base R27, $ls ldq R15, $dp .base R15, $ds start: ; $OPEN FAB = OutFile ; $CONNECT RAB = Records_to_go ; $PUT RAB = Records_to_go ; Output the first record. ; $PUT RAB = Records_to_go ; Do it again for fun. ; $CLOSE FAB = OutFile done:: mov 1, R0 $return $end_routine rmsstuff .end rmsstuff Here is the first error: OutFile: $FAB FAC=put, FNM=<"MyFile.txt"> ................^ %MACRO64-E-INVEXP, Assembler found end of line when expecting a valid expression. I'm obviously missing something critical. Thanks for any help. --Joe T. The Answer is : Alpha Macro64 is a rather different environment than VAX Macro. The use of the Alpha Macro64 compiler is generally not recommended. Further, the support for Alpha Macro64 within the OpenVMS operating system is rather different (and more primitive) than that for the traditional support for the Macro32 assembler (on OpenVMS VAX) and for the Macro32 compiler (on OpenVMS Alpha). The use of a language other than Alpha Macro64 is generally recommended. In particular, the use of the Macro32 compiler on OpenVMS Alpha would be recommended here, as this will permit you to use your existing VAX Macro examples and your existing programming experience -- with a minimum of effort and a minimum of source changes required. If you wish to pursue the use of the Macro64 assembler, you will have to create your own $FAB macro or explicit creation of the $FAB data structure based on the contents of $FABDEF, as well as the need to create various other macros -- the contents of the existing STARLET.MLB macro library are largely targeted at the Macro32 compiler, not the Macro64 assembler. Many will work, but not all. (In particular, the way that the Macro32 $FAB macro operates within the Alpha Macro64 environment runs afoul of the Macro64 assembler code generator expectations, hence the OVERLAP errors during the FAB initialization operations. The OpenVMS Wizard would have expected an .error directive to be included within the $FAB and $RAB macros (in MACRO64.MLB) indicating that the macros do not operate with Macro64, but that was apparently omitted.) nb: When working with the Macro64 assembler, do *not* use /OPTIMIZE.
|