Download
marie n.
Skip this Video
Loading SlideShow in 5 Seconds..
MARIE PowerPoint Presentation

MARIE

213 Views Download Presentation
Download Presentation

MARIE

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. MARIE

  2. MARIE • Machine Architecture that is Really Intuitive and Easy

  3. MARIE Architecture • 16 bit computer • Stored program • 16 bit instructions • 4K 16 bit words main memory • 8KBytes total • 4K = 22 * 210 = 212 = 12 bit addresses • 16bit wide ALU • Two’s complement representation

  4. Registers • Seven registers • MAR : Memory Address Register • Location to store/retrieve in mainmemory • 12 bits wide • MBR: Memory Buffer Register • Value on way to/from main memory • One input to ALU • 16 bits wide

  5. Registers • Seven registers • AC : Memory Address Register • Stores one input for ALU • Stores output for ALU • 16 bits wide

  6. Registers • Seven registers • IR : Instruction Register • Holds instruction being executed • 16 bits wide • PC : Program Counter • Address of next instruction to execute • 12 bits wide

  7. Registers • Seven registers • InReg: Input Register • Input magically appears here • 8 bits wide (1 char) • OutReg: Output Register • Can be magically written to screen • 8 bits wide (1 char)

  8. MARIE • Logical View:

  9. Instruction Set Architecture • ISA : capabilities machine advertises • Machine instructions

  10. MARIE Instructions • 9 Basic Instructions

  11. MARIE Instructions • Instruction format • 4 bit opcode • 12 bit address (X) • No immediate instructions!!!

  12. Instruction Samples • Load address 3 to AC

  13. Instruction Samples • Add contents of memory location 13 to AC

  14. Assembly • MARIE assembly • .mas files • /starts comment • Data specified as DEC/HEX • label, instruction

  15. Assembler Addresses • Assembly produces • .map file "symbol table" • .lst file "listing" • .mex file "machine code"

  16. Two pass • Assembler uses two passes • Pass1: • Convert instructions • Build symbol table

  17. Two pass • Assembler uses two passes • Pass2: • Replace symbols with addresses

  18. Using Skip • Absolute value

  19. Skipcond • Skipcond– skips next instruction if… • AC matches conditionspecified by bits 11-10 If AC > 0 skip one instruction

  20. Using Skip • Skipcond000:0000 0000 0000AC < 0 • Skipcond400:0100 0000 0000AC = 0 • Skipcond800:1000 0000 0000AC > 0

  21. Pick Larger Number • Pick larger number using non 0 skipcond

  22. Add Numbers • Post test loop: