Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 4th, 2012, 11:37 PM
starofstar starofstar is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 2 starofstar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 40 sec
Reputation Power: 0
Small Assembler programming help

//Program
org 100

mov ax, 2 ;initialize bx to 2(stores successive even numbers)
mov bx, 2 ;initialize ax(stores sum of successive even numbers)
mov cx, 3 ;initialize cx to 3 or 5 (number of times loop body executes)

;Execute the loop body cx times
jmp WHILE_CONDITION

WHILE_TOP:



WHILE_CONDITION:
cmp ??
j? WHILE_TOP
hlt


Instructions:

One number at at time starting with 2, generate successive even integers in bx.
Total the N even integers in ax.
If cx is assigned 3, ax should end as 12 (which is C in hex)
If cx is assigned 5, ax should end as 30 (that is 1E in hex).

Reply With Quote
  #2  
Old October 5th, 2012, 11:41 AM
OmegaZero OmegaZero is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: May 2007
Posts: 737 OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level)OmegaZero User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 22 h 50 m 32 sec
Reputation Power: 928
As the sticky at the top of the forum says, we won't do your homework for you. If you show some effort and ask a question we can help point you in the right direction.

If you don't know where to start, this page may be helpful: So, You Need to Write a Program but Don't Know How to Start

To increase the chance of getting help, post your current attempt and any error messages you get. If your program doesn't give the expected output, explain what you think the code should produce and post what it produces instead. If you're stuck, post what exactly you don't understand. When you post source code, paste it between [code]...[/code] tags to make it easy to read.
__________________
sub{*{$::{$_}}{CODE}==$_[0]&& print for(%:: )}->(\&Meh);

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Small Assembler programming help

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap