Calculator graphics drawing benchmark
|
02-02-2022, 10:12 PM
(This post was last modified: 02-03-2022 08:20 PM by C.Ret.)
Post: #35
|
|||
|
|||
RE: Calculator graphics drawing benchmark (HP-71B)
Here is a version for the full graphic one-line display calculator HP-71B.
As you can see it on the picture, the HP-71B is a full graphic calculator since its display is a full matrix of LCD dots without any hole or gap between the character positions. Here is a code that hallows the Calculator graphics drawing benchmark for any size of Hitomezashi pattern from 1 pixel up to 8 pixels. This version of the code is suitable to all HP-71B without any module or extension. It is adapted from an original code that need specific instructions from the JPC ROM ver E. The rendering is based on the behavior of the GDISP instruction, a precursor of GROB operations on actual RPL and HPPL pockets. 1 DESTROY ALL @ DIM G$[132] @ INPUT "Hito.(1-8) ","4";N @ ON N GOSUB 10,20,30,40,50,60,70,80 3 T=TIME @ D=1+LEN(H$) @ J=CEIL(D*RND) @ FOR K=0 TO 131 5 IF NOT MOD(K,N) THEN I=CEIL(2*RND) @ G$=G$&V$[I,I] @ J=D-J ELSE G$=G$&H$[J,J] 7 NEXT K @ GDISP G$ @ T=TIME-T @ PAUSE @ DISP T @ END 10 V$=CHR$(85)&CHR$(170) @ H$=CHR$(255) 12 RETURN 20 V$=CHR$(119)&CHR$(221) @ H$=CHR$(0)&CHR$(1)&CHR$(4)&CHR$(5)&CHR$(16)&CHR$(17)&CHR$(20) 22 H$=H$&CHR$(21)&CHR$(64)&CHR$(65)&CHR$(68)&CHR$(69)&CHR$(80)&CHR$(81)&CHR$(84)&CHR$(85) 24 RETURN 30 V$=CHR$(121)&CHR$(207) 32 H$=CHR$(0)&CHR$(1)&CHR$(8)&CHR$(9)&CHR$(64)&CHR$(65)&CHR$(72)&CHR$(73)&CHR$( ) 34 RETURN 40 V$=CHR$(31)&CHR$(240) @ H$=CHR$(0)&CHR$(1)&CHR$(16)&CHR$(17) 42 RETURN 50 V$=CHR$(63)&CHR$(225) @ H$=CHR$(0)&CHR$(1)&CHR$(32)&CHR$(33) 52 RETURN 60 V$=CHR$(127)&CHR$(193) @ H$=CHR$(0)&CHR$(1)&CHR$(64)&CHR$(65) 62 RETURN 70 V$=CHR$(129)&CHR$(255) @ H$=CHR$(0)&CHR$(1)&CHR$(128)&CHR$(129) 72 RETURN 80 V$=CHR$(1)&CHR$(255) @ H$=CHR$(0)&CHR$(1) 82 RETURN Usage: RUN Press ENTER to select default size or type-in size and validate The pattern is displayed full size. Press f-CONT to display execution time in second Press f-CONT again or RUN to get a new random pattern. Screen: 132 x 8 = 1056 Speed: ~6.06" (for size 4) Performance: 174.2574 Edited to add sample capture pictures. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 15 Guest(s)