3

I'm looking through the documentation and there are a few pseudo ops that I am stuck with, they are DV, LIST and XXX.

DV says is like DC but used with EQM, I've mess around with it, but I am not noticing any difference, I've try to find any examples but couldn't find any.

LIST and XXX, I'm not sure how these works either.

1 Answer 1

5

DV

DV does macro expansion. This is best demonstrated with an example.

mymacro  eqm    10 + ..

mylist   dv     mymacro 1, 2, 3

The first line defines a symbol mymacro that will be used as a macro. The dotdot (..) acts as a parameter.

In the second line, the macro is applied to every expression in the list. From left to right:

  • 1 is replaced by 10 + 1
  • 2 is replaced by 10 + 2
  • 3 is replaced by 10 + 3

Basically, the second line is equivalent to:

mylist   dc     10 + 1, 10 + 2, 10 + 3

which obviously is equivalent to:

mylist   dc     11, 12, 13

The example is rather trivial; DV may be more useful when the macro contains a symbol. For example:

mylabel  dc     "ABCD"
mymacro  eqm    mylabel + ..
mylist   dv     mymacro 1, 2, 3

is equivalent to:

mylabel  dc     "ABCD"
mylist   dc     mylabel + 1, mylabel + 2, mylabel + 3

LIST

LIST OFF and LIST ON affect output being written to the list file. Normally, every line from the source file is written to the list file; this is inhibited by LIST OFF. Error messages will still be written to the list file, though.

Obviously, this only has effect if a list file was specified on the command line (option -l or -L).

XXX

As far as I can tell, DASM has no pseudop XXX. I guess you are refering to this part of the documentation:

[label] XXX[.force] operand

XXX is just a placeholder there; it can be any mnemonic you like, for example lda. See the section about the FORCE extension.

2
  • Fantastic reply, i have another question, the LIST directive, which list is turning on or off? The only list I'm aware of is the symbol list. Jul 8, 2018 at 1:15
  • 1
    @DanielSega Please feel free to edit your original question and add LIST and other pseudops that are unclear; I will gladly expand my answer accordingly. Jul 8, 2018 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.