Monday, June 30, 2008

Machine Level Program On Windows

Learn How To Do Simple Machine Level Program On Computer
Machine Level Program are those program,which are directly understandable by the Machine.The Machine read those program and directly acts according to that.For Example,if we have to switch off a machine when its temprature is more then 100 degree celsius and keep the Machine working if temprature is below 100 degree celsius,for this we need the Machine Level programming.So,Machine Level programming is as important as other languages programms are like java programming,c++,c,perl,asp & jsp and all other.
In Machine Level programming,all the data are stored in register memory.Accumulator and Base register are most frequently used in this operations.here,they are represented by AX,and Bx.
How to move a data in register:
mov AX,0032
This,above syntax will move the Hexadecimal number 0032 in accumulator AX.
sub AX,0032
This,above syntax will subtract the Hexadecimal number 0032 from accumulator AX.
Program for converting the Farenheit temp into celsius:
formula for conversion:
c=[(c-32)*5]/9
/* open run and type cmd in it.command prompt will open.type “debug”type “a” /this will take us in assembler mode/*/
Program code:
mov AX,0098sub AX,0032mov BX,05mul BX /multiply content of BX with AX/mov BX,0009div BX /divide content of AX by BX/p /compile the program/t /show the result in AX/
*NOTE:All the value will be in Hexadecimal.

No comments: