⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lolevel.s

📁 ARM入门的好帮手.包含了从简单到相对较复杂的程序.
💻 S
字号:
	TTL Automatically generated by "makelo.aif"
	; Do not edit this file directly. Changes made to the 'C' header
	; files will force this file to be re-built by the make process.
	ASSERT	(listopts_s)	; ensure listopt.s included
old_opt	SETA	{OPT}
	OPT	(opt_off)

		GBLL	lolevel_s
lolevel_s	SETL	{TRUE}

	; Time and Date variables
	GBLA	MakeTime	; secs since 1st Jan 1970
	GBLS	MakeDate	; full ANSI time and date
	GBLS	MakeDay		; full weekday name
	GBLS	MakeMDay	; month day
	GBLS	MakeMonth	; full month name
	GBLS	MakeYear	; full year number
	GBLS	MakeClock	; 24hour clock

MakeTime	SETA	&3C7554E5
MakeDate	SETS	"Thu Feb 21 20:13:25 2002"
MakeDay		SETS	"Thursday"
MakeMDay	SETS	"21"
MakeMonth	SETS	"February"
MakeYear	SETS	"2002"
MakeClock	SETS	"20:13"

	; Standard ARM definitions
reg_a1	RN	0
reg_a2	RN	1
reg_a3	RN	2
reg_a4	RN	3
reg_v1	RN	4
reg_v2	RN	5
reg_v3	RN	6
reg_v4	RN	7
reg_v5	RN	8
reg_v6	RN	9
reg_sl	RN	10
reg_fp	RN	11
reg_ip	RN	12
reg_sp	RN	13
reg_lr	RN	14
reg_pc	RN	15
reg_sb	RN	9

IRQDisable		EQU	0x00000080
FIQDisable		EQU	0x00000040
InterruptMask		EQU	0x000000C0
ModeMask		EQU	0x0000001F
ModeMaskUFIS		EQU	0x0000000F
USRmode			EQU	0x00000010
SYSmode			EQU	0x0000001F
SVCmode			EQU	0x00000013
IRQmode			EQU	0x00000012
FIQmode			EQU	0x00000011
ABTmode			EQU	0x00000017
UNDmode			EQU	0x0000001B
USR26mode		EQU	0x00000000
IRQ26mode		EQU	0x00000002
SVC26mode		EQU	0x00000003
cond_EQ			EQU	0x00000000
cond_mask		EQU	0xF0000000
Tbit	EQU	0x00000020
vec_reset			EQU	0x00000000
vec_undefined_instruction	EQU	0x00000004
vec_SWI				EQU	0x00000008
vec_prefetch_abort		EQU	0x0000000C
vec_data_abort			EQU	0x00000010
vec_unused			EQU	0x00000014
vec_IRQ				EQU	0x00000018
vec_FIQ				EQU	0x0000001C

angel_BreakPointInstruction_ARM		EQU	0xE7FDDEFE
angel_BreakPointInstruction_THUMB	EQU	0x0000DEFE
angel_SWI_ARM				EQU	0xEF123456
angel_SWI_THUMB				EQU	0x0000DFAB
angel_SWIreason_CLibBase		EQU	0x00000001
angel_SWIreason_CLibLimit		EQU	0x00000016
angel_SWIreasonLimit			EQU	0x00000020
angel_SWIreason_EnterSVC		EQU	0x00000017
angel_SWIreason_ReportException		EQU	0x00000018
angel_SWIreason_ApplDevice		EQU	0x00000019
angel_SWIreason_LateStartup		EQU	0x00000020
AL_CONTINUE		EQU	0x00000000
AL_BLOCK		EQU	0x00000001

FIQ_SAFETYLEVEL		EQU	0x00000000
FIQ_NeverUsesSerialiser_DoesNotReschedule_HasNoBreakpoints		EQU	0x00000003
FIQ_NeverUsesSerialiser_DoesNotReschedule		EQU	0x00000002
FIQ_NeverUsesSerialiser		EQU	0x00000001
BRANCH_TO_HIGH_ROM_ON_RESET		EQU	0x00000000

Angel_RegBlock_R0offset		EQU	0x00000008
Angel_RegBlock_CPSRoffset	EQU	0x00000000
Angel_RegBlock_SPSRoffset	EQU	0x00000004
Angel_RegBlockSize		EQU	0x00000048
TP_AngelInit			EQU	0x00000001
TP_Application			EQU	0x00000002
TP_ApplCallBack			EQU	0x00000003
TP_AngelCallBack		EQU	0x00000004
TP_AngelWantLock		EQU	0x00000005
arm_padding			EQU	0xDEADC0DE

MMUCP			CP	15
MMUIDReg		CN	0
MMUControlReg		CN	1
MMUPageTableBaseReg	CN	2
MMUDomainAccessReg	CN	3
MMUFlushTLBReg		CN	5
MMUPurgeTLBReg		CN	6
MMUFlushIDCReg		CN	7

MMUOn			EQU	0x00000001
AlignFaultOn		EQU	0x00000002
CacheOn			EQU	0x00000004
WriteBufferOn		EQU	0x00000008
Config32		EQU	0x00000030
ConfigBE		EQU	0x00000080
DefaultMMUConfig	EQU	0x00000030

	; ARM identification manifests:
