Assembly Language
1 Page

Assembly Language

Course Number: COS 231, Summer 2009

College/University: Thomas Edison State

Rating:

Document Preview

TITLE subtract three integers ; ; ; ; ; ; ; ( (main.asm) Description: Assignment 2 part 1 Using the AddSub program from Section 3.2 on page 76 of your textbook as a reference, write a program that subtracts three integers using only 16 bit registers. Revision date: I INCLUDE Irvine32.inc .data val1 val2 val3 finalVal .code m main PROC mov sub sub mov call exit main ENDP END main ax,val1 ax,val2 ax,val3...

Unformatted Document Excerpt
Coursehero >> New Jersey >> Thomas Edison State >> COS 231

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

subtract TITLE three integers ; ; ; ; ; ; ; ( (main.asm) Description: Assignment 2 part 1 Using the AddSub program from Section 3.2 on page 76 of your textbook as a reference, write a program that subtracts three integers using only 16 bit registers. Revision INCLUDE date: I Irvine32.inc .data val1 val2 val3 finalVal .code m main PROC mov sub sub mov call exit main ENDP END main ax,val1 ax,val2 ax,val3 finalVal, ax D DumpRegs ; AX = 8000h ; AX = 4000h ; AX = 2000h SWORD SWORD SWORD S SWORD 8000h 4000h 2000h ?

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Thomas Edison State - COS - 231
TITLE subtract three integers ; ; ; ; ; ; ; ; ; ;( (main.asm)Description: Assignment 2 part 2 Write instructions that use direct-offset addressing to move the four values in Uarray to the EAX, EBX, ECX, and EDX registers. Next, write instructions that u
Thomas Edison State - COS - 231
TITLE subtract three integers ; ; ; ; ; ; ; ; ;( (main.asm)Description: Assignment 3 part 1 Write a program that clears the screen, locates the cursor near the middle of the screen, prompts the user for two integers, adds the integers, and displays thei
Thomas Edison State - COS - 231
TITLE ArrayScan ; ; ; ; ; ;( (main.asm)Description: Assignment 3 part 2 Using the ArrayScan program in Section 6.3.4.2 as a model, implement the search using the LOOPZ instruction. Revision date: Oct 9th 2008I INCLUDE Irvine32.inc .data ;intArray SWORD
Thomas Edison State - COS - 231
1.2. ThisistheonlyscreenIgot3. Skippedasdirected. 4.5.
Thomas Edison State - COS - 231
TITLE Program with packed decimal to asc (main.asm)INCLUDE Irvine32.inc . .data ; ;pack1 ; ;pack1 p pack1 b buffer m mymsg DWORD 42349673h DWORD 23456733h DWORD 67234873h BYTE 16 dup(0),0 BYTE 'This is a Packed to ASCII output.'.code m main PROC mov mov
Thomas Edison State - COS - 231
TITLE WA5 Concatinate two strings. ; ; ; ; ; ; Description:( (main.asm)Write a procedure named Str_concat that concatenates a source string to the end of a target string. Sufficient space must be available in the target string before this procedure is c
Thomas Edison State - COS - 231
TITLE multiplies 32-bit memory operands( (main.asm); Create a macro named mMult32 that multiplies two unsigned ; 32-bit memory operands and produces a 32-bit product.I INCLUDE Irvine32.inc m mMult32 MACRO op1,op2,product mov eax,op1 mul op2 mov product
Thomas Edison State - COS - 231
TITLEmultiplies32bitmemoryoperands(main.asm);Forthisassignmentyoumustbuildaprogramthatshouldprompt ;theuserfortheradiusofacircle.Itshouldcalculateand ;displaythecirclesarea. ;TocreatethisprogramusetheReadFloatandWriteFloatprocedures ;fromyourtextbooksli
Thomas Edison State - COS - 231
WA3 Your first program, using the WriteInt statement, prints the first integer entered rather than the sum of the two. It should also prompt the user to enter the numbers rather than just leave a blank screen. If you have questions let me know.Discussion
Thomas Edison State - COS - 231
TITLE Euclidean algorithm(main.asm); Description: Euclidean algorithmINCLUDE Irvine32.inc.datainput1WORD1071d;; A - Larger numberinput2WORD1029d;; B - Smaller numberanswWORD0temp WORD 0; decimal=1071, 1029, 42, 21, 0; hex=42f, 40
Thomas Edison State - COS - 231
TITLE Euclidean algorithm ; Description:( (main.asm)I INCLUDE Irvine32.inc .data input1 input2 answ WORD .code m main PROC mov mov mov mov m mov dx, 0 eax, 0 ax, input1 dx, input2 cx, input2 ; if dx/remainder = 0 jump to finish ; else continue working m
Thomas Edison State - COS - 231
TITLE WA5 Concatinate two strings.(main.asm); Description:; ; Write a procedure named Str_concat that concatenates a source string; to the end of a target string. Sufficient space must be available in; the target string before this procedure is call
Thomas Edison State - COS - 231
cld;clear direction flag.mov esi,OFFSET sourcemov edi,OFFSET destmov ecx, 2rep movsbshl dest,16mov esi,OFFSET source2mov edi,OFFSET destmov ecx, 2rep movsbmov eax, destcall WriteHex;write the hex value of eaxcall Crlf-
Thomas Edison State - COS - 451
Timothy Martens ARTIFICIAL INTELLIGENCE COS 451 OL009 September 20081. (10 points) Prove the following, using a truth table:A (A B ) A A T T F F T F T F B T T F F A (A B ) A2. (20 points) Prove the following by using (a) truth tables and (b) the Resolu
Thomas Edison State - COS - 451
a.The Towers of Hanoi problem with 4 disks I would use a top-down, problem reduction goal tree.b. The Traveling Salesman problem with 5 citiesI would use a search tree.c. The map-coloring problem with 4 countries and 3 colors where we apply the constr
Thomas Edison State - COS - 451
1. (see secondary documents) 2. For the tree below, show your path of nodes and the number of nodes you need to visit if you follow the protocol from right to left for the respective search strategies ofa. Breadth-first search 1, 2, 3, 4, 5, 6, 7, 8, 9,
Thomas Edison State - COS - 451
Timothy Martens ARTIFICIAL INTELLIGENCE COS 451 OL009 September 20081. Complete the following problems, which can be found in section 9.8 (Review Questions), page261.a. Explain why an expert system are so called.Because they are expert in a particular
Thomas Edison State - COS - 451
1. Are heuristics examples of strong AI methods or weak AI methods? Please explain. Heuristics are definitely examples of strong AI. They are educated guesses, not an exact science. Heuristics use education to help lead them to the correct solution.2. Th
Thomas Edison State - COS - 451
1. Please discuss why metaheuristic search methods may lead to suboptimal solutions.This method just changes items until they happen to work in that particular place. Although they work there it may not be there best place. Take the school teaching examp
Thomas Edison State - COS - 451
Breath first search. GOAL STATE = ABC H~D GFE ~ denotes a empty space. NL = Node Level [U] = UP; [D] = Down; [L] = Left; [R] = Right Denotes the direction the blank space was moved to arrive at the current position. Hueristic: Do not search deeper than si
Thomas Edison State - COS - 451
Depth first search. GOAL STATE = ABC H~D GFE ~ denotes a empty space. NL = Node Level [U] = UP; [D] = Down; [L] = Left; [R] = Right Denotes the direction the blank space was moved to arrive at the current position. Hueristic: Do not search deeper than six
Thomas Edison State - COS - 451
Depth-First Search Count of moves to correct position heuristic with A*. Number of tiles in wrong place? 4 Step 1 2 3 4 5 6 7 8 N Level Config #heuristic 1 2 2 3 3 4 5 6 1 2 3 6 7 14 26 45 5,0,5 7,1,6 5,1,4 7,2,5 5,2,3 5,3,2 5,4,1 5,5,0 NotesX XDone!Br
Thomas Edison State - COS - 451
Depth-First Search Count of tiles in wrong place heuristic with A*. Number of tiles in wrong place? 4 Step 1 2 3 4 5 6 7 8 9 N Level config # heuristic 1 2 2 3 4 3 4 5 6 1 2 3 6 12 7 14 26 45 4,0,4 6,1,5 4,1,3 5,2,3 6,3,3 5,2,3 5,3,2 5,4,1 5,5,0 NotesNo
Thomas Edison State - COS - 451
1. (see secondary documents)2. For the t ree below, show your path of nodes and the number of nodes you need to visit if you follow the protocol from r ight to left for the respective search strategies ofa. Breadth-fi rst search 1, 2, 3, 4, 5, 6, 7, 8,
Thomas Edison State - COS - 451
1. (b) Review Question 7.4 and Allow us to account for everything or part of something without explicitly writing it all out. Instead of having to write everyones names out which would create HUGE name name list you can just use the all inclusive . Same
Thomas Edison State - COS - 451
Bobowns2 CarsownsHomeCarsparked at Homedrives onFreewayis aFordFordis aCarHomeis inCaliforniaCaliforniais a StateSacramento is capital ofCaliforniaFreewayHighway 81is a FreewayRoute 101is a Freeway
Thomas Edison State - COS - 451
Thomas Edison State - COS - 451
1.Takes the chicken to side 2 leaving the grain and the wolf on side 1.2.Leaving the chicken on side 2 by itself he returns to side 1.3.Taking the grain he goes to side 2 picks up the chicken and leaves the grain.4.On side 1 he leaves the Chicken b
Thomas Edison State - COS - 451
Thomas Edison State - COS - 451
Thomas Edison State - COS - 451
Thomas Edison State - COS - 451
Thomas Edison State - COS - 451
Timothy Martens 2008-09-COS-451-OL009 WA 11. Exercise 3.10, which can be found in section 3.15 (Exercises), page 65Bob Cars Ford Home California Sacramento Freeway Highway 81 Route 101owns owns parked at drives on is a is a is in is a is capital of is
Thomas Edison State - COS - 451
Thomas Edison State - COS - 451
Step Node Alpha Beta 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 a b d h h d i i i d b e j j j e k k k e b a c f l l f m f c - - - 5 4 4 4 1 0 - - - - 8 9 4 4 6 7 - 4 4 4 4 - 3 4 2 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
Metropolitan CC - INFO - 1011
Martens1TimothyMartens ProjectManagement1 February26,2008Ireallyappreciatedthisclass.ThethingIlikedmostaboutitwastheclarityofthe assignments,everythingyouhadtodowassaidononepageunlikemanyoftheotherclassesI havetakeninwhichassignmentsarescatteredthroughd
Metropolitan CC - INFO - 1011
Why is the scope an important part of the project and what happens if i t there is creep?Scope defines what needs to be done to complete a project. Without a scope the project could g row indefinitely. Creep can cause additional labor and t ime to a proj
Metropolitan CC - INFO - 1011
TimothyMartens ProjectManagement1 December23,2007Project ScopeThescopeofthisprojectistoequipeachsalespersonwithalaptopallowingthemto updatearealtimedatabaseinordertoincreaseefficiency.Acustomapplicationthat canbothreadandupdatethedatabasewillneedtobewri
Metropolitan CC - INFO - 1011
TimothyMartens January22,2008Critical Path for Building a House Contact Realator Research locations - FS Predecessor > Contact Realator Find Location - FS Predecessor > Research locations Apply for loan- FS Predecessor > Find Location Receive financing
Metropolitan CC - INFO - 1011
Timothy Martens English Composition I February 12, 2007Theadvantagestoworkingonteamsratherthansoloaretremendous.Morebrains workingtogethercreateamoreversatileandthoughtoutproductthatwillbemorestableand helpmorepeople.Morepeopleworkingtogether,combiningef
Metropolitan CC - INFO - 1011
http:/www.sitepoint.com/article/project-management-web-geeks "Project Management" has always been a term more likely to elicit a groan than a smile. Nevertheless, the use of project management skills is often what distinguishes an easy, successful project
Metropolitan CC - INFO - 1011
Ithinkthearticlewasgood.Straittothepointandtheexampleshepickedwereperfect,andhe didaverynicejobexplainingeverything.Hemakesanicepointaboutscope,andevensome waysonhowtodealwithscopecreep.
Metropolitan CC - INFO - 1011
TimothyMartens EnglishCompositionI December16,2007 ThearticlethatIfoundwas:http:/www.projectmanagertraining.com/art_wbs.html Inittheauthorremindsandwarnsusofthedangersofmicromanagingaprojectandhowwe shouldntbreakdownatasktomuch.Bybreakingataskintohourlyta
Metropolitan CC - INFO - 1011
Martens1TimothyMartens ProjectManagement1 February26,2008http:/www.spottydog.unet.com/guides/close/frameset.html Thistellshowimportantistocloseaprojectproperly.Lettingaprojectdriftonleavesthe projectteamdissatisfied.Theprojectmustbeclosedandcelebrated.
Metropolitan CC - INFO - 1011
Takesometimeandwritedownyouropiniononthethingsyoufeelareadvantagesor disadvantageswithprojectteams.Feelfreetogivepersonalexperiencesthatarerelevantto thisopinion.CreatethisinaMSWorddocument.Togetcreditforthisassignmentuploadthe worddocumentandsendtheclass
Metropolitan CC - MATH - 1220
OrdinaryAnnuities: Amountofeachdeposited. timesayear rate Time(years) 1750 1 0.08 14 0.08 14ratedechart 8.2414427.42AmountofAnnuitiesdue: Amountofeachdeposited. Timesayear Rate Time(years) 450 2 0.1 6 0.05 13ratedechart 17.71futurevalue7520.84Prese
Metropolitan CC - MATH - 1220
1. Define fair market value and assessed valuation. Fair Market value is the value that a buyer and seller both knowledgeable of the market, unpressured and willing to sell/buy at. 2. How do you find the amount of property taxes to pay if the mill levy is
Metropolitan CC - MATH - 1220
1. Define fair market value and assessed valuation. Fair Market value is the value that a buyer and seller both knowledgeable of the market, unpressured and willing to sell/buy at. 2. How do you find the amount of property taxes to pay if the mill levy is
Metropolitan CC - MATH - 1220
1. What does it mean to consolidate a loan? Consolidate a loan means to combine two loans into one loan. 2. Give one example to find the APR for a loan paid off in monthly payments. A 2 year loan for $5000 with a finance charge of 537.28 with no down paym
Metropolitan CC - MATH - 1220
1. What does it mean to consolidate a loan? Consolidate a loan means to combine two loans into one loan. 2. Give one example to find the APR for a loan paid off in monthly payments. A 2 year loan for $5000 with a finance charge of 537.28 with no down paym
Metropolitan CC - MATH - 1220
1. Define the basic terms used with annuities. Ordinary annuity: annuity in which payments are made at the end of each period. Payment period: The time between payments. Term of the annuity: the time from the first payment through the last payment. Intere
Metropolitan CC - MATH - 1220
Principle 5500rate 0.1time(mo) 18Interest 825maturity value 6325Principle 6300rate 0.08days 97ordinary(360) exact interest(365) 140.04 138.13Calculate Days First date second date 2-Jun 1-Jun First date 2-Jun Days to add. 97days between -1 date d
Metropolitan CC - MATH - 1220
Principal Rate 55000.1Time(yrs) 4compoundamount interestonly 8052.55 2552.55 amouttotal intonly 19212.39 7212.39Principal Rate time(yrs) coupounded(timesayear) 12000 0.08 6 2 coumpoundinteresttable: amount rate(fromtable) compoundingperiodsinterest to
Metropolitan CC - MATH - 1220
2552.55-2200 2 552.55 - 2200 = 352.55.4363=420000*(1+0.14)^50.74726*808674.12
Metropolitan CC - MATH - 1220
Cost13.4Markup$ SellingPrice %MarkuponCost %MarkuponSellingPrice 10.96 24.36 0.82 0.45Cost17.7Cost%1Markup%0markupcost0.00Cost176Markup$ SellingPrice %MarkuponCost %MarkuponSellingPrice 26.4 202.4 15.00% 0.13MarkuponSellingPrice %Markuponcos
Metropolitan CC - MATH - 1220
527.40 452.40 * .05 = 22.62 452.40 + 22.62 = 475.02527.40 - 475.02 = 52.38M ay 10th.02 * 11 848 = 236.9611848 - 236.96 = 11611.04686.4 * .05 = 34.32 686.4 - 34.32 = 652.087/6 7/2680.19 * .04 = 3.2076 80.19 - 3.2076 = 76.9824 76.9824 + 8.93 = 85.912
Metropolitan CC - MATH - 1220
Metropolitan CC - MATH - 1220
7148.01 77.11 + 462.03 + 86.51 + 67.39 = 693.04 434.89 + 48.38 = 483.27 7 148.01 - 693.04 + 483.27 = 6 938.24
Metropolitan CC - MATH - 1220
5.25 + (.08 * 45) = 8.8512 + (.20 * 15) = 159 394.42 - 10 898 = -1 503.58 10 898 - 273.52 = 10 624.4811 132.31 - 8 237.92 = 2 894.39 11 132.31 - 318.94 = 10 813.373 966.08 - 43.43 = 3 922.65 3 922.65 - 14.37 = 3 908.28 3 908.28 - 17.82 = 3 890.46 3 89
Metropolitan CC - MATH - 1220
.08*(24954-390)
Metropolitan CC - MATH - 1220
1. Findthecompoundamountandtheinterestearnedforthefollowing:Amount:$980,Rate:8%,Compounded:Quarterly,Time:5years 980(1+.02)^20=1456.22845 1456.232. Findtheinterestearnedif$2750isdepositedonJune12andwithdrawnonAugust30.Assume3.5%interestcompoundeddaily.