ZOJ-1072 MicroprocessorSimulation

这是一个关于微处理器模拟的题目,描述了微处理器的内存结构、指令集和执行流程。给定一系列内存状态,需要模拟执行从地址00开始的指令,直到遇到停止指令。输出为执行后的内存状态。
摘要由CSDN通过智能技术生成

MicroprocessorSimulation


Time Limit: 2 Seconds      MemoryLimit: 65536 KB


Problem

Consider a small microprocessor that has the following properties:

Each word is four bits.
Addresses are two words. The high word always comes first. That is, the highword of a two-word address will always occupy the lower word of memory.
Memory is 256 words.
There are two accumulators, A and B, each storing one word.
There are nine instruction codes. Each instruction requires at least one wordto store the code that specifies the instruction. Four instructions havearguments and require an additional two words.

Each 4 bit number can have the values from 0 to 15, inclusive, in base 10. Wewill write these using hexadecimal in the usual way, i.e. A means 10, B means11, etc.

These are the nine instructions:

Code

Words

Description

0

3

LD: Load accumulator A with the contents of memory at the specified argument.

1

3

ST: Write the conte

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值