Weird BASIC problem

From: ruud_at_baltissen.org
Date: Wed, 03 Jun 2026 08:57:34 +0200
Message-ID: <9cd0de3a6e30304df3507c9f06d27352_at_baltissen.org>
Hallo allemaal,


The problem I have looks weird to me but most probably is a normal 
behavior. As mentioned before I created a minimum Kernal that should be 
able to load, what I call, the BOOT program and start it. The first 
program to test that things work:


.ba $07FF

.by $01, $08,
;   --------
;   start of program

.by $0C, $08, $01, $00, $9E, $20, $32, $30, $36, $32, $00, $00, $00
;   --------  --------  ---  ---  ------------------
;       |         |      |    |          2062
;       |         |      |   SPACE
;       |         |     SYS
;       |     line number
;   start of next line

.fb $EA, 13				; = 13 NOPs

	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop

	sei

	ldy	#0
L001:
	tya
	sta	$0400,y
	sta	$0500,y
	sta	$0600,y

	iny
	bne	L001

	rts

.fb 0,5

.en


This creates a program that lists like a BASIC program with a normal 
Kernal. If you run it, it fills roughly 75% of the screen with 
characters from 0 to 255. In the original idea the 13 NOPs were 
commented out. The next step was to replace the 13 BASIC bytes with the 
13 NOPs, to load the program and start it with SYS 2062 (or lower 
number). But it crashed: just READY in the top-left screen. And I have 
no idea why.

After some experiments I replaced the first zero with a colon, ':'. I 
now got a listing but with nonsense after line 1. Worse: the program 
crashes and I have no idea why. After replacing the colon with a zero 
using a poke then the program still lists including the nonsense and 
still won't run.

After loading the original program again, it runs, as expected. When 
replacing the first zero with a colon using a POKE, it still lists, now 
including colon, but without the nonsense and it still runs. Although 
with ending with an explainable syntax error.

I hope I described the whole problem clearly enough and even hope more 
that someone can explain what is going on.


-- 

Kind regards / Met vriendelijke groet, Ruud Baltissen

www.Baltissen.org
Received on 2026-06-03 08:00:01

Archive generated by hypermail 2.4.0.