ID_unknown		EQU	0x00000000
ID_ARM1			EQU	0x00000001
ID_ARM2			EQU	0x00000002
ID_ARM3			EQU	0x00000003
ID_ARM6			EQU	0x00000006
ID_TYPE_MASK		EQU	0x0000000F
ID_LE			EQU	0x00000100
ID_BE			EQU	0x00000200
ID_MUL			EQU	0x00000400
ID_SWP			EQU	0x00000800
ID_CACHE		EQU	0x00001000
ID_MMU			EQU	0x00002000
ID_ENDIAN		EQU	0x00010000
ID_CACHE_ON		EQU	0x01000000
ID_WB_ON		EQU	0x02000000
ID_HWCONFIG_MASK	EQU	0xFF000000

	; Angel memory information:
APCS_STACKGUARD			EQU	0x00000100

	; ADP_Stopped reason codes:
ADP_Stopped_BranchThroughZero		EQU	131072
ADP_Stopped_UndefinedInstr		EQU	131073
ADP_Stopped_SoftwareInterrupt		EQU	131074
ADP_Stopped_PrefetchAbort		EQU	131075
ADP_Stopped_DataAbort			EQU	131076
ADP_Stopped_AddressException		EQU	131077
ADP_Stopped_IRQ				EQU	131078
ADP_Stopped_FIQ				EQU	131079
ADP_Stopped_BreakPoint			EQU	131104
ADP_Stopped_RunTimeErrorUnknown		EQU	131107
ADP_Stopped_InternalError		EQU	131108
ADP_Stopped_UserInterruption		EQU	131109
ADP_Stopped_ApplicationExit		EQU	131110
ADP_Stopped_StackOverflow		EQU	131111
ADP_Stopped_DivisionByZero		EQU	131112

	; Misc ADP things:
ADP_HandleUnknown		EQU	0xFFFFFFFF
ADP_CPUmode_Current		EQU	0x000000FF
ADP_CPUread_PCmode		EQU	0x00008000
ADP_CPUread_CPSR		EQU	0x00020000
ADP_CPUread_32bitIRQ		EQU	0x00000012
ADP_CPUread_32bitUndef		EQU	0x0000001B
ADP_CPUread_32bitSVC		EQU	0x00000013
ADP_CPU_LE			EQU	0x00000001
ADP_CPU_BE			EQU	0x00000002
ADP_CPU_BigEndian		EQU	0x80000000

	; Target specific definitions for PIE:
ROMBase			EQU	0x00000000
Angel_DefaultTopOfMemory		EQU	0x02040000
Angel_ApplStackOffset		EQU	0x00000000
Angel_ApplStackLimitOffset	EQU	0xFFFFE000
Angel_SVCStackOffset		EQU	0x00000400
Angel_SVCStackLimitOffset		EQU	0x00000000
Angel_IRQStackOffset		EQU	0x00000500
Angel_IRQStackLimitOffset		EQU	0x00000400
Angel_FIQStackOffset		EQU	0x00000400
Angel_FIQStackLimitOffset		EQU	0x00000400
Angel_UNDStackOffset		EQU	0x00000E00
Angel_UNDStackLimitOffset		EQU	0x00000D00
Angel_AngelStackOffset		EQU	0x00000D00
Angel_AngelStackLimitOffset		EQU	0x00000500
Angel_SVCStackSize		EQU	0x00000400

	; Definitions for device drivers.
ETHERNET_SUPPORTED	EQU	0
CACHE_SUPPORTED	EQU	0
PARALLEL_SUPPORTED	EQU	0

PROFILE_SUPPORTED	EQU	0

IH_SERIAL	EQU	0
DE_NUM_INT_HANDLERS	EQU	1
DC_SET_LED	EQU	6
DI_LED_DEVICE	EQU	0
HANDLE_INTERRUPTS_ON_IRQ	EQU	1
HANDLE_INTERRUPTS_ON_FIQ	EQU	0

	; Definitions for SYS library handler functions.
SYS_OPEN		EQU	1
SYS_CLOSE		EQU	2
SYS_WRITE0		EQU	4
SYS_WRITEC		EQU	3
SYS_WRITE		EQU	5
SYS_READ		EQU	6
SYS_ISERROR		EQU	8
SYS_ISTTY		EQU	9
SYS_SEEK		EQU	10
SYS_ENSURE		EQU	11
SYS_FLEN		EQU	12
SYS_TMPNAM		EQU	13
SYS_REMOVE		EQU	14
SYS_RENAME		EQU	15
SYS_CLOCK		EQU	16
SYS_TIME		EQU	17
SYS_SYSTEM		EQU	18
SYS_ERRNO		EQU	19
SYS_GET_CMDLINE		EQU	21
SYS_HEAPINFO		EQU	22

	; Definitions for AT91 board Specifically.
BOOTROMREG		EQU	16777518
FLASHREG		EQU	33554473
CSR2DEF		EQU	50331945
CSR3DEF		EQU	67109161
MAP_SSRAM		EQU	1048576
MEM_RCR		EQU	-2097120
AT91_MEM		EQU	-2097152
INT_IDCR		EQU	-3804
INT_ICCR		EQU	-3800
INT_ALL_SRC		EQU	459263
INT_SVR0		EQU	-3968
INT_SMR2		EQU	-4088
US_INT_SETUP		EQU	0
INT_SVR2		EQU	-3960
INT_ISR		EQU	-3832
INT_IPR		EQU	-3828
INT_EICR		EQU	-3792
UART0READYBIT		EQU	4
UART0ID		EQU	2
LED1		EQU	1
LED2		EQU	2

	OPT	(old_opt)
	END	; EOF lolevel_s

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -