Tiny VN computer_ - AC. IN <Device #...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
The Tiny Von Neumann Architecture CGS 3269 Spring 2007 The Instruction Cycle: FETCH : Fetch an instruction from the memory address pointed to by the PC (Program counter), place it in the instruction register (IR) and increment the PC by one. EXECUTE : The OP tells the computer what is the instruction that must be executed. NOTE: The PC always points to the instruction that will be fetched. When the program is loaded in memory, the PC points to the first instruction of the program. 000 MEMORY 001 100 002 ACCUMULATOR CPU INSTRUCTION REGISTER OP ADDRESS ADDRESS
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CGS 3269 Spring 2007 Instruction Set Architecture : LOAD <X> Loads the contents of memory location “X” into AC (AC stand for Accumulator). ADD <X> The data value stored at address “X” is added to the AC and the result is stored back in the AC. STORE <X> Store the contents of AC into memory location “X”. SUB <X> Subtracts the value located at address “X” from the AC and stored the result back in the
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: AC. IN &amp;lt;Device # &amp;gt;* A value from the input device is transferred into the AC. OUT &amp;lt;Device #&amp;gt; * Print out the contents of the AC in the output device. END The machine stops execution of the program. JMP &amp;lt;X&amp;gt; Causes an unconditional branch to address X. PC X SKIPZ If the contents of the Accumulator = 0 the next instruction is skipped. * Device # Device 5 Keyboard 7 Printer 9 Screen For instance you can write: 003 IN &amp;lt;5&amp;gt; 23 where 23 is the value you are typing in. CGS 3269 Spring 2007 Instruction Set Architecture Codes : 01 LOAD 02 ADD 03 STORE 04 SUB 05 IN 06 OUT 07 END 08 JMP 09 SKIPZ Instruction format assuming 6 digits, 2 are used for the op-code and 6 for the address, for example LOAD &amp;lt;0004&amp;gt; will be represented as: It can be written as 010004 using decimal numbers. LOAD 0004...
View Full Document

Page1 / 3

Tiny VN computer_ - AC. IN &amp;amp;amp;lt;Device #...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online