Difference between revisions of "C52 Free"
Jump to navigation
Jump to search
(Created page with "<font face='Courier New'> 00044600: 3c028001 lui r2,0x8001 00044604: 8c420010 lw r2,0x0010(r2) 00044608: 00000000 nop 0004460c: 00822023 subu r4,r4,r2 00044610: 000422c...") |
m (Talcall moved page 00044600 - 0004466c to C52 Free: libc) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
00044600: 3c028001 lui r2,0x8001 | 00044600: 3c028001 lui r2,0x8001 | ||
− | 00044604: 8c420010 lw r2,0x0010(r2) | + | 00044604: 8c420010 lw r2,0x0010(r2) #some LBA pointer, pointer for file to live in ram? |
00044608: 00000000 nop | 00044608: 00000000 nop | ||
− | 0004460c: 00822023 subu r4,r4,r2 | + | 0004460c: 00822023 subu r4,r4,r2 #input - LBA pointer |
− | 00044610: 000422c2 srl r4,r4,0x0b | + | 00044610: 000422c2 srl r4,r4,0x0b #reduces pointer to 6 digits, capped at 0x001fffff |
00044614: 3c018005 lui r1,0x8005 | 00044614: 3c018005 lui r1,0x8005 | ||
− | 00044618: 00240821 addu r1,r1,r4 | + | 00044618: 00240821 addu r1,r1,r4 #0x80050000 + pointer >> 0xb |
− | 0004461c: 9025e9d4 lbu r5,-0x162c(r1) | + | 0004461c: 9025e9d4 lbu r5,-0x162c(r1) #related to LBA? |
00044620: 3c018005 lui r1,0x8005 | 00044620: 3c018005 lui r1,0x8005 | ||
00044624: 00240821 addu r1,r1,r4 | 00044624: 00240821 addu r1,r1,r4 | ||
− | 00044628: 9022e9d3 lbu r2,-0x162d(r1) | + | 00044628: 9022e9d3 lbu r2,-0x162d(r1) # |
− | 0004462c: 2c830001 sltiu r3,r4,0x0001 | + | 0004462c: 2c830001 sltiu r3,r4,0x0001 #if pointer >> 0xb is 0, set to 1, otherwise 0? |
− | 00044630: 00a21026 xor r2,r5,r2 | + | 00044630: 00a21026 xor r2,r5,r2 #0xe9d4 XOR 0xe9d3 |
− | 00044634: 0002102b sltu r2,r0,r2 | + | 00044634: 0002102b sltu r2,r0,r2 #if discrepancy exists, 1? |
00044638: 00621825 or r3,r3,r2 | 00044638: 00621825 or r3,r3,r2 | ||
− | 0004463c: 1060000a beq r3,r0,0x00044668 | + | 0004463c: 1060000a beq r3,r0,0x00044668 #branch if any errors occur |
− | 00044640: 00001021 addu r2,r0,r0 | + | 00044640: 00001021 addu r2,r0,r0 #r2 = fail |
00044644: 3c028005 lui r2,0x8005 | 00044644: 3c028005 lui r2,0x8005 | ||
− | 00044648: 2442e9d4 addiu r2,r2,0xe9d4 | + | 00044648: 2442e9d4 addiu r2,r2,0xe9d4 # |
− | 0004464c: 00821821 addu r3,r4,r2 | + | 0004464c: 00821821 addu r3,r4,r2 # |
− | 00044650: a0600000 sb r0,0x0000(r3) | + | 00044650: a0600000 sb r0,0x0000(r3) #delete byte |
00044654: 24630001 addiu r3,r3,0x0001 | 00044654: 24630001 addiu r3,r3,0x0001 | ||
− | 00044658: 90620000 lbu r2,0x0000(r3) | + | 00044658: 90620000 lbu r2,0x0000(r3) #load next byte |
0004465c: 00000000 nop | 0004465c: 00000000 nop | ||
− | 00044660: 1045fffb beq r2,r5,0x00044650 | + | 00044660: 1045fffb beq r2,r5,0x00044650 #loop if equals 0xe9d4? |
− | 00044664: 34020001 ori r2,r0,0x0001 | + | 00044664: 34020001 ori r2,r0,0x0001 #return 1 if got this far. I am concerned with how far the above could reach into ram deleting bytes if anything was wrong... |
00044668: 03e00008 jr r31 | 00044668: 03e00008 jr r31 | ||
0004466c: 00000000 nop | 0004466c: 00000000 nop | ||
</font> | </font> |
Latest revision as of 07:53, 6 July 2023
00044600: 3c028001 lui r2,0x8001 00044604: 8c420010 lw r2,0x0010(r2) #some LBA pointer, pointer for file to live in ram? 00044608: 00000000 nop 0004460c: 00822023 subu r4,r4,r2 #input - LBA pointer 00044610: 000422c2 srl r4,r4,0x0b #reduces pointer to 6 digits, capped at 0x001fffff 00044614: 3c018005 lui r1,0x8005 00044618: 00240821 addu r1,r1,r4 #0x80050000 + pointer >> 0xb 0004461c: 9025e9d4 lbu r5,-0x162c(r1) #related to LBA? 00044620: 3c018005 lui r1,0x8005 00044624: 00240821 addu r1,r1,r4 00044628: 9022e9d3 lbu r2,-0x162d(r1) # 0004462c: 2c830001 sltiu r3,r4,0x0001 #if pointer >> 0xb is 0, set to 1, otherwise 0? 00044630: 00a21026 xor r2,r5,r2 #0xe9d4 XOR 0xe9d3 00044634: 0002102b sltu r2,r0,r2 #if discrepancy exists, 1? 00044638: 00621825 or r3,r3,r2 0004463c: 1060000a beq r3,r0,0x00044668 #branch if any errors occur 00044640: 00001021 addu r2,r0,r0 #r2 = fail 00044644: 3c028005 lui r2,0x8005 00044648: 2442e9d4 addiu r2,r2,0xe9d4 # 0004464c: 00821821 addu r3,r4,r2 # 00044650: a0600000 sb r0,0x0000(r3) #delete byte 00044654: 24630001 addiu r3,r3,0x0001 00044658: 90620000 lbu r2,0x0000(r3) #load next byte 0004465c: 00000000 nop 00044660: 1045fffb beq r2,r5,0x00044650 #loop if equals 0xe9d4? 00044664: 34020001 ori r2,r0,0x0001 #return 1 if got this far. I am concerned with how far the above could reach into ram deleting bytes if anything was wrong... 00044668: 03e00008 jr r31 0004466c: 00000000 nop