📄 bsecrt0.lst
字号:
00000000 00 1 #
00000000 00 2 # bsecrt0.s
00000000 00 3 #
00000000 00 4 # PowerPC C Runtime Initialization code for embedded Diab environment
00000000 00 5 # Adapted from Diab PowerPC crt0.s code
00000000 00 6 #
00000000 00 7 # Functions:
00000000 00 8 # None
00000000 00 9 #
00000000 00 10 # Author: Harry E. Barnett 11/11/99
00000000 00 11 # harryb@hbbse.com http://www.hbbse.com
00000000 00 12 #
00000000 00 13 # Version V1.00
00000000 00 14 #
00000000 00 15 #####################################################################
00000000 00 16
00000000 00 17
00000000 00 18 .list
00000000 00 19 .file "bsecrt0.s"
00000000 00 20 .title "MPC823 C Runtime Initialzation code (Diab)"
00000000 00 21
00000000 00 22 .global _start
00000000 00 23
00000000 00 24 .text
00000000 00 25 .align 2
00000000 00 26
00000000 00 27 .org 0x00004000
00004000 03 28
00004000 03 29 _start:
00004000 03 3d60 0000 30 addis r11,r0,__SP_INIT@ha # Initialize stack pointer r1 to
00004004 03 382b 0000 31 addi r1,r11,__SP_INIT@l # value in linker command file.
00004008 03 3da0 0000 32 addis r13,r0,_SDA_BASE_@ha # Initialize r13 to sdata base
0000400c 03 39ad 0000 33 addi r13,r13,_SDA_BASE_@l # (provided by linker).
00004010 03 3c40 0000 34 addis r2,r0,_SDA2_BASE_@ha # Initialize r2 to sdata2 base
00004014 03 3842 0000 35 addi r2,r2,_SDA2_BASE_@l # (provided by linker).
00004018 03 3800 0000 36 addi r0,r0,0 # Clear r0.
0000401c 03 9401 ffc0 37 stwu r0,-64(r1) # Terminate stack.
00004020 03 38
00004020 03 39 #
00004020 03 40 # Insert other initialization code here.
00004020 03 41
00004020 03 4800 0001 42 bl copy_to_ram
00004024 03 43
00004024 03 44 # End
00004024 03 45
00004024 03 4800 0001 46 bl __init_main # Finish initialization; call main().
00004028 03 4800 0000 47 b exit # Never returns.
0000402c 03 4800 0001 48 bl main # Dummy to pull in main() as soon as
00004030 03 49 # possible.
00004030 03 50
00004030 03 51 #------------------------------------------------------------- .init section --
00004030 03 52 .section .init$00,4,C
00000000 08 53 .globl __init
00000000 08 54 __init: # Entry to __init, called by
00000000 08 7c08 02a6 55 mfspr r0,8 # __init_main called above.
00000004 08 9421 ffc0 56 stwu r1,-64(r1)
00000008 08 9001 0044 57 stw r0,68(r1)
0000000c 08 58
0000000c 08 59 # Linker places .init sections from other modules, containing
0000000c 08 60 # calls to initialize global objects, here.
0000000c 08 61
0000000c 08 62 .section .init$99,4,C
00000000 0b 8001 0044 63 lwz r0,68(r1) # Return from __init.
00000004 0b 3821 0040 64 addi r1,r1,64
00000008 0b 7c08 03a6 65 mtspr 8,r0
0000000c 0b 4e80 0020 66 blr
00000010 0b 67
00000010 0b 68 #------------------------------------------------------------- .fini section --
00000010 0b 69 .section .fini$00,4,C
00000000 0e 70 .globl __fini
00000000 0e 71 __fini: # Entry to __fini, called by exit().
00000000 0e 7c08 02a6 72 mfspr r0,8
00000004 0e 9421 ffc0 73 stwu r1,-64(r1)
00000008 0e 9001 0044 74 stw r0,68(r1)
0000000c 0e 75
0000000c 0e 76 # Linker places .fini sections from other modules, containing
0000000c 0e 77 # calls to destroy global objects, here.
0000000c 0e 78
0000000c 0e 79 .section .fini$99,4,C
00000000 11 8001 0044 80 lwz r0,68(r1) # Return from __fini.
00000004 11 3821 0040 81 addi r1,r1,64
00000008 11 7c08 03a6 82 mtspr 8,r0
0000000c 11 4e80 0020 83 blr
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -