Shop OBEX P1 Docs P2 Docs Learn Events
DAT Section Question — Parallax Forums

DAT Section Question

william chanwilliam chan Posts: 1,326
edited 2014-07-04 01:49 in Propeller 1
Hi,

What is the difference between

0

and

0-0

in the DAT section?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-07-03 22:11
    None: they both equal zero. 0-0 is just a stylistic expression to denote that another value will be plugged in there from elsewhere in the program. Had the program counter symbol, $, been available in the first version of PASM (it was not), I'm sure the expression that we settled upon would have been $-$ instead. But 0-0 gained traction before $ came along.

    -Phil
  • Heater.Heater. Posts: 21,230
    edited 2014-07-04 01:49
    0-0 is the difference between 0 and 0. Which is obviously 0.

    It's just a convention. Used to indicate a "don't care" value. For example for a source or destination field of a PASM instruction that is to be filled in by some other code before it is executed. It's a warning to the reader that this is self-modifying code.
Sign In or Register to comment.