diosmios/asm/CARDGetMemSize.S
crediar@rypp.net 7f75f5eb1e Cheating:
*Due space limitations only the debug version of kenobigc is supported, this means there is a bit less space for cheats.


git-svn-id: svn://localhost/Users/andi/Downloads/code/trunk@2 be6c1b03-d731-4111-a574-e37d80d43941
2012-06-23 18:08:56 +00:00

31 lines
360 B
ArmAsm

#include <asm.h>
#
# r3 Channel
# r4 size(u16)
CARDGetMemSize:
cmpwi %r3, 0
beq DoCode
li %r3, -3
blr
DoCode:
mflr %r0
stw %r0, 4(%sp)
stwu %sp, -0x10(%sp)
#possible sizes 4,8,16,32,64,128
li %r0, 8
sth %r0, 0(%r4)
end:
li %r3, 0
lwz %r0, 0x14(%sp)
addi %sp, %sp, 0x10
mtlr %r0
blr