Lets go over how to create local variables inside of a pure assembly source code. Much like always, you will start with a *.asm file that looks like this: source code SECTION .data SECTION .bss SECTION .text global main ;make main available to operating system(os) main: ;create the stack frame push ebp push mov ebp, esp ;destroy the stack frame mov esp, ebp pop ebp ret So, the above is the general layout of an NASM source file. Our goal here is to create a local variable inside of the main method. The only way to create a local variable is by using the stack. Why? Because we can only declare variable in storage locations and the only available storage locations are: text, bss, and data. However, text section is only for code, so it is out of the question. The bss and data sections are appealing, but to declare our "local" variable in these sections will defeat the purpose of these variables being local, t
Hi...The linux module programming videos,which you have uploaded in youtube ,were very useful. Please keep on uploading other videos realted to device driver programming. It would be really of great help . N its a very good initiative that you are helping others also understand driver programming well .
ReplyDeleteCan you please upload videos on inter process communication and update the link in this blog? Im in need of it..
DeleteHi ,
ReplyDeleteCan help me out to best programmer in Linux Device Driver in Flavour of Embedded Processor Linux and Android.I have knowledge of OS porting to different Processor , now i would like to know writing Device Driver Programming , kindly Suggest Good Books , Videos and Good Development Board for writing Device Driver Programming or Kernel Module Programming, I hav less knowledge in C Programming , kindly email me on sakthisam[at]gmail[dot]com