New Posts  All Forums:Forum Nav:

I want to learn Assembly?

post #1 of 15
Thread Starter 
Hi I want to learn Assembly.
Wats the best Way?
+ rep for good answers.
Thanks!
post #2 of 15
i'm pretty sure there are lots of tuto on the interwebz, however something that helped me alot in understanding assembly (and i'm far from being an expert) is comparing parts of the generated assembly code from the actual coding langage (c++ for exemple). then you can replace that part in your c++ program with the assembly instructions (asm{....}) and try to play with the intructions a bit. and use a very simple c++ hello world program

good luck thumb.gif
GW2 Special
(16 items)
 
Redstroyer
(14 items)
 
 
CPUMotherboardGraphicsRAM
Phenom II X2 555(unlocked to X4 B55) Biostar ta870u3+ 6950HD msi twin frozr OC 2x2gb g.skill ripjaws ddr3 1600 
Hard DriveOptical DriveCoolingOS
OCZ Solid 3 Lg combo with IDE to sata adapter H50 win 7 x64 
MonitorKeyboardPowerCase
dynex hdtv 22''(HD)/philips 19''(VGA) k260(logitech wireless combo) corsair 650tx azza orion 
MouseMouse Pad
m210(logitech wireless combo) INFOREM custom mouse pad 
  hide details  
Reply
GW2 Special
(16 items)
 
Redstroyer
(14 items)
 
 
CPUMotherboardGraphicsRAM
Phenom II X2 555(unlocked to X4 B55) Biostar ta870u3+ 6950HD msi twin frozr OC 2x2gb g.skill ripjaws ddr3 1600 
Hard DriveOptical DriveCoolingOS
OCZ Solid 3 Lg combo with IDE to sata adapter H50 win 7 x64 
MonitorKeyboardPowerCase
dynex hdtv 22''(HD)/philips 19''(VGA) k260(logitech wireless combo) corsair 650tx azza orion 
MouseMouse Pad
m210(logitech wireless combo) INFOREM custom mouse pad 
  hide details  
Reply
post #3 of 15
Click

but seriously. The best way is by doing. Grab a book off Amazon or ebay and start from the beginning and doing the excersises in the book...The only way to learn the concepts are doing....No other way.
The Gibson
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5-6600k Gigabyte GA=Z170X MSI 980ti G.SKILL Ripjaws V Series 16GB (2 x 8GB) DDR4 2400 
Hard DriveOptical DriveCoolingOS
240GB SSD 1TB WD Black HDD 128mb cache LG Blu-Ray Burner Corsair Hydro Series H110i GT Windows 10 Pro 
MonitorKeyboardPowerCase
3011 Dell 30 inch 1600p Logitech 920 Illuminated EVGA SuperNOVA 850W 80 Plua Platinum Certified... Thermaltake Chaser Series Chaser MK-I 
Mouse
Logitech Performance MX 
  hide details  
Reply
The Gibson
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5-6600k Gigabyte GA=Z170X MSI 980ti G.SKILL Ripjaws V Series 16GB (2 x 8GB) DDR4 2400 
Hard DriveOptical DriveCoolingOS
240GB SSD 1TB WD Black HDD 128mb cache LG Blu-Ray Burner Corsair Hydro Series H110i GT Windows 10 Pro 
MonitorKeyboardPowerCase
3011 Dell 30 inch 1600p Logitech 920 Illuminated EVGA SuperNOVA 850W 80 Plua Platinum Certified... Thermaltake Chaser Series Chaser MK-I 
Mouse
Logitech Performance MX 
  hide details  
Reply
post #4 of 15
The basic concept of assembly is surprisingly simple. The key to doing it well is to train yourself to think like the machine. Break down every operation into its most basic sub-tasks, and do them one at a time, in order of operation.
Example: instead of doing 4x4, like a normal language. In assembly you would do 4+4+4+4.
The only other thing you really need to know is how FIFO and LIFO stacks work. As long as you get that, then you're ready to get started.

There should be plenty of assembly language simulators/trainers available online. Just search around and start experimenting. Start by creating some basic math functions first, that's a good way to learn. Then expand from there.
Death Star
(21 items)
 
