Skip to content

Commit

Permalink
Replace hand-crafted fail code in daa test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gekkio committed Oct 22, 2022
1 parent 645f2eb commit 2e35eb8
Showing 1 changed file with 14 additions and 28 deletions.
42 changes: 14 additions & 28 deletions acceptance/instr/daa.s
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,14 @@ run_tests:
ret

fail:
di
ld sp, $fffe
call disable_ppu_safe
call reset_screen
call print_load_font
quit_inline

ldh a, (<hram.testcase_h)
ld h, a
ld d, a
ldh a, (<hram.testcase_l)
ld l, a
push hl
ld e, a

ld hl, $9820
call print_newline
print_string_literal "Test failed"

call print_newline
Expand All @@ -103,17 +98,13 @@ fail:
call print_newline

print_string_literal "A: "
pop bc
ld a, (bc)
inc bc
push bc
ld a, (de)
inc de
call print_hex8

print_string_literal " F: "
pop bc
ld a, (bc)
inc bc
push bc
ld a, (de)
inc de
call print_bin4

call print_newline
Expand All @@ -122,17 +113,13 @@ fail:
call print_newline

print_string_literal "A: "
pop bc
ld a, (bc)
inc bc
push bc
ld a, (de)
inc de
call print_hex8

print_string_literal " F: "
pop bc
ld a, (bc)
inc bc
push bc
ld a, (de)
inc de
call print_bin4

call print_newline
Expand All @@ -149,9 +136,8 @@ fail:
swap a
call print_bin4

enable_ppu
wait_vblank
halt_execution
ld d, $42
ret

.bank 0 slot 0
.section "testcases1"
Expand Down

0 comments on commit 2e35eb8

Please sign in to comment.