TaliForth2 icon indicating copy to clipboard operation
TaliForth2 copied to clipboard

should MARKER state really include BLK and SCR ?

Open patricksurry opened this issue 1 year ago • 3 comments

I was looking at the MARKER code and noticed it has hard-coded 4 and 40 constants relating to user table offset. I was going to add marker_state_start/end labels within cold_user_table in definitions.asm to avoid the magic numbers (like below). But then I wondered whether it should actually save/restore the two block variables - wouldn't this potentially mess up screen editing when you released the marker?

cold_user_table:
    .logical 0          ; make labels here offsets that we can add to 'up'
...
marker_state_start:
; Block variables
blk_offset:             .word 0         ; BLK
scr_offset:             .word 0         ; SCR
...
search_order_offset:
    .byte 0,0,0,0,0,0,0,0,0             ; SEARCH-ORDER (9 bytes to keep offsets even)
marker_state_end:

patricksurry avatar Apr 27 '24 11:04 patricksurry

I suspect this is an issue with using hard constants and the shuffling of things into the "RAM system variables". The comments seem to indicate the desire was to save CURRENT through the wordlists. It's also possible that I just can't count and used 4 as CURRENT is the 4th word in that location. This definitely should use labels and should not include BLK and SCR. I wrote this word, so it's my bad regardless of how it came to be - using labels should fix things.

SamCoVT avatar Apr 28 '24 13:04 SamCoVT

Do you want to fix MAKER or should I add it to my list?

SamCoVT avatar Apr 28 '24 15:04 SamCoVT

I’m happy to do it. I’m working on a few things to streamline compilation a little so I’ll add to that.

patricksurry avatar Apr 28 '24 15:04 patricksurry