org $1000
loop: bsr newline
lea msg,a1
move #sizemsg,d1
bsr strout
bsr charin
cmpi.b #48,d1
beq end
bsr newline
lea msgIn,a1
move #sizeIn,d1
bsr strout
bsr charin
move.b d1,d2
move.b #61,d1
bsr charout
move.b d2,d1
bsr decout
bra loop
end: bsr newline
stop #$2000
newline: clr.l d1
move #0,d0
trap #15
rts
charout: move #6,d0
trap #15
rts
charin: move #5,d0
trap #15
rts
decout: move #3,d0
trap #15
rts
decin: move #4,d0
trap #15
rts
strout: move.b #1,d0
trap #15
rts
strin: move.b #2,d0
trap #15
rts
msg: dc.b 'Show ASCII value, press '0' to quit or other key to continue:'
sizemsg: equ *-msg
msgIn: dc.b 'Input a character:'
sizeIn: equ *-msgIn
end $1000
               (
geocities.com/wonlin)