Assembly之example
Here is a simple example by assembly language. It is based on openMSP430. Very important is to understand "interrupt vectors".
.global main .set P1OUT, 0x0021
.set WDTCTL, 0x0120 main: /* ------------ Disable Watchdog ---------------- */
MOV #0x5A80, &WDTCTL /* ------------ Toggle P1 ------------------------*/
loop:
MOV.B #0x00, &P1OUT
MOV.B #0xff, &P1OUT jmp loop /* ---------------------------- INTERRUPT VECTORS --------------- */
.section .vectors, "a"
.word loop ; Interrupt 0 (lowest priority) <unused>
.word loop ; Interrupt 1 <unused>
.word loop ; Interrupt 2 <unused>
.word loop ; Interrupt 3 <unused>
.word loop ; Interrupt 4 <unused>
.word loop ; Interrupt 5 <unused>
.word loop ; Interrupt 6 <unused>
.word loop ; Interrupt 7 <unused>
.word loop ; Interrupt 8 <unused>
.word loop ; Interrupt 9 <unused>
.word main ; Interrupt 10 Watchdog timer
.word loop ; Interrupt 11 <unused>
.word loop ; Interrupt 12 <unused>
.word loop ; Interrupt 13 <unused>
.word loop ; Interrupt 14 NMI
.word main ; Interrupt 15 (highest priority) RESET
Assembly之example的更多相关文章
- 为C# as 类型转换及Assembly.LoadFrom埋坑!
背景: 不久前,我发布了一个调试工具:发布:.NET开发人员必备的可视化调试工具(你值的拥有) 效果是这样的: 之后,有小部分用户反映,工具用不了(没反应或有异常)~~~ 然后,建议小部分用户换个电脑 ...
- ASP.NET Core: You must add a reference to assembly mscorlib, version=4.0.0.0
ASP.NET Core 引用外部程序包的时候,有时会出现下面的错误: The type 'Object' is defined in an assembly that is not referenc ...
- An error occurred during the installation of assembly 'Microsoft.VC90.CRT……的问题
有一段时间没有用到AnkhSvn了,今天工作需要安装了一下.结果安装到一半就无法继续了,提示An error occurred during the installation of assembly ...
- Beennan的内嵌汇编指导(译)Brennan's Guide to Inline Assembly
注:写在前面,这是一篇翻译文章,本人的英文水平很有限,但内嵌汇编是学习操作系统不可少的知识,本人也常去查看这方面的内容,本文是在做mit的jos实验中的一篇关于内嵌汇编的介绍.关于常用的内嵌汇编(AT ...
- MAC上安装 HLA(High Level Assembly)
1.安装HLA 最新版的hla汇编器可在这里下载,支持MacOs,Linux,Windows平台 2.安装步骤 将下载好的hla程序包放在Mac根目录下 最重要的一步是设置好环境变量,打开Mac根目录 ...
- .NET 程序集Assembly使用
概述 一直以来,我们都在用C#编写程序,编写程序的时候,我们用到继承.多态.接口以及泛型,我们也都明白子类可以继承抽象类,并能够重写父类的抽象方法,可是大家是否想过,如下几个问题: 1.凡树必有根和叶 ...
- configuration error-could not load file or assembly crystaldecisions.reportappserver.clientdoc
IIS启动网站后报错: configuration error Could not load file or assembly 'crystaldecisions.reportappserver.cl ...
- Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its de
页面加载时出现这个错误: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Cul ...
- How to make your assembly more secure from referencing by unauthorized bits
Now the security has a trend to become more and more important in our daily work, hence I did some r ...
- Linux+Mono+WebService:CS1703: An assembly with the same identity--mscorlib
最近把一些东西开始往Linux迁移了,因为老系统大部分都是.NET,所以直接使用Mono,代码一般都使用MonoDevelop把代码重新编译,把一些WMI和windows DLL调用改Linux的os ...
随机推荐
- 00105_UDP和TCP协议
1.UDP协议 (1)UDP是User Datagram Protocol的简称,称为用户数据报协议: (2)UDP是无连接通信协议,即在数据传输时,数据的发送端和接收端不建立逻辑连接: (3)当一台 ...
- Django——8 关系表的数据操作 表关联对象的访问 多表查询
Django 关系表中的数据操作 表关联对象的访问 关联对象的add方法 create方法 remove方法 clear方法 多表查询 查询补充 聚合查询 分组查询 F查询 Q查询 关系表的数据操作 ...
- (44). Spring Boot日志记录SLF4J【从零开始学Spring Boot】
在开发中打印内容,使用 System.out.println() 和 Log4j 应当是人人皆知的方法了. 其实在开发中我们不建议使用 System.out 因为大量的使用 System.out 会增 ...
- UE 高亮 一个或多个关键字的方法
#######2014-11-20,11:13:06######### 一.高亮一个关键字 方法1: 选中该关键字, Ctrl + . 即可: 方法2: 选中该关键字, Shift + 双击左键 ...
- js递归解决汉诺塔问题
汉诺塔是一个印度的古老传说.有三个圆柱,其中一个圆柱上放着若干圆盘,这些圆盘从上到下,直径递增,利用一个辅助圆柱,将原来柱子上的圆盘放到另一个柱子上,依旧是从上到下直径递增. 汉诺塔是一个经典的递归案 ...
- HDU 4522
DIJK,最短路,建两个图就好了. #include <cstdlib> #include <cstdio> #include <cstring> #include ...
- java 执行可执行文件时提示“could not find or load main class ”的问题
- UVa 642 - Word Amalgamation
题目:给你一个单词列表.再给你一些新的单词.输出列表中又一次排列能得到此新单词的词. 分析:字符串.对每一个字符串的字母排序生成新的传f(str).总体排序,用二分来查找就可以. 说明:注意输出要满足 ...
- 【面试】【Spring常见问题总结】【07】
[常见面试问题总结文件夹>>>] 61.Spring IoC容器的依赖有两层含义: Bean依赖容器:也就是说Bean要依赖于容器,这里的依赖是指容器负责创建Bean并管理Bean的 ...
- HDU 5534/ 2015长春区域H.Partial Tree DP
Partial Tree Problem Description In mathematics, and more specifically in graph theory, a tree is an ...