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

Continue statement for loop #5

Open
vorotynsky opened this issue Jan 30, 2022 · 0 comments
Open

Continue statement for loop #5

vorotynsky opened this issue Jan 30, 2022 · 0 comments
Labels
good first issue Good for newcomers

Comments

@vorotynsky
Copy link
Owner

Add a continue statement that allows jumping to the beginning of the loop. It's the opposite of the break operator.

Examples

loop L {
  !inc cx
  continue (L)
}
;=======
L_begin:
  inc cx
  jmp L_begin
jmp L_begin
L_end:

And more complicated:

loop L {
  if (x > 0, CL)
    continue(L)
  !inc cx
}
;=======
L_begin:
  cmp cx, 0
  jg CL_begin
  jmp CL_end
  CL_begin:
    jmp L_begin
  CL_end:
  inc cx
jmp L_begin
L_end:
@vorotynsky vorotynsky added the good first issue Good for newcomers label Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant