Thursday, 28 January 2016

clrscr() function in ALP

Assembly Program to simulate 'cls' Command of DOS (clrscr)

Program is as follows:
;Program for cls command in ALP
assume cs:code
code segment
start:  mov ah,06
        mov al,0
        mov al,0
        mov cx,0000
        mov dh,24
        mov dl,79
        int 10h
        mov ah,02h
        mov bh,0
        mov dx,0
        mov ah,4ch
        int 21h
code ends
end start

To run this program open Tasm 1.4(TechApple.net)
> tasm clrscr.asm
>tlink clrscr.obj
>clrscr
Output:
If you need any type of program just notify me in Comment Box above

Friday, 22 January 2016

Program for nslookup Command in Java

As you know that nslookup is to fetch IP Address of destination
The Program in java for that is as follow:

/*nslookup*/
import java.net.*;
import java.*;
class nslookup
{
 public static void main(String args[]) throws UnknownHostException
 {
  String s=args[0];
  InetAddress ip = InetAddress.getByName(s);
  System.out.println("IP Address of: " +ip.toString());
 }
}

Output:
By Hungund Bilal
Student of ARKP
Computer Dept