Cross-compatible USR calls?

A place to discuss everything Dragon related that doesn't fall into the other categories.
Post Reply
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Cross-compatible USR calls?

Post by sixxie »

Can anyone remind me how to do them so they work on both D32 and D64? If indeed it's actually possible... I thought maybe it was a space before the digit, but that doesn't seem to work...
sorchard
Posts: 530
Joined: Sat Jun 07, 2014 9:43 pm
Location: Norwich UK

Re: Cross-compatible USR calls?

Post by sorchard »

http://archive.worldofdragon.org/index. ... R_Routines

Though rather amusingly the code to detect a d64 isn't quite right :)
Stew
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: Cross-compatible USR calls?

Post by sixxie »

Ah, extra code everywhere? Ok, that's pretty horrible :)

Though I'm reasonably sure you don't need the bodge for DEF USR, only USR...
sorchard
Posts: 530
Joined: Sat Jun 07, 2014 9:43 pm
Location: Norwich UK

Re: Cross-compatible USR calls?

Post by sorchard »

One obstacle is the D32 ROM defaults to USR0 if the character immediately following USR is not a digit. For example:

Code: Select all

A=USR 1(0)
This code is valid syntax on both platforms, but the D32 will treat it as USR0.

This is of course fine if only USR0 is defined. (And possibly what you've seen working before)
Stew
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: Cross-compatible USR calls?

Post by sixxie »

sorchard wrote: Fri Aug 27, 2021 3:16 pm

Code: Select all

A=USR 1(0)
This is of course fine if only USR0 is defined. (And possibly what you've seen working before)
Yeah that's probably what I was remembering. Ah well, multiple versions it is...
Post Reply