Post Reply 
(42S) BROWSE - Row-by-row matrix browser
05-31-2019, 03:02 PM (This post was last modified: 06-11-2019 12:07 PM by Dave Britten.)
Post: #1
(42S) BROWSE - Row-by-row matrix browser
EDIT: I found a bug concerning the handling of end wrapping with I+ and I-. The program listing has been corrected.

This is a simple program that lets you flip through a matrix a whole row at a time. The rows are displayed using the alpha register, with all elements in the row concatenated together and separated by spaces. This will only really be practical for matrices that are only a few columns wide, and you may have to adjust the display mode to limit the number of decimal places.

Usage:

1. INDEX the matrix.
2. XEQ "BROWSE"
3. Use the two arrow keys to scroll through the matrix rows, or press the "TOP" menu key to return to the first row.
4. Press EXIT to finish browsing, and the stack will be restored.

This is mostly intended for use from within other programs (pressing EXIT will do RTN after cleaning up), but it's also suitable for direct use.

Code:
00 { 175-Byte Prgm }
01▸LBL "BROWSE"
02 STO "B_X"
03 R↓
04 STO "B_Y"
05 R↓
06 STO "B_Z"
07 R↓
08 STO "B_T"
09 R↓
10 WRAP
11 CLMENU
12 "TOP"
13 KEY 1 GTO 11
14 KEY 7 GTO 07
15 KEY 8 GTO 08
16 KEY 9 GTO 09
17▸LBL 11
18 1
19 ENTER
20 STOIJ
21▸LBL 00
22 CLA
23 RCLIJ
24 X<>Y
25 AIP
26 ├":"
27 GTO 02
28▸LBL 01
29 ├" "
30▸LBL 02
31 RCLEL
32 ARCL ST X
33 J+
34 FC? 76
35 GTO 01
36 I-
37 FS? 77
38 XEQ 04
39▸LBL 03
40 AVIEW
41 MENU
42 STOP
43 GTO 03
44▸LBL 07
45 I-
46 FS? 77
47 XEQ 04
48 GTO 00
49▸LBL 08
50 I+
51 FS? 77
52 XEQ 04
53 GTO 00
54▸LBL 04
55 RCLIJ
56 R↓
57 1
58 STOIJ
59 RTN
60▸LBL 09
61 RCL "B_T"
62 RCL "B_Z"
63 RCL "B_Y"
64 RCL "B_X"
65 CLV "B_T"
66 CLV "B_Z"
67 CLV "B_Y"
68 CLV "B_X"
69 END[/b]
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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