Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

assembly language programming

Status
Not open for further replies.

lamiajoyee

Newbie level 4
Joined
Jul 4, 2010
Messages
7
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,327
what is the difference between the following two codes? can anyone tell me?
Code:
ORIGIN 1000
DATAWORD 300
and
Code:
MOVE #300,1000
 

srizbf

Advanced Member level 5
Joined
Apr 3, 2010
Messages
1,995
Helped
417
Reputation
840
Reaction score
328
Trophy points
1,363
Activity points
10,985
no difference.
1st one initialise 300 at address 1000 by assembler.

2nd one same initialisation by processor.
 

    lamiajoyee

    Points: 2
    Helpful Answer Positive Rating

lamiajoyee

Newbie level 4
Joined
Jul 4, 2010
Messages
7
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,327
i know there is no difference but the timing is what matters.could you please tell me when 300 is stored in location 1000 for the two separate occassions?
 

srizbf

Advanced Member level 5
Joined
Apr 3, 2010
Messages
1,995
Helped
417
Reputation
840
Reaction score
328
Trophy points
1,363
Activity points
10,985
after assembling the codes shown ,

1st method starts the program with 300 at loc 1000.

whereas in second method , it is at that time when move is executed.
until then loc 1000 content is not known
 

    lamiajoyee

    Points: 2
    Helpful Answer Positive Rating

lamiajoyee

Newbie level 4
Joined
Jul 4, 2010
Messages
7
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,327
here is my problem:
register R5 is used to point the top of the stack.write sequence instruction to pop the top two items off the stack, add them and push the result onto the stack. also copy the fifth item from the top into register R3 and remove the top ten items from the stack.
here i only know two instrctions.how can i implement the above problem using these and more instructions?please help me.
Code:
 MOVE item,-(SP)
MOVE (SP)+,item
 

srizbf

Advanced Member level 5
Joined
Apr 3, 2010
Messages
1,995
Helped
417
Reputation
840
Reaction score
328
Trophy points
1,363
Activity points
10,985
an incrementing or decrementing stack type ?

any pop /push instrctions available?
 

lamiajoyee

Newbie level 4
Joined
Jul 4, 2010
Messages
7
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,327
they have asked me to use index,auto increment and auto decrement mode
 

srizbf

Advanced Member level 5
Joined
Apr 3, 2010
Messages
1,995
Helped
417
Reputation
840
Reaction score
328
Trophy points
1,363
Activity points
10,985
for increment type:

MOVE num1,-(SP)
MOVE num2 , -(SP)
add num1,num2
MOVE (SP)+ , num1

other parts . whether to get fifth item after adding and pushing to stack or get before .
not clear

Added after 2 minutes:

a 68000 book will give you the idea.
 

    lamiajoyee

    Points: 2
    Helpful Answer Positive Rating

amraldo

Advanced Member level 4
Joined
Aug 29, 2004
Messages
1,185
Helped
145
Reputation
290
Reaction score
40
Trophy points
1,328
Location
Egypt
Activity points
5,880
The first is compile time (assemble time) initialization while the second is run time initialization.
--
Amr
 

    lamiajoyee

    Points: 2
    Helpful Answer Positive Rating

amraldo

Advanced Member level 4
Joined
Aug 29, 2004
Messages
1,185
Helped
145
Reputation
290
Reaction score
40
Trophy points
1,328
Location
Egypt
Activity points
5,880
Which processor and assembler are you targeting?
--
Amr
 

lamiajoyee

Newbie level 4
Joined
Jul 4, 2010
Messages
7
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,327
im a total newbie.im studying 8085 computer architecture.so i actually dont the processor or assembler
 

srizbf

Advanced Member level 5
Joined
Apr 3, 2010
Messages
1,995
Helped
417
Reputation
840
Reaction score
328
Trophy points
1,363
Activity points
10,985
you can see the following for beginning with 8085 assmbler.
http://gnusim8085.sourceforge.net/doc/asm-guide.html


if you visit:
**broken link removed**
there are 8085 related materials on this page.
download the pdfs and read.
you will get the grip of 8085.

hope it helps you
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top