Previous in Forum: Software to Extrapolate Temperature Rise in Busbars   Next in Forum: Why can I get no cursor in the message box?
Close
Close
Close
2 comments
Rate Comments: Nested
Active Contributor

Join Date: Nov 2006
Posts: 10

Micro Computer Assembly Language Programming

12/15/2006 3:55 AM

hey guys...

I wanna ask u about the assembly language in the micro-processors which is used in the micro-processors kit (or @ ms dos in the P.C), I think you know what I meant.. anyway,

I wanna write a program in this assembly language to multiply double word with another double word...
but this will be done using the shift, rotate and loops instructions..

so can anyone help me in this program??

best wishes..

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#1

Re: Micro Computer Assembly Language Programming

12/16/2006 4:20 AM

Assuming you are going to use WinXP or similar, I would recommend that you use a compiled language as the complier will take care of the system calls and other complicated bits etc for you.

Although complied languages are not as fast as assembler (they are pretty damn good though for most applications), there are so many things that should be taken care of for WinXP in the program, that you may lose interest before one line of working code is written!

Or go back to DOS (if that is still possible) where program writing was easier if not easy.

I still use Basic from time to time to write short programs that I need (nothing too complicated)....maybe a modern Basic (Visual Basic or similar) will do what you wish and still be fast enough for you.....a modern Basic I believe can be tested "as is" and compiled when it works....though I lack personal experience in this area, sorry.

I am sure that there will be a lot of more knowledgeable comment shortly for you in this blog.

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
Engineering Fields - Control Engineering - New Member China - Member - New Member

Join Date: Sep 2006
Location: CHINA
Posts: 2945
Good Answers: 14
#2

Re: Micro Computer Assembly Language Programming

12/16/2006 7:06 AM

v

I send you one for reference. you can use it at 51 microchip.

Multiplication

Mul: mov a,r3

mov b,r5

mul a b

mov r7,b

mov a,r3

mov b,r4

mul a b

add a,r7

mov r7,a

clr a

addc a,b

mov r3,a

mov a,r2

mov b, r5

mul a b

add a,r7 mov r7,a mov a,r3 addc a,b mov r3,a mov psw.5,c mov a,r2 mov b,r4 mul a b add a,r3 mov r3,a clr a addc a,b mov c,psw.5 addc a,#00h mov r2,a ret

Register to Reply
Register to Reply 2 comments

Previous in Forum: Software to Extrapolate Temperature Rise in Busbars   Next in Forum: Why can I get no cursor in the message box?

Advertisement