Post Reply 
Recalling X-MEM files information - RAMPAGE
06-24-2021, 05:50 PM (This post was last modified: 06-24-2021 07:06 PM by Artur - Brasil.)
Post: #1
Recalling X-MEM files information - RAMPAGE
Well, me again with my ideas....

I wrote some routines for saving data in X-Memory files, as numbered registers or as named variables. Also, I wrote on program for presenting a menu of equations and solving for any choosen variable of such equations.
Now, I would like to put both programs to work togheter, but I stopped with the following problem:
- changing from one x-file (data file), used in one program, to another in a subroutine, and back again.

I was planning to write a programm to save the actual X-file - name (thanks RAMPAGE) and its record pointer - make the new one as current file and returning to caller program:

Main program
will it use X-DATA?
if so, CREATE xfile1
...
XEQ SUBPROGRAM1 (I don't care and don't know if this sub will use x-file too)
continues...
CLOSE (clean the stack of xfile control)
END

Subprogram1
will it use its own -XDATA?
if so, XEQ CREATE xfile2
uses xfile2
...
...
CLOSE (here, the current xfile will be xfil1 again)
END

sub CREATE file
save current file[name/pointer]
CRFLD xfile1
END

sub CLOSE
step back SAVED FILES
get saved pointer (maybe -1)
SEEKPT
END

I'm using the WORKFL function on RAMPAGE to get the current xfile name;
FLHD for getting the address of its header;
And studying the PEEKR function to get the pointer information.

Please, could someone help if am I walking in correct diretion? How to use PEEKR in this situation, as the x-file header has more information than pointer number?


BYTE: 13 12 11 10 09 08 07 06 05 04 03 02 01 00
CONT: T A D R - - - - R E G S Z E


Best wishes
Artur - Brasil

ARTUR MARIO JUNIOR
BRAZIL
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Recalling X-MEM files information - RAMPAGE - Artur - Brasil - 06-24-2021 05:50 PM



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