
;    while ( scr2 < 10 ) {
     cmp    scr2, 10     ; subtract scr2-10 without saving
     jnl    end_while   ; jump out of the while if not less than 10

while_top:

;       Do whatever you need to do
;       including something which modifies rax

     cmp    scr2, 10     ; subtract scr2-10 without saving
     jl     while_top   ; repeat while scr2 < 10
;    }
end_while:

;    It is slightly more efficient to test at the bottom.
;    Jumping back to the original test is fine for most uses.

