Posts

Showing posts from July, 2018

How to install NASM and compile Assembly program in kali linux.

Image
Here i am going to show you how you can install NASM compiler to compile your assembly program in kali linux or any other linux. Step 1: Open terminal in your linux. Step 2: To download and install linux write the command on your terminal                                           " apt-get install nasm" Step 3: Open your text editor and write Hello World program and save it with  .asm file extension.   section .text global _start   _start: mov edx,len mov ecx,msg mov ebx,1 mov eax,4 int 0x80 mov eax,1 int 0x80   section .data   msg db 'hello World!' , 0xa   len equ $ -msg         Step 4: To compile the program write " nasm -f elf64 hello.asm " .             ->Here " hello.asm " is the file name so don't get confused.             ->If your system is 32 bit then you should use " nasm -f elf32 hello.asm "             ->If your system is 64 bit then you should use "nasm -f elf64

Print message without main method in java.

Image
Here i am gonna show you how you can print message without main method and without executing your java program. You just need to do is to write the program in your text-editor and compile it using javac in command-prompt.  class con  {  String s="\n\n\n\n\n\n\n\n\nI am in coding page\n\n\n\n\n\n\n";  } Save it with any file name but other than con For example you can save it with demo.java Compile it  javac demo.java After compiling your code you will get a output like this.