Run assembly program on debian?


 
Thread Tools Search this Thread
Top Forums Programming Run assembly program on debian?
# 1  
Old 09-04-2016
Run assembly program on debian?

Hi,
I am new to assembly.
What i need to install to run assembly program on debian 64?
What i write to excite the code?
# 2  
Old 09-04-2016
Quote:
Originally Posted by kaja
Hi,
I am new to assembly.
What i need to install to run assembly program on debian 64?
What i write to excite the code?
Assembler?
Would it not be easier to write the main code in C[++] and add mission critical stuff using inline assembly code inside the C source?
# 3  
Old 09-04-2016
Quote:
Originally Posted by kaja
What i need to install to run assembly program on debian 64?
I am not quite sure what exactly you mean: A "program" (any language, including assembler) is at first a text document containing the source code. This text document is then translated (Assembler programs by an assembler, other languages by a compiler, both of these are further processed by a linker afterwards), producing an executable. This executable file can then be executed (as the name suggests) without any other means. It is a "standalone" program.

So: for an assembled program to run you need: the executable file produced by the assembler, nothing else.

If you want to start writing programs in Assembler (note: "Assembler" is the language, "assembler" is a translation program translating program source code written in that language) you need:

- an editor that produces plain text files. My editor of choice is vi, but that is a personal choice. Whatever works for you.

- the assembler program. This is usually called as and you might have to install one or more packages in addition to the default installation of Debian.

- a linker. Same as above.

- a make utility. If i remember correctly this is installed per default, but i could be wrong. If not: same as above, install the necessary package(s). You do not need the make utility but you life will be much more comfortable using one. I suggest you start using it from the beginning.

Quote:
Originally Posted by kaja
What i write to excite the code?
Codes are a hopeless cause, they are not easily excited. ;-))

Serious: i suppose you meant "execute", but i am still not sure what you want to know. Was your question answered above?

I hope this helps.

bakunin
# 4  
Old 09-06-2016
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can't get my program to run -- GC calculator?

have been trying for a few weeks not to get this program running. I am newer to programming and it has definitely been a challenge. I think my problem arises with my if statement. I can get it to append the name to the new file, but it simply appends the whole sequence to the file rather than... (3 Replies)
Discussion started by: haley6719
3 Replies

2. Programming

Need assembly code for C program

Dear Buddies, I need assembly code for a compiled c program in unix. Kindly help me.... Thanking you in advance. (1 Reply)
Discussion started by: karthik537
1 Replies

3. Shell Programming and Scripting

Run a program as another user

I have a bash script that launches another problem. I need to run that program under a certain user account. The script itself is run using 'sudo <scriptname>'. #!/bin/bash myprogram=... exec "$myprogram" How would this be done? (1 Reply)
Discussion started by: Carson Dyle
1 Replies

4. UNIX for Dummies Questions & Answers

Help to run this socket program in C

i have created two files named server and client then when i run the server program it says the server is waiting(./server 5555) then when i run the client program it says "client error:connection refused" can u plz help me to run it?:( (7 Replies)
Discussion started by: kedah160
7 Replies

5. UNIX for Dummies Questions & Answers

Log in, run program

Hey, im editing the passwd file so that when the user ben logs in it runs my assign program. I changed the last column from to Then when i log in i get... There is no problem with the program because it runs fine when i open it normally. Any help much appreciated. (8 Replies)
Discussion started by: RAFC_99
8 Replies

6. UNIX for Dummies Questions & Answers

cannot run program

Hi, I have a program in /opt/local/bin, my path in my .profile is export PATH=/opt/local/bin:/opt/local/sbin:$PATH however when i type the program name it cannot find it, however i know the program is in /opt/local/bin? Thanks (2 Replies)
Discussion started by: c19h28O2
2 Replies

7. Shell Programming and Scripting

how can i run java program from any where

Hello all sorry didnt know where to post it i compiled simple program that using "System.getProperty("user.dir");" now i compiled the program under directory foo and and its running great when i do "java myapp" i included this directory in the $PATH env variable so i could see it fro any where... (1 Reply)
Discussion started by: umen
1 Replies

8. UNIX for Dummies Questions & Answers

How do i run a program while in Unix?....

Im new and wanted to know if im in the unix terminal and lets say i want to run microsoft word for example. i go in and go into the HD and then keep going and i type ls and see that microsoft word.app is there. how do i run it from that? (4 Replies)
Discussion started by: Corrail
4 Replies

9. UNIX for Dummies Questions & Answers

Getting a program to run

Please help, I have tried to run this program countless times and still nothing. Please tell me what I'm doing wrong. $ cat>test count=1 while do echo "5" read number echo $5 let count=count+ 1 done exit 0 ^C$ ksh test $ ^C $ ksh test $ $ nothing happend (6 Replies)
Discussion started by: ctiamaria
6 Replies

10. Programming

how to run debugging on c program

Can someone help me debug a c program I am running? It gives me segmentation fault. I want to turn on debugging. Can some one give the command to turn it on? Below is the error I get: Segmentation Fault (core dumped) (3 Replies)
Discussion started by: ibeg
3 Replies
Login or Register to Ask a Question