Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/06/2009, 15:21
Avatar de darwin2201
darwin2201
 
Fecha de Ingreso: octubre-2008
Mensajes: 106
Antigüedad: 15 años, 6 meses
Puntos: 1
Exclamación Ayuda con emsamblador....porfa

HOLA. GENTE DEL FORO...NECESITO QUE ME AYUDEN CON ESTO:



IDEAL

MODEL small
STACK 256


DATASEG
word1 DW 3
exCode DB 0

CODESEG

Start:
mov ax,@data
mov ds,ax

push [word1]
call factorial

;return to DOS
Exit:
mov ah,04Ch
mov al,[exCode]
int 21h

PROC factorial
;computes N factorial
;input:stack on entry-ret.addr.(top),
;output:Ax
push bp
mov bp,sp

cmp [WORD bp+4],0
jg recurs

mov ax,1
jmp return

recurs:
mov cx,[bp+4]
dec cx
push cx
call factorial
mul [WORD bp+4]

return:
pop bp
ret 2

ENDP factorial

END Start

QUE HACE CADA LINEA DE ESTE PROGRAMA...(linea por linea que hace???)