1 Replies - 1686 Views - Last Post: 25 November 2009 - 12:23 AM

#1 William_Wilson   User is offline

  • lost in compilation
  • member icon

Reputation: 207
  • View blog
  • Posts: 4,812
  • Joined: 23-December 05

If Statement

Posted 24 June 2006 - 09:36 AM

Description: The if does not use the keyword if, but rather labels and equality statements
.MODEL SMALL
.STACK 100H
.DATA
result_msg   DB  'true inside if statement',0

.486
.CODE
INCLUDE io.mac

main    PROC
        .STARTUP

start_go:
    mov Ax,0 ; put 0 into AX register (try changing the value)
    cmp Ax,0 ; compare AX and 0
    jne done ;'jump 'if' not equal

    putStr result_msg ;if they are equal this is displayed
    
done:
        .EXIT

main    ENDP
        END   main


Is This A Good Question/Topic? 0
  • +

Replies To: If Statement

#2 sinlaiyinghaha   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 01-November 09

Re: If Statement

Posted 25 November 2009 - 12:23 AM

thanks a lot~ ^^
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1