The Kowalski simulator's assembler not only recognizes pseudo-ops as dot-something, e.g.,
.BYTE, it recognizes dot-labels, e.g.,
.0000010, as local labels whose scope is bounded by the nearest global labels. A simple example will explain this:
Code:
GLOBAL01 <————— a global label
.0000010 <———— a local label <————+
|
goto .0000010 ———————————+
.0000020 <— another local label <—+
|
goto .0000020 ———————————+
GLOBAL02 <————— another global label
.0000010 <————————————————————————+
|
goto .0000010 ———————————+
if some condition
goto .0000020 ;won't work, as .0000020 isn't in scope
GLOBAL03 etc.
In reviewing your source code I noted several attempts to reference a local label that was not in scope at the point where the reference was made. For example:
Code:
kbreinit JSR KBINIT ;
LDA puntouno
jsr .printacc
KBINPUT JSR kbtscrl ; turn off scroll lock (ready to input)
In the above code fragment,
.printacc would not be in scope, as it is bounded by the labels
kbreinit and
KBINPUT.
As a fairly general rule, subroutine entry points should be demarcated with global labels. Also, as a matter of style, I use all lower case labels and symbols. Not all assemblers are case-insensitive—the Kowalski assembler is configurable to either recognize or efface case in labels, symbols, mnemonics and pseudo-ops. For consistency, I recommend that you make
.opt proc65c02,caseinsensitive the first line in your program. This statement tells the simulator that 65C02 instructions should be supported (but be aware that it is the Rockwell 65C02, not the WDC one, that is supported) and that case-insensitivity is in effect. Case-insensitivity, of course, doesn't apply to quoted strings, such as
.BYTE "Text String".