Hi,
Sometimes it is convenient to see what it is into stack, when no printer, to better programing.
Here is a little routine that I use always on my HP41, with WP34s, I use Printer virtual.
From PPC and HP41 examples book.
Gérard.
(11-02-2015 08:56 PM)ggauny@live.fr Wrote: [ -> ]Here is a little routine that I use always on my HP41, with WP34s, I use Printer virtual.
The 34s has a SHOW command (g EXIT).
Try it (use the up and down arrows) and see what you get. ;-)
Dieter
Thanks for posting the nifty little program.
Bonjour Gérard,
Merci pour ce petit programme.
J'aime particulièrement la ligne 18 qui permet au programme d'être très compact.
Cordialement,
Sylvain
----
Hello Gérard,
Thanks for this small program.
By removing the unnecessary RDN or RUP in the main body, step 18 make it very compact
Best regards,
Sylvain
Loop-unrolling saves 3 bytes but makes it 2 lines longer:
Code:
01 LBL "STKDISP"
02 "L="
03 ARCL L
04 AVIEW
05 PSE
06 "X="
07 ARCL X
08 AVIEW
09 PSE
10 "Y="
11 ARCL Y
12 AVIEW
13 PSE
14 "Z="
15 ARCL Z
16 AVIEW
17 PSE
18 "T="
19 ARCL T
20 AVIEW
21 END
Kind regards
Thomas
(11-08-2015 12:32 AM)Thomas Klemm Wrote: [ -> ]Loop-unrolling saves 3 bytes but makes it 2 lines longer:
Hello Thomas,
Actually, it is 4 bytes shorter and effectively 2 lines longer.
Kind regards,
Sylvain
Code:
BB LL Thomas (48 Bytes) BB LL Gérard (52 Bytes)
--------------------------- ---------------------------
11 01 LBL "STKDISP" 11 01 LBL "STKDISP"
03 02 "L=" 02 02 X<> L
02 03 ARCL L 03 03 "L="
01 04 AVIEW 03 04 XEQ 00
01 05 PSE 01 05 RUP
03 06 "X=" 02 06 X<> L
02 07 ARCL X 03 07 "X="
01 08 AVIEW 03 08 XEQ 00
01 09 PSE 03 09 "Y="
03 10 "Y=" 03 10 XEQ 00
02 11 ARCL Y 03 11 "Z="
01 12 AVIEW 03 12 XEQ 00
01 13 PSE 03 13 "T="
03 14 "Z=" 01 14 LBL 00
02 15 ARCL Z 02 15 ARCL X
01 16 AVIEW 01 16 AVIEW
01 17 PSE 01 17 PSE
03 18 "T=" 01 18 RDN
02 19 ARCL T 03 19 END
01 20 AVIEW
03 21 END
(11-08-2015 02:38 AM)Sylvain Cote Wrote: [ -> ]it is 4 bytes shorter
That's because I counted the bytes before removing the final
PSE instruction. Thanks for the correction.
Cheers
Thomas
Hi all,
Thank's for optimizations !
Gérard.
(11-08-2015 11:02 AM)ggauny@live.fr Wrote: [ -> ]Thank's for optimizations !
Optimized? Here comes the
definitely optimized version for the '41:
Code:
01 7PRSTK
02 VIEW L
03 END
OK, this requires a card reader... ;-)
Dieter
(11-08-2015 12:57 PM)Dieter Wrote: [ -> ]OK, this requires a card reader... ;-)
Dieter
Or, at least, its ROM.
Hi,
Code:
Or, at least, its ROM
Xrom 30.33 for emulator.
On real machine, without card reader, was....
Gérard.
Hi,
Thank but I have already two cards readers....
Gérard.
(11-10-2015 06:42 PM)ggauny@live.fr Wrote: [ -> ]Hi,
Thank but I have already two cards readers....
Gérard.
I don't even remember how many I have.
Hi,
How you don't remember of this ?
May I no good understand.
I tink when we have, we remember
(11-10-2015 10:28 PM)ggauny@live.fr Wrote: [ -> ]Hi,
How you don't remember of this ?
May I no good understand.
I tink when we have, we remember
When you got too many it is difficult to track everything.
I dont understand why you seem agressiv with me.
you have no understand my message.
surely I was not clear.
Yes i have two card reader for my 3 hp41( one C and two 41Cx)
It was ma passion expensive.
Really I dont understand your messages
Salut Gérard,
Je pense qu'il y a un problème de compréhensions entre vous et Massimo.
Voici ma compréhension de vos échanges ...
Vous: vous avez deux lecteurs de carte magnétique.
Massimo: moi, je ne me souviens plus de comment j'en possède.
Vous: Comment pouvez-vous ne pas vous souvenir de la quantité que vous avez ?
Vous: Je n'ai probablement pas compris votre intervention.
Vous: Normalement on devrait se souvenir de ce qu'on possède.
Massimo: Lorsque tu en possèdes beaucoup, il arrive d'en perdre le décompte.
Je ne pense pas que Massimo n'a été en aucun moment agressif dans ces échanges.
Cordialement,
Sylvain
Thanks Sylvain, and sorry Gérard: I didn't mean to sound offensive nor aggressive.
Actually I, sometimes, find difficult to fully understand what you mean. My fault, of course.
Massimo