All pastes #907760 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-02-17 21:34 UTC
rendered paste body
acdocsisMonitorView:
.asciiz "view_v1v2 docsisMonitorView"

acdocsisManagerView:
.asciiz "view_v1v2 docsisManagerView"

acdocsisNmAccessview:
.asciiz "view_v1v2 docsisNmAccessview"

acNoaccess:
.asciiz "view_v1v2 Noaccess"






#search(uint startloc,uint endloc,unit searchdataaddress, int searchdatasize) 
search:
        addi    $sp,-0x20
        sw      $ra,0x1c($sp)
        sw      $s0,0x18($sp)
        sw      $s1,0x14($sp)
        sw      $s2,0x10($sp)
        sw      $s3,0x08($sp)
        move    $s0,$a0
        move    $s1,$a1
        move    $s2,$a2
        addu    $s3,$a3,$s2
        lb      $a1,0($s2)
srchloop1:
        lb      $a0,0($s0)
        bne     $a0,$a1,srcnomatch
        addi    $a2,$s0,1
        addi    $a3,$s2,1
schrloop2:
        lb      $a0,0($a2)
        lb      $a1,0($a3)
        bne     $a0,$a1,srcnomatch        #if a char is not the same then blah
        lb      $a1,0($s2)
        addi    $a2,1
        addi    $a3,1
        bne     $a3,$s3,schrloop2        #if we are not at the end the keep going
        nop
        j       srchfound
        move    $2,$s0
srcnomatch:
        bne     $s0,$s1,srchloop1
        addi    $s0,1
        move    $2,$0
srchfound:
        lw      $s3,0x08($sp)
        lw      $s2,0x10($sp)
        lw      $s1,0x14($sp)
        lw      $s0,0x18($sp)
        lw      $ra,0x1c($sp)
        jr      $ra
        addi    $sp,0x20

offerhook:
addiu	$sp,-0x20
sw	$ra,0x1c($sp)
sw	$s0,0x18($sp)
sw	$s1,0x14($sp)
sw	$s2,0x10($sp)
sw	$s3,0x08($sp)
move $s0,$a0		# instance
move $s1,$a1		# dhcp packet type

la $s2,atypeHolder	# somewhere to store dhcp type
sw $s1,0x0($s2)		# store type there

move $a0,$s0		# instance
jal     0x8031d830	# do what we interupted.
move $a1,$s1		# type