Post Reply 
Benchmarks 71B versus 48GX
06-17-2020, 08:44 PM
Post: #21
RE: Benchmarks 71B versus 48GX
(06-17-2020 12:36 PM)J-F Garnier Wrote:  If it's really a 1LK7 then it's the same than used in the 28C and it supports the PC=(A) opcode. It may be a way to detect the CPU version by software. I may try.

Ok, I had to do it...

Here is the CPUV function that returns 1 if the CPU executes PC=(A), otherwise 0.

I got 0 on my oldest HP71s, but 1 on my 2842Axxx machine.

Note that both Emu71/Win and Emu71/DOS return 1 since they support the new opcodes.

Forth/assembler needed to enter and assemble the CPUV keyword.
Code:
       LEX 'CPUVER'
       ID #5C
       MSG 0
       POLL 0
       ENTRY CPUV
       CHAR #F
       KEY 'CPUV'
       TOKEN 1
       ENDTXT

FNRTN1 EQU #0F216
FUNCR0 EQU #2F89B

       NIBHEX 00
CPUV
* install hook
       GOSUB IHOOK 
HOOK   
       P= 14
       C=C+1 P   * return 1 if PC=(A) was effective
       GOTO ret

* set FUNCR0 to point to HOOK       
IHOOK  C=RSTK
       AD0EX          * save D0
       D0=(5) =FUNCR0
       DAT0=C A
* now set A[A] to point to FUNCR0
       AD0EX          * and restore D0
* prepare C
       C=0 W
* try PC=(A) 
       NIBHEX 808C     PC=(A)
* return 0 if nop
       C=0 W
       C=0 W
* return to Basic
ret    GOVLNG FNRTN1
       
       END

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Benchmarks 71B versus 48GX - RMollov - 06-22-2020, 04:48 AM
RE: Benchmarks 71B versus 48GX - KimH - 06-17-2020, 11:43 AM
RE: Benchmarks 71B versus 48GX - KimH - 06-17-2020, 12:25 PM
RE: Benchmarks 71B versus 48GX - KimH - 06-17-2020, 02:12 PM
RE: Benchmarks 71B versus 48GX - J-F Garnier - 06-17-2020 08:44 PM
RE: Benchmarks 71B versus 48GX - KimH - 06-18-2020, 06:09 AM
RE: Benchmarks 71B versus 48GX - KimH - 06-18-2020, 07:08 AM
RE: Benchmarks 71B versus 48GX - HP67 - 05-05-2014, 01:42 PM
RE: Benchmarks 71B versus 48GX - rprosperi - 06-17-2020, 10:23 PM
RE: Benchmarks 71B versus 48GX - KimH - 06-19-2020, 04:40 PM



User(s) browsing this thread: 1 Guest(s)