Character Counting?

Hi all,
Here is a 86k Motorola ASM program I have written. What it does is
accept keystrokes, echos them to the screen and stores them at memory
position $2400. It also should display the character count. As far
as can tell everything works except the character count isnt
displayed. But I dont get any errors. So I think I have set-up my
traps wrong in the finished section? Any help appreciated!

org $1000
move.l #$7ffe,sp
move.l #string,a6
clr.w d0 * zero the counter
next_key move.b #247,d7
trap #14
cmp.b #cr,d0
beq finished
move.b d0,(a6)+
move.b #248,D7
trap #14
add.w #1,d0 * bump count
bra next_key
finished move.b #228,d7
trap #14
move.w #248,d7 * display count
trap #14
data org $2400
string ds.b 100
cr equ $0d
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!