Code: Select all
MODULE M;
PROCEDURE p(s: SET);
END p;
PROCEDURE run;
VAR k: INTEGER;
BEGIN
p({k});
p({13})
END run;
END M.
Code: Select all
PROCEDURE run;
VAR k: INTEGER;
BEGIN
. 12 0CH 0B500H push { lr }
. 14 0EH 0B081H sub sp,#4
p({k});
. 16 010H 09800H ldr r0,[sp]
. 18 012H 02101H movs r1,#1
. 20 014H 04081H lsls r1,r0
. 22 016H 0F7FFFFF5H bl.w -22 -> 4
. 26 01AH 0E000H b 0 -> 30
. 28 <LineNo: 8>
p({13})
. 30 01EH 02001H movs r0,#1
. 32 020H 00340H lsls r0,r0,#13
END run;
. 34 022H 0F7FFFFEFH bl.w -34 -> 4
. 38 026H 0E000H b 0 -> 42
. 40 <LineNo: 10>
. 42 02AH 0B001H add sp,#4
. 44 02CH 0BD00H pop { pc }
. 46 02EH 046C0H nop
The immediate version works (second call of 'p').