Darksaber
(11 items)
 
 
CPUMotherboardGraphicsRAM
Athlon II x2 245 Asus M3A78 Radeon HD6570 1GB Mushkin Silverline 2GB DDR2  
Hard DriveOptical DriveOSMonitor
OCZ Vertex 2 120GB Samsung Blu-Ray Windows 7 Samsung 46" DLP 
PowerCaseOther
Silverstone Strider Essentials 400W Silverstone Milo ML03B Hauppage WinTV 1250 
  hide details  
Reply
Death Star
(21 items)
 
Darksaber
(11 items)
 
 
CPUMotherboardGraphicsRAM
Athlon II x2 245 Asus M3A78 Radeon HD6570 1GB Mushkin Silverline 2GB DDR2  
Hard DriveOptical DriveOSMonitor
OCZ Vertex 2 120GB Samsung Blu-Ray Windows 7 Samsung 46" DLP 
PowerCaseOther
Silverstone Strider Essentials 400W Silverstone Milo ML03B Hauppage WinTV 1250 
  hide details  
Reply
post #5 of 15
Like the others mentionned, best way is to learn trial and error by asking advice before each step or just collecting information. My advice would be, always calculate how much your theoretical build will need in regards to a PSU and add 100-150W. Always go for a high quality chassis with a lot of metal and little or no plastic (I have a preference for Mid-Towers) with plenty of cable management options.

When you have those in mind, think of your hard disk configuration, I go for SSD for C: and mechanical drive for D:, optical for E:

with all these parts, you can start thinking of your motherboard and processor and RAM trio. Minimum 8Gb in dual channel 1600mhz at the time of this writing.

When that is chosen, ask around for which graphics card would work best with the parts you chose.

If you chose a great case for your build, your experience building the computer will go very well if you follow instructions in the manual or advice from people like us.

