RECALL and anything else at the same time?

Everything related to BASIC version 1.x (Oric 1 and Atmos) or HYPERBASIC (Telestrat).
Don't hesitate to give your small program samples, technical insights, or questions...
Brana
Flying Officer
Posts: 169
Joined: Fri Nov 30, 2007 8:30 pm
Contact:

RECALL and anything else at the same time?

Post by Brana »

Is there anything that I could do in order to enhance the "beauty" of the following program;

(This is an example, FIRST part of the program)

10 CLS
20 DIM A$(500)
30 FOR S=0 TO 500
40 A$(S) = "Example text"
50 NEXT S
60 STORE A$,"FILE.TAP"
70 END

Now, when I want to "RECALL" the "FILE.TAP", I would do the following;

(Example, SECOND part of the program)

10 CLS
20 DIM A$(500)
30 RECALL A$,"FILE.TAP"
40 ...

Note that in the SECOND example, at the line of 30 (where RECALL statement is executing) a program remains waiting for a rather long time period (a couple of seconds).

So, my goal is to attempt to do any kind of LORES or TEXT animation on screen (during this very time while the RECALL is doing it's job).

Now, my question is:

Is there anything that I could do (from within the BASIC programming!) in order to have two jobs executing at the same time:

- the execution of the RECALL, and
- the display animation of any kind (in TEXT or LORES mode)?

As far as I know, the program given in the SECOND example will just remain "stuck" until the RECALL is finished it's job, so I cannot think any idea that would enable some screen animation during THAT TIME period (during the "RECALL").

Any ideas? If possible from within the "BASIC" programming??

Best regards

Brana
User avatar
Chema
Game master
Posts: 3081
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: RECALL and anything else at the same time?

Post by Chema »

Brana wrote: Is there anything that I could do (from within the BASIC programming!) in order to have two jobs executing at the same time:
Ummm I think the answer is no. And REALL is a tape loading routine, so I fear you can't do anything from asm also, at least not easily unless you modify the loading routine (I think there are a few cycles left :?: )

Cheers
User avatar
waskol
Flight Lieutenant
Posts: 416
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

On the "Welcome" tape of Oric atmos, how does work the animation (with color stripes moving up in the Oric logo) ?
I think the clue is there
User avatar
Dbug
Site Admin
Posts: 4739
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Custom loading and saving code can allow to do that.

Another solution is to save 500 small tape files instead of one tape file with 500 entries, then you do something during the waiting time between the files.
User avatar
waskol
Flight Lieutenant
Posts: 416
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

Here is an example, it is taken and adapted from the book of Geof Phillips :

Code: Select all

10 REM INIT
15 GOSUB1000
20 DOKE#2F5,#B300:DOKE#2FC,#B35A
100 REM ************ SAVING *************
105 REM STEP 1 : PREPARE DATA TO BE SAVED
110 HIMEM #97FF
120 DIM A$(100)
130 FOR Z=1TO100:A$(Z)=STR$(Z*Z):NEXTZ
133 PRINT "Euphoric : press F1,use Hardware tape,"
134 PRINT "and create a blank tape"
135 PRINT "Then press a key to save":GETA$
140 REM STEP 2 : SAVE A HEADER
145 CLS:PRINT "Saving..."
150 !"START"
160 REM STEP 3 : SAVE DATA 
170 FORZ=1TO100
180 REM animation can go here ! (do something small and fast)
185 M$=STR$(Z)+"%":PLOT 10,10,M$
190 !A$(Z)
200 NEXTZ
210 REM **********************************
220 REM 
230 REM ************ LOADING *************
234 CLS:PRINT "Rewind tape and"
235 PRINT "Press a key to load":GETA$
240 PRINT"LOADING BACK..."
250 REPEAT:UNTIL&(0)="START":REM repeat until header matches
252 PRINTER "Header found"
260 FORZ=1TO100
261 REM animation can go here !
262 M$=STR$(Z)+"%":PLOT 10,10,M$ 
270 PRINT &(0)
280 NEXTZ
290 PRINT "LOADING FINISHED"
1000 REM Poke machine code
1010 A=#B300:READ COD$
1020 REPEAT
1030 FOR I=1 TO LEN(COD$) STEP 2
1040 B=VAL("#"+MID$(COD$,I,2))
1050 POKE A,B
1060 A=A+1
1070 NEXT I
1080 READ COD$
1090 UNTIL COD$="END"
1095 RETURN 
1101 DATA 2017CF206AE7A908AE4D
1102 DATA 020A0AAAA916205EE6CA
1103 DATA D0F8A924205EE62024B3
1104 DATA 203DE960A528205EE6A5
1105 DATA 28D00CA005B9D000205E
1106 DATA E68810F760A002B1D399
1107 DATA D0008810F8A5D0205EE6
1108 DATA A000C4D0F008B1D1205E
1109 DATA E6C8D0F420CDD760206A
1110 DATA E72035E720C9E6C924D0
1111 DATA F920C9E68528D00FA005
1112 DATA 20C9E699D0008810F720
1113 DATA 3DE96020C9E685D020AB
1114 DATA D5A000C4D0F00820C9E6
1115 DATA 91D1C8D0F4203DE96868
1116 DATA 4CF4D5EAEA,END

hem, on euphoric, it saves (with a % animation), but I can't get it load the hardware tape (problem with euphoric)
The best is to try it out on a real Oric.
Post Reply