Skip to content

Commit

Permalink
Merge pull request #602 from paulscottrobson/lineno
Browse files Browse the repository at this point in the history
Fixed line numbers at edit error
  • Loading branch information
paulscottrobson authored Aug 19, 2024
2 parents 2b25ada + 2f04ed9 commit 0156e47
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
1 change: 1 addition & 0 deletions basic/scripts/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
array : array not declared
hardware : hardware error
mos : mos command error
badline : illegal line number
"""

err = []
Expand Down
1 change: 1 addition & 0 deletions basic/sources/editing/editing/warmstart.asm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ WarmStartNoClear:

_WSNotSerialLinkMos:
stz ControlStatus ; clear break flag.

jsr TOKTokenise ; tokenise it.
lda tokLineNumber ; any line number ? if not, execute it.
ora tokLineNumber+1
Expand Down
3 changes: 3 additions & 0 deletions basic/sources/editing/tokenise/tokenise.asm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ TOKTokenise:
sta tokLineSize ; line length itself and the line numbers.
stz tokLineNumber
stz tokLineNumber+1
stz ERRLine ; suppresses line # on error
stz ERRLine+1

;
stz inputPos ; input position.
_TOKMainLoop:
Expand Down
2 changes: 1 addition & 1 deletion basic/sources/editing/tokenise/workers/tok_intconstant.asm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ _TICLineNumber:
sta tokLineNumber+1
rts
_TICSyntax:
.error_syntax
.error_badline

.send code

Expand Down
15 changes: 1 addition & 14 deletions basic/test.bsc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
sfx 0,19
end

proc snd(ch,fq,ms,sl,ty,v)
while peek($FF00):wend
poke $FF04,ch
doke $FF05,fq
doke $FF07,ms
doke $FF09,sl
poke $FF0B,ty
poke $FF0C,v
poke $FF01,7
poke $FF00,8
endproc
print "98765";

0 comments on commit 0156e47

Please sign in to comment.