BBC BASIC for Windows
Programming >> Assembly Language Programming >> Variable value transfer/increment
http://bb4w.conforums.com/index.cgi?board=assembler&action=display&num=1462858749

Variable value transfer/increment
Post by michael on May 10th, 2016, 05:39am

Actually this should go faster if I can send the increased information to the start variable value.
what if I wanted to make the assembler wait until it reached 2 million?
.label -would be the label it would cycle to if less than
cmp register,register
jne label
?
Am I getting close?
Code:
      PRINT "Please wait for increment to 2 million"
      PROCassemble

      bin%=0
      REPEAT
        CALL bin2bcd
      UNTIL bin%=2000000
      PRINT "DONE"
      END
      DEF PROCassemble

      LOCAL P%, L%
      DIM P% 12, L% -1
      [OPT 10
      .bin2bcd
      mov eax,[^bin%]
      inc eax
      mov [^bin%],eax
      ret
      ]
      ENDPROC