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 ...
随机推荐
- PAT 1039. Course List for Student
Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists o ...
- flask中的session cookie 测试 和 项目中的用户状态保持
# -*- coding:utf-8 -*- # Author: json_steve from flask import Flask, current_app, make_response, req ...
- vue监听数组中某个属性,计算其他属性问题
今天在项目开发中遇到一个根据数组中某个属性变化同时更新另一个属性变化的问题,刚开始代码如下 this.weekList1=r.data.roomProducts; this.weekList1.map ...
- (41)Spring Boot 使用Java代码创建Bean并注册到Spring中【从零开始学Spring Boot】
已经好久没有讲一些基础的知识了,这一小节来点简单的,这也是为下节的在Spring Boot中使用多数据源做准备. 从Spring 3.0开始,增加了一种新的途径来配置Bean Definition,这 ...
- 暑假集训D19总结
考试 日常爆炸 T1 辣么简单,淼到极致的DP,我竟然打挂了= =,打挂了= =,只拿了75分啊,不能接受啊= = T2 随便找找规律,瞎XX模拟一下就能A的鬼东西,我竟然打了个暴力+Floy ...
- 火星人 2004年NOIP全国联赛普及组
题目描述 Description 人类终于登上了火星的土地并且见到了神秘的火星人.人类和火星人都无法理解对方的语言,但是我们的科学家发明了一种用数字交流的方法.这种交流方法是这样的,首先,火星人把一个 ...
- Python基础操作-集合
在Python set是基本数据类型的一种集合类型,它有可变集合(set())和不可变集合(frozenset)两种.创建集合set.集合set添加.集合删除.交集.并集.差集的操作都是非常实用的方法 ...
- ZooKeeper的应用场景(转)
应用场景1 :统一命名服务 分布式应用中,通常需要一套完备的命令机制,既能产生唯一的标识,又方便人识别和记忆. 我们知道,每个ZNode都可以由其路径唯一标识,路径本身也比较简洁直观,另外ZNode上 ...
- 使用Visual Studio Code调试Electron主进程
1.打开VS Code,使用文件->打开,打开程序目录 2.切换到调试选项卡 3.打开launch.json配置文件 4.在“附加到进程”节点上增加localhost配置 5.使用命令行启动el ...
- iOS:让标题栏背景图片适应iOS7
From google: If your app uses a custom image as the background of the bar, you'll need to provide a ...