TASM: Embedded Loops

我与影子孤独终老i 提交于 2019-12-24 09:29:28

问题


does anybody knows what's the syntax for double looping in TASM? I remember you use cx with push and pop function but I don't remember how.

Thank you very much.


回答1:


Here's how

    mov cx, 02           ; loop twice
    cc:                  ; outer  loop
    push cx              ; store outer cx
    mov cx,03            ; loop thrice
    bb:                  ; inner loop

    ;do stuff

    loop bb
    pop cx               ;get outer cx
    loop cc

that's basically it



来源:https://stackoverflow.com/questions/5849606/tasm-embedded-loops

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!