Continue to Site

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.

C code in Assembly code?

Status
Not open for further replies.

buts101

Full Member level 3
Joined
Apr 29, 2005
Messages
168
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Activity points
2,867
Hello guys,
I have written code for interfacing CD-ROM in 8051 assembly language and its working fine. I tried to convert same function of assembly code into C language. But it didn't worked. So I must go with the assembly code for interfacing CDROM. The CD is telephone directory which contains Names and corresponding telephone numbers. The user enters the name of person and my system should search the name and display the corresponding tel. no. in LCD. So, searching string in assembly lang. is being tough for me, so i have to write the seaching code in C. and all other interfacing code for CDROM,Keyboard,LCD in assembly.
Therefore, please help me to understand how to enter C code in assembly program or assembly code in C program.(Some sample code will be a great asset.)

Also, give me some searching algorithm which is easy and efficient to use for my type of strings (names are sorted in ascending order and numbers are tagged in the end of the strings)

Waiting for your reply.
Thank you
Buts101
 

Start your C code ..

; insert assembly code ..

#asem

.. your code ..

#endasem

and continue in C ..

Regards,
IanP
 

how to enter C code in assembly program or assembly code in C program
Usually is assembly code in C program, but at your case I think it is not a simple task to insert the assembly code for interfacing CDROM in C program.

I think the best way is continue to tried to convert same function of assembly code into C language. This link maybe can help you to do that:
http://www.mameworld.net/maws/mamesrc/src/cdrom.c
 

Thank guys for your helpful replies.
Could you me with efficient searching alogrithm which is easy to use in assembly language.

Best regards,
Buts101
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top