Fisrt of all let me complete your patch disasm:
...
above are for the selectable part. How about these parts below?
27D69C: E0 04 : mov r4, #0 ;store word 0 in r4 (needed to set 0 the rh4)
27D69E: DA A4 66 98 : calls 0A4h, loc_A49866 ; getProfile (): it gets temporary profile in use in rl4: 0-7 =profle 1-8
27D6A2: 06 F4 20 02 : add r4, #220h ;add 220 to r4= get profile in use picture ID
27D6A6: F0 E4 : mov r14, r4
27D6A8: E6 FC 30 00 : mov r12, #30h <= for the x position
27D6AC: E6 FD 43 00 : mov r13, #43h <= for the y position
27D6B0: DA C1 EC 22 : calls 0C1h, loc_C122EC ;drowPITPicture () : it drows the ID picture specified by r14 at r12(=x) and r13(=y) position
27D6B4: DB 00 : loc_27D6B4:
27D6B4: DB 00 : rets
Now is more clear?
Then.. have you understood what are r0-r15?
The are called General Purpose Register (o GPRs) and are used to store variable word datas inside a routine.
The first 0-7 registers are byte addressable and can be addressed by their low or high byte.
There are also other used registers, called Special Function Registers (o SFRs)
Calls and their registers answers can be tested with the Debugger, as well as get a look at RAM locations.
calls must have their registers rightly setted before calling them, to obtain the right effect.
Bye
Lalo
Last edited by lalo.lerry; 02-04-2005 at 21:16.
|