Use of STKLIM@FA92 when saving files.

About the BASIC system (not including PROGRAMMING)
User avatar
Crazyboss
Site Admin
Posts: 180
Joined: 09 Aug 2012, 21:45
Location: Sweden
Contact:

Use of STKLIM@FA92 when saving files.

Postby Crazyboss » 11 Mar 2015, 16:42

Hi There.

It seems like when you save files, it seems like the variables at FA92 and FA94 are saved.

on a basic system without SDX (or without the user have done a USER DIR), area: F8F2-FB4B is saves.

with SDX it can be D6FF-FB4B.

The feature could be used if I lower the STKLIM a bit, I can put code from e.g D000 to F8F1 and then lower the STKLIM ti D000, then it should actually save the area D000-FB4B ?

Wonder if there are any systemvariable, contain the address to jump to after the loading of the file have been done?

I did try to cheat and poke STKLIM with 8021 and the next A600, I was thinking I then could save the area 8021-A600, but then I get a "NO SPACE" error and cant save anything :)
//CLAUS - Webmaster at www.mtxworld.dk

User avatar
thewiz
Posts: 99
Joined: 12 Aug 2012, 16:08

Re: Use of STKLIM@FA92 when saving files.

Postby thewiz » 18 Mar 2015, 14:29

Hi Claus,

Changing STKLIM was also used back in the day with sneeky little routines that get called by the USER command. The USER sysvar would be set to something like F920 and the basic loader just had USER.

Have you thought about setting USRINT and USERJP (I think) before saving? You might be able to get your interrupt routine run which then somehow runs your code on return from interrupt.

Keep up the good work.

Paul
THIS is what Memotech is doing now.

Martin A
Posts: 264
Joined: 09 Nov 2013, 21:03

Re: Use of STKLIM@FA92 when saving files.

Postby Martin A » 21 Mar 2015, 13:29

Don't forget you can save un-named blocks from assembler by setting up VERIF and TYPE at FD67 and FD68

FD68 = 0 for SAVE, 1 for LOAD/VERIFY
FD67 = 0 for LOAD, 1 for VERIFY

Then calling the tape input/output 0AAE with DE set to the length and HL the starting address.

User avatar
Crazyboss
Site Admin
Posts: 180
Joined: 09 Aug 2012, 21:45
Location: Sweden
Contact:

Re: Use of STKLIM@FA92 when saving files.

Postby Crazyboss » 30 Mar 2015, 21:35

Martin A wrote:Don't forget you can save un-named blocks from assembler by setting up VERIF and TYPE at FD67 and FD68

FD68 = 0 for SAVE, 1 for LOAD/VERIFY
FD67 = 0 for LOAD, 1 for VERIFY

Then calling the tape input/output 0AAE with DE set to the length and HL the starting address.


Means I could do like this:

ld hl,#8000
ld de,#1000
ld a,0
ld (#fd68),a
call #0aae

to save memory area #8000-#9000 ?

can I load the file by using the normal load"" ?
//CLAUS - Webmaster at www.mtxworld.dk

User avatar
Crazyboss
Site Admin
Posts: 180
Joined: 09 Aug 2012, 21:45
Location: Sweden
Contact:

Re: Use of STKLIM@FA92 when saving files.

Postby Crazyboss » 31 Mar 2015, 09:40

above make memu crash....
//CLAUS - Webmaster at www.mtxworld.dk

Martin A
Posts: 264
Joined: 09 Nov 2013, 21:03

Re: Use of STKLIM@FA92 when saving files.

Postby Martin A » 31 Mar 2015, 21:15

You're saving a block of data not a BASIC program, (which seems to be 4 blocks.) so LOAD"" wont work

To load back, you'd need to set up FD67 and FD68 for load, as well as HL and DE and then call &0AAE again.

It's meant for saving to tape, I've not tried it on Memu.

Andy should be able to confirm how to use it with virtual tapes, there may be info about that on his site.

Didn't disc systems have a USER WRITE or something similar to save blocks of memory?

User avatar
thewiz
Posts: 99
Joined: 12 Aug 2012, 16:08

Re: Use of STKLIM@FA92 when saving files.

Postby thewiz » 01 Apr 2015, 13:09

Hi,

Not to tread on Andy's toes, but this will work in memu as the emulator monitors calls to AAE for saving and loading.

Regards
THIS is what Memotech is doing now.

User avatar
Dave
Posts: 573
Joined: 11 Aug 2012, 18:16
Contact:

Re: Use of STKLIM@FA92 when saving files.

Postby Dave » 01 Apr 2015, 17:44

But why do you need to call Accident & Emergency when you're just playing with your MTX?

:lol:

Maybe you DID tread ion Andy's toes? :D

User avatar
1024MAK
Posts: 451
Joined: 24 Dec 2012, 03:01
Location: Looking forward to summer, in Somerset, UK

Re: Use of STKLIM@FA92 when saving files.

Postby 1024MAK » 01 Apr 2015, 22:30

Dave wrote:Maybe you DID tread ion Andy's toes? :D
You would need to call Accident & Emergency if you trod ion on Andy's toes :lol:

Mark

User avatar
thewiz
Posts: 99
Joined: 12 Aug 2012, 16:08

Re: Use of STKLIM@FA92 when saving files.

Postby thewiz » 03 Apr 2015, 18:01

Are you saying I'm fat?
THIS is what Memotech is doing now.


Return to “BASIC”

Who is online

Users browsing this forum: No registered users and 1 guest