It's working right now, in hardware.
I checked with "objdump -t a.out" before.
Start.s
!/****************************************************************
!KPIT Infosystems Ltd, Pune, India. - 04-Dec-2001.
!
!This program is distributed in the hope that it will be useful,
!but WITHOUT ANY WARRANTY; without even the implied warranty of
!MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!
!*****************************************************************/
! Start.s
.list
.section .text
.global _start ! global Start routine
.extern _main
.extern _hw_initialise ! external Sub-routine to initialise Hardware
.extern _data
.extern _mdata
.extern _edata
.extern _stack
.extern _vects
_start:
! initialise the SP for non-vectored code
mov.l stack,r15
! call the hardware initialiser
mov.l hw_initialise,r1
jsr @r1
nop
! initialise sections
mov.l edata,r1 ! edata in r1
mov.l mdata,r2 ! mdata in r2
mov.l data,r0 ! data in r0
cmp/eq r0,r1
bt start_1
nop
start_l:
mov.b @r2,r3 !get from src
mov.b r3,@r0 !place in dest
add #1,r2 !inc src
add #1,r0 !inc dest
cmp/eq r0,r1 !dest == edata?
bf start_l
nop
start_1:
! initialise itim
mov.l esciexec,r1 ! esciexec in r1
mov.l itim_start,r2 ! itim_start in r2
mov.l sciexec,r0 ! sciexec in r0
start_2:
mov.l @r2,r3 !get from src
mov.l r3,@r0 !place in dest
add #4,r2 !inc src
add #4,r0 !inc dest
cmp/hi r0,r1 !dest == esciexec?
bt start_2
nop
mov.l main,r1
jsr @r1
nop
.ALIGN 4
hw_initialise:
.long _hw_initialise
stack:
.long _stack
data:
.long _data
mdata:
.long _mdata
edata:
.long _edata
main:
.long _main
sciexec:
.long _sciexec
esciexec:
.long _esciexec
itim_start:
.long _itim_start