2 ms·
You would need to look into the addressing modes at length. * --i = * j++ is directly a «mov @(r0)+, -(r1)» (provided * j is in r0 and * i is in r1) whereas *
by inkyoto 6y ago
You would need to look into the addressing modes at length.
* --i = * j++ is directly a «mov @(r0)+, -(r1)» (provided * j is in r0 and * i is in r1) whereas * i++ = * j-- is a «mov @-(r0),@(r1)+»; i[4] = 1 is «mov #1, @4(r1)» and * (int * )040 |= 01 is «bis 01, @#040». A function call via a function pointer (that is, say, stored in r2) is a «jsr pc, @(r2)» etc etc.
Most of the C pointer operations map onto single PDP-11 instructions and can be used even with the program counter register (which is r7).