bkumanchik wrote:[...] do I have to set pointers in order to protect BASIC at all, like when doing this in BASIC, [...]
No, it is not necessary to protect the character definitions from the activity of the BASIC interpreter in that case.
See also
this post, and to quote from there:
Mike wrote:It's not necessary to protect RAM in the BASIC stub with the POKEs to 55/56. Once you leave BASIC with SYS, there's nothing that could be overwritten by the BASIC interpreter. Furthermore, the whole appended machine code already is protected as 45/46 is set behind the loaded data of the file. Actually, setting 55/56 *below* 45/46 (what you do effectively) would confuse the interpreter, if you were to return to BASIC.
bkumanchik wrote:This question is for: no expansion, 3K expansion and 8K or more expansion
The above recommendation applies regardless what RAM configuration is present.
bkumanchik wrote:Code: Select all
;custom char setup stuff
lda #255 ; move char set to 7168 ($1C00)
sta $9005 ; -
;lda #52 ; change pointers to top of available RAM (ARE THESE LINES NEEDED??)
;sta $1c ; -
;lda #56 ; -
;sta $1c ; -
The code portion you commented out wouldn't anyhow work as intended. Its BASIC equivalent is "POKE28,52:POKE28,56" so you were getting value and address the wrong way round.
BTW, when changing the pointer in 55/56, the pointer in 51/52 can be made to follow suit by doing a "CLR" in BASIC. It is more important to set the whole pointer in 55/56 to the correct value than setting 52 by hand in the style of
cargo cult programming: 55 need not necessarily be 0 by default (when, for example, the Super Expander is plugged in), and then the characters wouldn't be fully protected.