Active Topics

 


Reply
Thread Tools
Posts: 29 | Thanked: 7 times | Joined on Nov 2008 @ France
#1
Hello all,

I hope there are some people who can advise me :
I would want to learn basic programming, beginning with ASM first.
then, i would learn C, then a little C++ stuff, and then perl and python.

But i need these things :
- a guide of ARM "assembleur"
- tools for programming in asm code on my n810

THanks in advance !
 
Bundyo's Avatar
Posts: 4,708 | Thanked: 4,649 times | Joined on Oct 2007 @ Bulgaria
#2
Assembler isn't something that can be called basic
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious.
 
BrentDC's Avatar
Posts: 903 | Thanked: 632 times | Joined on Apr 2008
#3
Originally Posted by benohit View Post
Hello all,

I hope there are some people who can advise me :
I would want to learn basic programming, beginning with ASM first.
then, i would learn C, then a little C++ stuff, and then perl and python.

But i need these things :
- a guide of ARM "assembleur"
- tools for programming in asm code on my n810

THanks in advance !
You got the languages in the wrong order! Start with Python, man.
 

The Following User Says Thank You to BrentDC For This Useful Post:
Posts: 183 | Thanked: 115 times | Joined on Nov 2007 @ Seattle, WA
#4
Originally Posted by BrentDC View Post
You got the languages in the wrong order! Start with Python, man.
I second that.

Besides being beginner-friendly, you don't need to compile when using Python, so you can instantly try out your code. You can also open a command-line interface, so that you can try out individual commands.

Last edited by baksiidaa; 2009-02-22 at 22:43.
 
Posts: 29 | Thanked: 7 times | Joined on Nov 2008 @ France
#5
Originally Posted by BrentDC View Post
You got the languages in the wrong order! Start with Python, man.
I took a look at this language indeed,but, i'm fed up with slow performance of "modern" applications.
I know python is very interesting.
I know how to do :
- algorithmic
- shell scripting
- basic to turbo pascal
- php
But since i use computers (since 1992), i don't want to debate about this, but, i'm look for performance you know.

I prefer e17 to gnome+compiz
I prefer mp3blaster to xmms
I prefer vim to gedit

I want to know how things work, and to be able to use my n810 for real tasks, than to wait for a web page to be loaded on zimbra for example, or a map to be loaded in gmaps too.

Python is used in every tools in ubuntu for update-manager and all things, but i'm the man to launch "apt-get update ; apt-get dist-upgrade". I prefer scripting a daemon instead of using a "good-looking" app that takes some time to launch its scripts, to launch the graphical stuff, update the information in its window, wait for a user interaction, etc...

So please just let me know about asm on arm stuff please ! i will then be a forever-smiling man !
Why not programming in python, but in months... ;-)
 

The Following User Says Thank You to benohit For This Useful Post:
Posts: 13 | Thanked: 2 times | Joined on Jul 2007
#6
Well, I'm not a very good programmer, but a few years ago I looked into this free ebook on PC asm, I know it isn't ARM asm, but it could be a useful start. I just happened upon this thread so I don't happen to have any useful links to free books for ARM assembly, but I'd imagine a lot of the same principles still apply and can be utilized.

Here is the link to the aforementioned book:
http://www.drpaulcarter.com/pcasm/

Hope it helps and best of luck!
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#7
Originally Posted by benohit View Post
I took a look at this language indeed,but, i'm fed up with slow performance of "modern" applications.
I know python is very interesting.
It's a question of balance. Assembly development can be very daunting and long winded. If you are after performance, you are probably better off writing your app in python, profiling it, and then replacing specifing routines/functions with assembly ones.

Also, after doing quite some assembly myself (admittedly not ARM) I must say it's far from what assembly was in 1992, mostly for two reasons:

1) The operating system. With DOS it was dead easy, nobody cared what your assembly code did, you had simple BIOS routines to interact with the user and that was it. That's no longer the case. Just interacting with the OS to copy a file or read a keypress can be hell.

2) You need to grow a head of the size of a basketball. Seriously. With multiple cores, pipelines, branch prediction, etc, it becomes more and more sorcery to create fast code by hand. Less instructions do no longer mean quicker execution. I had cases where just changing the order of instructions meant a difference of ~30% in speed (!).
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#8
Learn C, the execution-speed:writing-speed ratio is very good, only very occasionally will you need to resort to raw ASM. I'd skip Python completely if you want speed (plus C is a useful thing to know).

ASM is a pita to use basically, and I only resort to it if I really have to (not very often thankfully ). To learn it, I scoured the web, mainly looking at existing ARM ASM code (the ARM Linux site has some useful info too: http://www.arm.linux.org.uk/developer/) and also eventually bought a book (ARM Assembly Language - an introduction by J.R. Gibson), however I've not done much ASM since then, and therefore haven't really read the book, so can't actually recommend it in any way other than saying that it's the one that looked best to me at the time
 

The Following 3 Users Say Thank You to lardman For This Useful Post:
Bundyo's Avatar
Posts: 4,708 | Thanked: 4,649 times | Joined on Oct 2007 @ Bulgaria
#9
You can try Vala for speed - it is similar to Python and C#, but translates to C and compiles to native, so the execution speed is much better.
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious.
 

The Following User Says Thank You to Bundyo For This Useful Post:
Posts: 37 | Thanked: 9 times | Joined on Nov 2008
#10
Well this is really pretty easy. Let's see. First you need to stop off at the company that makes the CPU. You should be able to down load a PDF spec that will outline all of the instructions that your particular variant of the ARM processor can execute. Then you need to determine which assembler you are going to use. Probably something from GNU, so you need to get the manual for that. That manual will have all of the directives and formats used by the assemble to translate assembler into machine language. Next you will need to read the man pages for maemo. basically section 2 and 3. That is about it.

As to a book, all that would be in the book would be the machine instructions, addressing formats, etc.; all of which is in the spec sheet from the cpu manufacturer. Assembler directives, etc. are from your assembler vendor. OS callable routines are in the maemo man pages. The book would add little except sample programs.

The previous comment about growing a big head is right on. In assemble you must keep in your mind the contents of all registers and status flags, and know how each op code will effect them.

Me, I would follow Atilla77's suggestion of python, with a few optimized routines. I read a report a number of years ago that said it takes about 350 lines of assembler to do the same job as about 150 lines of C. Python wasn't mentioned, but I'm pretty sure that it would be well below 100.

I've done assembler programming as a job. I've been programming since 1969. My shortest assembler program was a CICS transaction that was 3 lines of code. It was used for a number of years by my employer. Avoid assembler programming!
 

The Following 2 Users Say Thank You to CVBruce For This Useful Post:
Reply

Tags
arm, asm, programming


 
Forum Jump


All times are GMT. The time now is 01:44.