• Re: Routine to detect CPU type (was Re: apple 2 chip's help)

    From Wyatt Wong@21:1/5 to [email protected] on Thu May 25 12:25:27 2023
    On Wednesday, 10 May 2023 at 02:43:21 UTC+8, [email protected] wrote:
    On Tuesday, May 9, 2023 at 12:47:06 PM UTC-4, Wyatt Wong wrote:
    On Sunday, 3 December 2000 at 20:12:04 UTC+8, David Empson wrote:
    [snip]
    Here is a BASIC subroutine to implement the above routine.
    6000 REM IDENTIFY THE PROCESSOR
    [snip]
    6060 RETURN
    [snip]

    2. In the BASIC Program, line 6060 should be END instead of RETURN. Since there is NO GOSUB statement, the original line 6060 RETURN will generate an error.
    Wyatt, I think David's BASIC code is OK because it's presented as a subroutine and is not intended to run as a stand-alone program. I agree that if you want to exercise the code stand-alone, you would need to either change RETURN to END, or add a line
    on the front like 10 GOSUB 6000 : END

    It is ***YOUR*** assumption that David's BASIC code is presented as a subroutine. But It does NOT mean that EVERYONE who read his message will get the SAME impression at all.

    I simply mentioned that changing line "6060 RETURN" into "6060 END" will NOT generate error when execute the code. For those who incorporate David's code as part of their BASIC program, they can simply ignore what I suggest.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Oliver Schmidt@21:1/5 to And it on Fri May 26 10:53:22 2023
    Hi Wyatt,

    It is ***YOUR*** assumption that David's BASIC code is presented as a subro= >utine. But It does NOT mean that EVERYONE who read his message will get th= >e SAME impression at all.

    Certainly not! It is solely ******YOUR****** communication style that
    causes problems - not only here, but also on FB...

    The posting in question is titled 'Routine...' and consistently uses
    the term 'routine', not 'program' all over the place.

    And it says:

    So, after calling this routine, location 0 (and the acummulator) contain
    one of the following values:
    0 6502
    1 Standard 65C02
    2 Rockwell R65C02
    3 65802 or 65816

    So it uses the term 'calling', not 'running'. Apart from that: What
    sense is in a standalone program, that doesn't print its findings?

    And finally it literally says:

    Here is a BASIC subroutine to implement the above routine.
    6000 REM IDENTIFY THE PROCESSOR
    6010 I = 800
    6020 READ J: IF J < 0 THEN GOTO 6040
    6030 POKE I,J: I = I + 1: GOTO 6020
    6040 CALL 800
    6050 CPU = PEEK(0): REM 0 = 6502, 1 = 65C02, 2 = R65C02, 3 = 65802/816
    6060 RETURN

    So it's a ******subroutine******, you see it? Just 7 lines above the
    RETURN.

    I simply mentioned that changing line "6060 RETURN" into "6060 END" will NO= >T generate error when execute the code. For those who incorporate David's c= >ode as part of their BASIC program, they can simply ignore what I suggest.

    Cartainly not! You didn't "simply mention" or "suggest" anything. You classified the RETURN as "typo" and wrote, it "should" be an END
    instead.

    I strongly suggest that you take a step back from creating alternative realities.

    Thanks,
    Oliver

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael 'AppleWin Debugger Dev'@21:1/5 to Wyatt Wong on Sat May 27 08:25:07 2023
    On Thursday, May 25, 2023 at 12:25:28 PM UTC-7, Wyatt Wong wrote:

    It is ***YOUR*** assumption that David's BASIC code is presented as a subroutine.

    Wyatt, you WAY OFF BASE on this for three reasons:

    1. First, David **explicitly** stated it was a sub-routine. (Emphasis added):
    Here is a BASIC **subroutine**

    2. The LARGE line numbers, 6000 - 6090 are a BASIC idiom that it is sub-routine.

    3. The RETURN on line 6060 was your THIRD clue that it was a sub-routine.

    Ignoring the evidence doesn't magically make it go away.

    But It does NOT mean that EVERYONE who read his message will get the SAME impression at all.

    Yes. Yes, it does.

    People post code snippets with the implicit understanding that any half-competent programmer can figure out how to use them. If you need help with BASIC then ASK -- people are more then willing to help beginners out. But flaming a 20+ year old post
    because YOU are still a **naïve and beginner Applesoft programmer** just makes you look like a complete tool / utter fool.

    i.e. Next time lose the fucking attitude.

    Michael

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)