Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QPLOP vs NQPLOP #2

Closed
gabrielsroka opened this issue Jul 13, 2019 · 3 comments
Closed

QPLOP vs NQPLOP #2

gabrielsroka opened this issue Jul 13, 2019 · 3 comments

Comments

@gabrielsroka
Copy link

gabrielsroka commented Jul 13, 2019

Hi,

Thank you for the excellent Ultimate Commodore 64 BASIC & KERNAL ROM Disassembly!!!

I was looking at PLOOP1:
https://www.pagetable.com/c64disasm/#A700

The first column, which is "Microsoft/Commodore source" in green, 4th line in PLOOP1 says
BNE QPLOP (QPLOP is $A71A)
but if you look at the hex it's actually BNE $A717.

I did a search of your repo for QPLOP :
https://github.com/mist64/cbmsrc/search?q=qplop&unscoped_q=qplop

and found these 3:
https://github.com/mist64/cbmsrc/blob/master/BASIC_C64/code3#L53-L64
https://github.com/mist64/cbmsrc/blob/master/BASIC_CBM2_A/bverbs1#L53-L64
https://github.com/mist64/cbmsrc/blob/master/BASIC_CBM2_B/bverbs1#L53-L64

all have a QPLOP (which is the JMP (IQPLOP) using the IQPLOP vector) and a NQPLOP which is the actual QPLOP (if you will -- the target of the vector), whereas:
https://github.com/mist64/cbmsrc/blob/master/BASIC_PET2001/M6502.MAC#L2030-L2041

doesn't use the vector (there's no NQPLOP -- it jumps directly to the code, and there's a mysterious [?] blank line above it). This is PET 2001 version. Did it not use a vector?

I'm not sure if it's a bug, and if so, how to fix it. Are they supposed to be different?

Long story short, I was using both the ML and the assembly code to write my own, custom LIST and QPLOP for the 64, but this difference threw me off.

Thanks!

@gabrielsroka gabrielsroka changed the title qplop vs NQPLOP QPLOP vs NQPLOP Jul 13, 2019
@gabrielsroka
Copy link
Author

gabrielsroka commented Jul 13, 2019

This also seems to be the case for most (all?) other BASIC vectors in $300-$30B: IERROR, IMAIN, ICRNCH, IGONE, IEVAL (and maybe KERNAL vectors, too)

@Rhialto
Copy link

Rhialto commented Jul 4, 2020

@gabrielsroka Indeed, as versions progressed, more and more vectors and jump tables were introduced. If the C64 ROM has some sort of indirection somewhere, it is not guaranteed that it was like that in earlier versions.

@mist64
Copy link
Owner

mist64 commented Apr 16, 2021

@Rhialto is right.

@mist64 mist64 closed this as completed Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants