Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test for revealing random behavior of bits 5 and 3 after CCF on…
… real machines.
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
; Z80 test - monitor random behavior of bits 5 and 3 after CCF. | ||
; | ||
; Copyright (C) 2022 Patrik Rak (patrik@raxoft.cz) | ||
; | ||
; This source code is released under the MIT license, see included license.txt. | ||
|
||
org 0x8000 | ||
|
||
main: di | ||
ld sp,22528+512 | ||
ld hl,0x7838 | ||
ld b,0 | ||
.fill push hl | ||
djnz .fill | ||
ld sp,49152 | ||
ld hl,16384 | ||
ld d,0xEF | ||
.loop push hl | ||
pop af | ||
ccf | ||
push af | ||
pop bc | ||
ld a,l | ||
xor c | ||
ld (hl),a | ||
inc hl | ||
ld a,h | ||
and d | ||
ld h,a | ||
jp .loop | ||
|
||
; EOF ; |