Good luck! thumb.gif
Dream PC 2012
(15 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i3/i5/i7 MAXIMUS V FORMULA Gigabyte HD7970 Corsair Vengeance 16GB 1866 
Hard DriveOptical DriveCoolingOS
Intel 320 Series SSD 160GB LG Blue Blu-Ray RW Corsair H100 Windows 7  
MonitorKeyboardPowerCase
Samsung SyncMaster 244T Logitech G110 Antec TruePower Quattro 1200W Corsair 650D 
MouseAudio
R.A.T. 5 M-Audio Firewire Solo 
  hide details  
Reply
Dream PC 2012
(15 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i3/i5/i7 MAXIMUS V FORMULA Gigabyte HD7970 Corsair Vengeance 16GB 1866 
Hard DriveOptical DriveCoolingOS
Intel 320 Series SSD 160GB LG Blue Blu-Ray RW Corsair H100 Windows 7  
MonitorKeyboardPowerCase
Samsung SyncMaster 244T Logitech G110 Antec TruePower Quattro 1200W Corsair 650D 
MouseAudio
R.A.T. 5 M-Audio Firewire Solo 
  hide details  
Reply
post #6 of 15
Write an emulator. To be fair, that's more likely to teach you machine code than assembly; but writing a simple assembler for your emulated chip should be simple after you've written the emulator itself.
Meh
(14 items)
 
   
CPUMotherboardGraphicsRAM
i5 760 @ 3.8 Ghz GA-P55-USB3 Gigabyte GTX 460 16GB(4x4) Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Samsung Spinpoint F3 1TB Asus Cheapo Corsair H70 Arch Linux 
MonitorKeyboardPowerCase
LG 26LH20 HDTV Das Model S Ultimate Silent Corsair HX850 Lian Li(Lancool) PC-K62 
MouseMouse Pad
Logitech MX 518 My desk. 
CPUMotherboardGraphicsRAM
Intel Core i5-4200U Toshiba Intel HD Graphics 4400 6 GB DDR3L @1600 Mhz 
Hard DriveOptical DriveCoolingOS
750 GB 5400RPM SATA HDD DVD SuperMulti drive Stock fans Arch Linux 
MonitorKeyboardPowerCase
15.6" 1920x1080 Screen Toshiba Toshiba battery and A/C adapter Toshiba 
MouseAudio
Touchpad Intel HD Audio 
  hide details  
Reply
Meh
(14 items)
 
   
CPUMotherboardGraphicsRAM
i5 760 @ 3.8 Ghz GA-P55-USB3 Gigabyte GTX 460 16GB(4x4) Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Samsung Spinpoint F3 1TB Asus Cheapo Corsair H70 Arch Linux 
MonitorKeyboardPowerCase
LG 26LH20 HDTV Das Model S Ultimate Silent Corsair HX850 Lian Li(Lancool) PC-K62 
MouseMouse Pad
Logitech MX 518 My desk. 
CPUMotherboardGraphicsRAM
Intel Core i5-4200U Toshiba Intel HD Graphics 4400 6 GB DDR3L @1600 Mhz 
Hard DriveOptical DriveCoolingOS
750 GB 5400RPM SATA HDD DVD SuperMulti drive Stock fans Arch Linux 
MonitorKeyboardPowerCase
15.6" 1920x1080 Screen Toshiba Toshiba battery and A/C adapter Toshiba 
MouseAudio
Touchpad Intel HD Audio 
  hide details  
Reply
post #7 of 15
Quote:
Originally Posted by PCWIZMTL View Post

Like the others mentionned, best way is to learn trial and error by asking advice before each step or just collecting information. My advice would be, always calculate how much your theoretical build will need in regards to a PSU and add 100-150W. Always go for a high quality chassis with a lot of metal and little or no plastic (I have a preference for Mid-Towers) with plenty of cable management options.

When you have those in mind, think of your hard disk configuration, I go for SSD for C: and mechanical drive for D:, optical for E:

with all these parts, you can start thinking of your motherboard and processor and RAM trio. Minimum 8Gb in dual channel 1600mhz at the time of this writing.

When that is chosen, ask around for which graphics card would work best with the parts you chose.

If you chose a great case for your build, your experience building the computer will go very well if you follow instructions in the manual or advice from people like us.

Good luck! thumb.gif
What? He's not asking for PC assembly, he's asking about the Assembly programming language. There's a difference.
post #8 of 15
I must say learning this alone might be hard, specially depending on your background.

Learning the syntax is one thing, another thing is learning how to write proper code with it, because it requires a lot of knowledge of the CPU architecture.


When I learnt it in the university the only books we used were the manuals for intel processors. The professors gave us all of the other material, made by themselves. So I recommend finding good material and to start by trying to integrate C and assembly to make your life easier: maybe try writing a hello world program only in asm, and then a hello world in asm using printf function from C, because that just makes life much easier to debug your code in the beginning.

Why do you want to learn it? I ask this because it can be pretty different depending on which architecture you are looking at.


I don't think it's simple as somebody above said. You must know your hardware and must know how to use it properly, this is the hard part. The syntax couldn't be simpler, though.
post #9 of 15

I would avoid x86 assembly at all costs. Most books cover only the most basic instructions and are somewhat out of date. Most of the important instructions are simply a matter of memorizing the thousands of instructions that make x86 work. RISC chips (like the ones below) have far fewer instructions and the principles of operation are probably easier to grasp.

 

MIPS -- here's the best free source I could find. MIPS is what you would learn in college. It is the best example of an architecture you're likely to find. You can find emulators so you can run the code on your PC. If you want a hobby board, chipKIT makes an inexpensive one that can use Arduino UNO components. There's a book called See MIPS Run that is a popular book on the topic of MIPS assembly.

 

 

AVR -- it's used for lots of hobby boards (especially the popular Arduino series). It is RISC (so is MIPS), but has some oddities due to it's being designed primarily for hobbyists.

http://www.avr-asm-tutorial.net/avr_en/

 

Ultimately, when you understand all the principles, all you need is the microprocessor datasheet which contains the list of instructions (and all the little details).


Edited by hajile - 6/7/13 at 6:19pm
post #10 of 15
Quote:
Originally Posted by hajile View Post

I would avoid x86 assembly at all costs. Most books cover only the most basic instructions and are somewhat out of date. Most of the important instructions are simply a matter of memorizing the thousands of instructions that make x86 work. RISC chips (like the ones below) have far fewer instructions and the principles of operation are probably easier to grasp.

MIPS -- here's the best free source I could find. MIPS is what you would learn in college. It is the best example of an architecture you're likely to find. You can find emulators so you can run the code on your PC. If you want a hobby board, chipKIT makes an inexpensive one that can use Arduino UNO components. There's a book called See MIPS Run that is a popular book on the topic of MIPS assembly.


AVR -- it's used for lots of hobby boards (especially the popular Arduino series). It is RISC (so is MIPS), but has some oddities due to it's being designed primarily for hobbyists.
http://www.avr-asm-tutorial.net/avr_en/

Ultimately, when you understand all the principles, all you need is the microprocessor datasheet which contains the list of instructions (and all the little details).

This.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming