当前位置:网站首页>Principles of microcomputer Chapter 6 notes arrangement
Principles of microcomputer Chapter 6 notes arrangement
2022-06-23 18:57:00 【Bachuan Xiaoxiaosheng】
Command system
Machine instruction set
Command word
A string of bits representing a particular instruction
contain
- opcode
- Operands ( There may be more than one )
- Operand address
Need to point out that
- Operation type
- Operand type
- Addressing mode
T32
And then there is 16 Bit instructions have 32 Bit instruction , Half word alignment ,32 Bit instruction two and a half words ,16 One place , Pass the half word maximum 5 Bit discrimination
Assembly syntax
< o p c o d e > [ c o n d ] [ q ] [ S ] < R d > < R n > [ , O p r a n d 2 ] <opcode>[cond][q][S]<Rd><Rn>[,Oprand2] <opcode>[cond][q][S]<Rd><Rn>[,Oprand2]
among <> Mandatory [] Optional
- opcode: Mnemonic , Describe the type of operation
- cond: Condition code
- q: Width selection
- N-16
- W-32
- S: Automatically update after adding APSR Flag bit value
- Rd, Target operands , register
- Rn, First source operand , register
- Oprand2: Second source operand , Register or immediate
Condition execution
APSR
- N negative
- Z zero
- C carry
- V overflow
- Q saturated
- GE be used for DSP Expand
Condition code
- EQ be equal to
- NE It's not equal to
- CS carry
- CC Carry to zero
- MI negative
- PL Integer or zero
- VS overflow
- VC No overflow
- HI No sign greater than
- LS Unsigned less than or equal to
- GE Signed greater than or equal to
- LT Signed less than
- LT Signed less than
- GT There is a sign greater than
- LE Unsigned less than or equal to
- AL Unconditional
Mnemonic symbol
- ADD
- LDM Store multiple... Into multiple registers 32 Bit value
- LDR take 32 The bit value is stored in the register
- MOV
- STM Store multiple register values into memory
- STR The of a register 32 The number of bits is stored in memory
- SUB
IT Instructions
Yes
- IT
- ITT
- ITE
- ITTE
- ITTEE
Addressing mode
Operand addressing
Data addressing
Used to determine the address of the operand in the current instruction
Command addressing
Determine the next instruction address
Can be divided into
| Operand position | Addressing mode |
|---|---|
| In the instruction | Count now |
| register | register |
| Register displacement | |
| Memory data area | Register indirect |
| Register Offset | |
| Front index | |
| Post indexing | |
| Multiple registers | |
| Stack | |
| Memory code area | PC Relative addressing |
Immediate addressing
The operand is contained in the instruction , Fetching an instruction fetches the operand
Register addressing
Register direct addressing , Make the value in the register an operand
Register indirection
The register value is the operand address , The operand itself is in memory
Register shift addressing
ARM specific , The register is addressed to the operand and shifted to the real operand
Register offset addressing
The operand address is obtained by adding the value stored in the register and the address offset given by the instruction
This register is the base register , The given offset has
- Count now
- register
- Register shift
Pre indexed addressing
Automatically add the base address and offset to form the operand address and write it back to the register , Occurs before addressing , So it is called pre indexing
It is good for looping statements
Post indexing
Occurs after addressing
Multi register addressing
Some instructions can load contiguous storage areas into multiple registers
- LDM{addr_mode}{!},
Rn Is the base register ,{!} Indicates that the modified address needs to be written back to the base address register ,{addr_mode} Optional I( Increasing )/D( Decline ) and A( After taking the value )/B( Before value )
- STM Write registers to memory
Stack addressing
Replace the base address in multi register addressing with stack pointer register SP, And add {!}
Note that it is full decreasing
PC Relative addressing
Short for relative addressing
With PC Value is base address , The address label in the instruction is offset , Add the two together
Cortex-M3/M4 Instruction set
Data transfer instructions in the processor
Register to register
General registers and special registers
Count to register immediately
Memory access instructions
This special exam will be given , There are too many instructions , skip
ah , sorry , The following is all about how to use instructions , skip , Next chapter
边栏推荐
- PISCES: A Programmable, Protocol-Independent Software Switch(总结)
- 亚香香料深交所上市:市值40亿 鼎龙博晖与涌耀投资是股东
- 外卖江湖格局将变,美团“大哥”不好当
- STM32 (VIII) -- PWM output
- 学习编程只需要这三条建议!
- Task management of embedded development foundation (thread management)
- 又一家破产清算:那些在时代和资本裹挟下风雨飘摇的游戏公司
- 2022年升降机司机考试题模拟考试平台操作
- 盘点四种WiFi加密标准:WEP、WPA、WPA2、WPA3
- VirtP4笔记
猜你喜欢

外卖江湖格局将变,美团“大哥”不好当

吃顿饭的时间,学会simulink之BLDC基本原理

Take out Jianghu will change, and meituan "big brother" is hard to be

【Qt】第十章:数据库

Docker搭建redis集群

【NOI2014】15.起床困難綜合症【二進制】

Borui data attends Alibaba cloud observable technology summit, and digital experience management drives sustainable development

诺亚财富通过聆讯:年营收43亿 汪静波有49%投票权,红杉是股东

Rancher2.6 new monitoring QuickStart

Shengke communication IPO meeting: annual revenue of 460million China Zhenhua and industry fund are shareholders
随机推荐
8、AI医生案例
STM32 (VIII) -- PWM output
Sany Heavy energy technology innovation board listed: annual revenue of RMB 10.2 billion and market value of RMB 47 billion
【NOI2014】15.起床困難綜合症【二進制】
Jerry's dynamic switching vcomo modulation method [chapter]
考PMP有用吗?
汇编语言(1)基础知识
Graffiti intelligence passed the hearing: Tencent is an important shareholder planning to return to Hong Kong for listing
CV-背景-简介
【One by One系列】IdentityServer4(七)授权码流程原理之MVC
Borui data attends Alibaba cloud observable technology summit, and digital experience management drives sustainable development
诺亚财富通过聆讯:年营收43亿 汪静波有49%投票权,红杉是股东
在Microsoft Exchange Server 2007中安装SSL证书的教程
涂鸦智能通过聆讯:拟回归香港上市 腾讯是重要股东
CV-全连接神经网络
高级计网笔记(五)
Leetcode: hash table 02 (intersection of two arrays)
高级计网笔记(九)
高级计网笔记(七)
【One by One系列】IdentityServer4(四)授权码流程