factorial variant 1
what goes wrong here?
jump does not push return address
fact: cmp arg1, #0
jump.ne recurse
load val, #1
rts
recurse: push arg1
sub arg1, #1
jump fact
pop arg1
mul val, arg1
rts
Previous slide
Next slide
Back to first slide
View graphic version