Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .data
- packets:
- p1: .word 0x4500003c 0x1c464000 0x4006b1e6 0xac100a63 0xac100a0c
- p2: .word 0x45000030 0x44224000 0x80060000 0x8c7c19ac 0xae241e2b
- p3: .word 0x45000030 0x44224000 0x8006442e 0x8c7c19ac 0xae241e2b
- p4: .word 0x45000031 0x44224000 0x8006442e 0x8c7c19ac 0xae241e2b
- .text
- j main #starting point of the program
- check: #here I will do the main check for the loop
- lw $t1,($s0)
- srl $t2, $t1, 16
- and $t3, $t1, 0x0000FFFF
- add $s1, $s1, $t2
- add $s1, $s1, $t3
- #down below happens the same but for different hex forms of the packets
- lw $t6,($s2)
- srl $t8, $t9, 16
- and $t4, $t9, 0x0000FFFF
- add $s3, $s3, $t8
- add $s3, $s3, $t9
- jr $ra
- main:
- la $s0 packets #fetch address of the packet buffer
- li $t0, 0
- la $s2 packets
- li $t5, 0
- loop:
- bgt $t0, 4, end
- addi $t0, $t0, 1
- bgt $t5, 4, end #check for the 2nd packet checksum
- addi $t5, $t5, 5
- jal check
- addi $s0, $s0,4
- addi $s5, $s5, 4
- j loop
- end:
- nop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement