This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

IF statement in assembly

I'm wondering, Does assembler support if staments? (like a C program) Tried something very simple:

org 0h
sjmp BEGIN

org 50h
BEGIN:
	IF R0 == #45
		MOV A, #54
		CPL A
	ELSE
		MOV A, #45
		CPL A
	ENDIF
END

After building and enter debug mode I found this code seems to be a #ifdef like statement instead of a C like if-then-else statement. Did I do something wrong or the assembler does no support if statement?

Parents
  • It's easy to change de project now, but my teacher will not allow it. I did buy a 32kbytes chip on past week(before start writing the code), but if you are a teacher you must understand that he wants to learn assembly(or he is just being sarcastic hehehe), yesterday I past all day optimizing the code, I did remove a lot of useless staff.

Reply
  • It's easy to change de project now, but my teacher will not allow it. I did buy a 32kbytes chip on past week(before start writing the code), but if you are a teacher you must understand that he wants to learn assembly(or he is just being sarcastic hehehe), yesterday I past all day optimizing the code, I did remove a lot of useless staff.

Children