Two's complement: Difference between revisions
Content deleted Content added
Puppydrum64 (talk | contribs) mNo edit summary |
Puppydrum64 (talk | contribs) mNo edit summary |
||
Line 40:
ADC #0
STA myVar+1</lang>
<lang asm>mov al,17
neg al ;8-bit
mov bx,4C00h
=={{header|C}}==
<lang C>int a = 3;▼
a = -a;</lang>
=={{header|Z80 Assembly}}==
Line 63 ⟶ 74:
sub b
ld b,a</lang>
▲=={{header|C}}==
▲<lang C>int a = 3;
▲a = -a;</lang>
|