Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, this makes magic on real hardware and I see it do nothing on emulators. So something really funny must be going on here ...


Actually I got it to work on the emulator too, see updated comment.

I'm sure this is a BASIC ROM artifact. Would require disassembling the ROM to see what's going on and it's a bit too early in the morning for that :-) EDIT: See flohofwoe's much better answer.


You mean like this

http://www.primrosebank.net/computers/zxspectrum/docs/Comple...

The Spectrum ROM is a wonderful program. The numerical evaluation system was unique. Every number could be replaced by an expression.


I get a colorful screen pattern when I try that on my emulator (which otherwise isn't very precise though):

https://floooh.github.io/tiny8bit/zx-ui.html?type=zx128

...you can open the step debugger after entering the command (in the menu "Debug => CPU Debugger") and see that execution is caught in an LDDR (reverse block copy) which essentially overwrites the entire RAM, and then gets caught in a loop which causes it to return to that LDDR.

The poke address 23641 is probably some state variable of the BASIC interpreter and by writing to it you're messing up the state in a way that a RUN jumps into a specific place in the ROM which happens to run that LDDR.


> The poke address 23641 is probably some state variable of the BASIC interpreter and by writing to it you're messing up the state in a way that a RUN jumps into a specific place in the ROM which happens to run that LDDR.

Yes, it's the least significant byte of "E LINE Address of command being typed in" in the scratch area: https://worldofspectrum.org/ZXBasicManual/zxmanchap25.html It's cool that they documented all that stuff in the manual!


And how does that lead to colorful flashing pattern that "collapses" some 30 seconds after it appears?


I discovered a bug when I was a kid and I don't think I've seen anyone else mention it before. Do you have any idea what's going on?

Write a simple program to make the Spectrum display the "Scroll?" message and then press Capslock and symbol shift together, then press any letter.

The screen fills up with various words. Any insights?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: