SAM Coupé subtype highram / allram - no return to basic?

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
Stefan
Member
Posts: 25
Joined: Fri Nov 29, 2013 10:21 pm

SAM Coupé subtype highram / allram - no return to basic?

Post by Stefan »

A question popped up on the SAM Facebook group about execution not returning to basic when using default subtype allram.
When using subtype basic a return is made, but highram / allram do not even make an attempt and just loop forever in crt_exit_loop_forever since they are defining TAR__crt_on_exit = $10001 ;loop forever

Since returning to basic is trivial (fingers crossed the user program has not stomped where it should not), is there any reason, apart from who wants to return to basic anyway, for not doing so?
User avatar
dom
Well known member
Posts: 2255
Joined: Sun Jul 15, 2007 10:01 pm

Re: SAM Coupé subtype highram / allram - no return to basic?

Post by dom »

I'll be honest, the reasons why I didn't add it as an option:

1. Why bother?
2. There's no guarantee that the environment hasn't been stomped on
3. I was too lazy to reverse the paging and jp about the place

I can add it if it's wanted though.
Stefan
Member
Posts: 25
Joined: Fri Nov 29, 2013 10:21 pm

Re: SAM Coupé subtype highram / allram - no return to basic?

Post by Stefan »

dom wrote: Fri Jan 03, 2025 12:40 pm I can add it if it's wanted though.
:) I'll point Andy Chandler this way.
User avatar
dom
Well known member
Posts: 2255
Joined: Sun Jul 15, 2007 10:01 pm

Re: SAM Coupé subtype highram / allram - no return to basic?

Post by dom »

I've just implemented it and it seems to work for at least Adventure A (-pragma-define:CRT_ON_EXIT=0x10002)
Stefan
Member
Posts: 25
Joined: Fri Nov 29, 2013 10:21 pm

Re: SAM Coupé subtype highram / allram - no return to basic?

Post by Stefan »

Mr C is happy:
I can confirm it works! If anyone else needs the same functionality, it requires adding "-pragma-define:CRT_ON_EXIT=0x10002" to compile command line and you must use the default ram arrangement (eg. -subtype=allram)
User avatar
dom
Well known member
Posts: 2255
Joined: Sun Jul 15, 2007 10:01 pm

Re: SAM Coupé subtype highram / allram - no return to basic?

Post by dom »

Happy to be of service!

Not that's confirmed to work for somebody apart from me, I've just updated -subtype=highram to have the same capability.
Post Reply