Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #6083
| From | Jeff Blakeney <CUTjeffrey_blakeney@yahoo.ca> |
|---|---|
| Newsgroups | comp.sys.apple2.programmer |
| Subject | Re: Typo in ProDOS refTechMan |
| Date | 2023-08-24 08:10 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <uc7hb2$3f3vg$1@dont-email.me> (permalink) |
| References | (1 earlier) <yubzg2iicr9.fsf@jpen.ca> <20230823082311.3dc76fb1@laptop-sigfox> <uc4d2e$4ofj$1@solani.org> <20230823152214.5e86230e@laptop-sigfox> <yubr0ntht3u.fsf@jpen.ca> |
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.
Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Typo in ProDOS refTechMan Colin Leroy-Mira <colin@colino.net> - 2023-08-22 22:19 +0200
Re: Typo in ProDOS refTechMan Jerry Penner <jerry+a2@jpen.ca> - 2023-08-22 22:49 -0600
Re: Typo in ProDOS refTechMan Colin Leroy-Mira <colin@colino.net> - 2023-08-23 08:23 +0200
Re: Typo in ProDOS refTechMan Oliver Schmidt <ol.sc@web.de> - 2023-08-23 07:38 +0000
Re: Typo in ProDOS refTechMan Colin Leroy-Mira <colin@colino.net> - 2023-08-23 15:22 +0200
Re: Typo in ProDOS refTechMan Jerry Penner <jerry+a2@jpen.ca> - 2023-08-24 00:06 -0600
Re: Typo in ProDOS refTechMan Jeff Blakeney <CUTjeffrey_blakeney@yahoo.ca> - 2023-08-24 08:10 -0400
Re: Typo in ProDOS refTechMan Michael J. Mahon <mjmahon@aol.com> - 2023-08-28 06:45 +0000
Re: Typo in ProDOS refTechMan Jeff Blakeney <CUTjeffrey_blakeney@yahoo.ca> - 2023-08-28 08:28 -0400
Re: Typo in ProDOS refTechMan Michael J. Mahon <mjmahon@aol.com> - 2023-08-31 18:54 +0000
Re: Typo in ProDOS refTechMan Peter 'Shaggy' Haywood <phaywood@alphalink.com.au> - 2023-08-31 13:30 +1000
Re: Typo in ProDOS refTechMan Michael J. Mahon <mjmahon@aol.com> - 2023-08-31 18:54 +0000
Re: Typo in ProDOS refTechMan Antoine Vignau <ntn.vignau@gmail.com> - 2023-09-07 12:41 -0700
Re: Typo in ProDOS refTechMan Peter 'Shaggy' Haywood <phaywood@alphalink.com.au> - 2023-09-05 12:14 +1000
Re: Typo in ProDOS refTechMan qkumba <peter.ferrie@gmail.com> - 2023-08-28 10:23 -0700
Re: Typo in ProDOS refTechMan Antoine Vignau <ntn.vignau@gmail.com> - 2023-08-28 12:29 -0700
csiph-web