Skip to content

Commit

Permalink
refactor-tri-example
Browse files Browse the repository at this point in the history
Signed-off-by: yzamir <[email protected]>
  • Loading branch information
yaacov committed Oct 6, 2023
1 parent e2577e2 commit 41baf8f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions examples/recursive-triangular.asm
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,11 @@ FUNC:
; Add the argument to register B
ADDB TEMP

; Use register A to check for termination condition (arg == 0)
; Check for termination condition, arg == 0
JZA RET

; Put (arg - 1) in temp
; Call recursively with (arg - 1)
ADDA MINUSONE
STOREA TEMP

; Call recursively with num - 1
PUSHA
CALL FUNC
POPA ; clear stack into regA
Expand Down

0 comments on commit 41baf8f

Please sign in to comment.