; Load constants into registers cst A, 5 ; A = 5 cst B, 3 ; B = 3 ; Perform addition add A, B, A ; A = A + B (A = 5 + 3 = 8) ; Load another constant cst C, 2 ; Load 2 into register C ; Perform subtraction sub A, A, C ; A = A - C (A = 8 - 2 = 6) ; Perform multiplication mul A, A, B ; D = A * B (A = 6 * 3 = 18) ; Verify that overflows are handled well. All registers are 32 bit unsigned integers. cst D, 0xFFFFFFFF ; D = 2^32 - 1 add D, D, C ; D = D + C (D = 2^32 - 1 + 2 = 1) cst C, 0 ; C = 0 sub C, C, D ; C = C - D (C = 0 - 1 = 2^32 - 1) add C, C, B ; C = C + B (C = 2^32 - 1 + 3 = 2) ; End of program ; Expected state: A = 18, B = 3, C = 2, D = 1 ; Expected output: 18*3 + 2*1 = 56