Пользователь
- Сообщения
- 88
- Реакции
- -9
- Предупреждения
- 31
- Помог
- 1 раз(а)
Неверный раздел форума
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
- Ошибка
-
___
- Компилятор
- Локальный
- Amx Mod X
- 1.9.0
- Исходный код
-
___
Приходилось ли вам использовать встроенный ассемблер в амхх, какие задачи решали, и помогло ли вам это использование?
Спасибо
# mnemonika operand semantika
1 LOAD.pri address PRI = [address]
2 LOAD.alt address ALT = [address]
3 LOAD.S.pri offset PRI = [FRM + offset]
4 LOAD.S.alt offset ALT = [FRM + offset]
5 LREF.pri address PRI = [[ address ]]
6 LREF.alt address ALT = [[ address ]]
7 LREF.S.pri offset PRI = [[FRM + offset]]
8 LREF.S.alt offset ALT = [[FRM + offset]]
9 LOAD.I PRI = [PRI]
11 CONST.pri value PRI = value
12 CONST.alt value ALT = value
13 ADDR.pri offset PRI = FRM + offset
14 ADDR.alt offset ALT = FRM + offset
15 STOR address [address] = PRI
16 STOR.S offset [FRM + offset] = PRI
19 SREF.pri address [[ address ]] = PRI
20 SREF.alt address [[address]] = ALT[\td]
21 SREF.S.pri offset [[FRM + offset]] = PRI
22 SREF.S.alt offset [[FRM + offset]] = ALT
23 STOR.I [ALT] = PRI (full cell)
25 LIDX PRI = [ ALT + (PRI ? cell size) ] (load what is there at calculated index)
27 IDXADDR PRI = ALT + (PRI ? cell size) (calculate indexed address)
39 PUSH.C value [STK] = value,STK = STK - cell size
31 LCTRL index PRI is set to the current value of any of the special registers. The index parameter must be: 0=COD, 1=DAT, 2=HEA,3=STP, 4=STK, 5=FRM, 6=CIP (of the next instruction)
32 SCTRL index Set the indexed special registers to the value in PRI.The index parameter must be: 2=HEA, 4=STK, 5=FRM, 6=CIP
33 MOVE.pri PRI = ALT
34 MOVE.alt ALT = PRI
35 XCHG Exchange contents of PRI and ALT
36 PUSH.pri [STK] = PRI and STK = STK - cell size
37 PUSH.alt [STK] = ALT and STK = STK - cell size
40 PUSH address [STK] = [address], STK = STK - cell size
41 PUSH.S offset [STK] = [FRM + offset], STK = STK - cell size
42 POP.pri PRI = [STK] and STK = STK + cell size
43 POP.alt ALT = [STK] and STK = STK + cell size
44 STACK value ALT = STK and STK = STK + value
47 RET STK = STK + cell size, FRM = [STK],STK = STK + cell size,CIP = [STK], The RET instruction cleans up the stack frame and returns from the function to the instruction after the call
48 RETN STK = STK + cell size, FRM = [STK],STK = STK + cell size, CIP = [STK], STK = STK + [STK]The RETN instruction removes a specifed number of bytes from the stack. The value to adjust STK with must be pushed prior to the call.
65 SHL PRI = PRI << ALT
66 SHR PRI = PRI >> ALT (without sign extension)
67 SSHR PRI = PRI >> ALT (with sign extension)
68 SHL.C.pri value PRI = PRI << value
69 SHL.C.alt value ALT = ALT << value
72 SMUL PRI = ALT * PRI (signed multiply)
73 SDIV PRI = ALT / PRI (signed divide),ALT = ALT mod PRI
78 ADD PRI = ALT + PRI
79 SUB PRI = ALT - PRI
81 AND PRI = ALT & PRI
82 OR PRI = ALT | PRI
83 XOR PRI = ALT?PRI
84 NOT PRI = !PRI
85 NEG PRI = -PRI
86 INVERT PRI = ~PRI
87 ADD.C value PRI = PRI + value
88 SMUL.C value PRI = PRI * value
107 INC.pri PRI = PRI + 1
108 INC.alt ALT = ALT + 1
109 INC [address] = [address] + 1
110 INC.S offset [FRM + offset] = [FRM + offset] + 1
112 DEC.pri PRI = PRI - 1
113 DEC.alt ALT = ALT - 1
116 DEC.I [PRI] = [PRI] - 1
119 FILL number Fill memory at [ALT] with value in [PRI]. The parameter specifes the number of bytes, which must be a multiple of the cell size.
123 SYSREQ.C address Used to call a system service or native functions
133 PUSH.ADR offset [STK] = FRM + ofset,STK = STK - cell size
1 LOAD.pri address PRI = [address]
2 LOAD.alt address ALT = [address]
3 LOAD.S.pri offset PRI = [FRM + offset]
4 LOAD.S.alt offset ALT = [FRM + offset]
5 LREF.pri address PRI = [[ address ]]
6 LREF.alt address ALT = [[ address ]]
7 LREF.S.pri offset PRI = [[FRM + offset]]
8 LREF.S.alt offset ALT = [[FRM + offset]]
9 LOAD.I PRI = [PRI]
11 CONST.pri value PRI = value
12 CONST.alt value ALT = value
13 ADDR.pri offset PRI = FRM + offset
14 ADDR.alt offset ALT = FRM + offset
15 STOR address [address] = PRI
16 STOR.S offset [FRM + offset] = PRI
19 SREF.pri address [[ address ]] = PRI
20 SREF.alt address [[address]] = ALT[\td]
21 SREF.S.pri offset [[FRM + offset]] = PRI
22 SREF.S.alt offset [[FRM + offset]] = ALT
23 STOR.I [ALT] = PRI (full cell)
25 LIDX PRI = [ ALT + (PRI ? cell size) ] (load what is there at calculated index)
27 IDXADDR PRI = ALT + (PRI ? cell size) (calculate indexed address)
39 PUSH.C value [STK] = value,STK = STK - cell size
31 LCTRL index PRI is set to the current value of any of the special registers. The index parameter must be: 0=COD, 1=DAT, 2=HEA,3=STP, 4=STK, 5=FRM, 6=CIP (of the next instruction)
32 SCTRL index Set the indexed special registers to the value in PRI.The index parameter must be: 2=HEA, 4=STK, 5=FRM, 6=CIP
33 MOVE.pri PRI = ALT
34 MOVE.alt ALT = PRI
35 XCHG Exchange contents of PRI and ALT
36 PUSH.pri [STK] = PRI and STK = STK - cell size
37 PUSH.alt [STK] = ALT and STK = STK - cell size
40 PUSH address [STK] = [address], STK = STK - cell size
41 PUSH.S offset [STK] = [FRM + offset], STK = STK - cell size
42 POP.pri PRI = [STK] and STK = STK + cell size
43 POP.alt ALT = [STK] and STK = STK + cell size
44 STACK value ALT = STK and STK = STK + value
47 RET STK = STK + cell size, FRM = [STK],STK = STK + cell size,CIP = [STK], The RET instruction cleans up the stack frame and returns from the function to the instruction after the call
48 RETN STK = STK + cell size, FRM = [STK],STK = STK + cell size, CIP = [STK], STK = STK + [STK]The RETN instruction removes a specifed number of bytes from the stack. The value to adjust STK with must be pushed prior to the call.
65 SHL PRI = PRI << ALT
66 SHR PRI = PRI >> ALT (without sign extension)
67 SSHR PRI = PRI >> ALT (with sign extension)
68 SHL.C.pri value PRI = PRI << value
69 SHL.C.alt value ALT = ALT << value
72 SMUL PRI = ALT * PRI (signed multiply)
73 SDIV PRI = ALT / PRI (signed divide),ALT = ALT mod PRI
78 ADD PRI = ALT + PRI
79 SUB PRI = ALT - PRI
81 AND PRI = ALT & PRI
82 OR PRI = ALT | PRI
83 XOR PRI = ALT?PRI
84 NOT PRI = !PRI
85 NEG PRI = -PRI
86 INVERT PRI = ~PRI
87 ADD.C value PRI = PRI + value
88 SMUL.C value PRI = PRI * value
107 INC.pri PRI = PRI + 1
108 INC.alt ALT = ALT + 1
109 INC [address] = [address] + 1
110 INC.S offset [FRM + offset] = [FRM + offset] + 1
112 DEC.pri PRI = PRI - 1
113 DEC.alt ALT = ALT - 1
116 DEC.I [PRI] = [PRI] - 1
119 FILL number Fill memory at [ALT] with value in [PRI]. The parameter specifes the number of bytes, which must be a multiple of the cell size.
123 SYSREQ.C address Used to call a system service or native functions
133 PUSH.ADR offset [STK] = FRM + ofset,STK = STK - cell size