Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; 330_lab3_2.asm - Codewarrior -
- ; counts the number of 0s in a memory byte and stores it
- XDEF Entry, main
- XREF __SEG_END_SSTACK ; the end of the stack
- RAM_Data: SECTION
- ORG $1100
- T1 dc.b 1,2,4,8
- ORG $1110
- T2 dc.b $10,$20,$30,$40
- Code: SECTION
- main:
- Entry:
- ldab #4
- ldx #T1
- ldy #T2
- L1: ldaa 0,x
- adda 0,y
- staa 0,y
- inx
- iny
- decb
- bne L1
- ldab #4
- ldx #T1
- L3: ldaa 0,x
- lsla
- lsla
- lsla
- staa 0,x
- inx
- decb
- bne L3
- L2: bra L2
- ***** end of file *****
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement