#emit Discussion
#15

Quote:
Originally Posted by Dutheil
Посмотреть сообщение
1. My first question is : there is any difference between a "data register" and a "data segment" ?
Well the data register DAT points to the start of the data section / segment
You can use lctrl and sctrl to load / set the registers

Quote:
Originally Posted by Dutheil
Посмотреть сообщение
2. My second question is based on the tests I made.
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; 
No time to look into y_amx but if it says AMX_REAL_DATA it is probably the data section relative to the real memory block of the server

Quote:
Originally Posted by Dutheil
Посмотреть сообщение
3. Is it better to use the p-code STACK twice or once in such cases ?
Well that doesn't matter at all as long as HEA and STK do no collide
Reply


Messages In This Thread
#emit Discussion - by Yashas - 20.06.2015, 18:47
Re: #emit Discussion - by ]Rafaellos[ - 20.06.2015, 19:08
Re: #emit Discussion - by Misiur - 20.06.2015, 21:18
Re: #emit Discussion - by Yashas - 21.06.2015, 04:38
Re: #emit Discussion - by Misiur - 21.06.2015, 07:50
Re: #emit Discussion - by Yashas - 21.06.2015, 08:48
Re: #emit Discussion - by PeterJane - 25.06.2015, 00:29
Re: #emit Discussion - by Yashas - 12.07.2015, 07:56
Re: #emit Discussion - by Vince - 12.07.2015, 10:46
Re: #emit Discussion - by Yashas - 12.07.2015, 10:54
Re: #emit Discussion - by Yashas - 31.08.2015, 15:46
Re : #emit Discussion - by Dutheil - 10.11.2015, 23:04
Re: #emit Discussion - by Yashas - 11.11.2015, 13:09
Re: #emit Discussion - by Dutheil - 18.07.2017, 14:26
Re: #emit Discussion - by Nero_3D - 18.07.2017, 23:47
Re: #emit Discussion - by Dutheil - 19.07.2017, 00:31
Re: #emit Discussion - by Nero_3D - 19.07.2017, 22:07
Re: #emit Discussion - by Dutheil - 29.12.2017, 14:45
Re: #emit Discussion - by Misiur - 29.12.2017, 15:24
Re: #emit Discussion - by Kaperstone - 29.12.2017, 15:49
Re: #emit Discussion - by Y_Less - 29.12.2017, 16:00
Re: #emit Discussion - by Dutheil - 29.12.2017, 19:56

Forum Jump:


Users browsing this thread: 1 Guest(s)