Page 1 of 2

Use of STKLIM@FA92 when saving files.

Posted: 11 Mar 2015 16:42
by Crazyboss
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 :)

Re: Use of STKLIM@FA92 when saving files.

Posted: 18 Mar 2015 14:29
by thewiz
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

Re: Use of STKLIM@FA92 when saving files.

Posted: 21 Mar 2015 13:29
by Martin A
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.

Re: Use of STKLIM@FA92 when saving files.

Posted: 30 Mar 2015 21:35
by Crazyboss
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"" ?

Re: Use of STKLIM@FA92 when saving files.

Posted: 31 Mar 2015 09:40
by Crazyboss
above make memu crash....

Re: Use of STKLIM@FA92 when saving files.

Posted: 31 Mar 2015 21:15
by Martin A
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?

Re: Use of STKLIM@FA92 when saving files.

Posted: 01 Apr 2015 13:09
by thewiz
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

Re: Use of STKLIM@FA92 when saving files.

Posted: 01 Apr 2015 17:44
by Dave
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

Re: Use of STKLIM@FA92 when saving files.

Posted: 01 Apr 2015 22:30
by 1024MAK
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

Re: Use of STKLIM@FA92 when saving files.

Posted: 03 Apr 2015 18:01
by thewiz
Are you saying I'm fat?