-
Help in assembly please
Hi, I am trying to write this simple program, but I am not sure how to do, please help.
I have the following:
*******************
program 1
*******************
org $500
start move.l sam,d0
add.l sue,d0
add.l ted,d0
add.l jill,d0
move.l d0,sum
subq.w #3,sam
subq.w #3,ted
addq.w #5,sue
addq.w #5,jill
break
org $1000
sam dc.l $abcd
sue dc.l @1234
ted dc.l %101100111
jill dc.l 2349
sum ds.l 1
Here's what I am supposed to do:
1. Store "Program 1" at location $2000 then declare a constant 316 and label it with "bear"
2. Let horse be 200 and tiger be 18
3. Compute ((bear+horse)-tiger) and store the result to "result"
4. Now isolate bit 0 and 7 of "result" then store them to "done"
5. The program needs to be loaded at location $1000 and data need to be loaded at location $2000.
Thanks for any help.
-
You do realise this is a C++ board !
-
Ask here. They have many ASM gurus there ;)
-
Um, your assignment is talking about bears and tigers and your program is defining "jill" and "sue". That doesn't make sense. Looks like your using M68K correct? Send me a message if you still can't figure it out.