Nп/п : 56 из 100
 От   : Jeff Blakeney                       2:5075/128        24 авг 23 08:11:06
 К    : Jeff Blakeney                                         24 авг 23 15:13:02
 Тема : Re: Typo in ProDOS refTechMan
----------------------------------------------------------------------------------
                                                                                 
@MSGID: 2@dont-email.me> b6c08023
@REPLY: <f2acea4d-7124-35df-7393-5c6c8f16f389@yahoo.ca>
ebc6a1f0
@REPLYADDR Jeff Blakeney
<CUTjeffrey_blakeney@yahoo.ca>
@REPLYTO 2:5075/128 Jeff Blakeney
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: 2@dont-email.me>
@RFC-References: <20230822221945.4eb8a091@laptop-sigfox>
<yubzg2iicr9.fsf@jpen.ca> <20230823082311.3dc76fb1@laptop-sigfox> 1@solani.org>
<20230823152214.5e86230e@laptop-sigfox> <yubr0ntht3u.fsf@jpen.ca>
<f2acea4d-7124-35df-7393-5c6c8f16f389@yahoo.ca>
@TZUTC: -0400
@PID: Mozilla/5.0 (Windows NT 10.0; Win64; x64;
rv:102.0) Gecko/20100101 Thunderbird/102.14.0
@TID: FIDOGATE-5.12-ge4e8b94
On 2023-08-24 7:54 a.m., Jeff Blakeney wrote:
> On 2023-08-24 2:06 a.m., Jerry Penner wrote:
>> Colin Leroy-Mira <colin@colino.net> writes:
>>
>> The P8 tech-ref states:
>>
>> ----------------------------------------
>> SYSCALL  JSR MLI       ;Call Command Dispatcher
>>           DB CMDNUM     ;This determines which call is being made
>>           DW CMDLIST    ;A two-byte pointer to the parameter list
>>           BNE ERROR     ;Error if nonzero
>>
>>        Upon completion of the call, the MLI returns to the address of the
>>        JSR plus 3 (in the above example, the BNE statement); the call
>>        number and parameter list pointer are skipped.
>> ----------------------------------------
>>
>> Where the CPU returns to is 6 bytes past the label SYSCALL, which is the
>> location of the "BNE ERROR" instruction.
>>
>> I think I always read and understood the book the way I think Oliver
>> does, but I think the book`s address arithmetic is wrong, looking at it
>> now.

> As far as I remember my 6502 assembly, when you do a JSR, the processor 
> has already read the JSR byte and the two byte address so the PC is 
> pointing at the DB CMDNUM statement and that is what is pushed on the 
> stack.  The MLI pulls that address off the stack, adds 3 to it, pushes 
> it back on the stack and does an RTS so that the BNE ERROR statement 
> will get executed.

> In other words, the SYSCALL is the address of the JSR but it isn`t the 
> address that gets pushed onto the stack when the JSR is executed.


It has been a while since I posted to usenet but I`m not sure why this 
ended up in the wrong newsgroups.  Sorry about that everyone.
 --- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
 * Origin: A noiseless patient Spider (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх