Benchmark Testing Program

Contributions to this software library are always welcome. Please ensure that you post program listings rather than .raw files. They give a reasonable idea of what your program does without having to load them into a DM42 and you can also include comments in your code. Check out the following link for a decoder/encoder: http://www.swissmicros.com/dm42/decoder/

You can then copy/paste the listing and post it in "code" tags.
Post Reply
nmihiylov
Posts: 14
Joined: Sat Sep 22, 2018 8:19 pm
Location: Ohio

Benchmark Testing Program

Post by nmihiylov » Fri Oct 26, 2018 8:08 pm

Is there a benchmark testing program or calculation available that I could use to run my DM42 through its' paces so I can see just how amazing this machine runs?
Nick Mihiylov
DM42
SN# 03787

Stu_In_VA
Posts: 2
Joined: Sat May 16, 2020 5:34 pm

Re: Benchmark Testing Program

Post by Stu_In_VA » Tue May 19, 2020 11:38 pm

[Moderator note: code placed in "code" tags]

Here's a trivial program that will run a subroutine using the value in the X register as an iteration count. I put some random instructions in the called subroutine to test but you should replace them with any instructions or procedures you're interested in timing. Set flag 00 to execute your test routine. Clear flag 00 to simply loop per the initial value in the X register. When the program stops, the stack will contain:
T: - Start Time
Z: - End Time
Y: - Elapsed Time
X:- Initial Loop Count Value

Code: Select all

00 { 74-Byte Prgm }
01 LBL "BNCHMRK"
02 STO 00		Store iteration count for DSE
03 FIX 04		for display
04 STO 02		save iteration count
05 CLST			housekeep
06 ×
07 CLA
08 TIME			capture start time
09 STO 01		save it
10 ATIME24		to alpha for start time display
11 |-"--"		format alpha reg
12 LBL 01		Loop Top
13 FS? 00			test flag 00 to execute code or jump around
14 XEQ 99			Execute routine of your choice
15 DSE 00		decrement loop count
16 GTO 01		not zero, loop back
17 TIME			done, capture end time
18 ATIME24		to alpha for end time display
19 STO 03		save it
20 RCL 01		start time	
21 HMS-			end time - start time = elapsed time
22 FIX 06		for display 
23 RCL 01		Build stack for end display
24 X<>Y				x=initial loop count
25 RCL 03			y=elapsed time (h.mmsshh) hours, minutes,seconds, hundredths
26 X<>Y				z=end time
27 RCL 02			t=start time
28 AVIEW		display start and stop times
29 STOP			stop
30 GTO "BNCHMRK"	r/s to repeat test
31 LBL 99		dummy subroutine containing instructions to benchmark
32 CLST				insert anything to time
33 30				'
34 SIN				'
35 SQRT				'
36 LOG				'
37 ABS				'
38 LN				'
39 RTN			Exit dummy routine
40 END
Attachments
BNCHMRK.raw
(77 Bytes) Downloaded 6 times
Stu In Northern Virginia, USA
- DM42 (05312)
- HP42S
- HP12 Platinum+
- FREE42 (Windows, Android)
- retired: HP35, HP65, HP67, HP41, HP16

Post Reply