0

How would I go about changing the sign of a negative .BLOCK to positive in Pep8? And the other way around?

Thank you

Maxime Lorant
  • 34,607
  • 19
  • 87
  • 97
user2994884
  • 153
  • 7
  • according to https://code.google.com/p/pep8-1/wiki/InstructionSet you should use `NEGr` instruction. However, I don't know more than Google. In fact, I heard about that PEP/8 just now :) – Serhii Kheilyk Nov 15 '13 at 05:57

1 Answers1

1

All you have to do is load 0 into the accumulator, and then subtract the number by that.

LDA 0,i
SUBA num1,d
STA num1
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
Maxime Lorant
  • 34,607
  • 19
  • 87
  • 97