2 ; Programme non pur qui fait des opérations multiples
5 LDX num,d ; X = nombre opération = getNombre();
8 LDBYTEA op,d ; A = op = getChar()
9 CPA '+',i ; if (A == '+') ;
12 BRNE error ; else if (A == '-') {
14 STBYTEA instr,d ; remplace l'instruction à instr par SUBA
16 error: STRO errMsg,d ; print error;
18 loop: SUBX 1,i ; while(--X >= 0) {
23 instr: ADDA num,d ; num = getInt() + getInt() // ou - si remplassage
26 CHARO '\n',i ; print(num, "\n")
27 BR loop ; } // fin while
29 op: .BLOCK 1 ; #1c symbole de l'opération
30 num: .BLOCK 2 ; nombre entrée, calculé et affiché
31 errMsg: .ASCII "Attendu '+' ou '-'\x00"
32 subad: SUBA 0,d ; code opération instruction