Detailed info on Basic USR command...

Machine language, BASIC, technical questions...

Moderators: Atari Frog, Andre

Post Reply
dwhyte74
Posts: 4
Joined: Sun Oct 15, 2006 8:02 pm

Detailed info on Basic USR command...

Post by dwhyte74 » Sun Oct 15, 2006 8:10 pm

I've been looking for some detailed info regarding the Atari Basic USR command. What I need to know is how parameters are passed.


If I have a routine called with say:

U=USR(ADR(STRINGWITHML$),ADR(STRINGWITHDATA$),ADDRESS,LENGTH,X,Y)

How are they sent. I know that the you need to include a PLA at the start of the routine. What is first PLA pulling off the stack? The number of parameters? Now for my next PLA, will it be pulling the value for Y first, or the LSB of ADR(STRINGWITHML$)?

Any info would be appreciated.... Thanks
dwhyte74
Posts: 4
Joined: Sun Oct 15, 2006 8:02 pm

I found it...

Post by dwhyte74 » Mon Oct 16, 2006 6:18 pm

Found the info I needed at http://www.atarimagazines.com/compute/i ... nd_USR.php


I needed this information because I'm converting J.D. Casten's East80 ML routine to Quick.

I'll be the first to admit that 6502 assembler is not my strong point, but it's only 270 bytes long... I have it disassembled and hard coded (the 'ol Action! way), and hope to save about 20 bytes or so as there's no need to pass the parameters to the stack.

There is one thing that I'm still not sure of. It uses zero page address $00 for something. Not sure what for exactly yet.
avram
Posts: 34
Joined: Sun Jul 11, 2004 2:54 am
Contact:

Post by avram » Tue Oct 17, 2006 2:03 pm

Not to direct you away from the excellent Atarimania but there may be more programming help in the Progamming forum at atariage.com
Post Reply