Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

64 lines (63 sloc) 1.567 kb
(FUNCTION fact [(int x)]
(BB 0
(OPER 14 Push [] [(m EBP)])
(OPER 15 Mov [(m EBP)] [(m ESP)])
(OPER 16 Load [(r 1)] [(m ESP)(i 8)])
)
(BB 7
(OPER 19 Cmp [(m Flags)] [(r 1)(i 1)])
(OPER 20 BGT [] [(bb 5)(m Flags)])
)
(BB 4
(OPER 21 Mov [(r 3)] [(r 1)])
(OPER 7 Sub_I [(r 3)] [(r 3)(i 1)])
(OPER 6 Push [] [(r 3)])
(OPER 8 JSR [] [(s fact)])
(OPER 22 Add_I [(m ESP)] [(m ESP)(i 4)])
(OPER 9 Load [(r 4)] [(m EAX)])
(OPER 23 Mov [(m EAX)] [(r 1)])
(OPER 10 Mul [(m EAX)(m EDX)] [(m EAX)(r 4)])
(OPER 24 Mov [(r 5)] [(m EAX)])
(OPER 11 Mov [(m EAX)] [(r 5)])
)
(BB 3
(OPER 17 Mov [(m ESP)] [(m EBP)])
(OPER 18 Pop [(m EBP)] [])
(OPER 3 Return [] [(m EAX)])
)
(BB 5
(OPER 12 Mov [(m EAX)] [(r 0)])
)
(BB 6
)
)
(FUNCTION main []
(BB 0
(OPER 15 Push [] [(m EBP)])
(OPER 16 Mov [(m EBP)] [(m ESP)])
)
(BB 2
(OPER 4 JSR [] [(s read)])
(OPER 5 Load [(r 2)] [(m EAX)])
(OPER 6 Mov [(r 1)] [(r 2)])
)
(BB 7
(OPER 19 Cmp [(m Flags)] [(r 1)(i 0)])
(OPER 20 BGT [] [(bb 3)(m Flags)])
)
(BB 4
(OPER 10 Push [] [(r 1)])
(OPER 11 JSR [] [(s fact)])
(OPER 21 Add_I [(m ESP)] [(m ESP)(i 4)])
(OPER 12 Load [(r 4)] [(m EAX)])
(OPER 9 Push [] [(r 4)])
(OPER 13 JSR [] [(s write)])
(OPER 22 Add_I [(m ESP)] [(m ESP)(i 4)])
(OPER 14 Load [(r 5)] [(m EAX)])
)
(BB 3
(OPER 17 Mov [(m ESP)] [(m EBP)])
(OPER 18 Pop [(m EBP)] [])
(OPER 3 Return [] [(m EAX)])
)
)
Jump to Line
Something went wrong with that request. Please try again.