/* lunmod.s */ .text .global _start _start: push { r4, r9, lr } ldr r4, =0x2200734c bl nand_get_total_sectors str r0, [r4, #0x2c] sub r0, r0, #1 str r0, [r4, #0x30] pop { r4, r9, pc } nand_get_total_sectors: ldr r15, =0x3cb00