; Macro: Clears any cell that contains masked data in a range of columns
;
CM       ; Clear all Memory Registers
FIX 6
;
; Input Dialog Box:
alpha     "Initial Column to be Cleared"
STOa 0
0e+00
STO 00
alpha     "Last Column to be Cleared"
STOa 1
1
STO 01
alpha     "Clear Macro - Multiple Columns"
inpt 2
;
; Storage Locations
; 00 - First column getting cleared
; 01 - Last column getting cleared
; 02 - Number of rows in data window
; 03 - Column Counter
; 04 - Row Counter
; 06 - Row and Col. # in decimal form 
;
ibase
size     ; Returns the size of the data window
STO 02   ; Stores the number of rows that are in the data window
RCL 00   ; Recall column number
STO 03   ; Set Column Counter
GTO 50   ; Store column in decimal form
;
LBL 10
XEQ 20
RCL 01   ; Recall final column value
ISG 03   ; Increment counter by 1, are contents of 03 <= 01
GTO 50   ; Yes - Increase column
STOP     ; No - Stop program
;
LBL 20
RCLi 06  ; Recall data from cell specified in mem. reg. 06
test 2   ; Test for masked data cell
CLRi 06  ; Clear the cell specified in 06
0e+00
DSE 04   ; Decrement counter by 1, are contents of 02 > 0.0
GTO 40   ; Yes - Increase row number by 1
RTN
;
LBL 40
XEQ 70   ; Increase current address
GTO 20
;
LBL 50
RCL 03   ; Recall current column
1000
 /       ; Divide column by 1000
STO 06   ; Store column in decimal format 
XEQ 60   ; Reset Row Counter
GTO 10
;
LBL 60
RCL 02
STO 04   ; Reset Row Counter
RTN
;
LBL 70
1
ADD 06   ; Increase address by 1
RTN
;
; Version 1.1 - August 10, 1993
; by Steve Wilson