bug in the Apple I book - CALL command

4 posts / 0 new
Last post
Offline
Last seen: 2 days 14 hours ago
Joined: Feb 27 2020 - 16:06
Posts: 11
bug in the Apple I book - CALL command

Tom, I found a problem in the Apple I guide on your site. 

 

I came here as a result of someone else working on an Apple I Replica. His is similar enough to the Briel board that your manual will help users of his computer, so I was doing some preliminary research before writing up a manual. 

 

It is figure 5.5 in Chapter 5, at https://www.applefritter.com/replica/chapter5

Anyway, in your BASIC programming guide, you have a table of CALL statements and options... except that the contents of the table are a random collection of BASIC commands (RUN, CLEAR, AUTO, etc)

 

The biggest reason I bring this up is to find out if the CALL command has a way to pre-load registers. On some BASIC variants, the CALL or SYS command allows the user to save values in 4 Zero Page memory locations, and the CALL or SYS subroutine loads those into A, X, Y, and the Status register.

Of coursse, there's not that much ROM code on the Apple I, so I can make my own routines smart enough to read zero-page addresses for their parameters. 

 

Anyway, thanks for all the work on this book. It's a great intro to the Apple I, and I'm going to enjoy digging into mine - when I finally get one.

 

 

 

 

Tom Owad's picture
Offline
Last seen: 9 hours 8 min ago
Joined: Dec 16 2003 - 15:14
Posts: 3008
Thanks for the reporting the

Thanks for the reporting the mistake. I'll fix that in the next revision. I regret that I don't know the answer to your question. Corey?

Offline
Last seen: 2 days 14 hours ago
Joined: Feb 27 2020 - 16:06
Posts: 11
No problem. I'm currently

No problem. I'm currently hunting down manuals, and I'm sure it will be in the original manual.

Offline
Last seen: 2 days 14 hours ago
Joined: Feb 27 2020 - 16:06
Posts: 11
So to answer my own question.

So to answer my own question...

 

http://retro.hansotten.nl/6502-sbc/lee-davison-web-site/enhanced-6502-basic/ehbasic-language-reference/#USR

 

CALL is a blind JSR into a machine language subroutine.
 

USR calls an ML routine after loading the parameter into FAC1. It then calls the ML routine pointed to by ($0B,$0C). Then the return value is dumped into FAC1. 
 

So that answers my question... it does not psss parameters or prime the registers. 

Log in or register to post comments