SHARE
TWEET

CMPN 330 Lab 3A Design Project 1

a guest Feb 21st, 2020 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; 330_lab3_2.asm - Codewarrior -
  2. ; counts the number of 0s in a memory byte and stores it
  3.      XDEF Entry, main
  4.      XREF __SEG_END_SSTACK     ; the end of the stack
  5.  
  6. RAM_Data: SECTION
  7.  
  8.        ORG $1100
  9. T1 dc.b  1,2,4,8
  10.        ORG $1110
  11. T2 dc.b $10,$20,$30,$40
  12.  
  13. Code:     SECTION
  14. main:
  15. Entry:    
  16.     ldab #4
  17.     ldx #T1
  18.     ldy #T2
  19. L1: ldaa 0,x
  20.     adda 0,y
  21.     staa 0,y
  22.     inx
  23.     iny
  24.     decb
  25.     bne L1
  26.     ldab #4
  27.     ldx #T1
  28. L3: ldaa 0,x
  29.     lsla
  30.     lsla
  31.     lsla
  32.     staa 0,x
  33.     inx
  34.     decb
  35.     bne L3
  36. L2: bra L2
  37.    
  38.  
  39. ***** end of file *****
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top