chapter6thelittlemancomputer内容摘要:

2 Numbers  Assume data is stored in mailboxes with addresses 90  Write instructions Input a Store the Input a Add Output the number Chapter 6 Little Man Computer 616 Program to Add 2 Numbers: Using Mnemonics Mailbox Mnemonic Instruction Description 00 IN。 input 1st Number 01 STO 99。 store data 02 IN。 input 2nd Number 03 ADD 99。 add 1st to 2nd 04 OUT。 output result 05 COB。 stop 99 DAT 00。 data Chapter 6 Little Man Computer 617 Program to Add 2 Numbers Mailbox Code Instruction Description 00 901。 input 1st Number 01 399。 store data 02 901。 input 2nd Number 03 199。 add 1st to 2nd 04 902。 output result 05 000。 stop 99 000。 data Chapter 6 Little Man Computer 618 Program Control  Branching (executing an instruction out of sequence)  Changes the address in the counter  Halt Content Op Code Operand (address) BR (Jump) 6 xx BRZ (Branch on 0) 7 xx BRP (Branch on +) 8 xx COB (stop) 0 (ignore) Chapter 6 Little Man Computer 619 Instruction Set Arithmetic 1xx ADD 2xx SUB Data Movement 3xx STORE 5xx LOAD BR 6xx JUMP BRZ 7xx BRANC ON 0 BRP 8xx BRANCH ON + Inp。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。