Advertisement
Guest User

httpd.conf

a guest
Feb 16th, 2011
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. ! This is the initialization routine for Prizm Add-in
  2. ! Written by Kristaba using the conv.g3a addin data (from OS 1.0 or 1.02)
  3.  
  4.  
  5. .extern _main
  6. .global initialize
  7.  
  8. .section ".pretext"
  9. .align 2
  10. initialize: ! 0x300000 with virtual address mapping
  11. mov.l r14, @-r15
  12. sts.l pr, @-r15
  13. mov.l r4, @-r15
  14. bsr ram_init
  15. mov r5, r14
  16.  
  17. mov #1, r6
  18. mov #0, r4
  19. bsr _GLibAddinAplExecutionCheck ! (0, 1, 1) so I think it's this syscall
  20. mov r6, r5
  21.  
  22. mov.l main, r7
  23. extu.w r14, r5
  24. mov.l @r15+, r4
  25. lds.l @r15+, pr
  26. jmp @r7 ! jmp _main(r4, r5); using given arguments of initialize routine
  27. mov.l @r15+, r14
  28.  
  29.  
  30. .align 4
  31. main:
  32. .long _main
  33.  
  34.  
  35. ! Copy .data in ram and fill .bss with 0x00
  36. ram_init:
  37. mov #0, r6
  38. bra LoopConditionBss
  39. mov.l Something1, r2
  40.  
  41. CopyByteBss:
  42. mov.l r6, @r2 ! 0 -> @(0x08100004 + 4xloop)
  43. add #4, r2
  44. LoopConditionBss:
  45. mov.l Something2, r5
  46. cmp/hs r5, r2
  47. bf CopyByteBss
  48.  
  49. mov.l Something3, r6
  50. bra LoopConditionData
  51. mov.l Something4, r5
  52. CopyByteData:
  53. mov.l @r5+, r2 ! @(rom_data + 4*loop) -> r2
  54. mov.l r2, @r6 ! r2 -> @(data_begin + 4*loop)
  55. add #4, r6
  56. LoopConditionData:
  57. mov.l Something5, r4
  58. cmp/hs r4, r6
  59. bf CopyByteData
  60.  
  61. mov.l RamStart, r1 ! first ram address
  62. mov.l Something1, r5
  63. sub r5, r4 ! @Something5 - @Something1 ->r4
  64. add #4, r4
  65. rts
  66. mov.l r4, @r1
  67.  
  68.  
  69.  
  70. .align 4
  71. RamStart:
  72. .long 0x08100000 ! ram address
  73.  
  74.  
  75.  
  76.  
  77. _GLibAddinAplExecutionCheck:
  78. mov.l SysCall, r2
  79. mov #0x29, r0
  80. jmp @r2
  81. nop
  82.  
  83.  
  84. .align 4
  85. SysCall:
  86. .long 0x80020070
  87.  
  88. Something1: ! was 3001e4
  89. .long _bbss ! start bss address
  90. Something2: ! was 3001e8
  91. .long _ebss ! end bss address
  92. Something3: ! was 3001ec
  93. .long _bdata ! start data address
  94. Something5: ! was 3001f0
  95. .long _edata ! end data address
  96. Something4: ! was 3001f4
  97. .long _romdata ! address of data section in rom
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement