LOAD&RUN sequence

Started by MIRKOSOFT, July 05, 2010, 09:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

Hi!
I tried to load and automatic run program.
All can be ok, but after successful loading BASIC always prints:
?SYNTAX ERROR


In case of command RUN, GOTO...and some others.
Here's code of routine:

jsr bank                  // set bank to #15
lda enter.lenname
ldx #<enter.name
ldy #>enter.name
jsr setnam
lda #00
ldx #00
// jsr $ff68       - disabled bank change for I/O (works not also if is enabled)
lda #00
ldx device
ldy #00
jsr setlfs
lda #00
ldx $2d
ldy $2e
 jsr $ffd5       // load routine
 jsr $5aa6     // run routine
rts




Please help me somebody where can be error, why BASIC outputs
?SYNTAX ERR...


Many many thanks.


Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

LokalHorst

#1
Hi Mirko,

your code-snippet doesn't have an error which could cause the 'syntax error' of the basic interpreter.
(the last statement can be changed to JMP $5aa6 as this routine does not return to your code anyway)

I suppose the error is displayed because the byte preceding the addr. $2d/$2e points to, is non-zero.
after power-on you have this:
1c00: 00  <- if this byte is non-zero you'll get a 'syntax error' no matter what command was entered
1c01: 00  <- here the basic start ($2d/2e) points to - will receive the first basic link-pointer
1c02: 00

wasn't this already covered in another post of yours ?