Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 13th, 2012, 4:32 AM   #1
scao
Newbie
 
Join Date: Mar 2012
Posts: 3
Rep Power: 0 scao is on a distinguished road
ARC Simulator - assemble code

Hi,

Could someone help me please. Im new in assemble code. Using ARC simulator. Im trying to add T = 148916, so the digit number is S = 6 + 1 + 9 + 8 + 4 + 1 = 29.
Where do i start? I know that i have to start with .begin and . end

Best regards
scao
scao is offline   Reply With Quote
Old Mar 13th, 2012, 6:12 AM   #2
scao
Newbie
 
Join Date: Mar 2012
Posts: 3
Rep Power: 0 scao is on a distinguished road
Re: ARC Simulator - assemble code

.begin

six: 6
nine: 9
one: 1
eigth: 8
four: 4
one: 1
almost: 50
Max: 50

ORG. 2048
a_start .equ 3000
ld [six], %g1
ld [nine], %g2
ld [one], %g3
ld [eigth], %g4
ld [four], %g5
ld [one], %g6
ld [almost], %g7
ld [max], %g8

i came so far...might be wrong.
scao is offline   Reply With Quote
Old Mar 13th, 2012, 9:00 AM   #3
scao
Newbie
 
Join Date: Mar 2012
Posts: 3
Rep Power: 0 scao is on a distinguished road
Re: ARC Simulator - assemble code

This migth be closer.

.begin
.org 2048

ld [six], %r1
ld [nine], %r2
ld [one], %r3
ld [eigth], %r4
ld [four], %r5
ld [one], %r6
addcc %r1, %r2, %r3, %r4, %r5, %r6, %r7
st %r7, [t]
jmpl %r15 + 4, %r0

six: 6
nine: 9
one: 1
eigth: 8
four: 4
one: 1

.end

anyone have and ide?
scao is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
code structure lapta Delphi 1 Dec 27th, 2010 9:19 AM
Hamming code error detection/correction thebiff C 0 Oct 22nd, 2010 2:24 PM
Does anyone know what this line of code does? neorich2002 Other Programming Languages 3 Jul 5th, 2010 1:23 PM
weird Allocation/Deallocation error in C code Abhijit Bose C 9 Jun 14th, 2010 6:33 AM
Incorporating javascript code into java application csrocker101 Java 1 Feb 11th, 2008 6:36 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:51 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC