flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > [solved] Loop instruction getting "stuck" |
Author |
|
nkeck72 15 Oct 2016, 01:38
I have the following code snippet as a part of the NOS API. When I was debugging, I noticed that Bochs seemed to get stuck indefinitely on this loop instruction:
Code: not_right_file: ; Somewhere in the filename. Go back to the beginning of the field dec bx mov ah, byte ptr es:bx cmp ah, 80h jne not_right_file ; Back to 0x80. Go to byte after 0xff go_to_end: mov cx, 14d inc bx loop go_to_end What this code does is effectively take the pointer from the middle of a file descriptor field in the FSB back to the beginning of the field, then make it point to the byte after the end of the field. As far as I know, this code was written correctly, but yet Bochs seems to sit indefinitely on the loop instruction. Can someone help shed some light on this situation? EDIT: I NOW NOTICE MY PROBLEM. I AM SUCH AN IDIOT. _________________ It may look hard, but it won't take long if you take it one byte at a time. NOS: www.github.com/nkeck720/nos |
|||
15 Oct 2016, 01:38 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.