Assembly language (ASM) is not a mythical dark art, in fact it’s fundamental to computers operating at all. I take a quick look at a very simple assembly language and show where it fits in.
Amazon Auto Links: No products found.
Assembly language (ASM) is not a mythical dark art, in fact it’s fundamental to computers operating at all. I take a quick look at a very simple assembly language and show where it fits in.
Amazon Auto Links: No products found.
Author: javidx9
I just can’t stop watching your videos! You are doing this awesome! 🙂
Very clearly explained. Thank you.
nailed it! thanks mate!
winslows :’v
AWESOME!! i have seen about 10 asm serries with like 50-100 episodes in each. none of them is as informative as this one video.
Visual Studio zoom in = Alt+ mouse scrolling, very informative video thank you.
Awesome stuff. This is exactly what I was searching for over a year. Hope you’ll create more videos on topics like these.
It would be interesting to see how an FPGA is programmed.
@javidx9 – Well done you for creating this video. In the 80’s, I learned Intel 8085 and MOS Technology 6502 Assembly Language. Very exciting stuff to see how the computer actually does it’s job. Thank you. John M. (from Sacramento, CA)
Great video!
i love youuuuu
Intel 80386 (32 bit):
A closer look to the possible sorts of bytes of one instruction:
Instruction Prefix 0 or 1 Byte
Address-Size Prefix 0 or 1 Byte
Operand-Size Prefix 0 or 1 Byte
Segment Prefix 0 or 1 Byte
Opcode 1 or 2 Byte
Mod R/M 0 or 1 Byte
SIB, Scale Index Base (386+) 0 or 1 Byte
Displacement 0, 1, 2 or 4 Byte (4 only 386+)
Immediate 0, 1, 2 or 4 Byte (4 only 386+)
Format of Postbyte(Mod R/M from Intel-manual)
——————————————
MM RRR MMM
MM – Memory addressing mode
RRR – Register operand address
MMM – Memory operand address
RRR Register Names
Filds 8bit 16bit 32bit
000 AL AX EAX
001 CL CX ECX
010 DL DX EDX
011 Bl BX EBX
100 AH SP ESP
101 CH BP EBP
110 DH SI ESI
111 BH DI EDI
—
(Note: We observe the next two tables from the 16 bit address mode. The D flag in the code-segment descriptor is not set. The default size of memory access and the operand size (without size prefixes) is 16 bit.) The first table below shows which of the 16 bit register can be used as an address register and the default segment register(Sreg) of them, if no segment override prefix is used.
16bit memory (No 32 bit memory address prefix)
MMM Default MM Field
Field Sreg 00 01 10 11=MMM is reg
000 DS [BX+SI] [BX+SI+o8] [BX+SI+o16]
001 DS [BX+DI] [BX+DI+o8] [BX+DI+o16]
010 SS [BP+SI] [BP+SI+o8] [BP+SI+o16]
011 SS [BP+DI] [BP+DI+o8] [BP+DI+o16]
100 DS [SI] [SI+o8] [SI+o16]
101 DS [DI] [DI+o8] [SI+o16]
110 SS [o16] [BP+o8] [BP+o16]
111 DS [BX] [BX+o8] [BX+o16]
Note: MMM=110,MM=0 Default Sreg is DS !!!!
32bit memory (Has 67h 32 bit memory address prefix)
MMM Default MM Field
Field Sreg 00 01 10 11=MMM is reg
000 DS [EAX] [EAX+o8] [EAX+o32]
001 DS [ECX] [ECX+o8] [ECX+o32]
010 DS [EDX] [EDX+o8] [EDX+o32]
011 DS [EBX] [EBX+o8] [EBX+o32]
100 SIB [SIB] [SIB+o8] [SIB+o32]
101 SS [o32] [EBP+o8] [EBP+o32]
110 DS [ESI] [ESI+o8] [ESI+o32]
111 DS [EDI] [EDI+o8] [EDI+o32]
Note: MMM=110,MM=0 Default Sreg is DS !!!!
—
SIB is (Scale/Base/Index)
= +*(2^(Scale))
SS BBB III
Note: SIB address calculated as:
Fild Default Base
BBB Sreg Register Note
000 DS EAX
001 DS ECX
010 DS EDX
011 DS EBX
100 SS ESP
101 DS o32 if MM=00 (Postbyte)
SS EBP if MM<>00 (Postbyte)
110 SS ESI
111 DS EDI
Fild Index
III register Note
000 EAX
001 ECX
010 EDX
011 EBX
100 never Index SS can be 00
101 EBP
110 ESI
111 EDI
Fild Scale coefficient
SS =2^(SS)
00 1
01 2
10 4
11 8
I co-learnt 6502 assembly language while learning BASIC way back when. I’m rusty as now but it was good to come across this video, and another of yours on C++. You present your topics very clearly, and I should definitely come in from the cold regarding programming.
I use fasm (flatassembler by Tomasz Grysztar) for years and now the processors became so complicated so decided to program C and C++ instead of ASM, and only for critical parts of code I use Assembly language if translation of C code doesn’t met my expectations. Most of daily job I do in scripting languages as a prototype but if something must be truly fast then the language should be compiled and as a result to become a machine code. The very equal effect you may achieve using C, which is more human readable than different mnemonics for different processor types: ARM, x86, Sparc, etc…sorry for my English, I’m not talented in writing something what isn’t a code. I hope you understand my point because I barely understand myself 😉
Thank you for this video man. I think it is very helpful.
23:36 lmao spitting bars, I have no idea what any of that stuff means but good on ya 😀
Great video! Please do more videos on assembly language.
This is great; very informative. Many thanks.
Thank you.
Earned yourself a like and a subscribe. Fantastic video.
der zuckt doch die ganze zeit oder ?
I vote for more Assembly videos and tutorials! if you would please 🙂
Hi Javid. Where did you use to work in academia if I may ask ? Were you a doctoral teacher, or a professor at a university? What area did you use to work on? Absolutely love your videos and am a follower! Best wishes. Constantino
Aw man, I got lost, you have a good video presence and it-s well paced though. I-ll take a second look later.
Is it true that C behaves often like a “portable assembly”?
Thank you so much for this!
i barely understand but keep goin
As a almost new to this coding world…I didn’t understand 95% of what u said…how can i start to understand….???
One of the best assembly tutorials on the tube. Explained in easy to comprehend terms and I love the the little piece at the end. Subscribed.
Thanks for this video. We’re covering assembly in one of my university courses this semester, and it’s been a pain. This helped clarify a lot!
THANKS FOR THIS VIDEO…!!!! JITEN KUMAR INDIA EMAIL jzpatel.2011@rediffmail.com MOBILE 00-91-9004648715 THANKS FOR READING WED 18TH.APR.2018 11 PM…jzpatelut..
Thank you for this awesome explanation. I program in much higher-level programming languages but I thought it could be helpful to know what’s going on under the hood. Your video was very helpful.
P.S. it’s quite refreshing to hear a British accent every once in a while, Computer Science is full of american people 😀
Thank you for the explanation. It makes so much sense 😀
Hey javidx9. I recently wanted to learn Assembly but there are tons of assemblers. Which one do you suggest me to use? And what things should I know before learning it.
Bro, face forward when you are speaking to the camera. That is so bad for your neck
what the problem
#include
using namespace std;
class fact{
int* number;
int *sum;
public:
fact(){number=new int; //constructor
*sum=1;
number=new int ;
}
~fact(){
delete sum;
delete number;
}
void print(){
cout< <"ENTER NUMBER: "; cin>>*number;
}
void print2(){
if(*number==1||*number==0)
cout< <"!"<<*number<<"= "<<1; else{ cout<<"!"<<*number<<"= "; for(;*number>0;*number-=1){
*sum=(*sum)*(*number);
cout<<*number; if(*number==1) cout<<"="<<*sum; else cout<<"*"; }}} }; int main() { fact a; a.print(); a.print2(); return 0; }
Thanks! That would be amazing if you could do some more ASM videos, maybe even tutorials?
Thank you for your great video! Your English is perfect. I’m russian and my English level is intermediate, but I understood almost everything… about 80% My like and subscription are yours =)
Nice video! A couple of questions, is it possible to convert from assembly to c/c++ in visual stusio? And if i want to include some assembly code to c/c++ code how should it be?
This introduction to assembly was very enlightening and reasonably simplified. Thank you very much!
It would be awesome seeing you doing a virtual machine
If you want to get your head dissembled , this is the language to learn.
Your videos show us all that we can program too, thank you soo much!
no words can describe my admiration for ASM and the people who are fluent in it, but for me it’s still a dark magic