Search found 2699 matches

by tofro
Fri Feb 16, 2018 2:08 pm
Forum: Software & Programming
Topic: A6 and the CALL command
Replies: 8
Views: 3480

Re: A6 and the CALL command

Is a6 cached in the job header at start? If so, you could either load it from there before ending your routine, there would be no need to stack it then either. In QDOS, this doesn't help. a6 can change between any two instructions (Even worse, QDOS might assume SuperBASIC is where you make a6 point...
by tofro
Fri Feb 16, 2018 12:14 pm
Forum: Software & Programming
Topic: A6 and the CALL command
Replies: 8
Views: 3480

Re: A6 and the CALL command

My first answer applied to SMSQ/E, sorry for not pointing this out. Note that, under SMSQ/E, the SBasic area doesn't move. If you write an extension, references thus needn't be relative to A6 during the entire processing. However, doing so will make your extension incompatible with QDOS. I think thi...
by tofro
Fri Feb 16, 2018 11:22 am
Forum: Software & Programming
Topic: A6 and the CALL command
Replies: 8
Views: 3480

Re: A6 and the CALL command

I would guess that as long as your code doesn't call any SBASIC traps and vectors (the ones that use a6 as argument), you should be safe. Your SBASIC program as such is halted during CALL, so if your code doesn't give SBASIC a reason to move, no one else will.

Tobias
by tofro
Wed Feb 14, 2018 7:31 pm
Forum: Software & Programming
Topic: Correct Maths Stack usage (CHRIX/RESRI)
Replies: 27
Views: 10542

Re: Correct Maths Stack usage (CHRIX/RESRI)

I have checked my paper copy of the SMSQ/E Reference Manual (from 1992, when you still had to buy it...) - It has the very same information, which I still strongly believe is wrong.

Tobias
by tofro
Wed Feb 14, 2018 12:08 pm
Forum: Software & Programming
Topic: Correct Maths Stack usage (CHRIX/RESRI)
Replies: 27
Views: 10542

Re: Correct Maths Stack usage (CHRIX/RESRI)

That file handles all the SB heaps, so contains a lot of stuff. But entering through sb_resar is pretty straightforward and doesn't have any branches (other than a "do nothing" exit if the wanted space is already there or the routine not being called from SBASIc context). Sorry to contrad...
by tofro
Wed Feb 14, 2018 11:54 am
Forum: Hardware
Topic: Internal memory upgrade?
Replies: 7
Views: 3401

Re: Internal memory upgrade?

Martin_Head wrote:I think you need +12v for the video circuitry. As for who did the upgrade, I think there used to be advert in the QL magazines.
12Volts should be needed only for Composite and Modulator. RGB should work fine without.

Tobias
by tofro
Wed Feb 14, 2018 8:40 am
Forum: Software & Programming
Topic: Correct Maths Stack usage (CHRIX/RESRI)
Replies: 27
Views: 10542

Re: Correct Maths Stack usage (CHRIX/RESRI)

The routine you're looking for is sb_resar in smsq_sbas_ressb_asm. It doesn't even use a1 as a parameter or return value, so there is not much point in setting it. a1 is also returned unchanged from there. The maths stack to be grown is retrieved from and returned in BV_RIP(a6). The sb_resar call c...
by tofro
Wed Feb 14, 2018 6:59 am
Forum: Software & Programming
Topic: Correct Maths Stack usage (CHRIX/RESRI)
Replies: 27
Views: 10542

Re: Correct Maths Stack usage (CHRIX/RESRI)

If I may return to one of the original questions very briefly - "Must we pre-load a1 with bv_rip(a6) BEFORE calling CHRIX/RESRI?", can we agree that this step is unnecessary (contrary to the SMSQ reference guide and source code comments)? Well, if you didn't change a1 from its previous va...
by tofro
Tue Feb 13, 2018 10:17 pm
Forum: Software & Programming
Topic: Correct Maths Stack usage (CHRIX/RESRI)
Replies: 27
Views: 10542

Re: Correct Maths Stack usage (CHRIX/RESRI)

The only thing the "Technical Guide" claims is The top of the arithmetic stack is usually pointed to by A1. (So, that's apparently a book you don't have, Norm, but should) ;) This is probably meant to say "you should make a1 point to it" and Pennel took it as "the system mak...
by tofro
Mon Feb 12, 2018 11:09 pm
Forum: Software & Programming
Topic: Bored of the Rings (game)
Replies: 11
Views: 5319

Re: Bored of the Rings (game)

Quill for the Spectrum was ported to the QL by Gilsoft and ended up as "Quill Adventure Writer" ("Quill the word processor" came later than "Quill for the Spectrum", so it was definitely legit (but still confusing) for Gilsoft to keep the name. I never had a copy, but h...