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

Making the timer emulation more robust #63

Open
bernd-ulmann opened this issue Aug 15, 2020 · 1 comment
Open

Making the timer emulation more robust #63

bernd-ulmann opened this issue Aug 15, 2020 · 1 comment
Assignees
Labels

Comments

@bernd-ulmann
Copy link
Collaborator

The timer emulation has problems when a newly initialized timer is immediately deactivated again as the timer thread has not been fully established and thus the thread cancel fails.

@bernd-ulmann bernd-ulmann self-assigned this Aug 15, 2020
@sy2002
Copy link
Owner

sy2002 commented Aug 15, 2020

The goal would be to remove again this "jump over the nasty part" section in test_programs/timer_test.asm, i.e. remove the RBRA START, 1. It works in hardware, but not in the emulator, yet.

        RBRA    START, 1

        MOVE    0xFFFF, @R0
        MOVE    0xEEEE, @R1
        MOVE    0xDDDD, @R2
        MOVE    0xCCCC, @R3
        MOVE    0xBBBB, @R4
        MOVE    0xAAAA, @R5

        CMP     0xDDDD, @R2
        RBRA    A_HALT, !Z
        MOVE    0x0000, @R2     ; stop timer 0
        CMP     0xAAAA, @R5
        RBRA    A_HALT, !Z
        MOVE    0x0000, @R5     ; stop timer 1
        CMP     0xFFFF, @R0
        RBRA    A_HALT, !Z
        CMP     0xEEEE, @R1
        RBRA    A_HALT, !Z
        CMP     0xCCCC, @R3
        RBRA    A_HALT, !Z
        CMP     0xBBBB, @R4
        RBRA    A_HALT, !Z

START

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

No branches or pull requests

2 participants