29 lines
331 B
Plaintext
29 lines
331 B
Plaintext
|
# lire a et b puis calculer et afficher l'expression ci-dessous.
|
||
|
#[(a+b)*(a-b)]+[(b+1)*(b-1)]
|
||
|
PUSHI 0 # a habite à l'adresse 0
|
||
|
PUSHI 0 # b habite à l'adresse 1
|
||
|
READ
|
||
|
STOREG 0
|
||
|
READ
|
||
|
STOREG 1
|
||
|
PUSHG 0
|
||
|
PUSHG 1
|
||
|
ADD
|
||
|
PUSHG 0
|
||
|
PUSHG 1
|
||
|
SUB
|
||
|
MUL
|
||
|
PUSHG 1
|
||
|
PUSHI 1
|
||
|
ADD
|
||
|
PUSHG 1
|
||
|
PUSHI 1
|
||
|
SUB
|
||
|
MUL
|
||
|
ADD
|
||
|
WRITE
|
||
|
POP
|
||
|
POP # oublier b
|
||
|
POP # oublier a
|
||
|
HALT
|