Skip to content

Commit

Permalink
Added test for revealing random behavior of bits 5 and 3 after CCF on…
Browse files Browse the repository at this point in the history
… real machines.
  • Loading branch information
raxoft committed Jan 25, 2022
1 parent f0ab7d7 commit b8a68c6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Makefile
Expand Up @@ -4,7 +4,7 @@ NAME = z80test
VERSION = 1.1a
PKG := $(NAME)-$(VERSION)

PROGS := z80full z80flags z80doc z80docflags z80ccf z80memptr
PROGS := z80full z80flags z80doc z80docflags z80ccf z80memptr z80ccfscr
SRCS := main idea crctab tests testmacros print

all: $(addsuffix .tap,$(PROGS))
Expand Down
32 changes: 32 additions & 0 deletions src/z80ccfscr.asm
@@ -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 ;

0 comments on commit b8a68c6

Please sign in to comment.