Unfortunately I cannot single step. I will check with my voltmeter when I can to see what it is doing.
I have now set my RAM within in these parameters, but still no luck.
As far as I can tell, my RAM is good. I haven't implemented a test in my monitor, but I have manually keyed in programs into RAM with my monitor and ran them from RAM with success. (LED Blinks, etc). I've also written random values throughout and checked them to be OK. The programs remain in memory through resets.
The ROM checks out okay when checking with the monitor. Matches the assembled code 100%
The monitor runs programs by doing a JMP to specified address through indirect addressing. This should disable the monitor completely, correct?
So here's where I am now. I have the accumulator restored after my echo routine before returning from sub, just as mentioned, but still get type mismatch errors.
It seems that it just cannot process values or variables.
For example. Writing this
Code:
10 PRINT
20 GOTO 10
will infinitely write carriage returns to the screen, like it should.
but if I write
Code:
10 PRINT 25
20 GOTO 10
this will cause a crash.
Also trying to manually add memory size will cause a crash. Is there a way I can force a memory size before running?
So in review:
RAM is good, as far as I can tell. ROM is 100% okay. LCD screen is properly driven, works just fine with my monitor and BASIC. ECHO restores acc before RTS. This is accomplished by first storing the ACC at a location outside of user RAM, and then LDA with that address before doing an RTS. PLA/PHA instructions cause it not to work properly. (Nothing gets displayed)
Input routines are as follows: Check to see if there is a key press, if not, CLC and RTS. If so, load key data, SEC, RTS.
RAM is located from $0000-$3FFF, ROM is at $8000-$FFFF. Basic is located at $9000
Here is my configuration.
Code:
LAB_STAK = $0100 ; stack bottom, no offset
LAB_SKFE = LAB_STAK+$FE
; flushed stack address
LAB_SKFF = LAB_STAK+$FF
; flushed stack address
ccflag = $0300 ; BASIC CTRL-C flag, 00 = enabled, 01 = dis
ccbyte = ccflag+1 ; BASIC CTRL-C byte
ccnull = ccbyte+1 ; BASIC CTRL-C byte timeout
VEC_CC = ccnull+1 ; ctrl c check vector
VEC_IN = VEC_CC+2 ; input vector
VEC_OUT = VEC_IN+2 ; output vector
VEC_LD = VEC_OUT+2 ; load vector
VEC_SV = VEC_LD+2 ; save vector
; Ibuffs can now be anywhere in RAM, ensure that the max length is < $80
Ibuffs = $3500+$14
; start of input buffer after IRQ/NMI code
Ibuffe = Ibuffs+$47; end of input buffer
Ram_base = $1000 ; start of user RAM (set as needed, should be page aligned)
Ram_top = $3000 ; end of user RAM+1 (set as needed, should be page aligned)
; This start can be changed to suit your system
*= $9000
Thanks everyone for all the help. I've just run out of ideas at this point.
I may have set Ibuffs wrong, as it wouldn't assemble with the value "IRQ_vec+$14" so I just chose an arbitrary spot to place this.
Again, I should also wait until I have my 40-character LCD, but that may be awhile.
Sorry for all of the questions.