; Macro: Performs the Invert Mask function on a data selection. ; If no selection is made, it operates on the entire data window. ; CM ; Clear all Memory Registers ; ; Storage Locations ; 00 - First column getting masked ; 01 - Last column getting masked ; 02 - Number of rows in data window ; 03 - Column Counter ; 04 - Row Counter ; 06 - Row and Col. # in decimal form ; ibase 0e+00 STO 00 size ; Returns the size of the data window STO 02 ; Stores the number of rows that are in the data window down ; Pushes the stack down to obtain number of columns 1 - ; Subtract one from number of columns STO 01 ; Store number of columns in 01 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 1 ; Test for an empty cell GTO 25 test 2 ; Test for masked data cell GTO 35 Mi 06 ; Mask the cell specified in 06 ; LBL 25 0e+00 DSE 04 ; Decrement counter by 1, are contents of 02 > 0.0 GTO 40 ; Yes - Increase row number by 1 RTN ; LBL 35 UMi 06 ; Unmask the cell specified in 06 GTO 25 ; 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.0 - August 30, 2001 ; by Steve Wilson