Good evening
I was trying to look into Systemcall 0x1839 (PowerOff). My goal is to locate the Bitmap of the Casio power off screen, because I want to replace it with something not so boring. If you put mentioned Systemcall in R0 and jump to 0x80020070, the code for locating the required poweroff Function would be this (OS 2.02):
Code:
Now I am a little bit confused. To understand this the first instruction is actually encoded as 1101|0010|0000|0010. This Document decodes the Instruction on page 119 (PDF: 139) as follows:
MOV.L ▪ @(disp,PC),Rn ▪ (disp + PC) → Rn ▪ 1101nnnndddddddd
n = Register, d = displacement
So in my humble opinion the target would be R2 and the displacement h"2". So the Disassembler and me are having a disagreement(Endianess) here. Depending on who you believe, you get these function addresses.
Code:
This way I jump to a section full of Strings...
Code:
Still in the same problematic section...
I think I misunderstood something. Any help would be appreciated.
I was trying to look into Systemcall 0x1839 (PowerOff). My goal is to locate the Bitmap of the Casio power off screen, because I want to replace it with something not so boring. If you put mentioned Systemcall in R0 and jump to 0x80020070, the code for locating the required poweroff Function would be this (OS 2.02):
Code:
0x80020070: MOV.L @(h'8'+PC),R2
0x80020072: SHLL2 R0
0x80020074: MOV.L @(R0+R2),R0
0x80020076: JMP @R0
0x80020078: NOP
Now I am a little bit confused. To understand this the first instruction is actually encoded as 1101|0010|0000|0010. This Document decodes the Instruction on page 119 (PDF: 139) as follows:
MOV.L ▪ @(disp,PC),Rn ▪ (disp + PC) → Rn ▪ 1101nnnndddddddd
n = Register, d = displacement
So in my humble opinion the target would be R2 and the displacement h"2". So the Disassembler and me are having a disagreement(Endianess) here. Depending on who you believe, you get these function addresses.
Code:
0x80020070: MOV.L @(h'8'+PC),R2 ; 0x8 + 0x80020070 = 0x80020078 → R2
0x80020072: SHLL2 R0 ; 0x1839 <<2 = 0x60e4 → R0
0x80020074: MOV.L @(R0+R2),R0 ; 0x60e4 + 0x80020078 = 0x8002615C → R0
0x80020076: JMP @R0
0x80020078: NOP
This way I jump to a section full of Strings...
Code:
0x80020070: MOV.L @(h'2'+PC),R2 ; 0x2 + 0x80020070 = 0x80020072 → R2
0x80020072: SHLL2 R0 ; 0x1839 <<2 = 0x60e4 → R0
0x80020074: MOV.L @(R0+R2),R0 ; 0x60e4 + 0x80020072 = 0x80026156 → R0
0x80020076: JMP @R0
0x80020078: NOP
Still in the same problematic section...
I think I misunderstood something. Any help would be appreciated.