For me this is easy in S7, but I'm struggling to find out how to do it in S5. Can you simple assign a output coil as a data bit, or just simply do a load and transfer in STL?
I seem to remember that the answer depends on which processor you are using. In some CPUs you can address Dxxx.xx e.g. D150.12 but I don't think that the smaller (non-floating point) CPUs support this. I may be confusing this with accessing DL (data left) or DR (data right) which is not available to all CPUs. I'm sure some will correct my memory.
In the smaller CPUs you would need to use bitwise instruction such as AND OR etc.