In: Computer Science
Please code in Assembly Language
Code solution using the provided template AL_Template_Irvine32.asm located towards the bottom of the question.. Debug programs with Visual Studio2017/19. Please add single line or block comments explaining the purpose or functionality of your code statements.
10.) Fibonacci Generator
Write a procedure that produces N values in the Fibonacci number series and stores them in an array of doubleword. Input parameters should be a pointer to an array of doubleword, a counter of the number of values to generate. Write a test program that calls your procedure, passing N = 47. The first value in the array will be 1, and the last value will be 2,971,215,073. Use the Visual Studio debugger to open and inspect the array contents.
AL_Template_Irvine32.asm
; Program Description: Describe with a short paragraph what your
; program does and its purpose. Explain in general
; terms the expected inputs and output result.
INCLUDE Irvine32.inc ;Use Irvine32 library.
.const
;Declare constants here.
.data
;Declare variables here.
.code
main PROC
;Write your code here.
exit
;Exit program.
main ENDP
;Procedures go here.
END main
<?xml version="1.0" encoding="utf-8"?> <NonUserCode xmlns="http://schemas.microsoft.com/vstudio/debugger/jmc/2015"> <!-- Modules --> <Module Name="ModuleSpec" /> <Module Name="ModuleSpec" Company="CompanyName" /> <!-- Files --> <File Name="FileSpec"/> <!-- Functions --> <Function Name="FunctionSpec" /> <Function Name="FunctionSpec" Module ="ModuleSpec" /> <Function Name="FunctionSpec" Module ="ModuleSpec" ExceptionImplementation="true" /> </NonUserCode>
<?xml version="1.0" encoding="utf-8"?> <StepFilter xmlns="http://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010"> <Function> <Name>FunctionSpec</Name> <Action>StepAction</Action> </Function> <Function> <Name>FunctionSpec</Name> <Module>ModuleSpec</Module> <Action>StepAction</Action> </Function> </StepFilter>
Element | Description |
---|---|
Function |
Required. Specifies one or more functions as non-user functions. |
Name |
Required. An ECMA-262 formatted regular expression specifying
the full function name to match. For example:<Name>MyNS::MyClass.*</Name> tells the debugger that all methods in MyNS::MyClass
are to be considered non-user code. The match is
case-sensitive. |
Module |
Optional. An ECMA-262 formatted regular expression specifying the full path to the module containing the function. The match is case-insensitive. |
Action |
Required. One of these case-sensitive values: |
{
"Eval" : "Classification",
"Function" : "Classification",
"ScriptBlock" : "Classification",
"MyCode" : [
"UrlOrFileSpec",
. . .
"UrlOrFileSpec"
],
"Libraries" : [
"UrlOrFileSpec",
. .
"UrlOrFileSpec"
],
"Unrelated" : [
"UrlOrFileSpec",
. . .
"UrlOrFileSpec"
]
}
Eval, Function, and ScriptBlock
The Eval, Function, and ScriptBlock key value pairs determine how dynamically generated code is classified:
Name | Description |
---|---|
Eval | Script that is executed by passing a string to the
host-provided eval function. By default, Eval script
is classified as MyCode. |
Function | Script that is executed by passing a string to the
Function constructor. By default, Function script is
classified as LibraryCode. |
ScriptBlock | Script that is executed by passing a string to the
setTimeout , setImmediate , or
setInterval functions. By default, ScriptBlock script
is classified as UnrelatedCode. |
You can change the value to one of these keywords:
MyCode
classifies the script as
MyCode.Library
classifies the script as
LibraryCode.Unrelated
classifies the script as
UnrelatedCode.MyCode, Libraries, and Unrelated
The MyCode, Libraries, and Unrelated key value pairs specify the URLs or files that you want to include in a classification:
Name | Description |
---|---|
MyCode | An array of URLs or files that are classified as MyCode. |
Libraries | An array of URLs or files that are classified as LibraryCode. |
Unrelated | An array of URLs or files that are classified as UnrelatedCode. |
The URL or file string can have one or more *
characters, which match zero or more characters. *
is
the same as the regular expression .*
.