; 	*= 0x100
; 
; @fac:
; 	@n= -6		; 	parametro n
; 	psh bp
 0x0100 0x52
; 	lbp sp		;  marco de referencia de fac()
 0x0101 0x71
; 	
; 	lda [bp + @n]
 0x0102 0x45
 0x0103 0xfa
 0x0104 0xff
; 	psh a
 0x0105 0x50
; 	lda #0
 0x0106 0x42
 0x0107 0x00
 0x0108 0x00
; 	cmp
 0x0109 0x15
; 	jne @1		;	n==0?
 0x010a 0x31
 0x010b 0x13
 0x010c 0x01
; 	
; 		lda #1		;	si, fac <- 1
 0x010d 0x42
 0x010e 0x01
 0x010f 0x00
; 		lsp bp
 0x0110 0x79
; 		pop bp
 0x0111 0x62
; 		rtn
 0x0112 0x3c
; ; else
; @1:		lda [bp+@n] ;	no, fac <- n * fac(n-1)	
 0x0113 0x45
 0x0114 0xfa
 0x0115 0xff
; 		psh a		; 	n	primer factor
 0x0116 0x50
; 		lda [bp+@n]
 0x0117 0x45
 0x0118 0xfa
 0x0119 0xff
; 		psh a
 0x011a 0x50
; 		lda #1
 0x011b 0x42
 0x011c 0x01
 0x011d 0x00
; 		sub			;  n-1
 0x011e 0x11
; 		psh a		;  primer parametro
 0x011f 0x50
; 		jsr @fac	;  f(n-1)	(segundo factor)
 0x0120 0x3a
 0x0121 0x00
 0x0122 0x01
; 		pop 2		;  sacamos al parametro 
 0x0123 0x63
 0x0124 0x02
 0x0125 0x00
; 		mul			;  teniamos penente la multiplicacion
 0x0126 0x12
; 		lsp bp
 0x0127 0x79
; 		pop bp
 0x0128 0x62
; 		rtn
 0x0129 0x3c
; 
; @main:
; 	psh bp		;  marco de referencia de main()
 0x012a 0x52
; 	lbp sp
 0x012b 0x71
; 
; 	lda #5
 0x012c 0x42
 0x012d 0x05
 0x012e 0x00
; 	psh a
 0x012f 0x50
; 	jsr @fac	;  fac(5)
 0x0130 0x3a
 0x0131 0x00
 0x0132 0x01
; 	pop 2
 0x0133 0x63
 0x0134 0x02
 0x0135 0x00
; 	irq pr_int	;  imprimimos el resultado
 0x0136 0x3d
 0x0137 0x01
 0x0138 0x00
; 
; 	lsp bp
 0x0139 0x79
; 	pop bp
 0x013a 0x62
; 	rtn
 0x013b 0x3c
; @pila:
; 	end @main, @pila
< 0x012a 0x013c
; 		
