18.07.2017, 23:47
Quote:
1. My first question is : there is any difference between a "data register" and a "data segment" ?
|
You can use lctrl and sctrl to load / set the registers
Because you used load.i, addr.pri already returns the address (FRM + offset)
load.i doesn't use the DAT register, it just loads the address, it usually works except if address is between HEA and STK or the unsigned address is over the memory size
PHP код:
// amx.c
case OP_LOAD_I:
/* verify address */
if (pri>=hea && pri<stk || (ucell)pri>=(ucell)amx->stp)
ABORT(amx,AMX_ERR_MEMACCESS);
pri=_R(data,pri); // #define _R(base,addr) (* (cell *)((unsigned char*)(base)+(int)(addr)))
break;
Well that doesn't matter at all as long as HEA and STK do no collide