当前位置:网站首页>Microcomputer principle and technology Interface Experiment four subroutines and interrupt experiment
Microcomputer principle and technology Interface Experiment four subroutines and interrupt experiment
2022-07-19 12:05:00 【Zhang Shier】
2022.6.9 Morning eight Experiment four
Experiment four Subroutine and interrupt experiment
List of articles
Preface
This article is 【 Microcomputer principle technical interface 】 Column articles , Mainly the experimental content
Microcomputer principle technical interface column Portal
Tips : The context of this article is emu8086 Simulation system .
1.1 The experimental requirements
be familiar with emu8086 Simulation system
Realize the design of subroutine and interrupt service subroutine
Write subroutine settings 40H Interrupt is a custom interrupt service subroutine
Write interrupt service subroutine to realize AX=AX+BX
Write the main program to call subroutines and interrupts
1.2 The theoretical analysis
Write subroutine settings 40h For custom interrupt service subroutine , Modify the interrupt vector table to store the offset address and segment address of the interrupt service program . After through INT 40H Jump interrupt service program calculation AX+BX Value
1.3 assembly language
Tips : All experimental source code has been in Github Arrangement
;AX+BX
CALL P ; Jump P
MOV AX,1
MOV BX,2
INT 40H ; Jump to interrupt service program
HLT ;JMP $
; Subroutines P Modify interrupt vector
P PROC NEAR
MOV AX,0
MOV ES,AX ; Segment address
MOV DI,40H*4 ; offset
MOV AX,OFFSET INT40H
MOV ES:[DI],AX
MOV AX,CS
MOV ES:[DI+2],AX
RET
P ENDP
; Interrupt service subroutine
INT40H PROC FAR
ADD AX,BX
IRET
INT40H ENDP
1.4 experimental result

AX=01,BX=02. perform ADD after ,AX=3

What to think about :
Advantages and disadvantages of interrupt vector table structure
The advantage of hardware circuit to realize interrupt priority queuing is that the interrupt response is fast , Flexible use . Each interrupt source has its own interrupt service subroutine , Will not affect each other , It is convenient to add or reduce interrupt sources .
The disadvantage is that the interface circuit is complex . In particular, each interrupt source needs to have its own identification , stay 8086CPU This identifier in the system is called interrupt type number , A one-to-one correspondence between the interrupt type number and the interrupt service subroutine must also be established .
Interrupt service subroutine debugging method
Before calling , Set interrupt vector , Write the entry address of the prepared interrupt service program into the interrupt vector table . utilize DOS Function call
边栏推荐
- Redis Distributed cache - Redis Cluster
- Flink
- TCP congestion control details | 7 Surpass TCP
- Tikv thread pool performance tuning
- Kunlunbase online meetup is waiting for you~
- 【机器学习】多标签分类的评价指标与代码实现
- Valid bracket sequence of "Niuke | daily question"
- mysql学习笔记-约束
- 百度文档翻译api
- Research on downlink spectrum efficiency of 6G space earth integrated network high altitude platform base station
猜你喜欢

【机器学习】多标签分类的评价指标与代码实现

Opencv draw a black rectangle and write the serial number

HCIP(6)

Dual machine hot standby of Huawei firewall (NGFW)

MAPGIS igserver Kyushu - expand service development under the control of localization environment

微机原理与技术接口 实验四 子程序及中断实验

Leetcode 1252. Number of odd value cells

解决:code ERESOLVE:ERESOLVE could not resolve 的报错问题

Transport layer -------- TCP (I)

NAT technology and NAT alg
随机推荐
A simple websocket example
QT learning diary 17 - QT database
LeetCode_216_组合总和Ⅲ
SQL union operator
Nature子刊 | 地下水固碳速率与寡营养海洋系统固碳速率相近
Flink
Research on downlink spectrum efficiency of 6G space earth integrated network high altitude platform base station
Project construction depends on people, and success depends on people!
[untitled] CV learning 1 conversion
FreeRTOS personal notes - protection of critical values
【无标题】cv 学习1转换
[embedded unit test] construction of C language unit test framework
Huawei firewall authentication technology
Valid bracket sequence of "Niuke | daily question"
02-2、缺省参数、函数重载、引用、隐式类型转换、关于报错
Baidu document translation API
LeetCode_ 77_ combination
微机原理与技术接口 实验五 基本IO操作温度控制实验
Kunlunbase online meetup is waiting for you~
[original] magisk+shamiko has been tested by app root