How to improve my level of assemble language ?
How to improve my level of assemble language ?
I have programmed for half and a year using MASM. but I still think my level is low.I must look for book sometimes.Do you have some good idea for me to improve it ? Thank you!
Just For Fun
Re: How to improve my level of assemble language ?
you know, there are a few programmers using assemble language. In my company, only I write code using assemble language. others write C language.It is hard to improve my level to a high level.
Just For Fun
Re: How to improve my level of assemble language ?
I have programmed 5.000 rows codes. but i don't think it is enough, do you have some good project. if it is open source, maybe i can develop it with you.. and if you want me to join you..
Just For Fun
Re: How to improve my level of assemble language ?
If you have been doing it for six months, then you already understand the basics. Getting to a higher level is just a matter of practice, after that. I would say that a good way to learn more is to create some small programs in C, compile them, disassemble them, and study the assembly code. Try to figure out if the compiler did a very good job, or a bad job. Try to rewrite the code in assembler, better than the compiler did it. Also, go back and look at ASM programs you wrote 6 months ago. Rewrite them so that they are up to your current standards. This kind of practice will improve your skills quickly.
As far as projects go, I found that creating a hexeditor in ASM was an interesting challenge, and was very useful in helping me create my OS, so far.
As far as projects go, I found that creating a hexeditor in ASM was an interesting challenge, and was very useful in helping me create my OS, so far.
Re: How to improve my level of assemble language ?
What I'd like to know is if a modern collection of "assembly gems" exists.
Agner Fog's page is the closest I've found.
Agner Fog's page is the closest I've found.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: How to improve my level of assemble language ?
Also, I suggest reading Michael Abrash's Graphics Programming Black Book Special Edition. Don't be fooled by the book's name; it's not just about graphics, he actually summed up all his books and articles into one, and Michael Abrash is well-known for his assembly optimizations. It contains a lot of stuff on assembly, especially the first chapters.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: How to improve my level of assemble language ?
and if you "read Michael Abrash's Graphics Programming Black Book Special Edition", please read the document from intel about optimizing ( for example cpus have more than 2 pipes ... and the most is improved... , and about the "zen" timer, you can make something close, but about cycles (RDTSC)* a little hint)
I have programmed asm for a year ( aprocemently), and i still trends to do a few dummy errors, but i still chalange my self: "can i make the code faster", "can it be done in another way"( this is a design thing, but desing in asm can also be a good path to learn more), but the best advice i can give, is try to make some app, but also try speed up code ( like bewing said), cause you learn much from that.
and as the last advice:
code more OS, that gives some good pratice
KMT dk
I have programmed asm for a year ( aprocemently), and i still trends to do a few dummy errors, but i still chalange my self: "can i make the code faster", "can it be done in another way"( this is a design thing, but desing in asm can also be a good path to learn more), but the best advice i can give, is try to make some app, but also try speed up code ( like bewing said), cause you learn much from that.
and as the last advice:
code more OS, that gives some good pratice
KMT dk
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
Re: How to improve my level of assemble language ?
I have been doing it for 18 months.
I am relly interesting in compiler( C language). I want to program a C language compiler. but i don't think my asm is high.
so i want to improve my asm first, and then I will begin to program a C language compiler. maybe my asm level will be improved when I develop a compiler. I will think it again.
bewing:
what C language compiler do you use ? Borland C++/ GCC/ VC
I am relly interesting in compiler( C language). I want to program a C language compiler. but i don't think my asm is high.
so i want to improve my asm first, and then I will begin to program a C language compiler. maybe my asm level will be improved when I develop a compiler. I will think it again.
bewing:
what C language compiler do you use ? Borland C++/ GCC/ VC
Just For Fun
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: How to improve my level of assemble language ?
Intel is well-known for compiler optimizations. You should also take a look through their Intel 64 & IA-32 manuals (including, but not limited to, the optimization reference).
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: How to improve my level of assemble language ?
well
to program a compiler , you will need at least one thing, the knowledge of every "instruction", and then could translate it.
secound you will need a interface ( a gui manby ? ), but if it is about file saving, gui and sutch, try looking for APIs on masm.
masm and fasm have both api calls interface..
KMT dk
to program a compiler , you will need at least one thing, the knowledge of every "instruction", and then could translate it.
secound you will need a interface ( a gui manby ? ), but if it is about file saving, gui and sutch, try looking for APIs on masm.
masm and fasm have both api calls interface..
KMT dk
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: How to improve my level of assemble language ?
That's in the Intel CPU manuals (volumes 2A and 2B).kmtdk wrote:well
to program a compiler , you will need at least one thing, the knowledge of every "instruction", and then could translate it.
Ahem... Compilers have nothing to do with GUIs. And I'm not sure what he's trying to say about API calls to the interface.secound you will need a interface ( a gui manby ? ), but if it is about file saving, gui and sutch, try looking for APIs on masm.
masm and fasm have both api calls interface..
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: How to improve my level of assemble language ?
eh
i can see the problem,( i could not explaine it in another way):
Masm have the abillity to call win API functions.
i can see the problem,( i could not explaine it in another way):
Masm have the abillity to call win API functions.
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: How to improve my level of assemble language ?
If you have the right library, any assembler can call the Win32 API. Except for MS-DEBUG, since that would be stupid.
And on the subject of writing compilers: one thing you can do is just turn the high level source into assembly for MASM, NASM, FASM, YASM, TASM, etc. and then have the respective assembler do the rest.
And on the subject of writing compilers: one thing you can do is just turn the high level source into assembly for MASM, NASM, FASM, YASM, TASM, etc. and then have the respective assembler do the rest.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: How to improve my level of assemble language ?
There are low-level assemblers (NASM) and high-level assemblers (MASM). High-level assemblers already start to look a bit like high-level languages and provide things like FOR,IF,WHILE,REPEAT..UNTIL. I'm not sure what kind of projects the OP is working on and which would suite him better.kmtdk wrote:eh
i can see the problem,( i could not explaine it in another way):
Masm have the abillity to call win API functions.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: How to improve my level of assemble language ?
I want to develop a compiler,
CPU has real mode and protect mode, my compiler should run in real mode or protect mode.
and a compiler must run in one OS, for example: Windows/Linux...
I am familiar with MASM and VC , they are all run in Windows, but no compiler open source in windows, it is hard to develop in windows.
GCC is open source, I can read its source to help me. but i have not used it before.
if you developed a compiler before, would you like to give me some good idea ?
CPU has real mode and protect mode, my compiler should run in real mode or protect mode.
and a compiler must run in one OS, for example: Windows/Linux...
I am familiar with MASM and VC , they are all run in Windows, but no compiler open source in windows, it is hard to develop in windows.
GCC is open source, I can read its source to help me. but i have not used it before.
if you developed a compiler before, would you like to give me some good idea ?
Just For Fun