mirror of
https://github.com/caperren/school_archives.git
synced 2025-11-09 21:51:15 +00:00
Added VERY old code. Very cringy to look at, but hey, we all had to start somewhere...
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1><EFBFBD>Vision Build Log</h1>
|
||||
<h2>Project:</h2>
|
||||
D:\Google Drive\_School\Current Term\CS 271\Final Paper\Code\Program1\ARMv7\Proj.uvproj
|
||||
Project File Date: 03/18/2014
|
||||
|
||||
<h2>Output:</h2>
|
||||
Rebuild target 'Target 1'
|
||||
assembling assem.s...
|
||||
linking...
|
||||
Program Size: Code=96 RO-data=0 RW-data=0 ZI-data=0
|
||||
".\Proj.axf" - 0 Error(s), 0 Warning(s).
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
.\Proj.axf" - 2 Error(s), 0 Warning(s).
|
||||
Target not created
|
||||
(s).
|
||||
Target not created
|
||||
g(s).
|
||||
Target not created
|
||||
" - 3 Error(s), 0 Warning(s).
|
||||
Target not created
|
||||
@@ -0,0 +1,20 @@
|
||||
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
||||
<html><head>
|
||||
<title>Static Call Graph - [.\Proj.axf]</title></head>
|
||||
<body><HR>
|
||||
<H1>Static Call Graph for image .\Proj.axf</H1><HR>
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 5.03 [Build 76]: Last Updated: Tue Mar 18 03:46:41 2014
|
||||
<BR><P>
|
||||
<H3>Maximum Stack Usage = 0 bytes</H3><H3>
|
||||
Call chain for Maximum Stack Depth:</H3>
|
||||
|
||||
<P>
|
||||
<H3>
|
||||
Global Symbols
|
||||
</H3><P>
|
||||
<H3>
|
||||
Local Symbols
|
||||
</H3><P>
|
||||
<H3>
|
||||
Undefined Global Symbols
|
||||
</H3><HR></body></html>
|
||||
@@ -0,0 +1,5 @@
|
||||
--cpu ARM7TDMI
|
||||
".\assem.o"
|
||||
--ro-base 0x00000000 --entry 0x00000000 --rw-base 0x00000000 --strict --summary_stderr --info summarysizes --map --xref --callgraph --symbols
|
||||
--info sizes --info totals --info unused --info veneers
|
||||
--list ".\Proj.map" -o .\Proj.axf
|
||||
@@ -0,0 +1,89 @@
|
||||
ARM Linker, 5.03 [Build 76] [MDK-ARM Lite]
|
||||
|
||||
==============================================================================
|
||||
|
||||
Section Cross References
|
||||
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
Image Symbol Table
|
||||
|
||||
Local Symbols
|
||||
|
||||
Symbol Name Value Ov Type Size Object(Section)
|
||||
|
||||
ConstrainProg 0x00000000 Section 96 assem.o(ConstrainProg)
|
||||
assem.s 0x00000000 Number 0 assem.o ABSOLUTE
|
||||
|
||||
Global Symbols
|
||||
|
||||
Symbol Name Value Ov Type Size Object(Section)
|
||||
|
||||
BuildAttributes$$THM_ISAv1$ARM_ISAv4$S$PE$A:L22$X:L11$S22$IEEE1$IW$USESV6$~STKCKD$USESV7$~SHL$OSPACE$EBA8$STANDARDLIB$EABIv2 0x00000000 Number 0 anon$$obj.o ABSOLUTE
|
||||
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
Memory Map of the image
|
||||
|
||||
Image Entry point : 0x00000000
|
||||
|
||||
Load Region LR_1 (Base: 0x00000000, Size: 0x00000060, Max: 0xffffffff, ABSOLUTE)
|
||||
|
||||
Execution Region ER_RO (Base: 0x00000000, Size: 0x00000000, Max: 0xffffffff, ABSOLUTE)
|
||||
|
||||
**** No section assigned to this execution region ****
|
||||
|
||||
|
||||
Execution Region ER_RW (Base: 0x00000000, Size: 0x00000060, Max: 0xffffffff, ABSOLUTE)
|
||||
|
||||
Base Addr Size Type Attr Idx E Section Name Object
|
||||
|
||||
0x00000000 0x00000060 Code RW 1 * ConstrainProg assem.o
|
||||
|
||||
|
||||
Execution Region ER_ZI (Base: 0x00000060, Size: 0x00000000, Max: 0xffffffff, ABSOLUTE)
|
||||
|
||||
**** No section assigned to this execution region ****
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
Image component sizes
|
||||
|
||||
|
||||
Code (inc. data) RO Data RW Data ZI Data Debug Object Name
|
||||
|
||||
96 16 0 0 0 248 assem.o
|
||||
|
||||
----------------------------------------------------------------------
|
||||
96 16 0 0 0 248 Object Totals
|
||||
0 0 0 0 0 0 (incl. Generated)
|
||||
0 0 0 0 0 0 (incl. Padding)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
0 0 0 0 0 0 Library Totals
|
||||
0 0 0 0 0 0 (incl. Padding)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
==============================================================================
|
||||
|
||||
|
||||
Code (inc. data) RO Data RW Data ZI Data Debug
|
||||
|
||||
96 16 0 0 0 248 Grand Totals
|
||||
96 16 0 0 0 248 ELF Image Totals
|
||||
96 16 0 0 0 0 ROM Totals
|
||||
|
||||
==============================================================================
|
||||
|
||||
Total RO Size (Code + RO Data) 96 ( 0.09kB)
|
||||
Total RW Size (RW Data + ZI Data) 0 ( 0.00kB)
|
||||
Total ROM Size (Code + RO Data + RW Data) 96 ( 0.09kB)
|
||||
|
||||
==============================================================================
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,193 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_opt.xsd">
|
||||
|
||||
<SchemaVersion>1.0</SchemaVersion>
|
||||
|
||||
<Header>### uVision Project, (C) Keil Software</Header>
|
||||
|
||||
<Extensions>
|
||||
<cExt>*.c</cExt>
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
</Extensions>
|
||||
|
||||
<DaveTm>
|
||||
<dwLowDateTime>0</dwLowDateTime>
|
||||
<dwHighDateTime>0</dwHighDateTime>
|
||||
</DaveTm>
|
||||
|
||||
<Target>
|
||||
<TargetName>Target 1</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<TargetOption>
|
||||
<CLKADS>60000000</CLKADS>
|
||||
<OPTTT>
|
||||
<gFlags>0</gFlags>
|
||||
<BeepAtEnd>1</BeepAtEnd>
|
||||
<RunSim>1</RunSim>
|
||||
<RunTarget>0</RunTarget>
|
||||
</OPTTT>
|
||||
<OPTHX>
|
||||
<HexSelection>1</HexSelection>
|
||||
<FlashByte>65535</FlashByte>
|
||||
<HexRangeLowAddress>0</HexRangeLowAddress>
|
||||
<HexRangeHighAddress>0</HexRangeHighAddress>
|
||||
<HexOffset>0</HexOffset>
|
||||
</OPTHX>
|
||||
<OPTLEX>
|
||||
<PageWidth>79</PageWidth>
|
||||
<PageLength>66</PageLength>
|
||||
<TabStop>8</TabStop>
|
||||
<ListingPath>.\</ListingPath>
|
||||
</OPTLEX>
|
||||
<ListingPage>
|
||||
<CreateCListing>1</CreateCListing>
|
||||
<CreateAListing>1</CreateAListing>
|
||||
<CreateLListing>1</CreateLListing>
|
||||
<CreateIListing>0</CreateIListing>
|
||||
<AsmCond>1</AsmCond>
|
||||
<AsmSymb>1</AsmSymb>
|
||||
<AsmXref>0</AsmXref>
|
||||
<CCond>1</CCond>
|
||||
<CCode>0</CCode>
|
||||
<CListInc>0</CListInc>
|
||||
<CSymb>0</CSymb>
|
||||
<LinkerCodeListing>0</LinkerCodeListing>
|
||||
</ListingPage>
|
||||
<OPTXL>
|
||||
<LMap>1</LMap>
|
||||
<LComments>1</LComments>
|
||||
<LGenerateSymbols>1</LGenerateSymbols>
|
||||
<LLibSym>1</LLibSym>
|
||||
<LLines>1</LLines>
|
||||
<LLocSym>1</LLocSym>
|
||||
<LPubSym>1</LPubSym>
|
||||
<LXref>0</LXref>
|
||||
<LExpSel>0</LExpSel>
|
||||
</OPTXL>
|
||||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>255</CpuCode>
|
||||
<DllOpt>
|
||||
<SimDllName>SARM.DLL</SimDllName>
|
||||
<SimDllArguments></SimDllArguments>
|
||||
<SimDlgDllName>DARMP.DLL</SimDlgDllName>
|
||||
<SimDlgDllArguments></SimDlgDllArguments>
|
||||
<TargetDllName>SARM.DLL</TargetDllName>
|
||||
<TargetDllArguments></TargetDllArguments>
|
||||
<TargetDlgDllName>TARMP.DLL</TargetDlgDllName>
|
||||
<TargetDlgDllArguments></TargetDlgDllArguments>
|
||||
</DllOpt>
|
||||
<DebugOpt>
|
||||
<uSim>1</uSim>
|
||||
<uTrg>0</uTrg>
|
||||
<sLdApp>1</sLdApp>
|
||||
<sGomain>1</sGomain>
|
||||
<sRbreak>1</sRbreak>
|
||||
<sRwatch>1</sRwatch>
|
||||
<sRmem>1</sRmem>
|
||||
<sRfunc>1</sRfunc>
|
||||
<sRbox>1</sRbox>
|
||||
<tLdApp>1</tLdApp>
|
||||
<tGomain>0</tGomain>
|
||||
<tRbreak>1</tRbreak>
|
||||
<tRwatch>1</tRwatch>
|
||||
<tRmem>1</tRmem>
|
||||
<tRfunc>0</tRfunc>
|
||||
<tRbox>1</tRbox>
|
||||
<tRtrace>1</tRtrace>
|
||||
<sRunDeb>0</sRunDeb>
|
||||
<sLrtime>0</sLrtime>
|
||||
<nTsel>-1</nTsel>
|
||||
<sDll></sDll>
|
||||
<sDllPa></sDllPa>
|
||||
<sDlgDll></sDlgDll>
|
||||
<sDlgPa></sDlgPa>
|
||||
<sIfile></sIfile>
|
||||
<tDll></tDll>
|
||||
<tDllPa></tDllPa>
|
||||
<tDlgDll></tDlgDll>
|
||||
<tDlgPa></tDlgPa>
|
||||
<tIfile></tIfile>
|
||||
<pMon></pMon>
|
||||
</DebugOpt>
|
||||
<TargetDriverDllRegistry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGDARM</Key>
|
||||
<Name>(134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>ARMDBGFLAGS</Key>
|
||||
<Name>-T5F</Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
<DebugFlag>
|
||||
<trace>0</trace>
|
||||
<periodic>1</periodic>
|
||||
<aLwin>1</aLwin>
|
||||
<aCover>0</aCover>
|
||||
<aSer1>0</aSer1>
|
||||
<aSer2>0</aSer2>
|
||||
<aPa>0</aPa>
|
||||
<viewmode>1</viewmode>
|
||||
<vrSel>0</vrSel>
|
||||
<aSym>0</aSym>
|
||||
<aTbox>0</aTbox>
|
||||
<AscS1>0</AscS1>
|
||||
<AscS2>0</AscS2>
|
||||
<AscS3>0</AscS3>
|
||||
<aSer3>0</aSer3>
|
||||
<eProf>0</eProf>
|
||||
<aLa>0</aLa>
|
||||
<aPa1>0</aPa1>
|
||||
<AscS4>0</AscS4>
|
||||
<aSer4>0</aSer4>
|
||||
<StkLoc>0</StkLoc>
|
||||
<TrcWin>0</TrcWin>
|
||||
<newCpu>0</newCpu>
|
||||
<uProt>0</uProt>
|
||||
</DebugFlag>
|
||||
<LintExecutable></LintExecutable>
|
||||
<LintConfigFile></LintConfigFile>
|
||||
</TargetOption>
|
||||
</Target>
|
||||
|
||||
<Group>
|
||||
<GroupName>Source Group 1</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>1</FileNumber>
|
||||
<FileType>2</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\assem.s</PathWithFileName>
|
||||
<FilenameWithoutPath>assem.s</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
</ProjectOpt>
|
||||
@@ -0,0 +1,412 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_proj.xsd">
|
||||
|
||||
<SchemaVersion>1.1</SchemaVersion>
|
||||
|
||||
<Header>### uVision Project, (C) Keil Software</Header>
|
||||
|
||||
<Targets>
|
||||
<Target>
|
||||
<TargetName>Target 1</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
<Device>ARM7 (Little Endian)</Device>
|
||||
<Vendor>ARM</Vendor>
|
||||
<Cpu>CLOCK(60000000) CPUTYPE(ARM7TDMI)</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>3654</DeviceId>
|
||||
<RegisterFile></RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
<Cmp></Cmp>
|
||||
<Asm></Asm>
|
||||
<Linker></Linker>
|
||||
<OHString></OHString>
|
||||
<InfinionOptionDll></InfinionOptionDll>
|
||||
<SLE66CMisc></SLE66CMisc>
|
||||
<SLE66AMisc></SLE66AMisc>
|
||||
<SLE66LinkerMisc></SLE66LinkerMisc>
|
||||
<SFDFile></SFDFile>
|
||||
<bCustSvd>0</bCustSvd>
|
||||
<UseEnv>0</UseEnv>
|
||||
<BinPath></BinPath>
|
||||
<IncludePath></IncludePath>
|
||||
<LibPath></LibPath>
|
||||
<RegisterFilePath></RegisterFilePath>
|
||||
<DBRegisterFilePath></DBRegisterFilePath>
|
||||
<TargetStatus>
|
||||
<Error>0</Error>
|
||||
<ExitCodeStop>0</ExitCodeStop>
|
||||
<ButtonStop>0</ButtonStop>
|
||||
<NotGenerated>0</NotGenerated>
|
||||
<InvalidFlash>1</InvalidFlash>
|
||||
</TargetStatus>
|
||||
<OutputDirectory>.\</OutputDirectory>
|
||||
<OutputName>Proj</OutputName>
|
||||
<CreateExecutable>1</CreateExecutable>
|
||||
<CreateLib>0</CreateLib>
|
||||
<CreateHexFile>0</CreateHexFile>
|
||||
<DebugInformation>1</DebugInformation>
|
||||
<BrowseInformation>1</BrowseInformation>
|
||||
<ListingPath>.\</ListingPath>
|
||||
<HexFormatSelection>1</HexFormatSelection>
|
||||
<Merge32K>0</Merge32K>
|
||||
<CreateBatchFile>0</CreateBatchFile>
|
||||
<BeforeCompile>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopU1X>0</nStopU1X>
|
||||
<nStopU2X>0</nStopU2X>
|
||||
</BeforeCompile>
|
||||
<BeforeMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
</BeforeMake>
|
||||
<AfterMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
</AfterMake>
|
||||
<SelectedForBatchBuild>0</SelectedForBatchBuild>
|
||||
<SVCSIdString></SVCSIdString>
|
||||
</TargetCommonOption>
|
||||
<CommonProperty>
|
||||
<UseCPPCompiler>0</UseCPPCompiler>
|
||||
<RVCTCodeConst>0</RVCTCodeConst>
|
||||
<RVCTZI>0</RVCTZI>
|
||||
<RVCTOtherData>0</RVCTOtherData>
|
||||
<ModuleSelection>0</ModuleSelection>
|
||||
<IncludeInBuild>1</IncludeInBuild>
|
||||
<AlwaysBuild>0</AlwaysBuild>
|
||||
<GenerateAssemblyFile>0</GenerateAssemblyFile>
|
||||
<AssembleAssemblyFile>0</AssembleAssemblyFile>
|
||||
<PublicsOnly>0</PublicsOnly>
|
||||
<StopOnExitCode>3</StopOnExitCode>
|
||||
<CustomArgument></CustomArgument>
|
||||
<IncludeLibraryModules></IncludeLibraryModules>
|
||||
<ComprImg>1</ComprImg>
|
||||
</CommonProperty>
|
||||
<DllOption>
|
||||
<SimDllName>SARM.DLL</SimDllName>
|
||||
<SimDllArguments></SimDllArguments>
|
||||
<SimDlgDll>DARMP.DLL</SimDlgDll>
|
||||
<SimDlgDllArguments></SimDlgDllArguments>
|
||||
<TargetDllName>SARM.DLL</TargetDllName>
|
||||
<TargetDllArguments></TargetDllArguments>
|
||||
<TargetDlgDll>TARMP.DLL</TargetDlgDll>
|
||||
<TargetDlgDllArguments></TargetDlgDllArguments>
|
||||
</DllOption>
|
||||
<DebugOption>
|
||||
<OPTHX>
|
||||
<HexSelection>1</HexSelection>
|
||||
<HexRangeLowAddress>0</HexRangeLowAddress>
|
||||
<HexRangeHighAddress>0</HexRangeHighAddress>
|
||||
<HexOffset>0</HexOffset>
|
||||
<Oh166RecLen>16</Oh166RecLen>
|
||||
</OPTHX>
|
||||
<Simulator>
|
||||
<UseSimulator>1</UseSimulator>
|
||||
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
|
||||
<RunToMain>1</RunToMain>
|
||||
<RestoreBreakpoints>1</RestoreBreakpoints>
|
||||
<RestoreWatchpoints>1</RestoreWatchpoints>
|
||||
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
|
||||
<RestoreFunctions>1</RestoreFunctions>
|
||||
<RestoreToolbox>1</RestoreToolbox>
|
||||
<LimitSpeedToRealTime>0</LimitSpeedToRealTime>
|
||||
</Simulator>
|
||||
<Target>
|
||||
<UseTarget>0</UseTarget>
|
||||
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
|
||||
<RunToMain>0</RunToMain>
|
||||
<RestoreBreakpoints>1</RestoreBreakpoints>
|
||||
<RestoreWatchpoints>1</RestoreWatchpoints>
|
||||
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
|
||||
<RestoreFunctions>0</RestoreFunctions>
|
||||
<RestoreToolbox>1</RestoreToolbox>
|
||||
<RestoreTracepoints>1</RestoreTracepoints>
|
||||
</Target>
|
||||
<RunDebugAfterBuild>0</RunDebugAfterBuild>
|
||||
<TargetSelection>-1</TargetSelection>
|
||||
<SimDlls>
|
||||
<CpuDll></CpuDll>
|
||||
<CpuDllArguments></CpuDllArguments>
|
||||
<PeripheralDll></PeripheralDll>
|
||||
<PeripheralDllArguments></PeripheralDllArguments>
|
||||
<InitializationFile></InitializationFile>
|
||||
</SimDlls>
|
||||
<TargetDlls>
|
||||
<CpuDll></CpuDll>
|
||||
<CpuDllArguments></CpuDllArguments>
|
||||
<PeripheralDll></PeripheralDll>
|
||||
<PeripheralDllArguments></PeripheralDllArguments>
|
||||
<InitializationFile></InitializationFile>
|
||||
<Driver></Driver>
|
||||
</TargetDlls>
|
||||
</DebugOption>
|
||||
<Utilities>
|
||||
<Flash1>
|
||||
<UseTargetDll>0</UseTargetDll>
|
||||
<UseExternalTool>0</UseExternalTool>
|
||||
<RunIndependent>0</RunIndependent>
|
||||
<UpdateFlashBeforeDebugging>0</UpdateFlashBeforeDebugging>
|
||||
<Capability>0</Capability>
|
||||
<DriverSelection>-1</DriverSelection>
|
||||
</Flash1>
|
||||
<bUseTDR>0</bUseTDR>
|
||||
<Flash2></Flash2>
|
||||
<Flash3></Flash3>
|
||||
<Flash4></Flash4>
|
||||
<pFcarmOut></pFcarmOut>
|
||||
<pFcarmGrp></pFcarmGrp>
|
||||
<pFcArmRoot></pFcArmRoot>
|
||||
<FcArmLst>0</FcArmLst>
|
||||
</Utilities>
|
||||
<TargetArmAds>
|
||||
<ArmAdsMisc>
|
||||
<GenerateListings>0</GenerateListings>
|
||||
<asHll>1</asHll>
|
||||
<asAsm>1</asAsm>
|
||||
<asMacX>1</asMacX>
|
||||
<asSyms>1</asSyms>
|
||||
<asFals>1</asFals>
|
||||
<asDbgD>1</asDbgD>
|
||||
<asForm>1</asForm>
|
||||
<ldLst>0</ldLst>
|
||||
<ldmm>1</ldmm>
|
||||
<ldXref>1</ldXref>
|
||||
<BigEnd>0</BigEnd>
|
||||
<AdsALst>1</AdsALst>
|
||||
<AdsACrf>1</AdsACrf>
|
||||
<AdsANop>0</AdsANop>
|
||||
<AdsANot>0</AdsANot>
|
||||
<AdsLLst>1</AdsLLst>
|
||||
<AdsLmap>1</AdsLmap>
|
||||
<AdsLcgr>1</AdsLcgr>
|
||||
<AdsLsym>1</AdsLsym>
|
||||
<AdsLszi>1</AdsLszi>
|
||||
<AdsLtoi>1</AdsLtoi>
|
||||
<AdsLsun>1</AdsLsun>
|
||||
<AdsLven>1</AdsLven>
|
||||
<AdsLsxf>1</AdsLsxf>
|
||||
<RvctClst>0</RvctClst>
|
||||
<GenPPlst>0</GenPPlst>
|
||||
<AdsCpuType>ARM7TDMI</AdsCpuType>
|
||||
<RvctDeviceName></RvctDeviceName>
|
||||
<mOS>0</mOS>
|
||||
<uocRom>0</uocRom>
|
||||
<uocRam>0</uocRam>
|
||||
<hadIROM>0</hadIROM>
|
||||
<hadIRAM>0</hadIRAM>
|
||||
<hadXRAM>0</hadXRAM>
|
||||
<uocXRam>0</uocXRam>
|
||||
<RvdsVP>0</RvdsVP>
|
||||
<hadIRAM2>0</hadIRAM2>
|
||||
<hadIROM2>0</hadIROM2>
|
||||
<StupSel>0</StupSel>
|
||||
<useUlib>0</useUlib>
|
||||
<EndSel>0</EndSel>
|
||||
<uLtcg>0</uLtcg>
|
||||
<RoSelD>0</RoSelD>
|
||||
<RwSelD>5</RwSelD>
|
||||
<CodeSel>0</CodeSel>
|
||||
<OptFeed>0</OptFeed>
|
||||
<NoZi1>0</NoZi1>
|
||||
<NoZi2>0</NoZi2>
|
||||
<NoZi3>0</NoZi3>
|
||||
<NoZi4>0</NoZi4>
|
||||
<NoZi5>0</NoZi5>
|
||||
<Ro1Chk>0</Ro1Chk>
|
||||
<Ro2Chk>0</Ro2Chk>
|
||||
<Ro3Chk>0</Ro3Chk>
|
||||
<Ir1Chk>0</Ir1Chk>
|
||||
<Ir2Chk>0</Ir2Chk>
|
||||
<Ra1Chk>0</Ra1Chk>
|
||||
<Ra2Chk>0</Ra2Chk>
|
||||
<Ra3Chk>0</Ra3Chk>
|
||||
<Im1Chk>0</Im1Chk>
|
||||
<Im2Chk>0</Im2Chk>
|
||||
<OnChipMemories>
|
||||
<Ocm1>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm1>
|
||||
<Ocm2>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm2>
|
||||
<Ocm3>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm3>
|
||||
<Ocm4>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm4>
|
||||
<Ocm5>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm5>
|
||||
<Ocm6>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm6>
|
||||
<IRAM>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</IRAM>
|
||||
<IROM>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</IROM>
|
||||
<XRAM>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</XRAM>
|
||||
<OCR_RVCT1>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT1>
|
||||
<OCR_RVCT2>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT2>
|
||||
<OCR_RVCT3>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT3>
|
||||
<OCR_RVCT4>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT4>
|
||||
<OCR_RVCT5>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT5>
|
||||
<OCR_RVCT6>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT6>
|
||||
<OCR_RVCT7>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT7>
|
||||
<OCR_RVCT8>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT8>
|
||||
<OCR_RVCT9>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT9>
|
||||
<OCR_RVCT10>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT10>
|
||||
</OnChipMemories>
|
||||
<RvctStartVector></RvctStartVector>
|
||||
</ArmAdsMisc>
|
||||
<Cads>
|
||||
<interw>1</interw>
|
||||
<Optim>1</Optim>
|
||||
<oTime>0</oTime>
|
||||
<SplitLS>0</SplitLS>
|
||||
<OneElfS>0</OneElfS>
|
||||
<Strict>0</Strict>
|
||||
<EnumInt>0</EnumInt>
|
||||
<PlainCh>0</PlainCh>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<wLevel>0</wLevel>
|
||||
<uThumb>0</uThumb>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define></Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath></IncludePath>
|
||||
</VariousControls>
|
||||
</Cads>
|
||||
<Aads>
|
||||
<interw>1</interw>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<thumb>0</thumb>
|
||||
<SplitLS>0</SplitLS>
|
||||
<SwStkChk>0</SwStkChk>
|
||||
<NoWarn>0</NoWarn>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define></Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath></IncludePath>
|
||||
</VariousControls>
|
||||
</Aads>
|
||||
<LDads>
|
||||
<umfTarg>0</umfTarg>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<noStLib>0</noStLib>
|
||||
<RepFail>1</RepFail>
|
||||
<useFile>0</useFile>
|
||||
<TextAddressRange>0x00000000</TextAddressRange>
|
||||
<DataAddressRange>0x00000000</DataAddressRange>
|
||||
<ScatterFile></ScatterFile>
|
||||
<IncludeLibs></IncludeLibs>
|
||||
<IncludeLibsPath></IncludeLibsPath>
|
||||
<Misc></Misc>
|
||||
<LinkerInputFile></LinkerInputFile>
|
||||
<DisabledWarnings></DisabledWarnings>
|
||||
</LDads>
|
||||
</TargetArmAds>
|
||||
</TargetOption>
|
||||
<Groups>
|
||||
<Group>
|
||||
<GroupName>Source Group 1</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>assem.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\assem.s</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
</Groups>
|
||||
</Target>
|
||||
</Targets>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,2 @@
|
||||
Dependencies for Project 'Proj', Target 'Target 1': (DO NOT MODIFY !)
|
||||
F (.\assem.s)(0x53282410)(--cpu ARM7TDMI --pd "__EVAL SETA 1" -g --apcs=interwork
|
||||
@@ -0,0 +1 @@
|
||||
.\assem.o: assem.s
|
||||
@@ -0,0 +1,124 @@
|
||||
|
||||
|
||||
|
||||
ARM Macro Assembler Page 1
|
||||
|
||||
|
||||
1 00000000 AREA ConstrainProg, CODE, READWRITE
|
||||
2 00000000 ENTRY
|
||||
3 00000000 Start
|
||||
4 00000000 E28FD054 ADR sp, Base ;Point to the base
|
||||
of the stack
|
||||
5 00000004 E59F004C LDR r0, LowerVal ;Load the lower va
|
||||
lue into r0
|
||||
6 00000008 E59F1044 LDR r1, UpperVal ;Load the upper va
|
||||
lue in r1
|
||||
7 0000000C E59F203C LDR r2, ParamToConstrain ;Load the
|
||||
value to constrain
|
||||
into r2
|
||||
8 00000010 E50D0004 STR r0,[sp,#-4] ;Load r0 onto the s
|
||||
tack pointer
|
||||
9 00000014 E50D1004 STR r1,[sp,#-4] ;Load r1 onto the s
|
||||
tack pointer
|
||||
10 00000018 E50D2004 STR r2,[sp,#-4] ;Load r2 onto the s
|
||||
tack pointer
|
||||
11 0000001C EB000001 BL Constrain ;Call constrain pro
|
||||
cedure
|
||||
12 00000020 E59D2000 LDR r2, [sp] ;Load constrained v
|
||||
alue back into r2
|
||||
13 00000024 ;r2 should now contain 2000
|
||||
14 00000024 E28DD008 ADD sp, sp, #8 ;Fix the stack poin
|
||||
ter
|
||||
15 00000028 Constrain
|
||||
16 00000028 E50DE004 STR LR, [sp, #-4]
|
||||
17 0000002C E59D500C LDR r5, [sp, #12]
|
||||
18 00000030 E59D4008 LDR r4, [sp, #8]
|
||||
19 00000034 E59D3004 LDR r3, [sp, #4]
|
||||
20 00000038 E1530004 CMP r3, r4
|
||||
21 0000003C 359D3008 LDRLO r3, [sp, #8]
|
||||
22 00000040 E1530005 CMP r3, r5
|
||||
23 00000044 859D300C LDRHI r3, [sp, #12]
|
||||
24 00000048 E58D3004 STR r3, [sp, #4]
|
||||
25 0000004C E49DF004 LDR PC, [sp], #4
|
||||
26 00000050 00000898
|
||||
ParamToConstrain
|
||||
DCD 2200 ;Value to constrain
|
||||
|
||||
27 00000054 000007D0
|
||||
UpperVal
|
||||
DCD 2000 ;Value to constrain
|
||||
|
||||
28 00000058 000003E8
|
||||
LowerVal
|
||||
DCD 1000 ;Value to constrain
|
||||
|
||||
29 0000005C AAAAAAAA
|
||||
Base DCD 0xAAAAAAAA
|
||||
30 00000060 END
|
||||
Command Line: --debug --xref --apcs=interwork --depend=.\assem.d -o.\assem.o -I
|
||||
C:\Keil\ARM\RV31\INC -IC:\Keil\ARM\CMSIS\Include --predefine="__EVAL SETA 1" --
|
||||
list=.\assem.lst assem.s
|
||||
|
||||
|
||||
|
||||
ARM Macro Assembler Page 1 Alphabetic symbol ordering
|
||||
Relocatable symbols
|
||||
|
||||
Base 0000005C
|
||||
|
||||
Symbol: Base
|
||||
Definitions
|
||||
At line 29 in file assem.s
|
||||
Uses
|
||||
At line 4 in file assem.s
|
||||
Comment: Base used once
|
||||
Constrain 00000028
|
||||
|
||||
Symbol: Constrain
|
||||
Definitions
|
||||
At line 15 in file assem.s
|
||||
Uses
|
||||
At line 11 in file assem.s
|
||||
Comment: Constrain used once
|
||||
ConstrainProg 00000000
|
||||
|
||||
Symbol: ConstrainProg
|
||||
Definitions
|
||||
At line 1 in file assem.s
|
||||
Uses
|
||||
None
|
||||
Comment: ConstrainProg unused
|
||||
LowerVal 00000058
|
||||
|
||||
Symbol: LowerVal
|
||||
Definitions
|
||||
At line 28 in file assem.s
|
||||
Uses
|
||||
At line 5 in file assem.s
|
||||
Comment: LowerVal used once
|
||||
ParamToConstrain 00000050
|
||||
|
||||
Symbol: ParamToConstrain
|
||||
Definitions
|
||||
At line 26 in file assem.s
|
||||
Uses
|
||||
At line 7 in file assem.s
|
||||
Comment: ParamToConstrain used once
|
||||
Start 00000000
|
||||
|
||||
Symbol: Start
|
||||
Definitions
|
||||
At line 3 in file assem.s
|
||||
Uses
|
||||
None
|
||||
Comment: Start unused
|
||||
UpperVal 00000054
|
||||
|
||||
Symbol: UpperVal
|
||||
Definitions
|
||||
At line 27 in file assem.s
|
||||
Uses
|
||||
At line 6 in file assem.s
|
||||
Comment: UpperVal used once
|
||||
7 symbols
|
||||
338 symbols in table
|
||||
Binary file not shown.
@@ -0,0 +1,30 @@
|
||||
AREA ConstrainProg, CODE, READWRITE
|
||||
ENTRY
|
||||
Start
|
||||
ADR sp, Base ;Point to the base of the stack
|
||||
LDR r0, LowerVal ;Load the lower value into r0
|
||||
LDR r1, UpperVal ;Load the upper value in r1
|
||||
LDR r2, ParamToConstrain ;Load the value to constrain into r2
|
||||
STR r0,[sp,#-4] ;Load r0 onto the stack pointer
|
||||
STR r1,[sp,#-4] ;Load r1 onto the stack pointer
|
||||
STR r2,[sp,#-4] ;Load r2 onto the stack pointer
|
||||
BL Constrain ;Call constrain procedure
|
||||
LDR r2, [sp] ;Load constrained value back into r2
|
||||
;r2 should now contain 2000
|
||||
ADD sp, sp, #8 ;Fix the stack pointer
|
||||
Constrain
|
||||
STR LR, [sp, #-4] ;Store return address
|
||||
LDR r5, [sp, #12] ;Retrieve lower
|
||||
LDR r4, [sp, #8] ;Retrieve upper
|
||||
LDR r3, [sp, #4] ;Retrieve val to constrain
|
||||
CMP r3, r4 ;Check if higher than max
|
||||
LDRHI r3, [sp, #8] ;If so, load max
|
||||
CMP r3, r5 ;Check if lower than min
|
||||
LDRLO r3, [sp, #12] ;If so, load min
|
||||
STR r3, [sp, #4] ;Overwrite constrained val
|
||||
LDR PC, [sp], #4 ;Return from procedure
|
||||
ParamToConstrain DCD 2200 ;Value to constrain
|
||||
UpperVal DCD 2000 ;Value to constrain
|
||||
LowerVal DCD 1000 ;Value to constrain
|
||||
Base DCD 0xAAAAAAAA
|
||||
END
|
||||
@@ -0,0 +1,3 @@
|
||||
AREA Pointers, CODE, READONLY
|
||||
ENTRY
|
||||
Start ADR r0, List
|
||||
@@ -0,0 +1,17 @@
|
||||
AREA Pointers, CODE, READONLY
|
||||
ENTRY
|
||||
Start
|
||||
ADR r0, Array ;Point to address of array
|
||||
MOV r1, #5 ;Set up a loop counter for array
|
||||
MOV r2, #1 ;Set first val to one so math works
|
||||
MultLoop
|
||||
LDR r3,[r0] ;Put current array value into r3
|
||||
MUL r2,r3,r2 ;Multiply array val by stored product
|
||||
ADD r0,r0,#4 ;Move forward by one array element
|
||||
SUBS r1,r1,#1 ;Decrease loop counter
|
||||
BNE MultLoop ;repeat until all elements added
|
||||
|
||||
;Final value in r2 (0x78 == 120 == 5!)
|
||||
|
||||
Array DCD 1,2,3,4,5 ;Array to hold values
|
||||
END
|
||||
@@ -0,0 +1,32 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
TITLE LoopArrayMultiply (main.asm)
|
||||
;Author: Corwin Perren
|
||||
;Date: 3/13/2014
|
||||
;Description:
|
||||
; This program runs through an array and multiplies each value until all
|
||||
; array elements have been iterated through
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
INCLUDE Irvine32.inc
|
||||
|
||||
.data
|
||||
Array DWORD 1,2,3,4,5 ;Array with five values
|
||||
|
||||
.code
|
||||
|
||||
main PROC
|
||||
cld ;Set direction forward
|
||||
mov esi, OFFSET Array ;Point esi to offset for array
|
||||
mov ecx, LENGTHOF Array ;Set loop counter to length of array
|
||||
mov ebx, 1 ;Set storage reg to 1 so initial multiplication works
|
||||
MultLoop:
|
||||
lodsd ;Load current array value into eax
|
||||
mul ebx ;Multiply eax by ebx
|
||||
mov ebx, eax ;Store result in ebx
|
||||
loop MultLoop ;Loop until array empty
|
||||
mov eax, ebx ;Move final value into eax for printing
|
||||
call WriteDec ;Print to screen
|
||||
call Crlf ;Print line
|
||||
exit ;Exit program
|
||||
main ENDP
|
||||
END main
|
||||
@@ -0,0 +1,30 @@
|
||||
AREA ConstrainProg, CODE, READWRITE
|
||||
ENTRY
|
||||
Start
|
||||
ADR sp, Base ;Point to the base of the stack
|
||||
LDR r0, LowerVal ;Load the lower value into r0
|
||||
LDR r1, UpperVal ;Load the upper value in r1
|
||||
LDR r2, ParamToConstrain ;Load the value to constrain into r2
|
||||
STR r0,[sp,#-4] ;Load r0 onto the stack pointer
|
||||
STR r1,[sp,#-4] ;Load r1 onto the stack pointer
|
||||
STR r2,[sp,#-4] ;Load r2 onto the stack pointer
|
||||
BL Constrain ;Call constrain procedure
|
||||
LDR r2, [sp] ;Load constrained value back into r2
|
||||
;r2 should now contain 2000
|
||||
ADD sp, sp, #8 ;Fix the stack pointer
|
||||
Constrain
|
||||
STR LR, [sp, #-4] ;Store return address
|
||||
LDR r5, [sp, #12] ;Retrieve lower
|
||||
LDR r4, [sp, #8] ;Retrieve upper
|
||||
LDR r3, [sp, #4] ;Retrieve val to constrain
|
||||
CMP r3, r4 ;Check if higher than max
|
||||
LDRHI r3, [sp, #8] ;If so, load max
|
||||
CMP r3, r5 ;Check if lower than min
|
||||
LDRLO r3, [sp, #12] ;If so, load min
|
||||
STR r3, [sp, #4] ;Overwrite constrained val
|
||||
LDR PC, [sp], #4 ;Return from procedure
|
||||
ParamToConstrain DCD 2200 ;Value to constrain
|
||||
UpperVal DCD 2000 ;Value to constrain
|
||||
LowerVal DCD 1000 ;Value to constrain
|
||||
Base DCD 0xAAAAAAAA
|
||||
END
|
||||
@@ -0,0 +1,48 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
TITLE Constrain (main.asm)
|
||||
;Author: Corwin Perren
|
||||
;Date: 3/13/2014
|
||||
;Description:
|
||||
; This program runs passes an argument via stack to a constain function
|
||||
; based off of hobby R/C pulse times (1000-2000 microseconds)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
INCLUDE Irvine32.inc
|
||||
|
||||
.data
|
||||
ParamToConstrain DWORD 2500 ;;;;Value to constrain
|
||||
UpperVal DWORD 2000 ;;;;Upper limit for constraint
|
||||
LowerVal DWORD 1000 ;;;;Lower limit for constraint
|
||||
.code
|
||||
|
||||
Constrain PROC
|
||||
mov ebp, esp ;;;;Move stack pointer into ebp
|
||||
mov eax, [ebp+4] ;;;;Move the param to constrain into eax
|
||||
cmp eax, [ebp+8] ;;;;Compare param to constrain to upper val
|
||||
jg IsGreater ;;;;If it's greater, jump to isgreater
|
||||
cmp eax, [ebp+12] ;;;;If it's not greater check if it's lower than lower val
|
||||
jg NoChange ;;;;If it's not lower, jump to end of procedure
|
||||
mov eax, [ebp+12] ;;;;If lower, move lower constrain value into eax
|
||||
mov [ebp+4], eax ;;;;Replace value to constrain with eax
|
||||
jmp NoChange ;;;;Just to end of procedure
|
||||
IsGreater:
|
||||
mov eax, [ebp+8] ;;;;If greater, move upper val into eax
|
||||
mov [ebp+4], eax ;;;;Replace value to constrain with eax
|
||||
NoChange:
|
||||
ret ;;;;Return from procedure
|
||||
Constrain ENDP
|
||||
|
||||
main PROC
|
||||
|
||||
MultLoop:
|
||||
push LowerVal ;;;;Push lower constraint to the stack
|
||||
push UpperVal ;;;;Push upper constraint to the stack
|
||||
push ParamToConstrain ;;;;Push value onto the stack
|
||||
call Constrain ;;;;Constrain this value
|
||||
pop eax ;;;;Pop constrained value off the stack
|
||||
add esp, 8 ;;;;Clean up stack
|
||||
call WriteDec ;;;;Write value to screen
|
||||
call Crlf ;;;;Prints a new line
|
||||
exit ;;;;Exits the program
|
||||
main ENDP
|
||||
END main
|
||||
Reference in New Issue
Block a user