Post Reply 
Is HP42 smarter than a kid on TV?
04-30-2018, 11:27 AM
Post: #7
RE: Is HP42 smarter than a kid on TV?
Here’s a quick hack to create a magic square of odd order:
Code:
00 { 77-Byte Prgm }
01▸LBL "MAGIC"
02 ENTER
03 NEWMAT
04 EDIT
05 LASTX
06 X↑2
07 1
08 LASTX
09 1
10 +
11 2
12 ÷
13 STOIJ
14 R↑
15▸LBL 02
16 ENTER
17 ↑
18 FS? 77
19 GTO 01
20 FS? 76
21 GTO 00
22 ←
23 FC? 77
24 GTO 02
25 J-
26 I+
27 GTO 00
28▸LBL 02
29 FS? 76
30 ↓
31 X=0?
32 GTO 00
33 J+
34▸LBL 01
35 I+
36 I+
37▸LBL 00
38 R↓
39 DSE ST X
40 GTO 02
41 RCLEL
42 EXITALL
43 END

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Is HP42 smarter than a kid on TV? - Dol - 04-28-2018, 08:03 PM
RE: Is HP42 smarter than a kid on TV? - Werner - 04-30-2018 11:27 AM



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