🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #142

Re: subtract and divide instruction

#142
From: Robert Finch
Date: Fri, 16 Oct 2026 00:13
29 lines
2481 bytes
On 2026-10-15 3:21 p.m., MitchAlsup wrote:
> 
> Robert Finch <robfi680@gmail.com> posted:
> 
>> Added the SUBDIV (subtract and divide) instruction to Qupls4, used
>> mainly with pointer arithmetic. The integer divider shortcuts divisions
>> by powers of two. This was previously called PTRDIF which only did a
>> right shift instead of a divide.
>>
>> SUBDIV Rd, Rs1, Rs2, Rs3  ; Rd = (Rs1-Rs2)/Rs3
> 
> Is this seen/used often enough to save useful amounts of instructions ?
> It does not appear to save execution time (except for power of 2 cases).
> 
> In My 66000, DIV is down near 0.5% seldom following a subtract.
>   
Maybe, it showed up less than 1% but more than 0.1% IIRC. It does not 
save execution time, but it saves code space. Probably would not be 
worth supporting except that it is for free.

It is a 3r instruction and provides DIV as well by subtracting zero. DIV 
was a 3r instruction format with one unused r.

>> At work again on Qupls4. Certain aspects seem to be stabilizing, like
>> the use of 48-bit instructions. The CPU currently has 64 GPRs. 8 GPRs
>> may be selected as carry registers and are selected by three-bit code in
>> some instructions.
>>
Technical Details
Message-ID: <11arq6g$2se7j$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11apshg$25e7t$1@dont-email.me> <1792092095-5857@newsgrouper.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Robert Finch <robfi680@gmail.com>
Newsgroups: comp.arch
Subject: Re: subtract and divide instruction
Date: Thu, 15 Oct 2026 20:13:02 -0400
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <11arq6g$2se7j$1@dont-email.me>
References: <11apshg$25e7t$1@dont-email.me> <1792092095-5857@newsgrouper.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 16 Oct 2026 00:13:05 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3029235"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18tJfohAp0W5Holh+FFh0DjIJ2Z0iM2AXA="; posting-host="5f68f1b3a6556c417607030021938697"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:enmS68r+7LfmOSsprGzECCvO7TA= sha256:XK5+Bs3eqcPn2+WrEwszhy1JAFtpRdVrNNp/r6aUQBc=
	sha1:ZAfRnR9dbtUUB6EVTw7xR5GLq1s= sha256:htCvXa56Rurj+V53l8ZETD71VwpNaqRNwh4L79p4wx0=
In-Reply-To: <1792092095-5857@newsgrouper.org>
Content-Language: en-US