;; if a == 0 then b ==1 else b == 2
;;

.org 0
  jmp begin
a: 1
b: 0
.org 100H
begin:
  lda a
;; we don't have jump-if-not-zero 
;; so we jump to "then" instead
  jpz then
else:
  lda #2
  sta b
  jmp exit
then:
  lda #1
  sta b
exit:
  jsr 1001
.end
