Post Reply 
(HP71B) ASM question
08-22-2024, 09:32 AM (This post was last modified: 08-22-2024 12:15 PM by floppy.)
Post: #24
RE: (HP71B) ASM question
Since beeping is healthy, lets create the TONE word like in HP41.
Usefull? perhaps

Entry points
Code:
=ABS    EQU #E1A23            (n -- |n|)
=SAVEFP EQU #E717A            save Forth pointer
=HDFLT  EQU #1B31B            change hex integ A(A) to 12dig float in A(W) exit DEC mode
=MP2-12 EQU #0C432            12 digit * (A) * (C) result 15dig in (A,B) 
=RESD1  EQU #0E1EE            reduce (AB) in (C), dont alter D1
=AD2-12 EQU #0C35F            12 digit add = (A) + (C) 15dig result in (A,B)
=BP     EQU #0EADF            make beep float A HZ Float C duration sec pdf ids3 page 1625
=GETFP  EQU #E71A5            restore Forth pointers

Code:
* create HP41 like tone function with input 0 (low)..9 (high)
* input in the integer stack (in HP41 it is as a line command TONE x)
* ( n -- ) TONE
* 0 .. 394 Hz  >> Value 394 + (43.777 * N) 
* 1 .. 437.8
* ..
* 8 .. 744.2
* 9 .. 788 HZ
* length 0,28s
* however inputs higher than 9 will be accepted
* negative values -8 (example) will be taken as 8
* tested Aug22 2024
* use  5 TONE in Forth prompt
       WORD 'TONE'
*
       GOSBVL =ABS           for positive whatever input was
       GOSBVL =SAVEFP
*
* not tested/completed; if bigger than 9, reduce with MOD 10
*       C=0    W
*       LCHEX  100000000000001  ? Integer format in integ stack?
*       D1=D1- 5
*       DAT1=C A
*       GOSBVL =MOD 
*
       A=DAT1 A
       GOSBVL =HDFLT          change A(A) to float A(W) 12 digits for further calc. exit with DEC mode
       C=0    S
       P=     0
       LCHEX  437777777777001 
       GOSBVL =MP2-12        result into (A,B)
       GOSBVL =RESD1         result into C
       R0=C
       C=0    S              S instead of W for less size?
       P=     0
       LCHEX  394000000000002
       A=R0
       GOSBVL =AD2-12        result into (A,B)
       GOSBVL =RESD1         result into C as 12 digit
       R0=C                  R0 Hz 
       C=0    W
       P=     0
       LCHEX  280000000000999 C duration
       SETDEC
       A=R0
       GOSBVL =BP
       GOSBVL =GETFP
       D1=D1+ 5              take the value out of the stack
       RTNCC

UPDATE: missing entry points included

HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(HP71B) ASM question - floppy - 07-15-2024, 04:50 PM
RE: (HP71B) ASM question - ThomasF - 07-16-2024, 06:05 AM
RE: (HP71B) ASM question - floppy - 07-16-2024, 07:22 AM
RE: (HP71B) ASM question - rprosperi - 07-16-2024, 12:07 PM
RE: (HP71B) ASM question - ThomasF - 07-16-2024, 07:00 AM
RE: (HP71B) ASM question - floppy - 07-23-2024, 05:54 PM
RE: (HP71B) ASM question - rprosperi - 07-23-2024, 06:10 PM
RE: (HP71B) ASM question - floppy - 07-29-2024, 09:25 AM
RE: (HP71B) ASM question - brouhaha - 07-30-2024, 06:47 AM
RE: (HP71B) ASM question - J-F Garnier - 07-30-2024, 07:54 AM
RE: (HP71B) ASM question - KeithB - 08-03-2024, 10:56 PM
RE: (HP71B) ASM question - brouhaha - 08-05-2024, 04:21 AM
RE: (HP71B) ASM question - J-F Garnier - 08-05-2024, 02:12 PM
RE: (HP71B) ASM question - J-F Garnier - 07-30-2024, 07:28 AM
RE: (HP71B) ASM question - brouhaha - 07-30-2024, 06:51 AM
RE: (HP71B) ASM question - floppy - 08-03-2024, 04:47 PM
RE: (HP71B) ASM question - rprosperi - 08-03-2024, 05:06 PM
RE: (HP71B) ASM question - floppy - 08-03-2024, 05:40 PM
RE: (HP71B) ASM question - floppy - 08-04-2024, 11:45 AM
RE: (HP71B) ASM question - rprosperi - 08-05-2024, 11:50 AM
RE: (HP71B) ASM question - floppy - 08-17-2024, 08:46 AM
RE: (HP71B) ASM question - floppy - 08-17-2024, 01:40 PM
RE: (HP71B) ASM question - floppy - 08-22-2024 09:32 AM
RE: (HP71B) ASM question - floppy - 08-23-2024, 07:37 AM
RE: (HP71B) ASM question - floppy - 09-03-2024, 03:36 PM
RE: (HP71B) ASM question - floppy - 09-24-2024, 12:00 PM
RE: (HP71B) ASM question - J-F Garnier - 09-25-2024, 07:18 AM
RE: (HP71B) ASM question - floppy - 10-07-2024, 11:24 AM
RE: (HP71B) ASM question - floppy - 10-16-2024, 10:00 AM
RE: (HP71B) ASM question - floppy - 10-18-2024, 08:55 AM



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