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

binary search subroutine (low < high) incorrect #3

Open
syeedameen opened this issue Jul 15, 2021 · 0 comments
Open

binary search subroutine (low < high) incorrect #3

syeedameen opened this issue Jul 15, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@syeedameen
Copy link
Owner

In Binary Search Subroutine BINARY SEARCH

i create comparison using index addressing MOVC A, @A+DPTR

a[mid] > key
    MOV A,R6 
    MOVC A,@A+DPTR                  ;Mov a <-- a[mid+base Addr.] 
    MOV R7,A                        ;temp store a[mid]
    SUBB A,R0                       ;Compare with key element 
    JNZ NOTFOUND_BINSSEARCH

it store the middle position and don't support operand greater than 8-bit

@syeedameen syeedameen added the bug Something isn't working label Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant