🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #132

Re: subtract and divide instruction

#132
From: Thomas Koenig
Date: Thu, 15 Oct 2026 14:42
27 lines
2246 bytes
Robert Finch <robfi680@gmail.com> schrieb:
> 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

Wise man once wrote "On many computers, division is very time consuming
and is to be avoided when possible."

This could only become relevant if the size of your objects are
unknown, and even then, a good optimizing compiler should be able
to chose a good induction variable to avoid division.

> 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.

That is an interesting approach if one does not want to copy Mitch's
CARRY modifier.

-- 
This USENET posting was made without artificial intelligence,
artificial impertinence, artificial arrogance, artificial stupidity,
artificial flavorings or artificial colorants.
Technical Details
Message-ID: <11aqons$2fud4$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>

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: Thomas Koenig <tkoenig@netcologne.de>
Newsgroups: comp.arch
Subject: Re: subtract and divide instruction
Date: Thu, 15 Oct 2026 14:42:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <11aqons$2fud4$1@dont-email.me>
References: <11apshg$25e7t$1@dont-email.me>
Injection-Date: Thu, 15 Oct 2026 14:42:05 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2619812"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/urh7Jq1neUOC9c+uuLCz5excb6vnsNmI="; posting-host="661ab90f74baa43a1175f5cab3f7399c"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:YKjHX7jSlmQq3K0Sb76xjYVwboM= sha256:hX1lHUAtjZqRMqTGzWXhwF56A8nMgVuWTeiUYHOQGzU=
	sha1:Rsp+4LRpVOxLCnuXd7yVPd1gycU= sha256:u3VRVlSpBvexszXXznTMI+gLZr8gcC+mBcfxitRLb7E=