Ch06 - Computer System Architecture Dept of Info Of Computer Chap 6 Programming the Basic Computer Chap 6 Programming the Basic Computer 6-1 Chap 6

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Computer System Architecture Dept. of Info. Of Computer Chap. 6 Programming the Basic Computer Chap. 6 Programming the Basic Computer 6-1 Chap. 6 Programming the Basic Computer ■ 6-1 Introduction Translate user-oriented symbolic program (alphanumeric character set) into binary programs recognized by the hardware 25 Instruction Set of the basic computer ● Memory Reference Instruction ● Register Reference Instruction ● Input-output Instruction Symbol Hex Code Description AND 0xxx 8xxx And memory word to AC ADD 1xxx 9xxx Add memory word to AC LDA 2xxx Axxx Load memory word to AC STA 3xxx Bxxx Store content of AC in memory BUN 4xxx Cxxx Branch unconditionally BSA 5xxx Dxxx Branch and Save return address ISZ 6xxx Exxx Increment and skip if zero CLA 7800 Clear AC CLE 7400 Clear E CMA 7200 Complement AC CME 7100 Comp e CIR 7080 Circulate right AC and E CIL 7040 Circulate left AC and E INC 7020 Increment AC SPA 7010 Skip next instruction if AC positive SNA 7008 Skip next instruction if AC negative SZA 7004 Skip next instruction if AC zero SZE 7002 Skip next instruction if E is 0 HLT 7001 Halt computer INP F800 Input character to AC OUT F400 Output character from AC SKI F200 Skip on input flag SKO F100 Skip on output flag ION F080 Interrup IOF F040 Inter ■ 6-2 Machine Language Program Categories ● 1) Binary Code(Machine Language) » Program Memory & O ¡ : Tab. 6-2 ● 2) ¢ctal or Hexadecimal Code » Binary Code X O ¡ : Tab. 6-3 ● 3) Symbolic Code : Tab. 6-4 » Assembly Language : Tab. 6-5 ● 4) High Level Language » C, Fortran,.. : Tab 6-6 * Tab. 6-4 Pseudoinstruction, Label 3 Computer System Architecture Dept. of Info. Of Computer Chap. 6 Programming the Basic Computer Chap. 6 Programming the Basic Computer 6-2 ■ 6-3 Assembly Language The rules for writing assembly language program ● Documented and published in manuals(from the computer manufacturer) Rules of the Assembly Language ● Each line of an assembly language program is arranged in three columns » 1) Label field : empty or symbolic address » 2) Instruction field : machine instruction or pseudoinstruction » 3) Comment field : empty or comment ● Symbolic Address( Label field ) » One, two, or three, but not more than three alphanumeric characters » The first character must be a letter; the next two may be letters or numerals » A symbolic address is terminated by a comma( recognized as a label by the assembler ) ● Instruction Field » 1) A memory-reference instruction( MRI ) ■ Ex) ADD OPR ( direct address MRI ), ADD PTR I ( indirect address MRI ) » 2) A register-reference or input-output instruction( non-MRI ) ■ Ex) CLA ( register-reference ), INP ( input-output ) » 3) A pseudoinstruction with( ORG N ) or without( END ) an operand : Tab. 6-7 ■ Pseudoinstruction o Machine Instruction ‚ ˙ „ “ Assembler & — ¡ ¢ H &&& && Field Label Instruction Comment Computer System Architecture Dept. of Info. Of Computer Chap. 6 Programming the Basic Computer...
View Full Document

This note was uploaded on 03/21/2010 for the course CS 145 taught by Professor Markjan during the Spring '10 term at Abilene Christian University.

Page1 / 16

Ch06 - Computer System Architecture Dept of Info Of Computer Chap 6 Programming the Basic Computer Chap 6 Programming the Basic Computer 6-1 Chap 6

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

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