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 ...
随机推荐
- 使用Autofac 依赖注入及 swagger 之startup配置
言语有限,代码如下: public IServiceProvider ConfigureServices(IServiceCollection services) { services .AddCor ...
- jquery源码分析(五)——Deferred 延迟对象
javascript的异步编程 为什么要使用异步编程? JS是单线程语言,就简单性而言,把每一件事情(包括GUI事件和渲染)都放在一个线程里来处理是一个很好的程序模型,因为这样就无需再考虑线程同步这些 ...
- Android音乐、视频类APP常用控件:DraggablePanel(1)
Android音乐.视频类APP常用控件:DraggablePanel(1) Android的音乐视频类APP开发中,常涉及到用户拖曳视频.音乐播放器产生一定交互响应的设计需求,最典型的以You ...
- 了解一下JAVA中的NIO模块
网上资料大把,但要写写代码,我这个年纪的人才有一点点记忆了.. 参考URL: http://blog.csdn.net/wuxianglong/article/details/6612282 pack ...
- leetcode第一刷_Minimum Window Substring
好题.字符串.线性时间. 我认为第一次拿到这个题的人应该不会知道该怎么做吧,要么就是我太弱了..先搞清楚这个题要求的是什么.从一个长字符串中找一个字串,这个字串中的字符全然包括了另一个给定目标串中的字 ...
- linux下查看监听port相应的进程
使用netstat查看进程PID [root@test ~]# netstat -anp|grep 5001 tcp 0 0 :::5001 :::* LISTEN 12886/java 之后各位看官 ...
- 常见的DP优化类型
常见的DP优化类型 1单调队列直接优化 如果a[i]单调增的话,显然可以用减单调队列直接存f[j]进行优化. 2斜率不等式 即实现转移方程中的i,j分离.b单调减,a单调增(可选). 令: 在队首,如 ...
- hibernate初步
Hibernate开发步骤1.新创建工程并且导入相关的包 主要是hibernate.mysql相关的JAR包. 注意:新导入的hibernate相关的JAR包是否与你当前所使用的jdk版本是否兼容,且 ...
- zoj--3870--Team Formation(位运算好题)
Team Formation Time Limit: 3000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu Submit ...
- PCB MS SQL跨库执行SQL 获取返回值
一.SQL跨库执行SQL 获取返回值 ) DECLARE @sql nvarchar(MAX) DECLARE @layer INT SET @Dblink = 'P2.fp_db.dbo.' sel ...