need help on assembly language

MrChips

Joined Oct 2, 2009
30,821
Before you write code in assembler or any computer language for that matter,
write out your algorithm steps in plain language. This is the difficult but essential part.
Writing computer code is the easy part.
 

atferrari

Joined Jan 6, 2004
4,771
I am new in assembly programming. I am confused where to start so before going to design i want to create basic algorithm

how to make algorithm for 8051 in assembly language?
how to write statement for input or output port?
how to write statement for input or output pin?

Look here. Write your own.

Once there, code should be the easiest part.
 

absf

Joined Dec 29, 2010
1,968
I am new in assembly programming. I am confused where to start so before going to design i want to create basic algorithm

how to make algorithm for 8051 in assembly language?
how to write statement for input or output port?
how to write statement for input or output pin?
http://forum.allaboutcircuits.com/editpost.php?do=editpost&p=651169
Sounds like you already have the 8051 hardware ready for writing programs..:rolleyes:

I started learning 8051 using the IDE as recommended by Ian Rogers in the ETO forum. Later I ordered the at89S51 chip and made my own SBC with it. The IDE is very nice to use with lots of goodies inside. Just read the threads here:

My 8051 thread

Another thread by 'ikelectro'

Allen
 

Thread Starter

vead

Joined Nov 24, 2011
629
Sounds like you already have the 8051 hardware ready for writing programs..:rolleyes:

I started learning 8051 using the IDE as recommended by Ian Rogers in the ETO forum. Later I ordered the at89S51 chip and made my own SBC with it. The IDE is very nice to use with lots of goodies inside. Just read the threads here:

My 8051 thread

Another thread by 'ikelectro'

Allen
thanks for response its grate help for me
I have MCU 8051 IDE assembler i am confused how to see ram location and rom address in assembler
 

absf

Joined Dec 29, 2010
1,968
The 89S52 has 8K flash memory (as ROM in 8052) from 0x0000 to 0x1FFF and it has only 256 bytes of ram. The ram available for use is from 0x0030 to 0x007F. 0x0000 to 0x001F are 4 banks of R0 to R7 general registers while 0x0020-0x002F are bit addressable RAM in which you can use them to store variables like flags where they can be used with SETB, JB, JNB type instructions.

There is an additional 128 bytes from 0x0080 to 0x00FF and I normally allocate the stacks here. If additional RAM or ROM is needed. You have to connect external RAM or ROM using ports 0 & 2 for the external address and data lines. The lower 8 but address is multiplexed with the data lines in order to save an 8-bit port.

If you read my thread, you'll see that the 8051 SBC that I made also has 32K external RAM. The external memory is addressed using "MOVX" instructions.

Allen
 

Arm_n_Legs

Joined Mar 7, 2007
186
If you are totally new to 8051, I would suggest reading the MCS51 Microcontroller Family User's Family. This is a pretty old book but the information is still relevant. The assembly instructions are well explain in the book.
 

Meixner

Joined Sep 26, 2011
117
If you are totally new to 8051, I would suggest reading the MCS51 Microcontroller Family User's Family. This is a pretty old book but the information is still relevant. The assembly instructions are well explain in the book.
Arm & Legs has good advice, When i started using 8051's there was no internet to ask questions. I read that book cover to cover 3 times. I was then able to write 8051 code very easily.
 
Top