; microprocessor lab programs fionacci series
Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out
Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

microprocessor lab programs fionacci series

VIEWS: 108 PAGES: 2

microprocessor lab programs for engg students

More Info
  • pg 1
									11.a) GENERATE FIRST n FIBONACCI SERIES PRINT MACRO N1 LOCAL NEXT1 LOCAL NEXT2 PUSH AX PUSH CX PUSH DX MOV AL,N1 MOV BL,AL MOV CL,04H AND AL,0F0H SHR AL,CL CMP AL,0AH JL NEXT1 ADD AL,07H NEXT1: ADD AL,30H MOV DL,AL MOV AH,02H INT 21H MOV AL,BL AND AL,0FH CMP AL,0AH JL NEXT2 ADD AL,07H NEXT2: ADD AL,30H MOV DL,AL MOV AH,02H INT 21H MOV DL,',' MOV AH,02H INT 21H POP DX POP CX POP AX ENDM data segment ARR DB 10 DUP(?) COUNT EQU 10H DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START:MOV AX,DATA MOV DS,AX MOV CX,COUNT-1 MOV SI,0000H MOV ARR[SI],00H MOV ARR[SI+1],01H UP: MOV AL,ARR[SI] PRINT AL INC SI ADD AL,ARR[SI] MOV ARR[SI+1],AL

LOOP UP MOV CX,COUNT-1 ;BACK: MOV SI,0000H ; MOV AL,ARR[SI] ; PRINT AL ; INC SI ; LOOP BACK MOV AH,4CH INT 21H CODE ENDS END START


								
To top