• M80 question

    From dxforth@21:1/5 to All on Sun Sep 12 03:28:33 2021
    I want to use this in a macro but wondering if there
    was a less clumsy way of writing it?

    ifb <axt>
    ifnb <fl>
    dw $+2
    else
    dw cfadr
    endif
    else
    dw cfadr
    endif

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From fridtjof.martin.weigel@gmail.com@21:1/5 to dxforth on Mon Sep 13 08:48:49 2021
    On Saturday, September 11, 2021 at 1:28:35 PM UTC-4, dxforth wrote:
    I want to use this in a macro but wondering if there
    was a less clumsy way of writing it?

    ifb <axt>
    ifnb <fl>
    dw $+2
    else
    dw cfadr
    endif
    else
    dw cfadr
    endif

    Not completely sure, but you may want to consider

    local v
    v set cfaddr
    ifnb <axt>
    ifb <fl>
    v set $+2
    endif
    endif
    dw v

    Gets rid of the else clauses.

    FredW

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to fridtjof.ma...@gmail.com on Tue Sep 14 03:28:53 2021
    On 14/09/2021 01:48, fridtjof.ma...@gmail.com wrote:
    On Saturday, September 11, 2021 at 1:28:35 PM UTC-4, dxforth wrote:
    I want to use this in a macro but wondering if there
    was a less clumsy way of writing it?

    ifb <axt>
    ifnb <fl>
    dw $+2
    else
    dw cfadr
    endif
    else
    dw cfadr
    endif

    Not completely sure, but you may want to consider

    local v
    v set cfaddr
    ifnb <axt>
    ifb <fl>
    v set $+2
    endif
    endif
    dw v

    Gets rid of the else clauses.

    It's one line shorter, however the logic is easier to follow.

    Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to dxforth on Tue Sep 14 17:48:23 2021
    On 14/09/2021 03:28, dxforth wrote:
    On 14/09/2021 01:48, fridtjof.ma...@gmail.com wrote:
    On Saturday, September 11, 2021 at 1:28:35 PM UTC-4, dxforth wrote:
    I want to use this in a macro but wondering if there
    was a less clumsy way of writing it?

    ifb <axt>
    ifnb <fl>
    dw $+2
    else
    dw cfadr
    endif
    else
    dw cfadr
    endif

    Not completely sure, but you may want to consider

    local v
    v set cfaddr
    ifnb <axt>
    ifb <fl>
    v set $+2
    endif
    endif
    dw v

    Gets rid of the else clauses.

    It's one line shorter, however the logic is easier to follow.

    Thanks.

    Something to note for anyone using the latter.

    For SLR assemblers in one-pass mode (the default) DW V must be
    known on the first pass i.e. CFADR can't be defined later.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)