



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




; Handle one case label1:. . . jmp continue
; Handle second case label2:. . . jmp continue . . . continue:
cmp ax, bx ; Compare AX and BX jg next1 ; Equivalent to: If ( AX > BX ) goto next jl next2 ; Equivalent to: If ( AX < BX ) goto next
bits BYTE? .CODE . . ; If bit 2 or bit 4 is set, then call task_a ; Assume "bits" is 0D3h 11010011 test bits, 10100y ; If 2 or 4 is set AND 00010100 jz skip1 ; -------- call task_a ; Then call task_a 00010000 skip1: ; Jump taken . . .
; If bits 2 and 4 are clear, then call task_b ; Assume "bits" is 0E9h 11101001 test bits, 10100y ; If 2 and 4 are clear AND 00010100 jnz skip2 ; -------- call task_b ; Then call task_b 00000000 skip2: ; Jump taken
or bx, bx ; Is BX = 0? jz is_zero ; Jump if so
cmp bx, 0 ; Is BX = 0? je is_zero ; Jump if so
or dx, dx ; Is DX sign bit set? js sign_set ; Jump if so
3. Experimental Work