Last active
December 27, 2019 23:06
-
-
Save mistificator/31bdf932d44ce17f5465fdf31aaa57c7 to your computer and use it in GitHub Desktop.
ZX Spectrum +3 code that reboots BASIC to start loader screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.org $5CD2 ; // fixed origin for https://clrhome.org/asm/ TAP generator | |
di | |
xor a | |
ld bc, $7ffd | |
out (c), a | |
ld b, $1f | |
out (c), a | |
rst $0 ; trick doesn't work when started from ZX Spectrum +3 boot menu right to BASIC48, cause bank switching is blocked forever |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ld hl, 0 | |
ld b, (hl) ; store byte of address 0 | |
ld (hl), 1 ; write 1 to address 0 | |
ld a, (hl) ; read byte of address 0 | |
dec a | |
or a | |
jr nz, ROM | |
ld (hl), a ; write 0 to address 0 | |
ld a, (hl) ; read byte of address 0 | |
or a | |
jr nz, ROM | |
ld (hl), b ; restore byte of address 0 | |
RAM: | |
... | |
ROM: | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment