0

I have a C exercise call a function from assembly. "Calculate perimeter of a triangle".

int a = 3, b = 4, c =5;
int Calculate_triangle(int a, int b, int c);

I have a code of Assembly here

PUSH HL
PUSH AX
MOVW AX, [HL]
ADDW AX, [HL+8]
ADDW AX, [HL+10]
POP  AX
POP  HL
RET
END

I know "a" will put in [HL]. But I have no idea why the b store in [HL+8]. Could anyone help me *I'm using RL78G14 renesas and cubesuit+ compiler

Some programmer dude
  • 400,186
  • 35
  • 402
  • 621
Quang Minh Lê
  • 169
  • 1
  • 2
  • 13

0 Answers0