I'm currently working on a project which requires a large chunk of RAM, and so I decided to use page 82 of ram to store information.
Everything runs fine on emulator. On real hardware it crashes the calculator, but in a really weird way. The calculator will run fine, but after scrolling up the menu a bit, the calculator will either shut itself off and clear the ram, or it will lock up and I will have to take the batteries out.
Are there any specific limitations to using page 82 of ram that I am unaware of? I was under the impression that page 82 was used for temporary storage during some operations. (https://www.cemetech.net/forum/viewtopic.php?t=8137&start=0)
Sample code that causes the crash:
Code:
(Note: changing "ld bc, 2000" to "ld bc, 1000" does not cause the crash.)
Any help is appreciated!
Everything runs fine on emulator. On real hardware it crashes the calculator, but in a really weird way. The calculator will run fine, but after scrolling up the menu a bit, the calculator will either shut itself off and clear the ram, or it will lock up and I will have to take the batteries out.
Are there any specific limitations to using page 82 of ram that I am unaware of? I was under the impression that page 82 was used for temporary storage during some operations. (https://www.cemetech.net/forum/viewtopic.php?t=8137&start=0)
Sample code that causes the crash:
Code:
ld a, $02
out ($05), a
ld e, $5D
ld bc, $2000
ld hl, $C000
loop:
ld (hl), e
dec bc
inc hl
xor a
or b
or c
jr nz, loop
xor a
out ($05), a
ret
(Note: changing "ld bc, 2000" to "ld bc, 1000" does not cause the crash.)
Any help is appreciated!