🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.asm370
Article #127

Re: Shifting memory to the right

#127
From: Richard Rogers
Date: Fri, 30 Sep 2005 16:39
50 lines
3459 bytes
Brute force:
Regs:
        R3 = length of each table element
        R4 = address of table entry to start right shift
        R5 = address of end of table, next free rightmost element
(table(n+1))
        R6 = work, point to next left element (table(n))

        Lnr     r3,r3           setup for bxh
        Lr      r6,r5           point past table
        Ar      r6,r3           point to last element
Shrt  ds        0h
        Mvc     0(length in r3,r5),0(r6)        copy table(n) to table(n+1)
        Ar      r6,r3           point source back
        Bxh     r5,r3,shrt      adjust target and continue

Brute force, ain't pretty...


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Don Nielsen
Sent: Friday, September 30, 2005 7:56 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Shifting memory to the right

Nothing like a dumb applications programmer question to end the week.  Is
there an instruction like MVCL that moves memory starting at the end working
to the beginning.  I have a table that is in sequence.  I want to insert a
new row, maintaining sequence.  That requires shifting right the end of the
table.  It would be great to just code an MVCL to do it, but I would be
overwrite data.  But if MVCL started with the last byte and worked its way
to the start, then the shift would be easy.  Does any such instruction or
function exist?

I guess I could do something silly and build the table starting at the end
of the of memory block and shift it left as I build it.

dvn

Don V Nielsen
Products & Tools
CMS
3707 Corporate Drive
Marshfield, WI 54449
donn@cmscms.com

> '715-486-8807 X434
>
Better Results, Faster!
Technical Details
Message-ID: <auto-000100301368@fr4.webmaillogin.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!sn-xit-03!sn-xit-10!sn-xit-08!sn-xit-14!supernews.com!149.173.6.116.MISMATCH!foggy!vm.sas.com!rcrogers.net!richard

Show Full Headers
Complete Article Headers
X-Google-Thread: fcdcb,3e46d196c2b56e33
X-Google-Attributes: gidfcdcb,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!sn-xit-03!sn-xit-10!sn-xit-08!sn-xit-14!supernews.com!149.173.6.116.MISMATCH!foggy!vm.sas.com!rcrogers.net!richard
From: Richard Rogers <richard@rcrogers.net>
Newsgroups: bit.listserv.asm370
Subject: Re: Shifting memory to the right
Date: Fri, 30 Sep 2005 10:39:21 -0600
Organization: SAS Inc.
Lines: 50
Sender: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Message-ID: <auto-000100301368@fr4.webmaillogin.com>
NNTP-Posting-Host: mozart.unx.sas.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: foggy.unx.sas.com 1128098662 18794 10.19.150.41 (30 Sep 2005 16:44:22 GMT)
X-Complaints-To: usenet@unx.sas.com
NNTP-Posting-Date: Fri, 30 Sep 2005 16:44:22 +0000 (UTC)
Comments: Gated by NETNEWS@VM.SAS.COM
Return-Path: <owner-assembler-list@LISTSERV.UGA.EDU>
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
Thread-Index: AcXFxrlhVboKC+O0RCyfYfk2hSlnpwAFM7eQ
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Approved-By: Richard Rogers <richard@RCROGERS.NET>
In-Reply-To: <F57FDB5201A2AA488C21CC5CC9759029848D5D@cdmail.cmscms.com>
Return-Path: owner-assembler-list@LISTSERV.UGA.EDU
X-OriginalArrivalTime: 30 Sep 2005 16:44:19.0014 (UTC)
                       FILETIME=[33AA5660:01C5C5DE]
Originator: daemon@mozart.unx.sas.com