汇编语言的简答入门--斐波那契数列(递归)

来源:本站
导读:目前正在解读《汇编语言的简答入门--斐波那契数列(递归)》的相关信息,《汇编语言的简答入门--斐波那契数列(递归)》是由用户自行发布的知识型内容!下面请观看由(电工技术网 - www.9ddd.net)用户发布《汇编语言的简答入门--斐波那契数列(递归)》的详细说明。

TITLE Save an array and dispaly INCLUDE Irvine32.inc .data array DWORD 12 DUP (?) ; define a array for saving Fibonacci numbers step = type array num DWORD ? count DWORD ? prompt byte "The first twelve fibonacci numbers are ",0 prompt1 DWORD " ",0 .code main PROC mov edx,offset prompt call writestring mov ebx,0 ;they are for calculateing the value of array mov edx,1 ; mov ebp,0 ; mov ecx,11 ;for outputing mov eax,00h display: push eax call Fibonacci pop eax call writeint add eax,01h loop display call crlf call waitmsg exit main ENDP Fibonacci proc USES esi eax ebx edx ebp mov esi,esp add esi,24 mov eax,[esi] ;get the value of we have pushed it cmp eax,1 jl L1 add ebp,ebx ;calculate the value of array add ebp,edx ; mov ebx,edx ; mov edx,ebp ; dec eax ;the times of recursion call Fibonacci L1: mov [esi],ebp ;result return address ret loop L1 Fibonacci ENDP END main

提醒:《汇编语言的简答入门--斐波那契数列(递归)》最后刷新时间 2024-03-14 01:05:31,本站为公益型个人网站,仅供个人学习和记录信息,不进行任何商业性质的盈利。如果内容、图片资源失效或内容涉及侵权,请反馈至,我们会及时处理。本站只保证内容的可读性,无法保证真实性,《汇编语言的简答入门--斐波那契数列(递归)》该内容的真实性请自行鉴别。