![]() |
|
#71
|
||||
|
||||
Re: Assembly Tutorial ?Quote:
If you are referring to me: 1: Why not use a more recent version of Ubuntu? Isn't 8.10 current, or is it merely a typo? I do not "know" how to install Oracle 10g on Ubuntu, because I have never done it. I have not installed Oracle on anything since the days of 7.x and that was on Solaris. However, if you have the RPM file, use sudo rpm -Uv <name of rpm file>. 2: I do not "know" how to install Netbeans on Ubuntu. It probably isn't very difficult, but I have never done it. Perhaps try: sudo apt-get install netbeans ? 3: I don't have any idea what "67" is other than as a placeholder between 66 and 68. The only other special significance that I can think of is that it is the "entry point" to "retirement" and the "beginning" of being able to "collect" "full benefits" from the SSA for those born during or after 1960. Besides, I like 69 better MxB |
||||
|
#72
|
|||
|
|||
Re: Assembly Tutorial ?Quote:
|
|
#73
|
|||
|
|||
Re: Assembly Tutorial?Hi all, I am back with more of the same i hope Howard_L is doing fine.
As i am still in school, i am still busy to continue with functions implementation in assembly. I will ask today about binary files in assembly, i think we said that linux treat every thing as a file ( which need more explanantion ) so i went online to know the structure of a binary file and how to use in linux (if it is a jpg picture we may want to display it, or if it text file coded as binary we want to display it is content to the screen ). So i did not get the part where the online document below talks about header file, allocation table.... http://www.itee.uq.edu.au/~cristina/...esis96/bff.htm so if it happen that you can show me how to display an image woth assembly that would be great ? thanks howard_l. |
|
#74
|
|||
|
|||
Re: Assembly Tutorial?In linux you should have a program called 'hexdump'.
Running it like this will have output like what is shown in that page: hexdump -C <file_to_examine> On the far left is the byte count of the first byte on that line. In the center are the bytes (16 per line in hex). On the right is the bytes in ascii. 'isprint()' characters are printed, non-printable characters are substituted with a dot. See if you can produce a listing file and find the machine language instructions. Then see if you can find those instructions in the hexdump of the binary. Another way to use the 'objdump -d ' on the .obj file. That will show you more stuff to find in the hexdump. man hexdump , man objdump , man as (or info as) Good to hear from you. Have fun. |
|
#75
|
|||
|
|||
Re: Assembly Tutorial?Hi EveryOne...
i guess it has been a while since i started this crazy idea about learning Assembly, So i guess i will resume where i stopped the Assembly Function With return Value knowing in c, c++ or Java as int myFunction(args[]) {// return myvariable } so i coded very primitive functions using two args but what i fail to understand is the over all mechanism to code a function according to standard if even there is any so by looking at the follwing code can anyone tell me what should be adjusted if necessary i called this function add( what a challenge... lol), it takes two args, and add them then return the value(which will be in EAX) CPP / C++ / C Code:
thanks... |
|
#76
|
|||
|
|||
Re: Assembly Tutorial?Don't have time to really get into this now , but here are some thoughts:
I think you should review your comments and be sure they are correct. I see what looks like misconceptions, but they may just be language dificulties. (heck I check my stuff over and over and still get it wrong...) re: CPP / C++ / C Code:
ret is a routine that: - automatically gets the address to return to from ebp. - then gets that address into eip (instruction pointer) so your code resumes running at that address. ie:you have returned! As for your: myfunc( myfunc(arg1, arg2) , 15)); question I believe you could enclose the call in a loop something like this: ---- push arg2 push arg1 i = 0 loop call (return val is in eax non?) pop arg1 pop arg2 push your 15 push return val in eax (new arg1) inc i cmpl i 1 j lt loop ---- Does that make sense? Of couse there would variations depending on the task. I think you are using it but in case not a good tutorial on functions is chapter 4 of: cs.princeton.edu/../ProgrammingGroundUp-1-0-lettersize.pdf |
|
#77
|
|||
|
|||
Re: Assembly Tutorial?[quote=Howard_L]Don't have time to really get into this now , but here are some thoughts:
re: CPP / C++ / C Code:
Quote:
I think that is what i wanted to understand about the ret instruction. i did coded the add functionbut when i coded the sub and if arg1<arg2 the result is weired ? any tips here ( i guess it is related to signed and insigned long but i may be wrong as always...lol) I will refer back to a previous function that you coded adding 5 args and i think the way you did it is by adding the arg[i] to EAX (for sure all args are pushed on the stack first ) after the 5 args are added the return result will be in eax, this fact is clear to me by now and i like it, because it gives the result with less instruction to issue. but when i compare that to what the compiler generate as codefile.s from an existing codefile.c i notice that the c compiler produced a different code with more instructions. So i was not trying to waist your time or either mine by spending more than 4 months just trying to grasp that concept. but i want to know the so called standards of coding in assembly. Other than that it is good to hear from you again, you seem very busy. but no rush in replying because i am going to progress a bit away from chap 4 and start chap 5 also i am taking 3 classes this quarter so good luck for me there,but i got to admit this though Assembly is addicting i have 3 projects in school, working full time midnihgt job and i am playing with assembly...lol) Till i hear from you bye and thanks for replying. |
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mixing C and assembly in x86 - Makefile nuances | aijazbaig1 | Assembly Language | 3 | 23-Apr-2008 09:29 |
| Tutorial: How to Make a Web 2.0-Style Logo | PhotoshopTrend | Graphics Forum | 0 | 20-Sep-2007 06:57 |
| Assemblers & assembly language | BlueFireCO. | Assembly Language | 2 | 26-Mar-2007 10:56 |
| Photoshop Tutorial: Make An Inspirational/Mystical Picture | ToddSAFM | Graphics Forum | 9 | 09-Aug-2005 21:32 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The