Microprocessor Simulator 0 Help


Counting and Jump Commands



Download 1.18 Mb.
Page25/82
Date18.03.2021
Size1.18 Mb.
#56105
1   ...   21   22   23   24   25   26   27   28   ...   82
sms32v50 (3)
sms32v50 (3), sms32v50 (6)

Counting and Jump Commands


Example - 04incjmp.asm

  1. Rewrite the example program to count backwards using DEC BL.

  2. Rewrite the example program to count in threes using ADD BL,3.

  3. Rewrite the program to count 1 2 4 8 16 using MUL BL,2

  4. Here is a more difficult task. Count 0 1 1 2 3 5 8 13 21 34 55 98 overflow. Here each number is the sum of the previous two. You will need to use two registers and two RAM locations for temporary storage of numbers. If you have never programmed before, this is a real brain teaser. Remember that the result will overflow when it goes above 127.
    This number sequence was first described by Leonardo Fibonacci of Pisa (1170_1230)



Download 1.18 Mb.

Share with your friends:
1   ...   21   22   23   24   25   26   27   28   ...   82




The database is protected by copyright ©ininet.org 2024
send message

    Main page