- 0
- 0
- 约1.24万字
- 约 7页
- 2019-05-17 发布于江西
- 举报
第 PAGE 6页,共 NUMPAGES 7页
Chapter 4 Program Design of Assemble Language
主讲教师:黄英
Contents:
TOC \o 1-5 \h \z 4.1 Introduction of Assemble Language 2
4.1.1 Features 2
4.1.2 Format 2
4.2 Basic structures 2
4.2.1 Sequential program 2
4.2.2 Branching program 3
4.2.2.1 Single branching program 3
4.2.2.2. Multi-branching program 11
1.By using some CJNE instructions 11
2.By using “address table” 13
3.By using “jump instruction table” 15
4.By using stack operation 18
4.2.3 Circular Structure 23
4.3 Delay time Program 24
4.3.1 Single-cycle delay time program 24
4.3.2 Long delay time program (Multi-cycle) 25
4.3.3 Adjusting delay time range 25
4.3.4 Get different timing with basic delay program 25
4.4 Pseudoinstruction 25
4.5 How to edit and assemble the source program 25
4.1 Introduction of Assemble Language
4.1.1 Features
Produces the optimized program.
Programmer must be familiar with hardware.
Manage and control hardware directly.
Not universal, can’t be transplanted.
4.1.2 Format (Detailed information: P77)
[Label]: opcode [operand] ; [note]
4.2 Basic structures
3 types:
Sequential Structure
Branching Structure
Circular Structure
4.2.1 Sequential program
For example: 3-byte unsigned constants addition
Assumed that:
Assumed that: 50H~52H cells of internal RAM have three augends respectively (beginning with high bytes), 53H~55H cells of internal RAM have three addends respectively(beginning with high bytes).
Requirement: Design a program to put the addition result into 50H~52H cells (beginning with high bytes), and the carry bit into 20H bit of bit addressable area.
DEC R0
DEC R0 (50H/51H/52H)= 11H/22H/33H
DEC R1 (53H/54H/55H)= 77H/88H/99H
= 3 \* GB3 ③ MOV A, @R0
ADDC A, @R1 112233H
MOV @R0, A + 778899H
CLR A
ADDC A, #00H ?
= 4 \* GB3 ④ MOV R0, #20H ?
MOV @R0, A ?
MOV R0, #52HMOV R1, #55H = 1 \* GB3 ①
MOV R0, #52H
MOV R1, #55H
=
您可能关注的文档
- 大型购物中心 河南风商国际招商手册.ppt
- 大型焦炉筑炉工法.doc
- 大型龙门起重机箱型梁变形控制措施.doc
- 大型游乐设施操作.ppt
- 大型贮煤筒仓设计中的几个问题.doc
- 大学本科毕业论文模板.doc
- 大学毕业生实习报告.doc
- 大学毕业生自荐书模板.doc
- 大学毕业晚会朗诵稿.doc
- 大学城阳光盛汇商业街项目全程营销执行大纲.ppt
- 七年级语文上册期末模拟试卷1(解析版).docx
- 七年级语文上册期末模拟试卷1(原卷版).docx
- 七年级语文上册期末模拟试卷2(原卷版).docx
- 七年级语文上册期末模拟试卷2(解析版).docx
- 期末测试卷(二)(解析版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
- 期末测试卷(三)(解析版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
- 期末测试卷(二)(原卷版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
- 期末测试卷(三)(原卷版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
- 期末测试卷(一)(原卷版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
- 期末测试卷(一)(解析版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
原创力文档

文档评论(0)