not wrong, but in my benchmarks, the order of how long it took to clear out a 255 byte area exactly reversed between the 370/168 and 3033. I hope I remember all the ways, not sure if I remember the order, or the exact syntax. Not included are the 'costs' of storage required for code and data areas. I did not think to try with various byte alignments of the fields, or account for mvcl being interuptable (though i ran during low activity times). this order was fastest to slowest on 3033, slowest to fastest on 168. I did this after reading a claim that the lm/stm was the fastest way.
also inspired by a programmer that used a LOOP including "MVC field, field+1) to left align a large alphanumeric field, that consumed 1/2 of the CPU time for the main overnight posting run, causing online to not come up on time in the morning...over 4 hours on the ONE instruction. xc field,field mvc field,field-1 mvc field,=xl255'0' mvcl field,=x'00' (well load the registers to accomplish this) stm/lm (store all but base reg, load them with zeros, several inline stm, restore) ...I wonder what the order would be in Hercules...anybody want to take the challenge? I'd guess like the 168 maybe with the XC moved to be faster or fastest. I had Hercules installed and running several times in the distant past, but...without access to a legal zVM operating system, not of much interest to me now. <pre>--Carey</pre> > On 11/03/2024 11:34 PM CST ben via cctalk <cctalk@classiccmp.org> wrote: > > > On 2024-11-03 9:37 p.m., Tony Duell via cctalk wrote: > > On Mon, Nov 4, 2024 at 4:06 AM Mychaela Falconia via cctalk > > <cctalk@classiccmp.org> wrote: > >> > >> Paul Koning wrote: > >> > >>> 1. Show a one-word PDP-11 program that writes all of memory, in reverse > >>> order. > >> > >> MOV -(PC),-(PC) > > > > Does that work on all models of PDP11? > > > > I had an idea that (as in C) the order of the decrements and reads was > > not specified by the instruction set definition and that on some > > machines (the 11/45?) it doubly decrements PC before reading or > > storing. > > > > -tony > > Where there any user instructions between models that gave strange > behavior on the wrong machine?