Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic test #9

Open
hikalium opened this issue Dec 5, 2017 · 1 comment
Open

Add automatic test #9

hikalium opened this issue Dec 5, 2017 · 1 comment

Comments

@hikalium
Copy link
Member

hikalium commented Dec 5, 2017

  • テストケースの作成
  • 自動テスト用のコード追加
@hikalium
Copy link
Member Author

hikalium commented Dec 5, 2017

Sample testcases for ADC, SBC.

<TESTCASE ACC WITH CARRY>

    LD ACC, 0FFh
    ST ACC, (0)
    LD ACC, 55h
    ST ACC, (1)
    LD ACC, 34h
    LD IX, 12h
    ADC ACC, (0)
    ADC IX, (1)
    HLT

EXP: 	IX=68h
	ACC=33h
<TESTCASE ACC WITH NO CARRY>
    LD ACC, 34h
    ST ACC, (0)
    LD ACC, 12h
    ST ACC, (1)
    LD ACC, 34h
    LD IX, 12h
    ADC ACC, (0)
    ADC IX, (1)
    HLT

EXP: 	IX=24h
	ACC=68h
<TESTCASE SBC WITH NO BORROW>

    LD ACC, 34h
    ST ACC, (0)
    LD ACC, 12h
    ST ACC, (1)
    LD ACC, 0ffh
    LD IX, 55h
    SBC ACC, (0)
    SBC IX, (1)
    HLT

EXP: 	IX=43h
	ACC=CBh
<TESTCASE SBC WITH BORROW>

    LD ACC, 0ffh
    ST ACC, (0)
    LD ACC, 55h
    ST ACC, (1)
    LD ACC, 034h
    LD IX, 12h
    SBC ACC, (0)
    SBC IX, (1)
    HLT

EXP: 	IX=BCh
	ACC=35h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant