Saturday 17 November 2012

The ORG Directive

The ORG directive in MASM does not necessarily produce an actual offset that matches the offset specified by "ORG XXX". For example, if you use "ORG 100h" in your program, the following code will not always begin at the 100h offset relative to the start of the segment.

When you are using a .COM source file and there is only one module, the "ORG 100h" will result in an actual offset of 100h for the code that follows the ORG statement. This behavior also occurs with segments with AT combine type (in which case segments are not combined by the linker, and no data or code is defined).

However, if you have multiple modules and/or you are not dealing with a .COM source file, the "ORG 100h" produces an actual offset, which is somewhat greater than 100h.

This behavior occurs because the linker, in these circumstances, will do some padding that you have no control over.

Saturday 20 October 2012

Von Neumann architecture

The von Neumann architecture is a computer design model that uses a processing unit and a single separate
storage structure to hold both instructions and data. It is named after mathematician and early computer scientist John von Neumann. Such a computer implements a universal Turing machine, and the common
"referential model" of specifying sequential architectures, in contrast with parallel architectures. The term "stored-program computer" is generally used to mean a computer of this design, although as modern computers are usually of this type, the term has fallen into disuse.



History

The earliest computing machines had fixed programs. Some very simple computers still use this design, either for simplicity or training purposes. For example, a desk calculator (in principle) is a fixed program computer. It can do basic mathematics, but it cannot be used as a word processor or to run video games. To change the program of such a machine, you have to re-wire, re-structure, or even re-design the machine.

Indeed, the earliest computers were not so much "programmed" as they were "designed". "Reprogramming", when it was possible at all, was a laborious process, starting with flow charts and paper notes, followed by detailed engineering designs, and then the often-arduous process of physically re-wiring and re-building the
machine.

The terms "von Neumann architecture" and "stored-program computer" are generally used interchangeably, and that usage is followed in this article. However, the Harvard architecture concept should also be mentioned, as a design which stores the program in a modifiable form, but without using the same physical storage or format as for general data.

A stored-program design also lets programs modify themselves while running, effectively allowing the computer to program itself. One early motivation for such a facility was the need for a program to increment or otherwise modify the address portion of instructions, which had to be done manually in early designs. This became less important when index registers and indirect addressing became customary features of machine architecture. Self-modifying code has largely fallen out of favor, since it is very hard to understand and debug, as well as inefficient under modern processor pipelining and caching schemes.

Early stored-program computers

The date information in the following chronology is difficult to put into proper order. Some dates are for first running a test program, some dates are the first time the computer was demonstrated or completed, and some dates are for the first delivery or installation.

  • The IBM SSEC was a stored-program electromechanical computer and waspublicly demonstrated on January 27, 1948. However it was partially electromechanical, thus not fully electronic.
  • The Manchester SSEM (the Baby) was the first fully electronic computer to run a stored program. It ran a factoring program for 52 minutes on June 21, 1948, after running a simple division program and a program to show that two numbers were relatively prime.
  • The ENIAC was modified to run as a stored-program computer (using theFunction Tables for program ROM) and was demonstrated as such on September 16, 1948, running a program by Adele Goldstine for von Neumann.
  • The BINAC ran some test programs in February, March, and April 1949,although it wasn't completed until September 1949.
  • The Manchester Mark I grew out of the SSEM project. An intermediate version of the Mark I was available to run programs in April 1949, but it wasn'tcompleted until October 1949 
  •  The EDSAC ran its first program on May 6, 1949.
  • The EDVAC was delivered in August 1949, but it had problems that kept it from being put into regular operation until 1951.
     
  • The CSIR Mk I ran its first program in November 1949.
     
  • The SEAC was demonstrated in April 1950.
     
  • The Pilot ACE ran its first program on May 10, 1950 and was demonstrated in December 1950.
  • The SWAC was completed in July 1950. The Whirlwind was completed in December 1950 and was in actual use in April 1951.
  • The first ERA Atlas (later the commercial ERA 1101/UNIVAC 1101) was
    installed in December 1950.

Saturday 1 September 2012

Logisim - Logic Circuit Simulator

Logisim is an educational tool for designing and simulating digital logic circuits. With its simple toolbar interface and simulation of circuits as you build them, it is simple enough to facilitate learning the most basic concepts related to logic circuits. With the capacity to build larger circuits from smaller subcircuits, and to draw bundles of wires with a single mouse drag, Logisim can be used (and is used) to design and simulate entire CPUs for educational purposes.


Logisim is used by students at colleges and universities around the world in many types of classes, ranging from a brief unit on logic in general-education computer science surveys, to computer organization courses, to full-semester courses on computer architecture.

Features

  • It is free! (Logisim is open-source (GPL).)
  • It runs on any machine supporting Java 5 or later; special versions are released for MacOS X and Windows. The cross-platform nature is important for students who have a variety of home/dorm computer systems.
  • The drawing interface is based on an intuitive toolbar. Color-coded wires aid in simulating and debugging a circuit.
  • The wiring tool draws horizontal and vertical wires, automatically connecting to components and to other wires. It's very easy to draw circuits!
  • Completed circuits can be saved into a file, exported to a GIF file, or printed on a printer.
  • Circuit layouts can be used as "subcircuits" of other circuits, allowing for hierarchical circuit design.
  • Included circuit components include inputs and outputs, gates, multiplexers, arithmetic circuits, flip-flops, and RAM memory.
  • The included "combinational analysis" module allows for conversion between circuits, truth tables, and Boolean expressions.

 Download Logisim!