; Frank Crack Program
; - tree.c at Wed Aug 13 13:14:07 2003
; struct node {
; struct node *left,*right;
; int val;
; };
; struct node *tree;
; int sortlist[ 5000 +1],
; biggest, littlest,
; top;
; void
; tInitarr()
.segment tree_code,memtype=0,locinc=1,rom
.global _tInitarr
_tInitarr:
addi_l R31,0x4,R31
strri_l R30,R31,-0x4
mov_l R31,R30
addi_l R31,0x4,R31
strri_l R0,R30,0x0
; ENTRY
; i in reg size 2
; temp in reg size 2
; {
; int i, temp;
; Initrand();
call _Initrand
; biggest = 0; littlest = 0;
movi_w 0x0,R24
stizi_w 0x0,_biggest
stizi_w 0x0,_littlest
; for ( i = 1; i <= 5000 ; i++ )
movi_w 0x1,R0
tInitarr_L1:
; {
; temp = Rand();
call _Rand
; sortlist[i] = temp - (temp/100000)*100000 - 50000;
cvtswl R24,R24
ldzi_l __lcons1,R25
div_l R24,R25,R25
ldzi_l __lcons1,R26
mul_l R25,R26,R25
sub_l R24,R25,R25
ldzi_l __lcons2,R24................
................
,..............ecc ecc ecc