摘要:
>>> a= 2>>> print bin(a) //打印二进制0b10>>> print bin(a)[2:].zfill(4) //去掉0b,四位对其,前面补零。0010 阅读全文
摘要:
str r1, [r0] ;将r1寄存器的值,传送到地址值为r0的(存储器)内mrs r0, cpsr ;读cpsr寄存器到r0bic r0, r0, #0x1 ;位清除 clear bit 1orr r0, r0, #0xd3 ;逻辑或msr cpsr,r0 ;写cpsr寄存器 mrc p15, 阅读全文
摘要:
一般的寄存器设置,下面几条指令就OK了。sb --->sb、sd、sh、sw(存储字节8、双字64、半字16、字32) li t0, 0x18007700 将立即数存入t0 li t1, 0x15006f221 将立即数存入t1 sw t1, 0x20(t0) 将t1 存储到t0偏移32位... 阅读全文
摘要:
源码版本:u-boot-2012.04.01 官网下载版本。#include #include #include #include .globl _start_start: b reset ldr pc, _undefined_instruction //设置arm的异常... 阅读全文
摘要:
模块引入:1 importmodual_name2 from modual_name import modual_name3 from modual_nameimport modual_nameas you_own_name(myFunc)4 如果需要重新载入修改后的源码,一是退出python的交互... 阅读全文
摘要:
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")OUTPUT_ARCH(arm) //elf 32位ARM指令,小端ENTRY(_start) //可执行文件的起始代码... 阅读全文
摘要:
Demo code:import xlrdfrom datetime import date,datetimedef read_excel(): workbook = xlrd.open_workbook(r'./file.xlsx') data = workbook.sheet_nam... 阅读全文
摘要:
直接上代码了:import sysimport os#coding=utf-8if __name__ == '__main__': #Create the main application try: outfile1 = open(r"./testfile1","wb") ... 阅读全文