X16Community / x16-rom

Other
45 stars 27 forks source link

[BASIC] fix POKE writing to the wrong place if the value expression disturbs `poker` #275

Closed mooinglemur closed 8 months ago

mooinglemur commented 8 months ago

On the code imported from the C64, the only function that mutates poker is PEEK, thus preserving poker inside of PEEK was effective in making POKE happy. X16 additions mutate it in at least 3 more functions (VPEEK, STRPTR, POINTER), so moving the preserve to the POKE statement should fix this logic.

Also removed a misleading comment that is no longer relevant, since (B)LOAD also populates the SYS shadow registers now.

stefan-b-jakobsson commented 8 months ago

Looks good to me.