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 ...
随机推荐
- hdu2008 数值统计【C++】
数值统计 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submis ...
- Java基础学习总结(72)——提升 java 代码的运行效率
前言 代码 优化 ,一个很重要的课题.可能有些人觉得没用,一些细小的地方有什么好修改的,改与不改对于代码的运行效率有什么影响呢?这个问题我是这么考虑的,就像大海里面的鲸鱼一样,它吃一条小虾米有用吗?没 ...
- 津津的储蓄计划 2004年NOIP全国联赛提高组
题目描述 Description 津津的零花钱一直都是自己管理.每个月的月初妈妈给津津300元钱,津津会预算这个月的花销,并且总能做到实际花销和预算的相同. 为了让津津学习如何储蓄,妈妈提出,津津可以 ...
- [Angular] Remove divs to Preserve Style and Layout with ng-container in Angular
The Angular <ng-container> is a grouping element that doesn't interfere with styles or layout ...
- UNIX环境编程学习——反思认识
学习情况: 有关UNIX系统环境编程的学习时间用来非常长的时间.可是感觉效果还是不是太好,在中间经过了期末考试.用来非常长的时间用来学习专业课.就将该过程的学习放到了一边上,放假以后又回家造成了 ...
- elciple中怎样设置字体大小
(1)假设想改变Java代码字体大小等 Window->perference->General->Appearance->Colors and Fonts->找到 须要更 ...
- 第十七周自由练习项目——acm 学生最高最低成绩
/* *程序的版权和版本号声明部分: *Copyright(c)2014,烟台大学计算机学院学生 *All rights reserved. *文件名:acm 学生最高与最低成绩 *作者:刘中林 *完 ...
- expect安装测试-自动登陆脚本
安装: yum list | grep expect yum install expect 参考:http://www.cnblogs.com/iloveyoucc/archive/2012/05/1 ...
- 关于QT版本的安装配置的一些困惑
大概是之前安装和使用QT太顺利了,什么都没注意就开始使用了.在使用VS2012开发Qt5.31的程序一段时间以后,虽然好用,但是发现其编译的程序不能在XP上使用,要打补丁才行.不仅VS2012本身要打 ...
- K-means (PRML) in C++
原始数据 #include <iostream>#include <fstream>#include <sstream>#include <vector> ...