use signed values instead of unsigned
Closed this issue · 1 comments
0x0584 commented
use signed values instead of unsigned
0x0584 commented
the program counter t_pc
, can be shifted by an integer offset, and the result is always mod MEM_SIZE
- the arithmetic modulo operator
%
is not mathematical mod; by which the circular memory is achieved- as
-64 mod 255 is -64
- while
-64 % 255 == 192
- as
- if the operation is
long_op
the offset is truncated by modIDX_MOD
before setting the PC - if PC is negative same as indexing the memory of opposite size