TREK52.BAS doesn't work on my new Pi build. WHY???

77 views
Skip to first unread message

Carl Marbach

unread,
Sep 15, 2025, 11:00:33 AM (11 days ago) Sep 15
to [PiDP-11]
here is the part that fails:

!     Read a single character from the keyboard
32210 def fnGetChar$()
32215 q$ = sys(chr$(3%)) ! Disable echoing
32220 on error goto 32230 : &
      q$ = sys(chr$(4%) + chr$(1%)) : &
      get #1, record 8192% : &
      goto 32250
32230 if err = 13 then resume 32240 else resume 32250
32240 sleep 1% : goto 32220
32250 fnGetChar$ = getChar$
32255 q$ = sys(chr$(2%)) ! Re-enable echoing
32260 fnend

on my new Pi 5, I get the error:

FNEND  without function call at line 32260

Why does it work on the Pi 4 build for RSTS7 and not Pi 5 build. Both builds run RSTS7.0

 Thanks
Carl

terry-...@glaver.org

unread,
Sep 15, 2025, 3:41:12 PM (11 days ago) Sep 15
to [PiDP-11]
It is hard to test this without at least a skeleton program around it. Or a pointer to the entire trek52 program.

Are the Pi 4 and 5 running the same version of simh that comes with the PiDP-11? Are you using the same RSTS/E V7 disk image on both?

I don't have a RSTS/E V7 system handy to test with, but the colon compound statement isn't legal on RSTS/E V10.1 in BP2 V2.7 (I use BP2 in compile mode because it has better diagnostics than regular Basic-Plus).

Carl Marbach

unread,
Sep 15, 2025, 7:33:04 PM (11 days ago) Sep 15
to [PiDP-11]
I have solved my problem by using the newest trek52, rewritten to modern standards. you can get it here: https://github.com/galacticstudios/Trek52

works well. What a great example of non-graphical terminals playing a type of graphic game.

Johnny Billquist

unread,
Sep 16, 2025, 10:28:36 AM (10 days ago) Sep 16
to pid...@googlegroups.com
I doubt different versions of simh would matter for this.

I agree that BP2 is often a better tool to diagnose things, but there
are incompatibilities between B+ and BP2, one of them being the usage of
colon to separate statements (it's use in B+ is discouraged since it is
incompatible with BP2).

But the error as such suggests that the program actually came to the
FNEND statement from outside of the function, so showing just that
snippet of code is rather unhelpful.

Somewhere else, there is a code path that also leads to the FNEND line,
that does not involve invoking the function fnGetChar$.

There might be some difference between the systems that matter, but I
would really look at in which ways the code could at all end up at the
FNEND no matter what.

Johnny

On 2025-09-15 21:41, terry-...@glaver.org wrote:
> It is hard to test this without at least a skeleton program around it.
> Or a pointer to the entire trek52 program.
>
> Are the Pi 4 and 5 running the same version of simh that comes with the
> PiDP-11? Are you using the same RSTS/E V7 disk image on both?
>
> I don't have a RSTS/E V7 system handy to test with, but the colon
> compound statement isn't legal on RSTS/E V10.1 in BP2 V2.7 (I use BP2 in
> compile mode because it has better diagnostics than regular Basic-Plus).
>
> On Monday, September 15, 2025 at 11:00:33 AM UTC-4 cmar...@marbachs.com
> wrote:
>
> here is the part that fails:
>
> !     Read a single character from the keyboard
> 32210 def fnGetChar$()
> 32215 q$ = sys(chr$(3%)) ! Disable echoing
> 32220 on error goto 32230 : &
>       q$ = sys(chr$(4%) + chr$(1%)) : &
>       get #1, record 8192% : &
>       goto 32250
> 32230 if err = 13 then resume 32240 else resume 32250
> 32240 sleep 1% : goto 32220
> 32250 fnGetChar$ = getChar$
> 32255 q$ = sys(chr$(2%)) ! Re-enable echoing
> 32260 fnend
>
> on my new Pi 5, I get /the error:/
> /
> /
> /FNEND  without function call at line 32260/
> /
> /
> Why does it work on the Pi 4 build for RSTS7 and not Pi 5 build.
> Both builds run RSTS7.0
>
>  Thanks
> Carl
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> pidp-11/386edacc-4134-4c77-8b52-4281a7c2a89an%40googlegroups.com
> <https://groups.google.com/d/msgid/
> pidp-11/386edacc-4134-4c77-8b52-4281a7c2a89an%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol

Reply all
Reply to author
Forward
0 new messages