📄 sbf_boot_code.s
字号:
/* * File: sbf_boot_code.s * Purpose: Sample image that is bootable from SBF * * Notes: * */#ifdef _UNDERSCORE_#define __SRAM ___SRAM#define __SRAM_SIZE ___SRAM_SIZE#endif .extern __SRAM .extern __SRAM_SIZE .global _asm_startmeup .text/******************************************************************** * * Exception Vector Table */VECTOR_TABLE:_VECTOR_TABLE:INITSP: .long __SRAM + 0x1000 /* Initial SP */INITPC: .long asm_startmeup /* Initial PC *//******************************************************************** * This is the main entry point upon hard reset. */asm_startmeup:_asm_startmeup: /* Initialize 32KByte SRAM */// move.l #__SRAM,d0// add.l #0x221,d0// movec D0,RAMBAR1 /* Initialize the system */ move.l #0x0A000000,d0 move.l d0,0xFC008000 /* CSAR0 */ move.l #0x00000001,d0 move.l d0,0xFC008004 /* CSMR0 */ move.l #0x08000000,d0 move.l d0,0xFC008018 /* CSAR3 */ move.l #0x00000140,d0 move.l d0,0xFC008020 /* CSCR3 */ move.l #0x00000001,d0 move.l d0,0xFC00801C /* CSMR3 */ loop1: nop move.l #0x00200000,d0 move.b #0xFF,d1 move.b d1,0x08000005wait1: nop subq.l #1,d0 bne wait1loop2: move.l #0x00200000,d0 move.b #0x00,d1 move.b d1,0x08000005wait2: nop subq.l #1,d0 bne wait2 bra loop1 /********************************************************************/.end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -