NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: siddharthamanka on October 06, 2013, 01:19:56 PM

Title: write c program using assembly language programming
Post by: siddharthamanka on October 06, 2013, 01:19:56 PM
write a c program using assembly language programming to convert binary to decimal/write a vc++ program using assembly language programming to convert binary to decimal???
Title: Re: write c program using assembly language programming
Post by: encryptor256 on October 07, 2013, 07:28:34 AM
Yes, i confirm, that,

Teacher at your University gave you this task and now you have to do it!

You are reading it nearly right, so, start doing it. :D
Title: Re: write c program using assembly language programming
Post by: Frank Kotler on October 07, 2013, 03:16:44 PM
On the face of it, this appears to be a bit of an oxymoron. "Write a German novel in English!" My definition of a "C program" would be "a program written in the C programming language". If it''s written in assembly language, it isn't a "C program". I ASSume what siddharthamanka's instructor has in mind is an assembly language program using C library functions, but it might be "a C program using inline assembly". Not really clear.

Before attempting to write any program (in any language), it is good to know exactly what the "specification" is! It is also helpful to know what the target platform (OS) is. Or... you could just start writing and see what it turns out to be... :)

There's a topic a couple of pages down in this section named "integer in, integer out" which discusses displaying a number as decimal, if that's any help.

Best,
Frank

Title: Re: write c program using assembly language programming
Post by: siddharthamanka on October 07, 2013, 08:16:13 PM
can anybody give me the code please???
Title: Re: write c program using assembly language programming
Post by: Gunner on October 07, 2013, 11:56:10 PM
THERE IT IS!!!!!

No, nobody here nor the many other Assembly Forums or Programming Forums will just "give" you code.  You learn nothing by us doing that.  If I were to give you code, I purposely add bugs to it and do not tell you about them.

What you need to do is, do some research on your own on what a binary number is and a decimal number and how to convert between the two, write some code, and when stuck, as for help.  We will be more than happy to help if YOU show some effort!
Title: Re: write c program using assembly language programming
Post by: Rob Neff on October 08, 2013, 03:34:59 PM
Well put, Gunner.  Kids these days.  Sheesh.  ::)