Re: Assembler code

2014-02-05 Thread Bernd Oppolzer
Am 05.02.2014 23:55, schrieb Bernd Oppolzer: Am 05.02.2014 13:25, schrieb Shmuel Metz (Seymour J.): In <52f17a2f.7070...@t-online.de>, on 02/05/2014 at 12:39 AM, Bernd Oppolzer said: The OP attached the complete source code of his module with his first mail. Sorry; I missed that. Where i

Re: Assembler code

2014-02-05 Thread Bernd Oppolzer
Am 05.02.2014 13:25, schrieb Shmuel Metz (Seymour J.): In <52f17a2f.7070...@t-online.de>, on 02/05/2014 at 12:39 AM, Bernd Oppolzer said: The OP attached the complete source code of his module with his first mail. Sorry; I missed that. Where is ITMAP defined? ITMAP is not defined in t

Re: Assembler code

2014-02-05 Thread Shmuel Metz (Seymour J.)
In <52f17a2f.7070...@t-online.de>, on 02/05/2014 at 12:39 AM, Bernd Oppolzer said: >The OP attached the complete source code of his module >with his first mail. Sorry; I missed that. Where is ITMAP defined? -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see

Re: Assembler code

2014-02-04 Thread Bernd Oppolzer
To make my point more clear: I guess that the FORCEONE code section is planned to FORCE the bit identified by the input parameters to ONE - that's what the name says. But what it really does: it puts a one bit in the correct position for the relevant target bit and issues an XI instruction on th

Re: Assembler code

2014-02-04 Thread Bernd Oppolzer
The OP attached the complete source code of his module with his first mail. Am 05.02.2014 00:29, schrieb Shmuel Metz (Seymour J.): In <6453954597906023.wa.ron5174gmail@listserv.ua.edu>, on 02/04/2014 at 11:22 AM, Ron Thomas said: Ok Thanks .so what would be o/p of this statement "TR

Re: Assembler code

2014-02-04 Thread Shmuel Metz (Seymour J.)
In <2073666706692890.wa.ron5174gmail@listserv.ua.edu>, on 02/04/2014 at 08:18 AM, Ron Thomas said: >I am new to assembler, so not sure i am pharsing the query correctly. Download and read Principles of Operation. >In the attached code whether if the ITMAP bit is on for a memory >location

Re: Assembler code

2014-02-04 Thread Shmuel Metz (Seymour J.)
In <6453954597906023.wa.ron5174gmail@listserv.ua.edu>, on 02/04/2014 at 11:22 AM, Ron Thomas said: >Ok Thanks .so what would be o/p of this statement "TRBIT,TR@TAB " >here ? How high is up? Nobody can answer your question until you say what BIT and TR@TAB are. -- Shmuel (Seym

Re: Assembler code

2014-02-04 Thread Bernd Oppolzer
I would like to add that the name of the code section and the comment both are misleading, IMO. The name of the code section is FORCEONE. If the bit really is forced to one, the instruction executed should be OI, not XI. And the comment says that a TM will be executed, but there is no TM. I hav

Re: Assembler code

2014-02-04 Thread Bernd Oppolzer
The TR translates a bit position in the range 0 to 7 to the appropriate bit mask, that is 0 is translated to B'1000' 1 to B'0100' 2 to B'0010' 3 to B'0001' and so on So the XI inverts the bit that is specified by those two parameters on entry to the procedure: ZAP BY

Re: Assembler code

2014-02-04 Thread Andy Wood
On Tue, 4 Feb 2014 13:08:25 -0600, Andy Wood wrote: . . . > >However to answer your specific question: The remainder, after dividing by 8, >and which has been placed in BIT, is a number in the range 0 to 7. The TR >converts 0 to X'80', 1 to X'40', 2 to X'20' etc, for use as the "mask" in the >

Re: Assembler code

2014-02-04 Thread Andy Wood
On Tue, 4 Feb 2014 11:22:32 -0600, Ron Thomas wrote: >Ok Thanks .so what would be o/p of this statement "TRBIT,TR@TAB " here ? > When I look at that code, I am left thinking "there has to be an easier way". I would have done a single CVB immediately after the PACK, and then split it up in

Re: Assembler code

2014-02-04 Thread Ron Thomas
Ok Thanks .so what would be o/p of this statement "TRBIT,TR@TAB " here ? Thanks, Ron T -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Re: Assembler code

2014-02-04 Thread Charles Mills
al Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Ron Thomas Sent: Tuesday, February 04, 2014 9:18 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Assembler code Hello. I am new to assembler, so not sure i am pharsing the query correctly. In the attached code

Re: Assembler code

2014-02-04 Thread Ed Jaffe
On 2/4/2014 6:18 AM, Ron Thomas wrote: Hello. I am new to assembler, so not sure i am pharsing the query correctly. FYI. The best (and most appropriate) place for assembler-related questions is assembler-l...@listserv.uga.edu. -- Edward E Jaffe Phoenix Software International, Inc 831 Parkvi

Assembler code

2014-02-04 Thread Ron Thomas
Hello. I am new to assembler, so not sure i am pharsing the query correctly. In the attached code whether if the ITMAP bit is on for a memory location, then after executing the below code is it going to be turned off.? So basically need to know what all condtions the BIT gets turned on and off

Re: Assembler code

2013-04-30 Thread Elardus Engelbrecht
Shmuel Metz (Seymour J.) wrote: >>Hi. Could someone let me know what the below assembler code is doing? >Turning my stomache. LOL! Do you have the stomach to read that code snippet? ;-D Groete / Greetings Elardus En

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-30 Thread Shmuel Metz (Seymour J.)
In , on 04/29/2013 at 07:09 PM, Kirk Talman said: >I was given at one point the Assembler source of the fast Fourier >transform, which I wanted to port to the 360. I had to read the >94 PoOp several times before I caught on that the EX instruction >on the 94 ORed the register (can't remem

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-30 Thread Shmuel Metz (Seymour J.)
In , on 04/29/2013 at 10:42 AM, John McKown said: >There is no architectural restriction about not modifying >instructions "on the fly". The z does not have the concept of >"data" versus "instruction" storage. But, IMO, it is an >abomination. There are two major reasons and one minor one. Fi

Re: Assembler code

2013-04-30 Thread Shmuel Metz (Seymour J.)
In , on 04/29/2013 at 10:50 AM, John Gilmore said: >It is not at all a bad subroutine. I would have marked it down had it been turned in as a homework assignment. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2 We don't care. We don't have

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread Ed Jaffe
On 4/29/2013 10:10 PM, Paul Gilmartin wrote: I don't know how it keeps a 128-bit PSW. XSBOPSW16 DS XL16 16-BYTE PSW ANALOG OF RBOPSW -- Edward E Jaffe Phoenix Software International, Inc 831 Parkview Drive North El Segundo, CA 90245 http://www.phoenixsoftware.com/ ---

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread Paul Gilmartin
On Tue, 30 Apr 2013 12:52:36 +0800, Timothy Sipples wrote: > >1. AMODE64. In certain languages on certain machines on certain releases of >z/OS a 2GB executable program code limit is enforced while there is no >corresponding restriction on data. That is, with such >languages/machines/releases code

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread Timothy Sipples
John McKown writes: >The z does not have the concept of "data" versus "instruction" storage. Well... There are nearly always exceptions. :-) Without going back in history I can think of two that are perhaps relevant today. In no particular order: 1. AMODE64. In certain languages on certain machin

Re: Assembler code

2013-04-29 Thread Sam Siegel
On Apr 29, 2013 7:14 PM, "Shmuel Metz (Seymour J.)" wrote: > > In <6572734584880884.wa.ron5174gmail@listserv.ua.edu>, on > 04/29/2013 >at 12:35 AM, Ron Thomas said: > > >Hi. Could someone let me know what the below assembler code is doing? > >

Re: Assembler code

2013-04-29 Thread Shmuel Metz (Seymour J.)
In <6572734584880884.wa.ron5174gmail@listserv.ua.edu>, on 04/29/2013 at 12:35 AM, Ron Thomas said: >Hi. Could someone let me know what the below assembler code is doing? Turning my stomache. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2<http:/

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread Kirk Talman
IBM Mainframe Discussion List wrote on 04/29/2013 06:47:16 PM: > From: Bernd Oppolzer > Another story: > I once had a hard time to understand a (very old) assembler module. It > searched > strings in another string, and the string to look for was specified > together with a > search directi

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread Bernd Oppolzer
The subroutine that was originally posted didn't modify itself, but it constructed a little subroutine (one instruction and branch for return) in a working area which was provided as a parameter by the caller. So there is no reentrant problem and no flushing of the I-cache. Thank you for posti

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread John Gilmore
I posted the formulæ for match-seeking binary and linear search in a 'related' thread. Following Knuth, the standard figure of merit for match-seeking binary search if the total number of ternary comparison operations required to search a set with 2n + 1 argments. For the n keys k(1) < k(2) < . .

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread Joel C. Ewing
I would be surprised if a binary search could beat a linear search with only five items in the list, which is the case in the example code here. If usage of the function request codes were uniformly distributed, the average number of list item comparisons with five items for binary search wou

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread Ed Jaffe
On 4/29/2013 8:06 AM, Paul Gilmartin wrote: what's the break-even between linear search and binary search? My ROT has always been to prefer linear search for single-digit quantities and prefer binary or hash algorithms for ten or more. -- Edward E Jaffe Phoenix Software International, Inc 83

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread Kirk Talman
IBM Mainframe Discussion List wrote on 04/29/2013 11:06:34 AM: > From: Paul Gilmartin > Has the z nowadays any memory protection mode that forbids fetching > instructions from data storage? (Many other processors have such.) they have different caches which makes for almost the same effect o

Re: Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread John McKown
There is no architectural restriction about not modifying instructions "on the fly". The z does not have the concept of "data" versus "instruction" storage. But, IMO, it is an abomination. There are two major reasons and one minor one. First, it causes a flush of the I (and D?) cache. This impacts

Linear search vs. Binary search (was: Assembler code)

2013-04-29 Thread Paul Gilmartin
On Mon, 29 Apr 2013 10:50:25 -0400, John Gilmore wrote: >It is not at all a bad subroutine. In many contexts the form of the >second argument would be gratuitously clumsy, but this routine was >(almost certainly) intended to be called from COBOL, and eight '0' or >'1' characters is appropriate f

Re: Assembler code

2013-04-29 Thread John Gilmore
It is not at all a bad subroutine. In many contexts the form of the second argument would be gratuitously clumsy, but this routine was (almost certainly) intended to be called from COBOL, and eight '0' or '1' characters is appropriate for COBOL. I would not myself have used assembler mnemonics,

Re: Assembler code

2013-04-29 Thread Joel C. Ewing
On 04/29/2013 07:11 AM, Bill Godfrey wrote: On Mon, 29 Apr 2013 03:58:41 -0500, Ron Thomas wrote: Ok. in that case what does this statement does? OCINSTR1+1(1),0(R5) I believe this will have the function either CLI,NI,TM,OI,XI. so why this "OR" aganist XL8'8040201008040201'. So how is

Re: Assembler code

2013-04-29 Thread Bill Godfrey
On Mon, 29 Apr 2013 03:58:41 -0500, Ron Thomas wrote: >Ok. in that case what does this statement does? > >OCINSTR1+1(1),0(R5) > >I believe this will have the function either CLI,NI,TM,OI,XI. so why this >"OR" aganist XL8'8040201008040201'. So how is the result going to be ? > The OC is pa

Re: Assembler code

2013-04-29 Thread Ron Thomas
Ok. in that case what does this statement does? OCINSTR1+1(1),0(R5) I believe this will have the function either CLI,NI,TM,OI,XI. so why this "OR" aganist XL8'8040201008040201'. So how is the result going to be ? Thanks . Ron T ---

Re: Assembler code

2013-04-28 Thread David Crayford
It's a routine to TEST, SET, AND, OR, XOR a byte. I would imagine it's for manipulating flag bytes in a language that doesn't support bitwise operations (COBOL). On 29/04/2013 1:35 PM, Ron Thomas wrote: Hi. Could someone let me know what the below assembler code is doing? PN

Assembler code

2013-04-28 Thread Ron Thomas
Hi. Could someone let me know what the below assembler code is doing? PNBITMSK AMODE 31 PNBITMSK RMODE ANY PNBITMSK CSECT USING *,R15 STM R14,R12,12(R13