Sunday, November 23, 2008

8085 Simulator for Windows (32 -bit)/ Linux

8085sim is a potential product for 8085 microprocessor instruction set simulation.The simulators for both Win(32-bit)/Linux are uploaded hereThe simulator for win is 8085sim.exe and for linux its named as 8085sim.
For Windows :
Copy the 8085sim.exe to any folder named 8085 or anything.It is necessary to copy this to a folder, otherwise the files created by the 8085sim.exe will get scattered around the environment folder.
Run the file
First we will be facing a main menu having 10 options.Select one of them using 1 to 10 numbers.

Code editor(2) & Memory editor (1)
Image above shows the main menu.number 2 is enetered for the code editor we type in the hex code (no need to put H at the end to indicate hex) of the instructions and will at last put a 76H(HLT)instruction.HLT is a must for a program entered in 8085sim.Without an HLT (76H)8085sim will execute infinite loops , so is the case for real hardware.
When we get into the code editor the
Codeeditor>>$ ORIGIN :
comes we have to type in the origin or starting address for the hexcode entry.
After the entry it prints the mapoffset and pc content
For the mem editor the pc will be different than the map offset.
Memory editor provides an interface to direct editing of memory. In this case we can store an array of numbers in some address and use that address in program.

Single step(3) & Normal exe(4)
Image above shows the single stepping mode for 8085sim.After the hexcode entry by using the code editor we can use singlestepping(3) or normal exe(4), for executing the program. When an instruction is executed the 8085sim diaplays all the reg contents below that after showing the instruction and address to which it has been entered.A single stepping or normal exe operation of 8085sim terminated with the execution of a 76 instruction.

Saving the program in harddisk(7)
The above image shows how to save a program that has been entered and executed to harddisk.The 8085 sim sets aside a memory map in RAM of the system ,for virtual 8085simulation.The memory map starts form 0000H to ffffH in hex.So it sets aside 64Kb of memory in RAM . After we leave the simulator it frees the RAM.When its been rerun it will initialise all the contents of RAM to 0H. So we need to write the entered hex code or memory content to hard disk. The purpose of save is to achieve this.We have to enter a file name and also the starting location of the code in memorymap.The saved file is created inside the folder to which the 8085sim was copied.When the file is saved successfully the 8085sim indicates it by printing the number of 8bit codes written to disk
----8-----File written to secondary storage device.
Now we can exit the 8085sim by typing 5.




Loading(8) & Dumping the RAM(9)
The image above shows how to load the file named 16bitadd.Suppose we are exiting the 8085sim by saving the current program.At anytime later on we can try executing the same program by loading that program file into the memorymap of 8085sim.Here the saved file is 16bitadd.
After succussfully loading the file the 8085sim prints a result as shown below.
-----8-----File successfully loaded.
where 8 is the number of code bytes in file.
8085sim also has a memory map analysis file called MAP.RAM. To print the contents of memorymap of 8085sim (0000h to ffffh) select the number 9 from the mainmenu.It dumps the contents of RAM to a file named MAP.RAM.
Assembler is under construction.

For LINUX:
I have tried the binary for Fedora Core 9.If there is any problem please comment.
For linux we have to copy the binary to the bin folder of root.
First open a terminal .Login as a root user
fedora home]$ su
password:
fedora home]#
After the entry as a root the command prompt change from $ to #
copu the 8085sim to /bin
type
home]# cp 8085sim /bin/8085sim
home]#exit
then the 8085sim binary will have entered into the /bin
Now one can type the 8085sim command anywhere to run the simulator.One problem with running the simulator anywhere is that u may not be having enough permissions to create files in some folders.In such cases the save file will show error message .So always use a valid path .Preferably create a folder for 8085simulator.I have created a folder named 8085simfiles in my home directory.
Now change the working directory to home ]$ cd /home/8085simfiles
Now run home]$8085sim
We can see the 8085 mainmenu as shown below



Code editor & Memory editor
Image above shows the main menu.number 2 is enetered for the code editor we type in the hex code (no need to put H at the end to indicate hex) of the instructions and will at last put a 76H(HLT)instruction.HLT is a must for a program entered in 8085sim.Without an HLT (76H)8085sim will execute infinite loops , so is the case for real hardware.
When we get into the code editor the
Codeeditor>>$ ORIGIN :
comes we have to type in the origin or starting address for the hexcode entry. After the entry it prints the mapoffset and pc content.For the mem editor the pc will be different than the map offset. Memory editor provides an interface to direct editing of memory. In this case we can store an array of numbers in some address and use that address in program.


Single step(3) & Normal exe(4)
Image above shows the single stepping mode for 8085sim.After the hexcode entry by using the code editor we can use singlestepping(3) or normal exe(4), for executing the program.When an instruction is executed the 8085sim diaplays all the reg contents below that after showing the instruction and address to which it has been entered.A single stepping or normal exe operation of 8085sim terminated with the execution of a 76 instruction.

Saving the program in harddisk(7)
The above image shows how to save a program that has been entered and executed to harddisk.The 8085 sim sets aside a memory map in RAM of the system ,for virtual 8085simulation.The memory map starts form 0000H to ffffH in hex.So it sets aside 64Kb of memory in RAM. After we leave the simulator it frees the RAM.When its been rerun it will initialise all the contents of RAM to 0H. So we need to write the entered hex code or memory content to hard disk. The purpose of save is to achieve this.We have to enter a file name and also the starting location of the code in memorymap.The saved file is created inside the folder to which the 8085sim was copied.When the file is saved successfully the 8085sim indicates it by printing the number of 8bit codes written to disk
----8-----File written to secondary storage device.
Now we can exit the 8085sim by typing 5.
Loading(8) & Dumping the RAM(9)
The image above shows how to load the file named 16bitadd.Suppose we are exiting the 8085sim by saving the current program.At anytime later on we can try executing the same program by loading that program file into the memorymap of 8085sim.Here the saved file is 16bitadd. After succussfully loading the file the 8085sim prints a result as shown below.
-----8-----File successfully loaded.
where 8 is the number of code bytes in file.


8085sim also has a memory map analysis file called MAP.RAM. To print the contents of memorymap of 8085sim (0000h to ffffh) select the number 9 from the mainmenu.It dumps the contents of RAM to a file named MAP.RAM.Assembler is under construction.

Saturday, November 22, 2008

How to remove abk.bat virus

Goto start>run>regedit
delete the entry
HKCU\Software\Microsoft\Windows\CurrentVersion\Run kamsoft
then reboot to another os preferably linux or to same system
delete all autorun.inf files made by the abk.bat infection
delete all abk.bats from all drives.
We cannot see the file unless we make all hidden files unhidden.
To enable the folder options >view>show hidden files and folders radiobutton
goto HKlocal machine>software>microsoft>windows>current version>explorer>advanced>folder>hidden>showall>click on checkedvalue and make its value 1
Then untick the hide protected os files in folderoptions >view
now the abk.bat files will be visible delete all of then including autorun.inf

Friday, November 14, 2008

Ultra dense non volatile memories using memristors

The memristor was first proposed by a scientist named LEON O.CHUA in 1971 as a fourth fundamental circuit element. The existence of such an element was mathematically proved and the theoretical properties were predicted using mathematical equations. But it was only in April 2008 the scientists were able to came up with a physical model to prove it.
Why the name memristor
By definition a memristor is characterized by a relation of the type g(Ψ, q)=O. It is said to be charge-controlled (flux-controlled) if this relation can be expressed as a single valued function of the charge q (flux-linkage Ψ). The voltage across a charge-controlled memristor is given by

v(t) = M(q(t)) . i(t)
where

M(q) = d Ψ(q)/dq.

Since M(q) has the unit of resistance, it will henceforth be called the incremental memristance. The value of the incremental memristance at any time to depends upon the time integral of the memristor current (voltage) from t = - ∞ to t= to. Hence, while the memristor behaves like an ordinary resistor at a given instant of time to, its resistance) depends on the complete past history of the memristor current. The memory property of the memristor arises from this fact. It is interesting to observe that once the memristor voltage v(t) or current i(t) is specified, the memristor behaves like a linear time-varying resistor.

Thus while behaving like an ordinary resistor at any given instant of time t0, its resistance depends on the complete past history of the memristor current. Thus memristor is basically a charge dependent resistor. Since memristance is a function of charge which is the time integral of current, the memristor behaves like a nonlinear resistor. The equation v(t) = M(q) . i(t) gives linear relationship only when M(q) is constant. Constant M(q) means charge does not vary with time. But a nonzero current results in instantaneously varying charge. Thus M(q) results in a nonlinear relationship. Thus memristor has meaning only in nonlinear ckt.
Device structure and fabrication


Single-crystalline TiO2 was used to elucidate how the metal/oxide interfaces control the device resistance. As shown in Fig. 1a, a single crystal of rutile TiO2 (bandgap Eg =3.0 eV) was first annealed in a 95% N2 and 5% H2 gas mixture at 550 °C for 2 h to create an oxygen-deficient layer near the surface. Oxygen vacancies in TiO2 are known to act as n-type dopants, transforming the insulating oxide into an electrically conductive doped semiconductor. Metal/semiconductor contacts are typically ohmic in the case of very heavy doping, and rectifying (Schottky-like) in the case of low doping. Two pairs of 100 µm x 100 µm Pt and Ti electrode contact pads were deposited onto the single crystal, as shown schematically in Fig. 1a: pads 1 and 4 were Pt films (80 nm thick) and pads 2 and 3 were Ti films (5 nm thick) with Pt (80 nm thick) caps. The 5-nm Ti layer was used as a chemically reactive contact to further reduce the TiO2 and create a locally high concentration of oxygen vacancies close to the metal/ semiconductor interface. These two regions showed an ohmic contact with resistance ~ 40Ω, showing that the bulk resistance of the annealed single crystal was low. In contrast, the electrical resistance between the two chemically unreactive Pt contact pads 1 and 4 was four orders of magnitude higher than the others.


Memory Storage

The bipolar switching behavior of the nanoscale metal/metal oxide/metal memristors can be used to develop resistive non volatile RAMs (Re-NVRAMs). The researches and experiments are indicating that the memristor based Re- NVRAMs will be faster than the evolving memory technologies like MRAM, PCRAM etc and 100x times faster than flash memory. Also the scientists at HP have created an ultra high density crossbar switches, which use thin film memristors to pack a record 100Gbits per cm² in a single die compared to the 16Gbits for the highest density flash memory chips extant. The memristors made by HP are very small about 15nm.

HP memristor based RRAMs will be using the crossbar architecture. Metal lines spaced less than 50-nm apart will serve as the bottom electrodes with the top electrodes patterned from metal lines arranged perpendicular to the bottom lines into a crossbar switch. In between the metal lines twin layers of titanium dioxide is sandwiched --one doped with oxygen vacancies and the other undoped. Running current between two metal lines--one on the top and one on the bottom--the device will be able to address individual bit cells, changing their resistance and thus turning bits on and off.

Ø Reading: The reading operation can be performed simply by applying a voltage lower than the threshold voltage. If the memristor is on then it will conduct even at the threshold voltage. If off it will not conduct. Thus binary data can be read.

Ø Writing: The writing operation can be performed by applying a voltage greater than the threshold voltage to write 0( or 1 depending upon the configuration) by making the memristor ON. To write a 1 (or 0) a voltage of opposite polarity whose magnitude is greater than the threshold voltage is applied which turns the memristor OFF.

Ø Addressing: Metal lines are arranged in two layers like rows and columns which are perpendicular with the other and are separated by the thin semiconductor film. Running current between the metal lines- one on the top and one on the bottom- the device will be able to access individual bit cells, changing their resistance and thus turning bits ON and OFF.

Advantages of Memristive memory

Ø For the memristor based memories there is no need of refreshing the data as in the case of today’s DRAMs. This could drastically reduce the power consumption.

Ø The inductive and capacitive effects associated with the memristors are negligible. This eliminates the delays due to charging time, storage time, discharging time.

Ø The memristive behavior and speed is inversely proportional to the square of device size. So scaling down increases the performance by great extent.

Ø The memristors can packed at a very large density than transistors. 15nm memristors are made which can hold 100Gbits/cm². Even at 4nm, a square centimeter of memristor can hold one terabit ie 10¹² bits/cm².

Ø Analog data storage is possible under controlled operation.