Expression in MASD / difference to the HP Tools - Hewlett Packard

This is a discussion on Expression in MASD / difference to the HP Tools - Hewlett Packard ; Hello, in the SASM-Syntax I can compute a position in my code object during compilation and use this value. For example: CODE .. SubRoutine_1 .. .. LA(5) (SubRoutine_1)-(SubRoutine_2)-14 .. .. SubRoutine_2 .. ENDCODE During compilation the right value for LA(5) ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Expression in MASD / difference to the HP Tools

  1. Expression in MASD / difference to the HP Tools

    Hello,

    in the SASM-Syntax I can compute a position in my code object during
    compilation and use this value.

    For example:

    CODE
    ..
    SubRoutine_1
    ..
    ..

    LA(5) (SubRoutine_1)-(SubRoutine_2)-14
    ..
    ..
    SubRoutine_2
    ..
    ENDCODE

    During compilation the right value for LA(5) is computed and placed
    into the binary. This will also work if the subroutines are in
    different code areas and or mixed with SYS-RPL.

    When I try to compile this with the MASD syntax for the PC/debug4x I
    alway get an error:
    ERROR: Can´t have external reference on right side of - *** 0

    Anybody knows the correct syntax for this in MASD on the pc ?

    Greetings and TIA
    Andreas
    http://www.software49g.gmxhome.de


  2. Re: Expression in MASD / difference to the HP Tools

    On 2007-11-15 05:01:32 +1100, Andreas Möller
    said:
    > During compilation the right value for LA(5) is computed and placed
    > into the binary. This will also work if the subroutines are in
    > different code areas and or mixed with SYS-RPL.
    >
    > When I try to compile this with the MASD syntax for the PC/debug4x I
    > alway get an error:
    > ERROR: Can´t have external reference on right side of - *** 0
    >
    > Anybody knows the correct syntax for this in MASD on the pc ?


    rplcomp will convert MAD syntax into SASM syntax, but when doing so, it
    will use global label references.
    so rather than doing LC(5) Label1-Label2 it does LC(5)
    (=Label1)-(=Label2) which the linker can not solve.

    to preven this, use double-quotes (") around your expression, so it is
    used as is.

    Jean-Yves
    --
    They who would give up an essential liberty for temporary security,
    deserve neither liberty or security (Benjamin Franklin)


+ Reply to Thread