Post Reply 
HP 42S: Programming Complexity Question
01-26-2016, 01:42 PM
Post: #6
RE: HP 42S: Programming Complexity Question
Here a smaller A2R programme which produces valid Roman numerals BUT only produces forms such as MIIII for 1004 & not MIV:

Code:

00 { 101-Byte Prgm }
01>LBL "A2R"
02 CLA
03 1.007
04 RCL ST Y
05>LBL 00
06>LBL 14
07 XEQ IND ST Y
08 X>Y?
09 GTO 15
10 -
11 GTO 14
12>LBL 15
13 Rv
14 ISG ST Y
15 GTO 00
16 RCL ST Z
17 AVIEW
18 RTN
19>LBL 01
20 1E3
21 X<=Y?
22 |-"M"
23 RTN
24>LBL 02
25 500
26 X<=Y?
27 |-"D"
28 RTN
29>LBL 03
30 100
31 X<=Y?
32 |-"C"
33 RTN
34>LBL 04
35 50
36 X<=Y?
37 |-"L"
38 RTN
39>LBL 05
40 10
41 X<=Y?
42 |-"X"
43 RTN
44>LBL 06
45 5
46 X<=Y?
47 |-"V"
48 RTN
49>LBL 07
50 1
51 X<=Y?
52 |-"I"
53 .END.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 42S: Programming Complexity Question - Gerald H - 01-26-2016 01:42 PM



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