Code Monkey home page Code Monkey logo

Comments (3)

iflan avatar iflan commented on June 12, 2024

Very interesting. I noticed a couple of things:

  • The program is not exactly correct. On the first line #FE should be #BE if you want a > as a prompt.
  • The program does print out HELLO ALL, but then runs ALL as if it were typed in to the monitor (as you say).
  • As expected, HELLO E003G will return to BASIC.
  • 1000G is exactly the same length as HELLO.

If you look at the Apple //e monitor ROM listings, the monitor entry code is at FF69. One of the first things it does is JSR GETLNZ, which is the same as the program above. It then decodes the command (and all hex numbers before it) and then executes it at FF82 with JSR TOSUB. TOSUB then executes the command through the jump table at FFE3 by pushing and address on the stack and then doing an RTS. The G command is implemented at FEB6. The jump to the user address happens at FEBC as an indirect jump through 003A. But note that this is a JMP not a JSR. This means that when the program's RTS happens, it's actually returning from the JSR TOSUB. As commented at FF85, this proceeds to process the next entry on the line—but that has been overwritten by the program. This is why anything after HELLO is interpreted by the monitor.

Thus, I don't think there's actually anything wrong with the ROM here.

Hope that helps!

from apple2js.

Bischoff avatar Bischoff commented on June 12, 2024

I confirm the same happens with an Apple ][+ ROM from https://ftp.apple.asimov.net loaded into another emulator. That confirms there's nothing wrong with the ROM in Apple2js, and I think this issue could be closed.

from apple2js.

whscullin avatar whscullin commented on June 12, 2024

Glad to hear it.

from apple2js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.