The Museum of HP Calculators

HP Forum Archive 17

[ Return to Index | Top of Index ]

MCODE utility Programs
Message #1 Posted by Jeff Davis on 6 Oct 2007, 4:11 p.m.

I have been looking over many issues of the PPC Journal and the Datafile as well as reading MCODE for Beginners. I have found some general utility functions that I have added that can assist while using MCODE. HEX-OCT, OCT-HEX (from MCODE for Beginners), ASRCH (from Datafile V8N2 used with the labels ROM), ROMSUM (fromDatafile V3N1 and I tried to get the "CALC" MCODE program to work but there must be some typo's in the code from Datafile V8N6.
Are there any other utility type programs that you may have used that assist with MCODE generation?
I am Currently using the DAVID-2C with Mainframe Labels.
Has anyone ever tried to get this "CALC" program to work?
This program calculates the Jump distances much like the User Code program in the HEPAX manual.
Please let me know your thoughts.
Thanks much,
Jeff

      
HP-41 MCODE Programming
Message #2 Posted by Jeff Davis on 9 Oct 2007, 6:58 p.m.,
in response to message #1 by Jeff Davis

Is there anyone out there that stills likes to program the HP-41 with MCODE? I need a little help on how to make a MCODE program Prompt for data. Any help would be appreciated. Jeff

            
Re: HP-41 MCODE Programming
Message #3 Posted by Doug on 9 Oct 2007, 10:26 p.m.,
in response to message #2 by Jeff Davis

Hi Jeff,

Exactly what type of data and when? I ask when because there are some auto-prompts at entry. Mcode for Beginners covers these and devotes a large section to a hex data input function.

Best

                  
Re: HP-41 MCODE Programming
Message #4 Posted by Jeff Davis on 14 Oct 2007, 11:58 a.m.,
in response to message #3 by Doug

Thanks for all who responded. I am trying to write a MCODE program to calculate the inductance of a coil. There are three inputs, Coil Length, Coil Diameter and Number of turns on the coil. I have tried using some of the technics in the MCODE for Beginners that are used on the OCT-HEX and HEX-OCT programs. The best I can get is the Prompt to Flash in the display but it does not R/S. Below is the listing for this. I have found the PROMPT function in the VASM and it uses the XPROMP routine which prompts and R/S. I will be trying this this evening to see if this works. My goal would be to load directly to C and not have to use READ 3(x) to get the data to C. I would like the program to R/S with , for example, Coil Lg.? in the display. Then accept the number entered like 1.500" or 1.750" similar to the User Code PROMPT. Any way, thanks for responding and any suggestions would be greatly appreciated.
FUNCTION 00C4 ... ... ... "IND1"
F 00C4 345 040 ... ?NC XQ 10D1
F 00C6 3C1 0B0 ... ?NC XQ 2CF0
F 00C8 003 ... ... JNC +00 00C8
F 00C9 00F ... ... JC +01 00CA
F 00CA 009 00C ... ?NC XQ 0302
F 00CC 020 ... ... XQ->GO
F 00CD 00C ... ... ?FSET 3
F 00CE 007 ... ... JC +00 00CE
F 00CF 03F ... ... JC +07 00D6
F 00D0 220 ... ... C=KEY
F 00D1 115 038 ... ?NC XQ 0E45
F 00D3 3E0 ... ... RTN
F 00D4 220 ... ... C=KEY
F 00D5 3DD 0AC ... ?NC XQ 2BF7
F 00D7 149 024 ... ?NC XQ 0952
F 00D9 375 03C ... ?NC XQ 0FDD
F 00DB 1FA ... ... C=C+C M
F 00DC 38C ... ... ?FSET 0
F 00DD 360 ... ... ?C_RTN
F 00DE 268 ... ... WRIT ( 9)Q
F 00DF 278 ... ... READ ( 9)Q
F 00E0 0E8 ... ... WRIT ( 3)X

Thanks Meindert for this great Disassembler in the Mldl2k software!

      
Re: MCODE utility Programs
Message #5 Posted by Vieira, Luiz C. (Brazil) on 10 Oct 2007, 1:28 a.m.,
in response to message #1 by Jeff Davis

Hi, Jeff;

the only info (I think) I can add is to have a look at the AECROM listings and technics. I remember reading in the MCODE for beginners that a user-coded program may be 'disguised' as MCODE (function), so the calculator executes it as a function, although it behaves as a running program. If there is no restriction to what functions to use, data might be input thru PROMPT, I guess. Have no idea of what would happen if [PRGM] is pressed while the 'disguised' program is stopped. I mentioned the AECROM because some of its functions seem to be coded this way.

My 2¢ (maybe 1¢...)

Luiz (Brazil)


[ Return to Index | Top of Index ]

Go back to the main exhibit hall