EX is a very funny instruction in the 360 series and works as follows: LA 4,9 loads R4 with the constant 9 EX 4,COPY executes the instruction COPY * OR'ing its 2nd byte with the * current content of R4 BR 14 return COPY MVC TO(1),FROM move chars from FROM to TO, * predefined length is zero which is * actually modified by EX So one could write a self-modifying program without actually changing the code. Imre +-----------------------------------------------------------------------+ | The information transmitted is intended only for the person or entity | | to which it is addressed and may contain confidential and/or | | privileged material. Any review, retransmission, dissemination or | | other use of, or taking of any action in reliance upon, this | | information by persons or entities other than the intended recipient | | is prohibited. If you received this in error, please contact the | | sender and delete the material from any computer. | +-----------------------------------------------------------------------+ On Thu, 4 Nov 2004, Byron A Jeff wrote: > On Wed, Nov 03, 2004 at 10:10:39AM +0100, dr. Imre Bartfai wrote: >> >>> On Mon, Oct 25, 2004 at 11:32:21AM -0400, Peter Johansson wrote: >>>> Herbert Graf writes: > > Actually for the record, I wrote that piece of code. It's written in NPCI. > I have a language spec here: > > http://www.finitesite.com/d3jsys/README-NPCI.html > >>> >>> proc clearbits(copy char count, copy char start) >>> while (count) >>> portb:start = 0 // Clear the bit in PORTB referenced by start. >>> start = start+1 >>> count = count-1 >>> endwhile >>> endproc >>> >>> The portb:start=0 line is a significant chunk of code because it represents >>> a variable bit number. But the compiler gives a compact abstraction for the >>> concept. >> >> Therefore I miss the EX assembly statement used in the IBM/360 (and >> successors) architecture. Does know somebody similar on another >> processors? > > I couldn't get a description from Google. What does that instruction do? > > BAJ > _______________________________________________ > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist