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

Minor: three jump after conditionals #56

Open
ern0 opened this issue Sep 22, 2018 · 1 comment
Open

Minor: three jump after conditionals #56

ern0 opened this issue Sep 22, 2018 · 1 comment

Comments

@ern0
Copy link

ern0 commented Sep 22, 2018

Location:
https://github.com/cfenollosa/os-tutorial/tree/master/05-bootsector-functions-strings

cmp ax, 4      ; if ax = 4
je ax_is_four  ; do something (by jumping to that label)
jmp else       ; else, do another thing
jmp endif      ; finally, resume the normal flow    ######### control never gets here, delete this line pls

ax_is_four:
    .....
    jmp endif

else:
    .....
    jmp endif  ; not actually necessary but printed here for completeness

endif:

You should remove line marked with "#"s.

@AtieP
Copy link

AtieP commented Mar 14, 2020

He would be using the jmp endif if for some reason jmp else doesn't work (i guess) 😅

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

No branches or pull requests

2 participants