Re: CMS abend caused by cmd "discard" at sixpack 1.2

"Robert O'Hara" <rohara-h1UBTB8qgA32lB8bt/G8DwC/[email protected]>
Newsgroups gmane.comp.emulators.hercules390.vm
Message-ID <[email protected]>
I will fix this... my code.

By the way, I wrote the DISCARD command (and FILELIST, RDRLIST, PEEK, NOTE, SENDFILE, etc) for VM/SP 2 many years ago :-)

Bob

PS.  I am on the US east coast for the next 10 days, delivering my son to college, then taking a vacation with my wife.  So my participation in this list will be somewhat sporadic.

--- In [email protected], "Kevin Leonard" <hercules-list@...> wrote:
>
> > DMSITP143T SPECIFICATION EXCEPTION OCCURRED AT 0176D6 IN SYSTEM
> > ROUTINE  Î     ,
> > RE-IPL CMS.
> > CP ENTERED; DISABLED WAIT PSW '00020000 4001B436'
> 
> This looks to be a minor bug in DMSCPF HRC350DS, which adds
> support for commands of the form:
> 
>         FIFO | LIFO | DISCARD cpcommand
> 
> If you say "DISCARD " with a trailing blank, it works.  If
> you say "DISCARD" without the blank, you get the pic6.  The
> code doesn't correctly handle the possibility of one of
> FIFO|LIFO|DISCARD with nothing at all after the initial
> word.  For "DISCARD", it does:
> 
>          CLC   0(8,R2),DISCARD is it 'DISCARD'
>          BNE   NORMAL         nope
>          SR    R6,R6          remember DISCARD
>          LA    R2,8(R2)       skip past 'DISCARD '
>          S     R3,EIGHT       decrement CP command length
> 
> then tests the length of the remaining command text:
> 
>          LTR   R3,R3          anything left in the buffer?
>          BZ    WRAPUP         no
> 
> except that the length register, R3, contains X'7FFFFFFF'
> rather than zero, so the test doesn't catch the absence of
> any CP command to be issued and doesn't branch around the
> diagnose X'0008'.  CP fails the diagnose with a pic6
> because of the invalid length.
> 
> A couple of things.  One is that R3 already contains the
> flag bits to be passed to diagnose in the high-order bits,
> which might screw up the length arithmetic if the bits are
> anything but zero.  The other is that the "anything left in
> the buffer" test needs to ensure the remaining length is positive,
> not just non-zero, because if there isn't any data after the
> first token, subtracting the expected length of the token
> plus one will make the length go negative.
> 
> -- 
> Kevin
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.