Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- absentry inic
- ram equ $1000
- rom equ $4000
- nb equ $10
- sz equ 8
- vreset equ $fffe
- ; contar o numero de 1 em kmo
- ; salvar em nums1
- org ram
- kmo ds.b 1
- aux dc.b 8
- org ram + nb
- nums1 ds.b 1
- org rom
- inic
- ldaa #0
- staa nums1 ; clear nums1
- ldaa aux
- ldab kmo ; A = 8, kmo = valor
- prog rolb
- bcs adiciona ; tinha valor 1
- volta deca ; A--
- bne prog
- bra inic
- adiciona ldaa nums1 ; incremento resposta
- inca
- staa nums1
- bra volta
- ;-------------------------
- org vreset
- reset_ dc.w inic
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement