Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Professional wrestling: ballet for the common man.


devel / comp.os.cpm / AM9511 - what is pi?

SubjectAuthor
* AM9511 - what is pi?fred_...@hotmail.com
+* Re: AM9511 - what is pi?Ross Presser
|`* Re: AM9511 - what is pi?fred_...@hotmail.com
| `- Re: AM9511 - what is pi?Eric Matecki
+* Re: AM9511 - what is pi?Wayne Hortensius
|`* Re: AM9511 - what is pi?fred_...@hotmail.com
| `- Re: AM9511 - what is pi?Wayne Hortensius
`* Re: AM9511 - what is pi?Martin
 `* Re: AM9511 - what is pi?fred_...@hotmail.com
  `* Re: AM9511 - what is pi?Wayne Hortensius
   `* Re: AM9511 - what is pi?fred_...@hotmail.com
    `* Re: AM9511 - what is pi?fred_...@hotmail.com
     `* Re: AM9511 - what is pi?Wayne Hortensius
      `* Re: AM9511 - what is pi?fred_...@hotmail.com
       `* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
        +* Re: AM9511 - what is pi?Wayne Hortensius
        |`- Re: AM9511 - what is pi?Wayne Hortensius
        `* Re: AM9511 - what is pi?Wayne Hortensius
         +* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
         |`* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
         | +- Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
         | `- Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
         `* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
          +* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
          |`- Re: AM9511 - what is pi?Wayne Hortensius
          `* Re: AM9511 - what is pi?Wayne Hortensius
           `* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
            `* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
             `* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
              `* Re: AM9511 - what is pi?Wayne Hortensius
               `* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
                `* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
                 `* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
                  `* Re: AM9511 - what is pi?fridtjof.ma...@gmail.com
                   `- Re: AM9511 - what is pi?fridtjof.ma...@gmail.com

Pages:12
AM9511 - what is pi?

<b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2581&group=comp.os.cpm#2581

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a37:8245:: with SMTP id e66mr1010290qkd.439.1622752536102;
Thu, 03 Jun 2021 13:35:36 -0700 (PDT)
X-Received: by 2002:a05:6830:2251:: with SMTP id t17mr935778otd.64.1622752535775;
Thu, 03 Jun 2021 13:35:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Thu, 3 Jun 2021 13:35:35 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:941c:a000:5d65:5ce5:488c:50a5;
posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:941c:a000:5d65:5ce5:488c:50a5
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
Subject: AM9511 - what is pi?
From: fred_wei...@hotmail.com (fred_...@hotmail.com)
Injection-Date: Thu, 03 Jun 2021 20:35:36 +0000
Content-Type: text/plain; charset="UTF-8"
 by: fred_...@hotmail.com - Thu, 3 Jun 2021 20:35 UTC

I have been working on DSD-80 debugger, and the AM9511 chip
(using DSD-80 to debug code for the AM9511).

I do not have an AM9511A, and am curious about it (working on
an emulator for the chip.

What is the value of PI on the chip?

in hex:

9b 0f 49 40

or

9a 0f 49 40

Just wondering if anyone knew, or can find out (do a PUPI instruction on the chip, and read out the four bytes would do).

output 00011010 (1A) to the chip (command port), then read four bytes
from the data port

I would imagine something like:

10 rem compupro system support 1, with am9511
20 c = &h59 : rem am9511 command port
30 d = &h58 : rem am9511 data port
40 out c,&h1a : rem output pupi command
50 for i=1 to 4
60 v = inp(d)
70 print hex$(v)
80 next i

would do nicely -- if you have that hardware...

Thanks in advance!
FredW

FredW

Re: AM9511 - what is pi?

<4726cdd2-10cd-48d0-850b-123c0a96f7abn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2582&group=comp.os.cpm#2582

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ae9:dfc4:: with SMTP id t187mr1529144qkf.0.1622758509121;
Thu, 03 Jun 2021 15:15:09 -0700 (PDT)
X-Received: by 2002:a05:6830:1e0d:: with SMTP id s13mr1231470otr.169.1622758508847;
Thu, 03 Jun 2021 15:15:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Thu, 3 Jun 2021 15:15:08 -0700 (PDT)
In-Reply-To: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.9.24; posting-account=SOVadwoAAAB3h7W1MLW9kMYtEc2JW2L8
NNTP-Posting-Host: 165.225.9.24
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4726cdd2-10cd-48d0-850b-123c0a96f7abn@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: rpres...@gmail.com (Ross Presser)
Injection-Date: Thu, 03 Jun 2021 22:15:09 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Ross Presser - Thu, 3 Jun 2021 22:15 UTC

On Thursday, June 3, 2021 at 4:35:36 PM UTC-4, fred_...@hotmail.com wrote:
> I have been working on DSD-80 debugger, and the AM9511 chip
> (using DSD-80 to debug code for the AM9511).
>
> I do not have an AM9511A, and am curious about it (working on
> an emulator for the chip.
>
> What is the value of PI on the chip?
>
> in hex:
>
> 9b 0f 49 40
>
> or
>
> 9a 0f 49 40
>
> Just wondering if anyone knew, or can find out (do a PUPI instruction on the chip, and read out the four bytes would do).

I don't have an answer, from hardware or from documents.

Nevertheless, neither of the hex values you suggest are the
closest possible to pi.

9b 0f 49 40 = mantissa 4788123, exponent 2^1 = 3.14157748222
9a 0f 49 40 = mantissa 4788122, exponent 2^1 = 3.1415772438

da 0f 49 40 = mantissa 4788186, exponent 2^1 = 3.14159250259
db 0f 49 40 = mantissa 4788187, exponent 2^1 = 3.14159274101

So I would guess it would be da or db as the LSB, not 9a or 9b.
Unless this chip didn't really comply with IEEE-754?
https://www.h-schmidt.net/FloatConverter/IEEE754.html

Re: AM9511 - what is pi?

<4b911554-22fd-4f22-ba68-75335e4b4e0cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2583&group=comp.os.cpm#2583

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:622a:1045:: with SMTP id f5mr1734090qte.392.1622759744752;
Thu, 03 Jun 2021 15:35:44 -0700 (PDT)
X-Received: by 2002:a05:6808:8e5:: with SMTP id d5mr976964oic.145.1622759744524;
Thu, 03 Jun 2021 15:35:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Thu, 3 Jun 2021 15:35:44 -0700 (PDT)
In-Reply-To: <4726cdd2-10cd-48d0-850b-123c0a96f7abn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:941c:a000:5d65:5ce5:488c:50a5;
posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:941c:a000:5d65:5ce5:488c:50a5
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com> <4726cdd2-10cd-48d0-850b-123c0a96f7abn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4b911554-22fd-4f22-ba68-75335e4b4e0cn@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fred_wei...@hotmail.com (fred_...@hotmail.com)
Injection-Date: Thu, 03 Jun 2021 22:35:44 +0000
Content-Type: text/plain; charset="UTF-8"
 by: fred_...@hotmail.com - Thu, 3 Jun 2021 22:35 UTC

On Thursday, June 3, 2021 at 6:15:09 PM UTC-4, rpre...@gmail.com wrote:
> On Thursday, June 3, 2021 at 4:35:36 PM UTC-4, fred_...@hotmail.com wrote:
> > I have been working on DSD-80 debugger, and the AM9511 chip
> > (using DSD-80 to debug code for the AM9511).
> >
> > I do not have an AM9511A, and am curious about it (working on
> > an emulator for the chip.
> >
> > What is the value of PI on the chip?
> >
> > in hex:
> >
> > 9b 0f 49 40
> >
> > or
> >
> > 9a 0f 49 40
> >
> > Just wondering if anyone knew, or can find out (do a PUPI instruction on the chip, and read out the four bytes would do).
> I don't have an answer, from hardware or from documents.
>
> Nevertheless, neither of the hex values you suggest are the
> closest possible to pi.
>
> 9b 0f 49 40 = mantissa 4788123, exponent 2^1 = 3.14157748222
> 9a 0f 49 40 = mantissa 4788122, exponent 2^1 = 3.1415772438
>
> da 0f 49 40 = mantissa 4788186, exponent 2^1 = 3.14159250259
> db 0f 49 40 = mantissa 4788187, exponent 2^1 = 3.14159274101
>
> So I would guess it would be da or db as the LSB, not 9a or 9b.
> Unless this chip didn't really comply with IEEE-754?
> https://www.h-schmidt.net/FloatConverter/IEEE754.html

You are correct, I mis-typed! I am using da 0f 49 40 for pi. But, the last bit is important for
the extra functions. One bit! Thanks for your correction!

and, no, the chip isn't ieee-754. The leading 1 isn't suppressed, and the exponent is 2's complement
7 bit. very strange. The am9512 was somewhat more 754 compliant, as far as I can tell.

Re: AM9511 - what is pi?

<6767accb-1279-42d1-aaab-fde08540b820n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2586&group=comp.os.cpm#2586

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ae9:c219:: with SMTP id j25mr2695596qkg.235.1622785311695; Thu, 03 Jun 2021 22:41:51 -0700 (PDT)
X-Received: by 2002:aca:1213:: with SMTP id 19mr9676638ois.29.1622785311377; Thu, 03 Jun 2021 22:41:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Thu, 3 Jun 2021 22:41:51 -0700 (PDT)
In-Reply-To: <4b911554-22fd-4f22-ba68-75335e4b4e0cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=185.230.10.187; posting-account=WWpcHgoAAABKwOrKBd2s2-Nn9fnk2Kem
NNTP-Posting-Host: 185.230.10.187
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com> <4726cdd2-10cd-48d0-850b-123c0a96f7abn@googlegroups.com> <4b911554-22fd-4f22-ba68-75335e4b4e0cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6767accb-1279-42d1-aaab-fde08540b820n@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: matecki....@gmail.com (Eric Matecki)
Injection-Date: Fri, 04 Jun 2021 05:41:51 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 2
 by: Eric Matecki - Fri, 4 Jun 2021 05:41 UTC

Not that strange.
From wikipedia : The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE)
The 9511 is from the late '70s.

Re: AM9511 - what is pi?

<20210604003715.3fc1ea28@earth>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2587&group=comp.os.cpm#2587

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx13.iad.POSTED!not-for-mail
From: me...@somewhere.foo (Wayne Hortensius)
Newsgroups: comp.os.cpm
Subject: Re: AM9511 - what is pi?
Message-ID: <20210604003715.3fc1ea28@earth>
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; arm-unknown-linux-gnueabihf)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Lines: 26
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Fri, 04 Jun 2021 06:37:15 UTC
Date: Fri, 4 Jun 2021 00:37:15 -0600
X-Received-Bytes: 1153
 by: Wayne Hortensius - Fri, 4 Jun 2021 06:37 UTC

> What is the value of PI on the chip?
>
> in hex:
>
> 9b 0f 49 40
>
> or
>
> 9a 0f 49 40

After waking my 9511 from its decades long slumber and asking it to
PUPI, it reported this:

02 C9 0F DA

which looks reasonable (the MSB comes off the stack first). The
mantissa is C9 0F DA, and the exponent is 2. C9 0F DA works out to
0.7853981, multiply by 4 and you end up with 3.141592.

And I'd forgotten just how hot the 9511 runs.

Regards,
Wayne

Re: AM9511 - what is pi?

<20210604102734.62eca097@earth>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2588&group=comp.os.cpm#2588

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx47.iad.POSTED!not-for-mail
From: me...@somewhere.foo (Wayne Hortensius)
Newsgroups: comp.os.cpm
Subject: Re: AM9511 - what is pi?
Message-ID: <20210604102734.62eca097@earth>
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<20210604003715.3fc1ea28@earth>
<4563ae76-74ea-4c26-a538-d22d81250d21n@googlegroups.com>
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; arm-unknown-linux-gnueabihf)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Lines: 10
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Fri, 04 Jun 2021 16:27:34 UTC
Date: Fri, 4 Jun 2021 10:27:34 -0600
X-Received-Bytes: 1202
 by: Wayne Hortensius - Fri, 4 Jun 2021 16:27 UTC

> Many thanks! I was looking for an am9511 emulator and then support
> library for am9511 and microsoft fortran-80. But... found neither.

I didn't find anything back in the day either. Back then, I made a
TM2 MathLib replacement that used the 9511 to speed up a planetarium
type program I was interested in. It made it seem like I had a 14MHz
Z80 in my Ampro... at the time, that seemed pretty impressive! :)

Regards,
Wayne

Re: AM9511 - what is pi?

<s9fqkm$1c1n$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2592&group=comp.os.cpm#2592

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!aioe.org!fxM2Fz0ji7jDL5RtsbylbQ.user.gioia.aioe.org.POSTED!not-for-mail
From: this.is....@so.its.invalid (Martin)
Newsgroups: comp.os.cpm
Subject: Re: AM9511 - what is pi?
Date: Sat, 05 Jun 2021 14:25:48 +0200
Organization: Aioe.org NNTP Server
Lines: 39
Message-ID: <s9fqkm$1c1n$1@gioia.aioe.org>
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
NNTP-Posting-Host: fxM2Fz0ji7jDL5RtsbylbQ.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:20.0) Gecko/20100101 SeaMonkey/2.17.1
X-Notice: Filtered by postfilter v. 0.9.2
 by: Martin - Sat, 5 Jun 2021 12:25 UTC

Am 06/03/2021 10:35 PM, fred_...@hotmail.com schrieb:
> I have been working on DSD-80 debugger, and the AM9511 chip
> (using DSD-80 to debug code for the AM9511).
>
> I do not have an AM9511A, and am curious about it (working on
> an emulator for the chip.
>
> What is the value of PI on the chip?
>

[...]

>
> Thanks in advance!
> FredW
>

There is an old emulator from "Bill Haygood"

The internet archive has it!

<http://web.archive.org/web/20050421093649/http://www.z80a.org/>

<http://web.archive.org/web/20050421131207id_/http://www.z80a.org/z80.tbz2>

This emulator passes the test programs from "Frank Cringle".

AND it contains emulations of the AM9511 APU and the AM9512 FPP!

By the way, in apu.c, you find:
#define PI 0x02c90fdb

Hmmm, after ~20 years, we have found a bug :-)

Martin

Re: AM9511 - what is pi?

<20210605142216.24e9bcd2@earth>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2593&group=comp.os.cpm#2593

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx33.iad.POSTED!not-for-mail
From: me...@somewhere.foo (Wayne Hortensius)
Newsgroups: comp.os.cpm
Subject: Re: AM9511 - what is pi?
Message-ID: <20210605142216.24e9bcd2@earth>
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org>
<3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; arm-unknown-linux-gnueabihf)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Lines: 16
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Sat, 05 Jun 2021 20:22:16 UTC
Date: Sat, 5 Jun 2021 14:22:16 -0600
X-Received-Bytes: 1292
 by: Wayne Hortensius - Sat, 5 Jun 2021 20:22 UTC

> Wayne Hortensius -- if you are reading this... (or anyone else with
> the real chip) Can you confirm that on the REAL AM9511A,
> (low to high): the smallest and largest numbers are:
>
> 2.71051e-20 00 00 80 40
> 9.22337e+18 ff ff ff 3f

Adding 00 00 80 28 to FE FF FF 3F results in FF FF FF 3F.
Adding 00 00 80 28 to FF FF FF 3F sets the overflow flag.

Dividing 00 00 80 41 by 00 00 80 02 (2) results in 00 00 80 40.
Dividing 00 00 80 40 by 00 00 80 02 (2) sets the underflow flag.

Regards,
Wayne

Re: AM9511 - what is pi?

<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2596&group=comp.os.cpm#2596

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ae9:e84f:: with SMTP id a76mr7713269qkg.366.1623070328283; Mon, 07 Jun 2021 05:52:08 -0700 (PDT)
X-Received: by 2002:a05:6808:144e:: with SMTP id x14mr19924095oiv.166.1623070327998; Mon, 07 Jun 2021 05:52:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Mon, 7 Jun 2021 05:52:07 -0700 (PDT)
In-Reply-To: <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:956b:6a00:ec5e:c05b:3cc1:fa0a; posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:956b:6a00:ec5e:c05b:3cc1:fa0a
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com> <s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com> <20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fred_wei...@hotmail.com (fred_...@hotmail.com)
Injection-Date: Mon, 07 Jun 2021 12:52:08 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 43
 by: fred_...@hotmail.com - Mon, 7 Jun 2021 12:52 UTC

On Saturday, June 5, 2021 at 5:23:44 PM UTC-4, fred_...@hotmail.com wrote:
> On Saturday, June 5, 2021 at 4:22:18 PM UTC-4, Wayne Hortensius wrote:
> > > Wayne Hortensius -- if you are reading this... (or anyone else with
> > > the real chip) Can you confirm that on the REAL AM9511A,
> > > (low to high): the smallest and largest numbers are:
> > >
> > > 2.71051e-20 00 00 80 40
> > > 9.22337e+18 ff ff ff 3f
> > Adding 00 00 80 28 to FE FF FF 3F results in FF FF FF 3F.
> > Adding 00 00 80 28 to FF FF FF 3F sets the overflow flag.
> >
> > Dividing 00 00 80 41 by 00 00 80 02 (2) results in 00 00 80 40.
> > Dividing 00 00 80 40 by 00 00 80 02 (2) sets the underflow flag.
> >
> > Regards,
> > Wayne
> Wayne
>
> Many thanks! That is what I expected! Putting in the limits in the emulation...
>
> Will publish soon! (conversion is there, but not the emulation)
>
> FredW

Reviewing instructions against "Am9511 Algorithm Details" -- I have the following
question about the real hardware:

if you do SSUB or DSUB of 0 - 1, is the carry/borrow SET in the status register.
It would be convenient as an API if it were set... because: overflow is indicted
by error code (note the SSUB description "if the subtraction generates a borrow
it is reported in the carry status bit")

Also 0x8000 - (anything) SSUB should give overflow.

0x7fff + 0x7fff (SADD) should give NO CARRY, NO ZERO, NEGATIVE and
error code xx01 (overflow) in the status register.

Wayne -- if you could validate this, I would be very grateful!

I have written the floating side of am9511 emulator -- I am working on the fixed side -- getting
status bits correct to published documentation (carry, borrow, overflow).

FredW

Re: AM9511 - what is pi?

<20210607132835.50f62ad7@earth>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2598&group=comp.os.cpm#2598

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx46.iad.POSTED!not-for-mail
From: me...@somewhere.foo (Wayne Hortensius)
Newsgroups: comp.os.cpm
Subject: Re: AM9511 - what is pi?
Message-ID: <20210607132835.50f62ad7@earth>
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org>
<3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth>
<7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com>
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; arm-unknown-linux-gnueabihf)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Lines: 21
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Mon, 07 Jun 2021 19:28:35 UTC
Date: Mon, 7 Jun 2021 13:28:35 -0600
X-Received-Bytes: 1581
 by: Wayne Hortensius - Mon, 7 Jun 2021 19:28 UTC

> if you do SSUB or DSUB of 0 - 1, is the carry/borrow SET in the
> status register. It would be convenient as an API if it were set...
> because: overflow is indicted by error code (note the SSUB
> description "if the subtraction generates a borrow it is reported in
> the carry status bit")

SSUB(0,1) = 0xFFFF status 0x41 (sign, carry)

> Also 0x8000 - (anything) SSUB should give overflow.

SSUB(0x8000,1) = 0x7FFF status 0x02 (overflow)

> 0x7fff + 0x7fff (SADD) should give NO CARRY, NO ZERO, NEGATIVE and
> error code xx01 (overflow) in the status register.

SADD(0x7fff,0x7fff) = 0xFFFE status 0x42 (sign, overflow)

Regards,
Wayne

Re: AM9511 - what is pi?

<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2599&group=comp.os.cpm#2599

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a0c:c3d1:: with SMTP id p17mr19357674qvi.44.1623095702929; Mon, 07 Jun 2021 12:55:02 -0700 (PDT)
X-Received: by 2002:a9d:748e:: with SMTP id t14mr3830819otk.354.1623095702637; Mon, 07 Jun 2021 12:55:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Mon, 7 Jun 2021 12:55:02 -0700 (PDT)
In-Reply-To: <20210607132835.50f62ad7@earth>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:956b:6a00:ec5e:c05b:3cc1:fa0a; posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:956b:6a00:ec5e:c05b:3cc1:fa0a
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com> <s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com> <20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com> <4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com> <20210607132835.50f62ad7@earth>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fred_wei...@hotmail.com (fred_...@hotmail.com)
Injection-Date: Mon, 07 Jun 2021 19:55:02 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 34
 by: fred_...@hotmail.com - Mon, 7 Jun 2021 19:55 UTC

On Monday, June 7, 2021 at 3:28:37 PM UTC-4, Wayne Hortensius wrote:
> > if you do SSUB or DSUB of 0 - 1, is the carry/borrow SET in the
> > status register. It would be convenient as an API if it were set...
> > because: overflow is indicted by error code (note the SSUB
> > description "if the subtraction generates a borrow it is reported in
> > the carry status bit")
> SSUB(0,1) = 0xFFFF status 0x41 (sign, carry)
> > Also 0x8000 - (anything) SSUB should give overflow.
> SSUB(0x8000,1) = 0x7FFF status 0x02 (overflow
> > 0x7fff + 0x7fff (SADD) should give NO CARRY, NO ZERO, NEGATIVE and
> > error code xx01 (overflow) in the status register.
> SADD(0x7fff,0x7fff) = 0xFFFE status 0x42 (sign, overflow)
>
> Regards,
> Wayne

Wayne

That matches my expectations. That means my C code to do SADD,DADD, SSUB
and DSUB is ok... expect that SSUB(0x8000,1) giving 0x7FFF was a touch .... surprising.
I was expecting 0x8000 and overflow. Need to fix that...

I am working on SMUL and SMULU -- based on 8x8 to 16 multiply. Done, and being
tested. I may have question based on the test suite... Floating point to native is
done -- just validating each instruction. Leaving SDIV and DDIV.

I want to be able to link in port driver (given data/command ports) or native z80
emulation. This would allow us to check the basics of emulation against the
actual chip. After that, I will publish to github (adding to files there), send to
Udo Monk and David Hansel for incorporation into the basic emulators.

Thank you for all your support on this project! Without your help, this would be
a dreadful slog.

FredW

Re: AM9511 - what is pi?

<7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2628&group=comp.os.cpm#2628

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a37:65c3:: with SMTP id z186mr5195210qkb.481.1624667759487; Fri, 25 Jun 2021 17:35:59 -0700 (PDT)
X-Received: by 2002:a05:6808:65a:: with SMTP id z26mr13285222oih.85.1624667759251; Fri, 25 Jun 2021 17:35:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Fri, 25 Jun 2021 17:35:59 -0700 (PDT)
In-Reply-To: <95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.144.35.79; posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 136.144.35.79
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com> <s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com> <20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com> <4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com> <20210607132835.50f62ad7@earth> <95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fridtjof...@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Sat, 26 Jun 2021 00:35:59 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 47
 by: fridtjof.ma...@gmail - Sat, 26 Jun 2021 00:35 UTC

On Monday, June 7, 2021 at 3:55:03 PM UTC-4, fridtjof.ma...@gmail.com wrote:
> On Monday, June 7, 2021 at 3:28:37 PM UTC-4, Wayne Hortensius wrote:
> > > if you do SSUB or DSUB of 0 - 1, is the carry/borrow SET in the
> > > status register. It would be convenient as an API if it were set...
> > > because: overflow is indicted by error code (note the SSUB
> > > description "if the subtraction generates a borrow it is reported in
> > > the carry status bit")
> > SSUB(0,1) = 0xFFFF status 0x41 (sign, carry)
> > > Also 0x8000 - (anything) SSUB should give overflow.
> > SSUB(0x8000,1) = 0x7FFF status 0x02 (overflow
> > > 0x7fff + 0x7fff (SADD) should give NO CARRY, NO ZERO, NEGATIVE and
> > > error code xx01 (overflow) in the status register.
> > SADD(0x7fff,0x7fff) = 0xFFFE status 0x42 (sign, overflow)
> >
> > Regards,
> > Wayne
> Wayne
>
> That matches my expectations. That means my C code to do SADD,DADD, SSUB
> and DSUB is ok... expect that SSUB(0x8000,1) giving 0x7FFF was a touch .... surprising.
> I was expecting 0x8000 and overflow. Need to fix that...
>
> I am working on SMUL and SMULU -- based on 8x8 to 16 multiply. Done, and being
> tested. I may have question based on the test suite... Floating point to native is
> done -- just validating each instruction. Leaving SDIV and DDIV.
>
> I want to be able to link in port driver (given data/command ports) or native z80
> emulation. This would allow us to check the basics of emulation against the
> actual chip. After that, I will publish to github (adding to files there), send to
> Udo Monk and David Hansel for incorporation into the basic emulators.
>
> Thank you for all your support on this project! Without your help, this would be
> a dreadful slog.
>
> FredW
Wayne

Hope you catch this. I have checked in a lot to https://github.com/ratboy666/am9511

I am wondering -- do you have AM9511 on an 8080 or a Z80? If it is a Z80, can you try testhw.com
on your system. If an 8080, I will rebuild with Whitesmiths 2.1

The syntax is testhw -d port -s port where both ports are in decimal. -d is data port, -s is status port.
test.com is the *same* test, but linked with the emulator.

Thanks in advance!
FredW

Re: AM9511 - what is pi?

<20210627194458.2b75882e@earth>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2633&group=comp.os.cpm#2633

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx19.iad.POSTED!not-for-mail
From: me...@somewhere.foo (Wayne Hortensius)
Newsgroups: comp.os.cpm
Subject: Re: AM9511 - what is pi?
Message-ID: <20210627194458.2b75882e@earth>
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org>
<3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth>
<7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com>
<20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com>
<7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; arm-unknown-linux-gnueabihf)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Lines: 39
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Mon, 28 Jun 2021 01:44:59 UTC
Date: Sun, 27 Jun 2021 19:44:58 -0600
X-Received-Bytes: 2807
 by: Wayne Hortensius - Mon, 28 Jun 2021 01:44 UTC

> Wayne
>
> Hope you catch this. I have checked in a lot to
> https://github.com/ratboy666/am9511
>
> I am wondering -- do you have AM9511 on an 8080 or a Z80?

At the moment, neither. I pulled it out of an ancient Z180 board and
hooked it up to an Arduino Nano for testing, figuring it would be
easier than gathering up the necessary bits and pieces to make a
complete system around the Z180 board again.

And it is... up to a point. I've melded your test program with the I/O
stuff I wrote for the Nano and got it up and running today. I still have
to put together the bits for a software serial connection (I used the
Nano's hardware Rx/Tx lines in the data bus connection to the 9511 -
that was the only full 8 bit port exposed on the Nano). The little I2C
OLED display I was using was fine for simple tests but now I definitely
need something bigger.

But even at this stage I have found one thing for you to work on.
CHSS/CHSD/CHSF do not all share the same 5 bit opcode. Both CHSS and
CHSD are xxx10100, but CHSF is 00010101 <- watch that lsb.
Interestingly, 00010100 does do something, it changed 3.2 (02 CC CC CD)
to (FD 33 33 33). 2s complemented it as a 32 bit integer at first
glance.

The biggest headslapper at the moment is that I forgot that the sprintf
on the Atmega328 Arduinos doesn't do floats. There's an easy way around
that on the ARM processors, but it's a wee bit of cut/hack/file to fit
on the 328s. Not a showstopper, just slowing me down.

Oh, and the Nano displayed pi as 3.141593 rather than 3.142592. But
that's pretty meaningless for your purposes. I'll stick the converted
value into a quickie Hitech C program tonight and see what it prints
as.

Regards,
Wayne

Re: AM9511 - what is pi?

<20210627210045.5b701928@earth>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2634&group=comp.os.cpm#2634

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx20.iad.POSTED!not-for-mail
From: me...@somewhere.foo (Wayne Hortensius)
Newsgroups: comp.os.cpm
Subject: Re: AM9511 - what is pi?
Message-ID: <20210627210045.5b701928@earth>
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org>
<3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth>
<7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com>
<20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com>
<7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
<20210627194458.2b75882e@earth>
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; arm-unknown-linux-gnueabihf)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Lines: 12
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Mon, 28 Jun 2021 03:00:45 UTC
Date: Sun, 27 Jun 2021 21:00:45 -0600
X-Received-Bytes: 1506
 by: Wayne Hortensius - Mon, 28 Jun 2021 03:00 UTC

> Oh, and the Nano displayed pi as 3.141593 rather than 3.142592. But
> that's pretty meaningless for your purposes. I'll stick the converted
> value into a quickie Hitech C program tonight and see what it prints
> as.

For Hitech C, your code converted the 9511's 02 C9 0F DA to 42 C9 0F
DA, which Hitech C displayed as 3.141592, which is what you were
expecting I think.

Regards,
Wayne

Re: AM9511 - what is pi?

<20210628004849.372144b5@earth>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2635&group=comp.os.cpm#2635

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx47.iad.POSTED!not-for-mail
From: me...@somewhere.foo (Wayne Hortensius)
Newsgroups: comp.os.cpm
Subject: Re: AM9511 - what is pi?
Message-ID: <20210628004849.372144b5@earth>
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org>
<3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth>
<7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com>
<20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com>
<7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; arm-unknown-linux-gnueabihf)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Lines: 41
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Mon, 28 Jun 2021 06:48:50 UTC
Date: Mon, 28 Jun 2021 00:48:50 -0600
X-Received-Bytes: 1903
 by: Wayne Hortensius - Mon, 28 Jun 2021 06:48 UTC

Fred,

I got everything together. With the change to send 0x15 rather than
0x14 for CHSF, here's the output I'm seeing:

test am9511
am_test1
NOP: am9511 status = 0
PUPI: am9511 status = 0
PUPI: 3.14159 (should be 3.141592)
CHSS 2 status = 64 (64)
result -> -2
CHSS 0 status = 0 (32)
result -> 0
CHSS -30 status = 0 (0)
result -> 30
CHSS 32767 status = 0 (64)
result -> 32767
CHSS -32768 status = 66 (66)
result -> -32768
CHSD 2 status = 64 (64)
result -> -2
CHSD 0 status = 32 (32)
result -> 0
CHSD -30 status = 0 (0)
result -> 30
am_test2
CHSD 2147483647 status = 64 (64)
result -> -2147483647
CHSD -2147483648 status = 66 (66)
result -> -2147483648
CHSF 3.2 status = 64 (64)
result -> -3.2
CHSF 0 status = 32 (32)
result -> 0
am_test3

Regards,
Wayne

Re: AM9511 - what is pi?

<216e9038-6b1d-4c2e-9246-8b97f3682b6en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2637&group=comp.os.cpm#2637

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a37:9c89:: with SMTP id f131mr15717581qke.433.1624878054451;
Mon, 28 Jun 2021 04:00:54 -0700 (PDT)
X-Received: by 2002:a05:6830:4db:: with SMTP id s27mr5803166otd.213.1624878054168;
Mon, 28 Jun 2021 04:00:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Mon, 28 Jun 2021 04:00:53 -0700 (PDT)
In-Reply-To: <20210628004849.372144b5@earth>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:956b:6a00:4779:cd51:cd73:935f;
posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:956b:6a00:4779:cd51:cd73:935f
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com> <20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com> <7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
<20210628004849.372144b5@earth>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <216e9038-6b1d-4c2e-9246-8b97f3682b6en@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fridtjof...@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Mon, 28 Jun 2021 11:00:54 +0000
Content-Type: text/plain; charset="UTF-8"
 by: fridtjof.ma...@gmail - Mon, 28 Jun 2021 11:00 UTC

On Monday, June 28, 2021 at 2:48:52 AM UTC-4, Wayne Hortensius wrote:
> Fred,
>
> I got everything together. With the change to send 0x15 rather than
> 0x14 for CHSF, here's the output I'm seeing:
>
> test am9511
> am_test1
> NOP: am9511 status = 0
> PUPI: am9511 status = 0
> PUPI: 3.14159 (should be 3.141592)
> CHSS 2 status = 64 (64)
> result -> -2
> CHSS 0 status = 0 (32)
> result -> 0
> CHSS -30 status = 0 (0)
> result -> 30
> CHSS 32767 status = 0 (64)
> result -> 32767
> CHSS -32768 status = 66 (66)
> result -> -32768
> CHSD 2 status = 64 (64)
> result -> -2
> CHSD 0 status = 32 (32)
> result -> 0
> CHSD -30 status = 0 (0)
> result -> 30
> am_test2
> CHSD 2147483647 status = 64 (64)
> result -> -2147483647
> CHSD -2147483648 status = 66 (66)
> result -> -2147483648
> CHSF 3.2 status = 64 (64)
> result -> -3.2
> CHSF 0 status = 32 (32)
> result -> 0
> am_test3
>
>
> Regards,
> Wayne
Wayne

Beautiful! That is exactly as expected -- and the emulator is the same.
I fixed the CHSF thing -- thanks for the report. An idiot blind oversight
on my part. Now, I wonder what op 0x1b is? puzzled. The behaviour
of 00010100 matches the chip as well.

During this project, I have found two serious bugs in HI-TECH C 3.09:

long = (unsigned char);
long = (long << 8) | (unsigned char);
long = (long << 8) | (unsigned char);
long = (long << 8) | (unsigned char);

is borked: Work around is

int = (unsigned char)
long = int

int = (unsigned char)
long = long << 8
long = long | int

int = (unsigned char)
long = long << 8
long = long | int

int = (unsigned char)
long = long << 8
long = long | int

The OTHER bug I haven't completely isolated/fixed -- and it is a doozy.

It shows up in test6() -- crash under HI-TECH C, works fine under GCC

The testhw14.com (test1 through test4) and testhw58.com should work
on-chip, and test most features (no advanced functions). I have grated
the am9511 into zxcc (see howto.com) and put am9511.bas on as a test
in MBASIC that can use chip, or emulator. Due to the Hi-TECH iissue,
test58.com doesn't work (it works when compiled with gcc and run)

Thank you for rescuing your AM9511 chip! Your help on this project is
very appreciated. My plan is to continue use MBASIC to create a test harness
that can run on chip or on emulator. I have tied emulator into zxcc
(the emulator that allow HI-TECH C to be used on linux). I will tie
am9511 into RunCPM next. I want to also run down that HI-TECH bug,
and get a work-around (so far, not optimizer related, but the optimizer
causes a DIFFERENT crash, and, putting in printf() makes it go away!
This needs DDT). My direct email is fred(underscore)weigel(at)hotmail(dot)com

Fred Weigel

Re: AM9511 - what is pi?

<7c63163d-9d2f-45c4-86b5-a1b8343e8398n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2638&group=comp.os.cpm#2638

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ac8:5f0d:: with SMTP id x13mr23576601qta.69.1624910675674;
Mon, 28 Jun 2021 13:04:35 -0700 (PDT)
X-Received: by 2002:a05:6808:1285:: with SMTP id a5mr16033611oiw.97.1624910675400;
Mon, 28 Jun 2021 13:04:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Mon, 28 Jun 2021 13:04:35 -0700 (PDT)
In-Reply-To: <216e9038-6b1d-4c2e-9246-8b97f3682b6en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:956b:6a00:4779:cd51:cd73:935f;
posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:956b:6a00:4779:cd51:cd73:935f
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com> <20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com> <7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
<20210628004849.372144b5@earth> <216e9038-6b1d-4c2e-9246-8b97f3682b6en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7c63163d-9d2f-45c4-86b5-a1b8343e8398n@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fridtjof...@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Mon, 28 Jun 2021 20:04:35 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 114
 by: fridtjof.ma...@gmail - Mon, 28 Jun 2021 20:04 UTC

On Monday, June 28, 2021 at 7:00:55 AM UTC-4, fridtjof.ma...@gmail.com wrote:
> On Monday, June 28, 2021 at 2:48:52 AM UTC-4, Wayne Hortensius wrote:
> > Fred,
> >
> > I got everything together. With the change to send 0x15 rather than
> > 0x14 for CHSF, here's the output I'm seeing:
> >
> > test am9511
> > am_test1
> > NOP: am9511 status = 0
> > PUPI: am9511 status = 0
> > PUPI: 3.14159 (should be 3.141592)
> > CHSS 2 status = 64 (64)
> > result -> -2
> > CHSS 0 status = 0 (32)
> > result -> 0
> > CHSS -30 status = 0 (0)
> > result -> 30
> > CHSS 32767 status = 0 (64)
> > result -> 32767
> > CHSS -32768 status = 66 (66)
> > result -> -32768
> > CHSD 2 status = 64 (64)
> > result -> -2
> > CHSD 0 status = 32 (32)
> > result -> 0
> > CHSD -30 status = 0 (0)
> > result -> 30
> > am_test2
> > CHSD 2147483647 status = 64 (64)
> > result -> -2147483647
> > CHSD -2147483648 status = 66 (66)
> > result -> -2147483648
> > CHSF 3.2 status = 64 (64)
> > result -> -3.2
> > CHSF 0 status = 32 (32)
> > result -> 0
> > am_test3
> >
> >
> > Regards,
> > Wayne
> Wayne
>
> Beautiful! That is exactly as expected -- and the emulator is the same.
> I fixed the CHSF thing -- thanks for the report. An idiot blind oversight
> on my part. Now, I wonder what op 0x1b is? puzzled. The behaviour
> of 00010100 matches the chip as well.
>
> During this project, I have found two serious bugs in HI-TECH C 3.09:
>
> long = (unsigned char);
> long = (long << 8) | (unsigned char);
> long = (long << 8) | (unsigned char);
> long = (long << 8) | (unsigned char);
>
> is borked: Work around is
>
> int = (unsigned char)
> long = int
>
> int = (unsigned char)
> long = long << 8
> long = long | int
>
> int = (unsigned char)
> long = long << 8
> long = long | int
>
> int = (unsigned char)
> long = long << 8
> long = long | int
>
> The OTHER bug I haven't completely isolated/fixed -- and it is a doozy.
>
> It shows up in test6() -- crash under HI-TECH C, works fine under GCC
>
> The testhw14.com (test1 through test4) and testhw58.com should work
> on-chip, and test most features (no advanced functions). I have grated
> the am9511 into zxcc (see howto.com) and put am9511.bas on as a test
> in MBASIC that can use chip, or emulator. Due to the Hi-TECH iissue,
> test58.com doesn't work (it works when compiled with gcc and run)
>
> Thank you for rescuing your AM9511 chip! Your help on this project is
> very appreciated. My plan is to continue use MBASIC to create a test harness
> that can run on chip or on emulator. I have tied emulator into zxcc
> (the emulator that allow HI-TECH C to be used on linux). I will tie
> am9511 into RunCPM next. I want to also run down that HI-TECH bug,
> and get a work-around (so far, not optimizer related, but the optimizer
> causes a DIFFERENT crash, and, putting in printf() makes it go away!
> This needs DDT). My direct email is fred(underscore)weigel(at)hotmail(dot)com
>
> Fred Weigel

Wayne (and lurkers)

Sorry for the check-in "flurry". Everything that needed immediate attention is
now done -- hardware linkage works with HI-TECH C and the MBASIC
code works. Integration with Zxcc and RunCPM -- others are possible,
but left "as an exercise for the reader".

I am now going to deliberately "slow down" now. The focus is on finding that
HI-TECH C bug (using DSD-80) - and adding to the MBASIC test harness
(running parallel MBASIC single precision float and AM9511 float --
which actually uses the host floating point for now).

I will fix any NASTY bugs, but hope to only have a release next weekend,
and the following weekend.

So -- post (or email) any reports -- but don't expect new code drop till next
Saturday/Sunday.

Thanks! Happy upcoming Canada Day (and Fourth of July for my American friends).

Fred Weigel

Re: AM9511 - what is pi?

<af359cd1-029f-40ab-98a7-cdbb39cb63a9n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2647&group=comp.os.cpm#2647

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ac8:6b0f:: with SMTP id w15mr15868428qts.366.1626027461182; Sun, 11 Jul 2021 11:17:41 -0700 (PDT)
X-Received: by 2002:aca:eb86:: with SMTP id j128mr9608462oih.73.1626027460926; Sun, 11 Jul 2021 11:17:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 11 Jul 2021 11:17:40 -0700 (PDT)
In-Reply-To: <7c63163d-9d2f-45c4-86b5-a1b8343e8398n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:956b:6a00:4779:cd51:cd73:935f; posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:956b:6a00:4779:cd51:cd73:935f
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com> <s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com> <20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com> <4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com> <20210607132835.50f62ad7@earth> <95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com> <7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com> <20210628004849.372144b5@earth> <216e9038-6b1d-4c2e-9246-8b97f3682b6en@googlegroups.com> <7c63163d-9d2f-45c4-86b5-a1b8343e8398n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <af359cd1-029f-40ab-98a7-cdbb39cb63a9n@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fridtjof...@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Sun, 11 Jul 2021 18:17:41 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 125
 by: fridtjof.ma...@gmail - Sun, 11 Jul 2021 18:17 UTC

On Monday, June 28, 2021 at 4:04:36 PM UTC-4, fridtjof.ma...@gmail.com wrote:
> On Monday, June 28, 2021 at 7:00:55 AM UTC-4, fridtjof.ma...@gmail.com wrote:
> > On Monday, June 28, 2021 at 2:48:52 AM UTC-4, Wayne Hortensius wrote:
> > > Fred,
> > >
> > > I got everything together. With the change to send 0x15 rather than
> > > 0x14 for CHSF, here's the output I'm seeing:
> > >
> > > test am9511
> > > am_test1
> > > NOP: am9511 status = 0
> > > PUPI: am9511 status = 0
> > > PUPI: 3.14159 (should be 3.141592)
> > > CHSS 2 status = 64 (64)
> > > result -> -2
> > > CHSS 0 status = 0 (32)
> > > result -> 0
> > > CHSS -30 status = 0 (0)
> > > result -> 30
> > > CHSS 32767 status = 0 (64)
> > > result -> 32767
> > > CHSS -32768 status = 66 (66)
> > > result -> -32768
> > > CHSD 2 status = 64 (64)
> > > result -> -2
> > > CHSD 0 status = 32 (32)
> > > result -> 0
> > > CHSD -30 status = 0 (0)
> > > result -> 30
> > > am_test2
> > > CHSD 2147483647 status = 64 (64)
> > > result -> -2147483647
> > > CHSD -2147483648 status = 66 (66)
> > > result -> -2147483648
> > > CHSF 3.2 status = 64 (64)
> > > result -> -3.2
> > > CHSF 0 status = 32 (32)
> > > result -> 0
> > > am_test3
> > >
> > >
> > > Regards,
> > > Wayne
> > Wayne
> >
> > Beautiful! That is exactly as expected -- and the emulator is the same.
> > I fixed the CHSF thing -- thanks for the report. An idiot blind oversight
> > on my part. Now, I wonder what op 0x1b is? puzzled. The behaviour
> > of 00010100 matches the chip as well.
> >
> > During this project, I have found two serious bugs in HI-TECH C 3.09:
> >
> > long = (unsigned char);
> > long = (long << 8) | (unsigned char);
> > long = (long << 8) | (unsigned char);
> > long = (long << 8) | (unsigned char);
> >
> > is borked: Work around is
> >
> > int = (unsigned char)
> > long = int
> >
> > int = (unsigned char)
> > long = long << 8
> > long = long | int
> >
> > int = (unsigned char)
> > long = long << 8
> > long = long | int
> >
> > int = (unsigned char)
> > long = long << 8
> > long = long | int
> >
> > The OTHER bug I haven't completely isolated/fixed -- and it is a doozy.
> >
> > It shows up in test6() -- crash under HI-TECH C, works fine under GCC
> >
> > The testhw14.com (test1 through test4) and testhw58.com should work
> > on-chip, and test most features (no advanced functions). I have grated
> > the am9511 into zxcc (see howto.com) and put am9511.bas on as a test
> > in MBASIC that can use chip, or emulator. Due to the Hi-TECH iissue,
> > test58.com doesn't work (it works when compiled with gcc and run)
> >
> > Thank you for rescuing your AM9511 chip! Your help on this project is
> > very appreciated. My plan is to continue use MBASIC to create a test harness
> > that can run on chip or on emulator. I have tied emulator into zxcc
> > (the emulator that allow HI-TECH C to be used on linux). I will tie
> > am9511 into RunCPM next. I want to also run down that HI-TECH bug,
> > and get a work-around (so far, not optimizer related, but the optimizer
> > causes a DIFFERENT crash, and, putting in printf() makes it go away!
> > This needs DDT). My direct email is fred(underscore)weigel(at)hotmail(dot)com
> >
> > Fred Weigel
> Wayne (and lurkers)
>
> Sorry for the check-in "flurry". Everything that needed immediate attention is
> now done -- hardware linkage works with HI-TECH C and the MBASIC
> code works. Integration with Zxcc and RunCPM -- others are possible,
> but left "as an exercise for the reader".
>
> I am now going to deliberately "slow down" now. The focus is on finding that
> HI-TECH C bug (using DSD-80) - and adding to the MBASIC test harness
> (running parallel MBASIC single precision float and AM9511 float --
> which actually uses the host floating point for now).
>
> I will fix any NASTY bugs, but hope to only have a release next weekend,
> and the following weekend.
>
> So -- post (or email) any reports -- but don't expect new code drop till next
> Saturday/Sunday.
>
> Thanks! Happy upcoming Canada Day (and Fourth of July for my American friends).
>
> Fred Weigel
Wayne

I received a note from Alan Cox, about integrating am9511 into his emulator. Alan wanted
to support multiple AM9511 chips. I have update am9511 to allow that -- this took care
of the ugly HI-TECH C bug as well! (shrug).

void *am9511 = am_create(status, data); to create a new chip, then pass am9511 as the
first parameter to push/pop/status/command. This allow multiple devices to exist.

FredW

Re: AM9511 - what is pi?

<abe1cd3b-7dd5-4b8a-b740-deb96bd41d51n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2648&group=comp.os.cpm#2648

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:6214:131:: with SMTP id w17mr21624882qvs.60.1626027598623; Sun, 11 Jul 2021 11:19:58 -0700 (PDT)
X-Received: by 2002:a9d:585:: with SMTP id 5mr38247671otd.12.1626027598379; Sun, 11 Jul 2021 11:19:58 -0700 (PDT)
Path: i2pn2.org!rocksolid2!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 11 Jul 2021 11:19:58 -0700 (PDT)
In-Reply-To: <7c63163d-9d2f-45c4-86b5-a1b8343e8398n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:956b:6a00:4779:cd51:cd73:935f; posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:956b:6a00:4779:cd51:cd73:935f
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com> <s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com> <20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com> <4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com> <20210607132835.50f62ad7@earth> <95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com> <7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com> <20210628004849.372144b5@earth> <216e9038-6b1d-4c2e-9246-8b97f3682b6en@googlegroups.com> <7c63163d-9d2f-45c4-86b5-a1b8343e8398n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <abe1cd3b-7dd5-4b8a-b740-deb96bd41d51n@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fridtjof...@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Sun, 11 Jul 2021 18:19:58 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 121
 by: fridtjof.ma...@gmail - Sun, 11 Jul 2021 18:19 UTC

On Monday, June 28, 2021 at 4:04:36 PM UTC-4, fridtjof.ma...@gmail.com wrote:
> On Monday, June 28, 2021 at 7:00:55 AM UTC-4, fridtjof.ma...@gmail.com wrote:
> > On Monday, June 28, 2021 at 2:48:52 AM UTC-4, Wayne Hortensius wrote:
> > > Fred,
> > >
> > > I got everything together. With the change to send 0x15 rather than
> > > 0x14 for CHSF, here's the output I'm seeing:
> > >
> > > test am9511
> > > am_test1
> > > NOP: am9511 status = 0
> > > PUPI: am9511 status = 0
> > > PUPI: 3.14159 (should be 3.141592)
> > > CHSS 2 status = 64 (64)
> > > result -> -2
> > > CHSS 0 status = 0 (32)
> > > result -> 0
> > > CHSS -30 status = 0 (0)
> > > result -> 30
> > > CHSS 32767 status = 0 (64)
> > > result -> 32767
> > > CHSS -32768 status = 66 (66)
> > > result -> -32768
> > > CHSD 2 status = 64 (64)
> > > result -> -2
> > > CHSD 0 status = 32 (32)
> > > result -> 0
> > > CHSD -30 status = 0 (0)
> > > result -> 30
> > > am_test2
> > > CHSD 2147483647 status = 64 (64)
> > > result -> -2147483647
> > > CHSD -2147483648 status = 66 (66)
> > > result -> -2147483648
> > > CHSF 3.2 status = 64 (64)
> > > result -> -3.2
> > > CHSF 0 status = 32 (32)
> > > result -> 0
> > > am_test3
> > >
> > >
> > > Regards,
> > > Wayne
> > Wayne
> >
> > Beautiful! That is exactly as expected -- and the emulator is the same.
> > I fixed the CHSF thing -- thanks for the report. An idiot blind oversight
> > on my part. Now, I wonder what op 0x1b is? puzzled. The behaviour
> > of 00010100 matches the chip as well.
> >
> > During this project, I have found two serious bugs in HI-TECH C 3.09:
> >
> > long = (unsigned char);
> > long = (long << 8) | (unsigned char);
> > long = (long << 8) | (unsigned char);
> > long = (long << 8) | (unsigned char);
> >
> > is borked: Work around is
> >
> > int = (unsigned char)
> > long = int
> >
> > int = (unsigned char)
> > long = long << 8
> > long = long | int
> >
> > int = (unsigned char)
> > long = long << 8
> > long = long | int
> >
> > int = (unsigned char)
> > long = long << 8
> > long = long | int
> >
> > The OTHER bug I haven't completely isolated/fixed -- and it is a doozy.
> >
> > It shows up in test6() -- crash under HI-TECH C, works fine under GCC
> >
> > The testhw14.com (test1 through test4) and testhw58.com should work
> > on-chip, and test most features (no advanced functions). I have grated
> > the am9511 into zxcc (see howto.com) and put am9511.bas on as a test
> > in MBASIC that can use chip, or emulator. Due to the Hi-TECH iissue,
> > test58.com doesn't work (it works when compiled with gcc and run)
> >
> > Thank you for rescuing your AM9511 chip! Your help on this project is
> > very appreciated. My plan is to continue use MBASIC to create a test harness
> > that can run on chip or on emulator. I have tied emulator into zxcc
> > (the emulator that allow HI-TECH C to be used on linux). I will tie
> > am9511 into RunCPM next. I want to also run down that HI-TECH bug,
> > and get a work-around (so far, not optimizer related, but the optimizer
> > causes a DIFFERENT crash, and, putting in printf() makes it go away!
> > This needs DDT). My direct email is fred(underscore)weigel(at)hotmail(dot)com
> >
> > Fred Weigel
> Wayne (and lurkers)
>
> Sorry for the check-in "flurry". Everything that needed immediate attention is
> now done -- hardware linkage works with HI-TECH C and the MBASIC
> code works. Integration with Zxcc and RunCPM -- others are possible,
> but left "as an exercise for the reader".
>
> I am now going to deliberately "slow down" now. The focus is on finding that
> HI-TECH C bug (using DSD-80) - and adding to the MBASIC test harness
> (running parallel MBASIC single precision float and AM9511 float --
> which actually uses the host floating point for now).
>
> I will fix any NASTY bugs, but hope to only have a release next weekend,
> and the following weekend.
>
> So -- post (or email) any reports -- but don't expect new code drop till next
> Saturday/Sunday.
>
> Thanks! Happy upcoming Canada Day (and Fourth of July for my American friends).
>
> Fred Weigel

And, work on the test harness continues -- I am using CHAIN MERGE to bring in code into
the tester, and executing against the chip, and the code brought in. Slow, but very
flexible.

FredW

Re: AM9511 - what is pi?

<40723f9d-7a8b-43dd-8169-f92979c1b7d8n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2649&group=comp.os.cpm#2649

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a37:2d04:: with SMTP id t4mr4552383qkh.160.1626185547818;
Tue, 13 Jul 2021 07:12:27 -0700 (PDT)
X-Received: by 2002:a9d:51c5:: with SMTP id d5mr3822243oth.186.1626185547566;
Tue, 13 Jul 2021 07:12:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Tue, 13 Jul 2021 07:12:27 -0700 (PDT)
In-Reply-To: <20210628004849.372144b5@earth>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:956b:6a00:4779:cd51:cd73:935f;
posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:956b:6a00:4779:cd51:cd73:935f
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com> <20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com> <7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
<20210628004849.372144b5@earth>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <40723f9d-7a8b-43dd-8169-f92979c1b7d8n@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fridtjof...@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Tue, 13 Jul 2021 14:12:27 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 57
 by: fridtjof.ma...@gmail - Tue, 13 Jul 2021 14:12 UTC

On Monday, June 28, 2021 at 2:48:52 AM UTC-4, Wayne Hortensius wrote:
> Fred,
>
> I got everything together. With the change to send 0x15 rather than
> 0x14 for CHSF, here's the output I'm seeing:
>
> test am9511
> am_test1
> NOP: am9511 status = 0
> PUPI: am9511 status = 0
> PUPI: 3.14159 (should be 3.141592)
> CHSS 2 status = 64 (64)
> result -> -2
> CHSS 0 status = 0 (32)
> result -> 0
> CHSS -30 status = 0 (0)
> result -> 30
> CHSS 32767 status = 0 (64)
> result -> 32767
> CHSS -32768 status = 66 (66)
> result -> -32768
> CHSD 2 status = 64 (64)
> result -> -2
> CHSD 0 status = 32 (32)
> result -> 0
> CHSD -30 status = 0 (0)
> result -> 30
> am_test2
> CHSD 2147483647 status = 64 (64)
> result -> -2147483647
> CHSD -2147483648 status = 66 (66)
> result -> -2147483648
> CHSF 3.2 status = 64 (64)
> result -> -3.2
> CHSF 0 status = 32 (32)
> result -> 0
> am_test3
>
>
> Regards,
> Wayne
Wayne

I do have another question -

If I do
SMUL -10 * -3 I get result 30, status 2

and

SMUL 10 * -3, result -30, status 66

does the real chip do this? or is the status corrected for signed multiply?
It is easy to adjust for, but the chip documentation is unclear...

Thanks in advance,

FredW

Re: AM9511 - what is pi?

<2a417f12-3d5b-4ed5-9086-d70fa0fafcc3n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2650&group=comp.os.cpm#2650

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a37:9e07:: with SMTP id h7mr4417459qke.481.1626187616411;
Tue, 13 Jul 2021 07:46:56 -0700 (PDT)
X-Received: by 2002:a9d:585:: with SMTP id 5mr4062824otd.12.1626187616142;
Tue, 13 Jul 2021 07:46:56 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Tue, 13 Jul 2021 07:46:55 -0700 (PDT)
In-Reply-To: <40723f9d-7a8b-43dd-8169-f92979c1b7d8n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:956b:6a00:4779:cd51:cd73:935f;
posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:956b:6a00:4779:cd51:cd73:935f
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com> <20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com> <7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
<20210628004849.372144b5@earth> <40723f9d-7a8b-43dd-8169-f92979c1b7d8n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2a417f12-3d5b-4ed5-9086-d70fa0fafcc3n@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fridtjof...@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Tue, 13 Jul 2021 14:46:56 +0000
Content-Type: text/plain; charset="UTF-8"
 by: fridtjof.ma...@gmail - Tue, 13 Jul 2021 14:46 UTC

On Tuesday, July 13, 2021 at 10:12:28 AM UTC-4, fridtjof.ma...@gmail.com wrote:
> On Monday, June 28, 2021 at 2:48:52 AM UTC-4, Wayne Hortensius wrote:
> > Fred,
> >
> > I got everything together. With the change to send 0x15 rather than
> > 0x14 for CHSF, here's the output I'm seeing:
> >
> > test am9511
> > am_test1
> > NOP: am9511 status = 0
> > PUPI: am9511 status = 0
> > PUPI: 3.14159 (should be 3.141592)
> > CHSS 2 status = 64 (64)
> > result -> -2
> > CHSS 0 status = 0 (32)
> > result -> 0
> > CHSS -30 status = 0 (0)
> > result -> 30
> > CHSS 32767 status = 0 (64)
> > result -> 32767
> > CHSS -32768 status = 66 (66)
> > result -> -32768
> > CHSD 2 status = 64 (64)
> > result -> -2
> > CHSD 0 status = 32 (32)
> > result -> 0
> > CHSD -30 status = 0 (0)
> > result -> 30
> > am_test2
> > CHSD 2147483647 status = 64 (64)
> > result -> -2147483647
> > CHSD -2147483648 status = 66 (66)
> > result -> -2147483648
> > CHSF 3.2 status = 64 (64)
> > result -> -3.2
> > CHSF 0 status = 32 (32)
> > result -> 0
> > am_test3
> >
> >
> > Regards,
> > Wayne
> Wayne
>
> I do have another question -
>
> If I do
> SMUL -10 * -3 I get result 30, status 2
>
> and
>
> SMUL 10 * -3, result -30, status 66
>
> does the real chip do this? or is the status corrected for signed multiply?
> It is easy to adjust for, but the chip documentation is unclear...
>
> Thanks in advance,
>
> FredW
The code currently in ova.c is from a strict reading of the AM9511 specification.

However, the fact that the chip reports overflow on 0x8000 * <anything> would seem
to indicate that the multiply function is/should be doing sign correction. Then:

a * b should be abs(a) * abs(b). and the sign applied to the result.

which is easy enough... but... what about the upper? As it is, signed multiply is
ok, but overflow is wrong --unless-- interpreted as unsigned multiply!

I just don't know how the chip does it -- thus the question SMUL 3 * 10, SMUL -3 * 10, and
SMUL -3 * -10 will tell us (status result). Also SMUU of the same 3 cases (status and result)
would be helpful. I will just build out a "test7" test of it.

Thanks in advance. The result of the emulator I am reasonably happy with now. Will be
doing testing against some known trig results.

FredW

Re: AM9511 - what is pi?

<20210713114240.68fdda02@earth>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2651&group=comp.os.cpm#2651

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx41.iad.POSTED!not-for-mail
From: me...@somewhere.foo (Wayne Hortensius)
Newsgroups: comp.os.cpm
Subject: Re: AM9511 - what is pi?
Message-ID: <20210713114240.68fdda02@earth>
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org>
<3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth>
<7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com>
<20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com>
<7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
<20210628004849.372144b5@earth>
<40723f9d-7a8b-43dd-8169-f92979c1b7d8n@googlegroups.com>
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; arm-unknown-linux-gnueabihf)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Lines: 28
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Tue, 13 Jul 2021 17:42:40 UTC
Date: Tue, 13 Jul 2021 11:42:40 -0600
X-Received-Bytes: 1653
 by: Wayne Hortensius - Tue, 13 Jul 2021 17:42 UTC

> Wayne
>
> I do have another question -
>
> If I do
> SMUL -10 * -3 I get result 30, status 2
>
> and
>
> SMUL 10 * -3, result -30, status 66
>
> does the real chip do this? or is the status corrected for signed
> multiply? It is easy to adjust for, but the chip documentation is
> unclear...
>
> Thanks in advance,
>
> FredW

I get:

SMUL: -10 * -3 = 30 status = 0
SMUL: 10 * -3 = -30 status = 64

No overflow error code in either case.

Regards,
Wayne

Re: AM9511 - what is pi?

<20210713115744.7f339223@earth>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2652&group=comp.os.cpm#2652

  copy link   Newsgroups: comp.os.cpm
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx41.iad.POSTED!not-for-mail
From: me...@somewhere.foo (Wayne Hortensius)
Newsgroups: comp.os.cpm
Subject: Re: AM9511 - what is pi?
Message-ID: <20210713115744.7f339223@earth>
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org>
<3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth>
<7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com>
<20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com>
<7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
<20210628004849.372144b5@earth>
<40723f9d-7a8b-43dd-8169-f92979c1b7d8n@googlegroups.com>
<2a417f12-3d5b-4ed5-9086-d70fa0fafcc3n@googlegroups.com>
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; arm-unknown-linux-gnueabihf)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Lines: 16
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Tue, 13 Jul 2021 17:57:44 UTC
Date: Tue, 13 Jul 2021 11:57:44 -0600
X-Received-Bytes: 1704
 by: Wayne Hortensius - Tue, 13 Jul 2021 17:57 UTC

> I just don't know how the chip does it -- thus the question SMUL 3 *
> 10, SMUL -3 * 10, and SMUL -3 * -10 will tell us (status result).
> Also SMUU of the same 3 cases (status and result) would be helpful. I
> will just build out a "test7" test of it.

SMUL: 10 * 3 = 30 status 0
SMUU: 10 * 3 = 0 status 32
SMUL: -10 * -3 = 30 status 0
SMUU: -10 * -3 = 0 status 32
SMUL: 10 * -3 = -30 status 64
SMUU: 10 * -3 = -1 status 64

Regards,
Wayne

Re: AM9511 - what is pi?

<11217079-2571-4970-9afe-8050c6ab7fcen@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2653&group=comp.os.cpm#2653

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ac8:5e08:: with SMTP id h8mr5282068qtx.54.1626200298503;
Tue, 13 Jul 2021 11:18:18 -0700 (PDT)
X-Received: by 2002:aca:1918:: with SMTP id l24mr526758oii.29.1626200298246;
Tue, 13 Jul 2021 11:18:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Tue, 13 Jul 2021 11:18:18 -0700 (PDT)
In-Reply-To: <20210713114240.68fdda02@earth>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:956b:6a00:4779:cd51:cd73:935f;
posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:956b:6a00:4779:cd51:cd73:935f
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com> <20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com> <7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
<20210628004849.372144b5@earth> <40723f9d-7a8b-43dd-8169-f92979c1b7d8n@googlegroups.com>
<20210713114240.68fdda02@earth>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <11217079-2571-4970-9afe-8050c6ab7fcen@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fridtjof...@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Tue, 13 Jul 2021 18:18:18 +0000
Content-Type: text/plain; charset="UTF-8"
 by: fridtjof.ma...@gmail - Tue, 13 Jul 2021 18:18 UTC

On Tuesday, July 13, 2021 at 1:42:42 PM UTC-4, Wayne Hortensius wrote:
> > Wayne
> >
> > I do have another question -
> >
> > If I do
> > SMUL -10 * -3 I get result 30, status 2
> >
> > and
> >
> > SMUL 10 * -3, result -30, status 66
> >
> > does the real chip do this? or is the status corrected for signed
> > multiply? It is easy to adjust for, but the chip documentation is
> > unclear...
> >
> > Thanks in advance,
> >
> > FredW
> I get:
>
> SMUL: -10 * -3 = 30 status = 0
> SMUL: 10 * -3 = -30 status = 64
>
> No overflow error code in either case.
>
> Regards,
> Wayne

Wayne

Thanks a bunch! I am correcting the emulator then. This means that multiply is sign corrected.
Also, that the documentation is wrong! But.. I suspected

FredW

Re: AM9511 - what is pi?

<8f08f42b-d52b-43c9-8374-98b675de5064n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2656&group=comp.os.cpm#2656

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ad4:4690:: with SMTP id bq16mr10178394qvb.23.1626262150455;
Wed, 14 Jul 2021 04:29:10 -0700 (PDT)
X-Received: by 2002:a9d:585:: with SMTP id 5mr8031275otd.12.1626262150193;
Wed, 14 Jul 2021 04:29:10 -0700 (PDT)
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Wed, 14 Jul 2021 04:29:09 -0700 (PDT)
In-Reply-To: <11217079-2571-4970-9afe-8050c6ab7fcen@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:956b:6a00:4779:cd51:cd73:935f;
posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:956b:6a00:4779:cd51:cd73:935f
References: <b269ebe3-72ca-41b9-a472-3b0f09a60c11n@googlegroups.com>
<s9fqkm$1c1n$1@gioia.aioe.org> <3d1c0983-71d0-49a0-abbf-2e54563c59bfn@googlegroups.com>
<20210605142216.24e9bcd2@earth> <7facd634-25df-4e49-88ac-4e57852a8b2an@googlegroups.com>
<4b381b82-aef4-4b1e-9963-e690ae40aa42n@googlegroups.com> <20210607132835.50f62ad7@earth>
<95bdbc53-f012-49b7-9ea2-253ef173b25cn@googlegroups.com> <7769e204-535f-4d39-b844-6b0d10239a52n@googlegroups.com>
<20210628004849.372144b5@earth> <40723f9d-7a8b-43dd-8169-f92979c1b7d8n@googlegroups.com>
<20210713114240.68fdda02@earth> <11217079-2571-4970-9afe-8050c6ab7fcen@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8f08f42b-d52b-43c9-8374-98b675de5064n@googlegroups.com>
Subject: Re: AM9511 - what is pi?
From: fridtjof...@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Wed, 14 Jul 2021 11:29:10 +0000
Content-Type: text/plain; charset="UTF-8"
 by: fridtjof.ma...@gmail - Wed, 14 Jul 2021 11:29 UTC

On Tuesday, July 13, 2021 at 2:18:19 PM UTC-4, fridtjof.ma...@gmail.com wrote:
> On Tuesday, July 13, 2021 at 1:42:42 PM UTC-4, Wayne Hortensius wrote:
> > > Wayne
> > >
> > > I do have another question -
> > >
> > > If I do
> > > SMUL -10 * -3 I get result 30, status 2
> > >
> > > and
> > >
> > > SMUL 10 * -3, result -30, status 66
> > >
> > > does the real chip do this? or is the status corrected for signed
> > > multiply? It is easy to adjust for, but the chip documentation is
> > > unclear...
> > >
> > > Thanks in advance,
> > >
> > > FredW
> > I get:
> >
> > SMUL: -10 * -3 = 30 status = 0
> > SMUL: 10 * -3 = -30 status = 64
> >
> > No overflow error code in either case.
> >
> > Regards,
> > Wayne
> Wayne
>
> Thanks a bunch! I am correcting the emulator then. This means that multiply is sign corrected.
> Also, that the documentation is wrong! But.. I suspected
>
> FredW
All Righty Then!

am9511 update with correction for SMUL/SMUU/DMUL/DMUU sign is on my github.
This just takes the abs of the args, multiplies and puts the result sign on.

Test cases added for SMUL/SMUU. One test case for DMUL/DMUU (need to split test cases
again for size on CP/M).

Enjoy!
FredW

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor