Addition

Die add-Anweisungen werden verwendet, um zwei Zahlen zu addieren, ähnlich wie der +-Operator in anderen Sprachen.

Probieren Sie es aus

Syntax

wasm
;; load two numbers onto the stack
i32.const 10
i32.const 3

;; add up both numbers
i32.add

;; the top item on the stack will now be 13  (10 + 3 = 13)
Anweisung Binärer Opcode
i32.add 0x6a
i64.add 0x7c
f32.add 0x92
f64.add 0xa0