Assembler Developer

Moderators: None (Apply to moderate this forum)
Number of threads: 819
Number of posts: 1580

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
PLEASE I NEED SOME HELP Posted by kragelj on 18 Dec 2009 at 3:58 AM
Suppose you have a table defined as:

table1 dw 1000h, 2000h, 3000h, 4000h, 5000h.

Write a program to third place in the table slid value 2500h, so that the other values (the third on) moved one to the right. Display new table.
Report
Re: PLEASE I NEED SOME HELP Posted by AsmGuru62 on 18 Dec 2009 at 5:09 AM
The first thing is that the room is needed to shift the values, so your initial table will look like this:
table dw 1000h,2000h,3000h,4000h,5000h,0000h

Then you need to calculate a few things:
1. How many values needs to be moved:
#VALUES = TABLE SIZE - INDEX AT WHICH TO INSERT NEW VALUE
#VALUES = 5 - 2 = 3 (3 words needs to be shifted to the right)

2. Then you need an address of the LAST table cell - you have to start with the last cell if you want to insert values.

+---------+---------+---------+---------+---------+
|  1000h  |  2000h  |  3000h  |  4000h  |  5000h  |
+---------+---------+---------+---------+---------+
                                        |         |
 THIS IS THE SOURCE ADDRESS YOU NEED -->|         |
                                                  |
           THIS IS THE TARGET ADDRESS YOU NEED -->|

Now, load that address into address register (it can be SI,DI or BX if you writing 16-bit code for DOS). Then load the value from that address and store it to the TARGET address. Then you need to move the address backwards (now it will point to 4000h) and repeat the moving operation. After you have done it #VALUES (three) times you will get this table:
    +---------+---------+---------+---------+---------+---------+
    |  1000h  |  2000h  |  3000h  |  3000h  |  4000h  |  5000h  |
    +---------+---------+---------+---------+---------+---------+
                        |
 THIS IS THE ADDRESS    |
 TO STORE 2500h INTO -->|


When working with WORDs, remember, that each WORD takes TWO bytes, so the address for the last cell will be TABLE+8 (not TABLE+4).
Report
Re: PLEASE I NEED SOME HELP Posted by shoesandjersey on 19 Dec 2009 at 10:26 AM
Get Nike Shoes at Super Cheap Prices
Discount Ed hardy tshirt (http://www.b2ctrader.com)
Discount Ed hardy jean (http://www.b2ctrader.com)
Discount Ed hardy shoes (http://www.b2ctrader.com)
Discount Ed hardy handbag (http://www.b2ctrader.com)
Discount Ed hardy other porduct (http://www.b2ctrader.com)
Discount Nike air jordans (http://www.b2ctrader.com)
Discount Nike Air Max 90 Sneakers (http://www.b2ctrader.com)
Discount Nike Air Max 91 Supplier (http://www.b2ctrader.com)
Discount Nike Air Max 95 Shoes Supplier (http://www.b2ctrader.com)
Discount Nike Air Max 97 Trainers (http://www.b2ctrader.com)
Discount Nike Air Max 2003 Wholesale (http://www.b2ctrader.com)
Discount Nike Air Max 2004 Shoes Wholesale
(http://www.b2ctrader.com)
Discount Nike Air Max 2005 Shop (http://www.b2ctrader.com)
Discount Nike Air Max 2006 Shoes Shop (http://www.b2ctrader.com)
Discount Nike Air Max 360 Catalogs (http://www.b2ctrader.com)
Discount Nike Air Max Ltd Shoes Catalogs (http://www.b2ctrader.com)
Discount Nike Air Max Tn Men's Shoes (http://www.b2ctrader.com)
Discount Nike Air Max Tn 2 Women's Shoes (http://www.b2ctrader.com)
Discount Nike Air Max Tn 3 Customize (http://www.b2ctrader.com)
Discount Nike Air Max Tn 4 Shoes Customize
( http://www.b2ctrader.com)
Discount Nike Air Max Tn 6 Supply (http://www.b2ctrader.com)
Discount Nike Shox NZ Shoes Supply (http://www.b2ctrader.com)
Discount Nike Shox OZ Sale (http://www.b2ctrader.com)
Discount Nike Shox TL Store (http://www.b2ctrader.com)
Discount Nike Shox TL 2 Shoes Store (http://www.b2ctrader.com)
Discount Nike Shox TL 3 Distributor (http://www.b2ctrader.com)
Discount Nike Shox Bmw Shoes Distributor (http://www.b2ctrader.com)
Discount Nike Shox Elite Shoes Manufacturer
(http://www.b2ctrader.com)
Discount Nike Shox Monster Manufacturer (http://www.b2ctrader.com)
Discount Nike Shox R4 Running Shoes (http://www.b2ctrader.com)
Discount Nike Shox R5 Mens Shoes (http://www.b2ctrader.com)
Discount Nike Shox Ride Womens Shoes (http://www.b2ctrader.com)
Discount Nike Shox Rival Shoes Wholesaler (http://www.b2ctrader.com)
Discount Nike Shox Energia Wholesaler (http://www.b2ctrader.com)
Discount Nike Shox LV Sneaker (http://www.b2ctrader.com)
Discount Nike Shox Turbo Suppliers (http://www.b2ctrader.com)
Discount Nike Shox Classic Shoes Suppliers
(http://www.b2ctrader.com)
Discount Nike Shox Dendara Trainer (http://www.b2ctrader.com)
Discount Nike Air Jordan 1 Seller (http://www.b2ctrader.com)
Discount Nike Air Jordan 2 Shoes Seller (http://www.b2ctrader.com)
Discount Nike Air Jordan 3 Collection (http://www.b2ctrader.com)
Discount Nike Air Jordan 4 Shoes Collection
(http://www.b2ctrader.com)
Discount Nike Air Jordan 5 Chaussure Shoes
(http://www.b2ctrader.com)
Discount Nike Air Jordan 6 Catalog (http://www.b2ctrader.com)
Discount Nike Air Jordan 7 Shoes Catalog (http://www.b2ctrader.com)
Discount Nike Air Jordan 8 Customized (http://www.b2ctrader.com)
Discount Nike Air Jordan 9 Shoes Customized
(http://www.b2ctrader.com)
Discount Nike Air Jordan 10 Wholesalers (http://www.b2ctrader.com)
Discount Nike Jordan 11 Shoes Wholesalers (http://www.b2ctrader.com)
Discount Nike Air Jordan 12 Factory (http://www.b2ctrader.com)
Discount Nike Air Jordan 13 Shoes Factory (http://www.b2ctrader.com)
Discount Nike Air Jordan 14 Shoes Sell (http://www.b2ctrader.com)
Discount Nike Air Jordan 16 Exporter (http://www.b2ctrader.com)
Discount Nike Air Jordan 17 Shoes Exporter
(http://www.b2ctrader.com)
Discount Nike Air Jordan 18 Offer (http://www.b2ctrader.com)
Discount Nike Air Jordan 19 Shoes Offer (http://www.b2ctrader.com)
Discount Nike Air Jordan 20 Manufacture (http://www.b2ctrader.com)
Discount Nike Jordan 21 Shoes Manufactu




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.